@purveyors/sdk 0.18.1 → 0.21.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 CHANGED
@@ -2896,7 +2896,7 @@ interface paths {
2896
2896
  patch?: never;
2897
2897
  trace?: never;
2898
2898
  };
2899
- "/v1/inventory/{id}": {
2899
+ "/v1/inventory/manual-batches": {
2900
2900
  parameters: {
2901
2901
  query?: never;
2902
2902
  header?: never;
@@ -2905,29 +2905,32 @@ interface paths {
2905
2905
  };
2906
2906
  get?: never;
2907
2907
  put?: never;
2908
- post?: never;
2909
2908
  /**
2910
- * Delete an owner inventory item
2911
- * @description Delete one of the caller's own inventory rows. Returns 409 if dependent roast profiles or sales exist (no force-cascade). Requires an authenticated session, or an owner-bound API key carrying the exact inventory:write scope.
2909
+ * Atomically create manual inventory lots
2910
+ * @description Create 1–50 owner-private catalog coffees and linked inventory lots in one transaction. Idempotency-Key is the stable batch identity; rowId values are stable item identities. Shared tax and shipping is allocated in exact cents by input order. Requires an authenticated session, or an owner-bound API key carrying the exact inventory:write scope.
2912
2911
  */
2913
- delete: {
2912
+ post: {
2914
2913
  parameters: {
2915
2914
  query?: never;
2916
- header?: never;
2917
- path: {
2918
- id: number;
2915
+ header: {
2916
+ "idempotency-key": string;
2919
2917
  };
2918
+ path?: never;
2920
2919
  cookie?: never;
2921
2920
  };
2922
- requestBody?: never;
2921
+ requestBody?: {
2922
+ content: {
2923
+ "application/json": components["schemas"]["ManualInventoryBatchCreateRequest"];
2924
+ };
2925
+ };
2923
2926
  responses: {
2924
- /** @description The inventory row was deleted */
2925
- 200: {
2927
+ /** @description The durable terminal batch result */
2928
+ 201: {
2926
2929
  headers: {
2927
2930
  [name: string]: unknown;
2928
2931
  };
2929
2932
  content: {
2930
- "application/json": components["schemas"]["InventoryDeleteResponse"];
2933
+ "application/json": components["schemas"]["ManualInventoryBatchResponse"];
2931
2934
  };
2932
2935
  };
2933
2936
  /** @description Invalid query parameter */
@@ -2957,15 +2960,6 @@ interface paths {
2957
2960
  "application/json": components["schemas"]["ErrorResponse"];
2958
2961
  };
2959
2962
  };
2960
- /** @description No such inventory item owned by the caller */
2961
- 404: {
2962
- headers: {
2963
- [name: string]: unknown;
2964
- };
2965
- content: {
2966
- "application/json": components["schemas"]["ErrorResponse"];
2967
- };
2968
- };
2969
2963
  /** @description Write conflict: dependent roast/sales rows exist, or an If-Match precondition failed */
2970
2964
  409: {
2971
2965
  headers: {
@@ -2995,45 +2989,41 @@ interface paths {
2995
2989
  };
2996
2990
  };
2997
2991
  };
2992
+ delete?: never;
2998
2993
  options?: never;
2999
2994
  head?: never;
2995
+ patch?: never;
2996
+ trace?: never;
2997
+ };
2998
+ "/v1/inventory/manual-batches/{batchId}": {
2999
+ parameters: {
3000
+ query?: never;
3001
+ header?: never;
3002
+ path?: never;
3003
+ cookie?: never;
3004
+ };
3000
3005
  /**
3001
- * Update an owner inventory item
3002
- * @description Update fields on one of the caller's own inventory rows. Optional `If-Match: <last_updated>` enables optimistic concurrency (409 on mismatch). Requires an authenticated session, or an owner-bound API key carrying the exact inventory:write scope.
3006
+ * Reconcile a manual inventory batch
3007
+ * @description Return the durable terminal result for a manual inventory batch owned by the caller. Missing and cross-tenant batch IDs return the same 404. Requires an authenticated session, or an owner-bound API key carrying the exact inventory:write scope.
3003
3008
  */
3004
- patch: {
3009
+ get: {
3005
3010
  parameters: {
3006
3011
  query?: never;
3007
- header?: {
3008
- "if-match"?: string;
3009
- };
3012
+ header?: never;
3010
3013
  path: {
3011
- id: number;
3014
+ batchId: string;
3012
3015
  };
3013
3016
  cookie?: never;
3014
3017
  };
3015
- requestBody?: {
3016
- content: {
3017
- "application/json": components["schemas"]["InventoryUpdateRequest"];
3018
- };
3019
- };
3018
+ requestBody?: never;
3020
3019
  responses: {
3021
- /** @description The updated inventory row */
3020
+ /** @description The durable terminal batch result */
3022
3021
  200: {
3023
3022
  headers: {
3024
3023
  [name: string]: unknown;
3025
3024
  };
3026
3025
  content: {
3027
- "application/json": components["schemas"]["InventoryItemResponse"];
3028
- };
3029
- };
3030
- /** @description Invalid query parameter */
3031
- 400: {
3032
- headers: {
3033
- [name: string]: unknown;
3034
- };
3035
- content: {
3036
- "application/json": components["schemas"]["ErrorResponse"];
3026
+ "application/json": components["schemas"]["ManualInventoryBatchResponse"];
3037
3027
  };
3038
3028
  };
3039
3029
  /** @description Authentication required */
@@ -3063,75 +3053,49 @@ interface paths {
3063
3053
  "application/json": components["schemas"]["ErrorResponse"];
3064
3054
  };
3065
3055
  };
3066
- /** @description Write conflict: dependent roast/sales rows exist, or an If-Match precondition failed */
3067
- 409: {
3068
- headers: {
3069
- [name: string]: unknown;
3070
- };
3071
- content: {
3072
- "application/json": components["schemas"]["ErrorResponse"];
3073
- };
3074
- };
3075
- /** @description Per-user mutation throttle exceeded; retry after a short wait */
3076
- 429: {
3077
- headers: {
3078
- [name: string]: unknown;
3079
- };
3080
- content: {
3081
- "application/json": components["schemas"]["ErrorResponse"];
3082
- };
3083
- };
3084
- /** @description Inventory writes are not enabled in this environment */
3085
- 503: {
3086
- headers: {
3087
- [name: string]: unknown;
3088
- };
3089
- content: {
3090
- "application/json": components["schemas"]["ErrorResponse"];
3091
- };
3092
- };
3093
3056
  };
3094
3057
  };
3058
+ put?: never;
3059
+ post?: never;
3060
+ delete?: never;
3061
+ options?: never;
3062
+ head?: never;
3063
+ patch?: never;
3095
3064
  trace?: never;
3096
3065
  };
3097
- "/v1/roasts": {
3066
+ "/v1/inventory/manual-batches/reservations": {
3098
3067
  parameters: {
3099
3068
  query?: never;
3100
3069
  header?: never;
3101
3070
  path?: never;
3102
3071
  cookie?: never;
3103
3072
  };
3073
+ get?: never;
3074
+ put?: never;
3104
3075
  /**
3105
- * List owner roasts
3106
- * @description List the authenticated principal's own roast profiles, most recent first. Requires an authenticated session, or an owner-bound API key carrying the roast:read scope.
3076
+ * Reserve a manual inventory batch
3077
+ * @description Durably accept a stable batch UUID and the complete validated request before inventory mutation starts. After a successful response, clients only need to retain batchId. Requires an authenticated session, or an owner-bound API key carrying the exact inventory:write scope.
3107
3078
  */
3108
- get: {
3079
+ post: {
3109
3080
  parameters: {
3110
- query?: {
3111
- coffee_id?: number;
3112
- roast_id?: number;
3113
- batch_name?: string;
3114
- coffee_name?: string;
3115
- date_start?: string;
3116
- date_end?: string;
3117
- stocked_only?: boolean | null;
3118
- catalog_id?: number;
3119
- limit?: number;
3120
- offset?: number | null;
3121
- };
3081
+ query?: never;
3122
3082
  header?: never;
3123
3083
  path?: never;
3124
3084
  cookie?: never;
3125
3085
  };
3126
- requestBody?: never;
3086
+ requestBody?: {
3087
+ content: {
3088
+ "application/json": components["schemas"]["ManualInventoryBatchReserveRequest"];
3089
+ };
3090
+ };
3127
3091
  responses: {
3128
- /** @description The principal's own roast profiles */
3129
- 200: {
3092
+ /** @description The durable accepted lifecycle */
3093
+ 201: {
3130
3094
  headers: {
3131
3095
  [name: string]: unknown;
3132
3096
  };
3133
3097
  content: {
3134
- "application/json": components["schemas"]["RoastListResponse"];
3098
+ "application/json": components["schemas"]["ManualInventoryBatchLifecycleResponse"];
3135
3099
  };
3136
3100
  };
3137
3101
  /** @description Invalid query parameter */
@@ -3161,44 +3125,72 @@ interface paths {
3161
3125
  "application/json": components["schemas"]["ErrorResponse"];
3162
3126
  };
3163
3127
  };
3128
+ /** @description The batch UUID is already reserved for a different validated request payload */
3129
+ 409: {
3130
+ headers: {
3131
+ [name: string]: unknown;
3132
+ };
3133
+ content: {
3134
+ "application/json": components["schemas"]["ErrorResponse"];
3135
+ };
3136
+ };
3137
+ /** @description Per-user mutation throttle exceeded; retry after a short wait */
3138
+ 429: {
3139
+ headers: {
3140
+ [name: string]: unknown;
3141
+ };
3142
+ content: {
3143
+ "application/json": components["schemas"]["ErrorResponse"];
3144
+ };
3145
+ };
3146
+ /** @description Inventory writes are not enabled in this environment */
3147
+ 503: {
3148
+ headers: {
3149
+ [name: string]: unknown;
3150
+ };
3151
+ content: {
3152
+ "application/json": components["schemas"]["ErrorResponse"];
3153
+ };
3154
+ };
3164
3155
  };
3165
3156
  };
3157
+ delete?: never;
3158
+ options?: never;
3159
+ head?: never;
3160
+ patch?: never;
3161
+ trace?: never;
3162
+ };
3163
+ "/v1/inventory/manual-batches/{batchId}/commit": {
3164
+ parameters: {
3165
+ query?: never;
3166
+ header?: never;
3167
+ path?: never;
3168
+ cookie?: never;
3169
+ };
3170
+ get?: never;
3166
3171
  put?: never;
3167
3172
  /**
3168
- * Create an owner roast
3169
- * @description Create a roast profile owned by the authenticated principal, optionally replacing its temperature curve and event markers atomically. Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
3173
+ * Commit a reserved manual inventory batch
3174
+ * @description Claim and atomically commit the server-owned request for a reserved batch UUID. Concurrent commits serialize through the durable lifecycle; callers may safely retry with no request body.
3170
3175
  */
3171
3176
  post: {
3172
3177
  parameters: {
3173
3178
  query?: never;
3174
- header?: {
3175
- "idempotency-key"?: string;
3179
+ header?: never;
3180
+ path: {
3181
+ batchId: string;
3176
3182
  };
3177
- path?: never;
3178
3183
  cookie?: never;
3179
3184
  };
3180
- requestBody: {
3181
- content: {
3182
- "application/json": components["schemas"]["RoastCreateRequest"];
3183
- };
3184
- };
3185
+ requestBody?: never;
3185
3186
  responses: {
3186
- /** @description The created roast profile */
3187
- 201: {
3188
- headers: {
3189
- [name: string]: unknown;
3190
- };
3191
- content: {
3192
- "application/json": components["schemas"]["RoastDetailResponse"];
3193
- };
3194
- };
3195
- /** @description Invalid query parameter */
3196
- 400: {
3187
+ /** @description The current typed lifecycle, including completed or terminal rejection */
3188
+ 200: {
3197
3189
  headers: {
3198
3190
  [name: string]: unknown;
3199
3191
  };
3200
3192
  content: {
3201
- "application/json": components["schemas"]["ErrorResponse"];
3193
+ "application/json": components["schemas"]["ManualInventoryBatchLifecycleResponse"];
3202
3194
  };
3203
3195
  };
3204
3196
  /** @description Authentication required */
@@ -3219,7 +3211,7 @@ interface paths {
3219
3211
  "application/json": components["schemas"]["ErrorResponse"];
3220
3212
  };
3221
3213
  };
3222
- /** @description No such coffee lot owned by the caller */
3214
+ /** @description No reserved manual inventory batch exists for this owner and batch UUID */
3223
3215
  404: {
3224
3216
  headers: {
3225
3217
  [name: string]: unknown;
@@ -3228,15 +3220,6 @@ interface paths {
3228
3220
  "application/json": components["schemas"]["ErrorResponse"];
3229
3221
  };
3230
3222
  };
3231
- /** @description Write conflict: an If-Match precondition failed */
3232
- 409: {
3233
- headers: {
3234
- [name: string]: unknown;
3235
- };
3236
- content: {
3237
- "application/json": components["schemas"]["ErrorResponse"];
3238
- };
3239
- };
3240
3223
  /** @description Per-user mutation throttle exceeded; retry after a short wait */
3241
3224
  429: {
3242
3225
  headers: {
@@ -3246,7 +3229,7 @@ interface paths {
3246
3229
  "application/json": components["schemas"]["ErrorResponse"];
3247
3230
  };
3248
3231
  };
3249
- /** @description Roast writes are not enabled in this environment */
3232
+ /** @description Inventory writes are not enabled in this environment */
3250
3233
  503: {
3251
3234
  headers: {
3252
3235
  [name: string]: unknown;
@@ -3263,7 +3246,7 @@ interface paths {
3263
3246
  patch?: never;
3264
3247
  trace?: never;
3265
3248
  };
3266
- "/v1/roasts/{id}": {
3249
+ "/v1/inventory/manual-batches/{batchId}/status": {
3267
3250
  parameters: {
3268
3251
  query?: never;
3269
3252
  header?: never;
@@ -3271,39 +3254,27 @@ interface paths {
3271
3254
  cookie?: never;
3272
3255
  };
3273
3256
  /**
3274
- * Get an owner roast
3275
- * @description Fetch one of the authenticated principal's roast profiles by id, optionally with its temperature curve and event markers. Requires an authenticated session, or an owner-bound API key carrying the roast:read scope.
3257
+ * Get manual inventory batch lifecycle
3258
+ * @description Return unknown, accepted, in_progress, completed, or terminal_rejected for an owner-scoped durable reservation. Missing and cross-tenant UUIDs both return the same nonterminal unknown lifecycle so clients retain the UUID while a reservation may still be arriving.
3276
3259
  */
3277
3260
  get: {
3278
3261
  parameters: {
3279
- query?: {
3280
- includeTemps?: boolean | null;
3281
- includeEvents?: boolean | null;
3282
- };
3262
+ query?: never;
3283
3263
  header?: never;
3284
3264
  path: {
3285
- id: string;
3265
+ batchId: string;
3286
3266
  };
3287
3267
  cookie?: never;
3288
3268
  };
3289
3269
  requestBody?: never;
3290
3270
  responses: {
3291
- /** @description The requested roast profile */
3271
+ /** @description The current typed lifecycle */
3292
3272
  200: {
3293
3273
  headers: {
3294
3274
  [name: string]: unknown;
3295
3275
  };
3296
3276
  content: {
3297
- "application/json": components["schemas"]["RoastDetailResponse"];
3298
- };
3299
- };
3300
- /** @description Invalid query parameter */
3301
- 400: {
3302
- headers: {
3303
- [name: string]: unknown;
3304
- };
3305
- content: {
3306
- "application/json": components["schemas"]["ErrorResponse"];
3277
+ "application/json": components["schemas"]["ManualInventoryBatchLifecycleResponse"];
3307
3278
  };
3308
3279
  };
3309
3280
  /** @description Authentication required */
@@ -3324,22 +3295,29 @@ interface paths {
3324
3295
  "application/json": components["schemas"]["ErrorResponse"];
3325
3296
  };
3326
3297
  };
3327
- /** @description No such roast for this principal */
3328
- 404: {
3329
- headers: {
3330
- [name: string]: unknown;
3331
- };
3332
- content: {
3333
- "application/json": components["schemas"]["ErrorResponse"];
3334
- };
3335
- };
3336
3298
  };
3337
3299
  };
3338
3300
  put?: never;
3339
3301
  post?: never;
3302
+ delete?: never;
3303
+ options?: never;
3304
+ head?: never;
3305
+ patch?: never;
3306
+ trace?: never;
3307
+ };
3308
+ "/v1/inventory/{id}": {
3309
+ parameters: {
3310
+ query?: never;
3311
+ header?: never;
3312
+ path?: never;
3313
+ cookie?: never;
3314
+ };
3315
+ get?: never;
3316
+ put?: never;
3317
+ post?: never;
3340
3318
  /**
3341
- * Delete an owner roast
3342
- * @description Delete one of the caller's own roast profiles and its temperature/event rows atomically. Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
3319
+ * Delete an owner inventory item
3320
+ * @description Delete one of the caller's own inventory rows. Returns 409 if dependent roast profiles or sales exist (no force-cascade). Requires an authenticated session, or an owner-bound API key carrying the exact inventory:write scope.
3343
3321
  */
3344
3322
  delete: {
3345
3323
  parameters: {
@@ -3352,13 +3330,13 @@ interface paths {
3352
3330
  };
3353
3331
  requestBody?: never;
3354
3332
  responses: {
3355
- /** @description The roast profile was deleted */
3333
+ /** @description The inventory row was deleted */
3356
3334
  200: {
3357
3335
  headers: {
3358
3336
  [name: string]: unknown;
3359
3337
  };
3360
3338
  content: {
3361
- "application/json": components["schemas"]["RoastDeleteResponse"];
3339
+ "application/json": components["schemas"]["InventoryDeleteResponse"];
3362
3340
  };
3363
3341
  };
3364
3342
  /** @description Invalid query parameter */
@@ -3388,7 +3366,7 @@ interface paths {
3388
3366
  "application/json": components["schemas"]["ErrorResponse"];
3389
3367
  };
3390
3368
  };
3391
- /** @description No such roast profile owned by the caller */
3369
+ /** @description No such inventory item owned by the caller */
3392
3370
  404: {
3393
3371
  headers: {
3394
3372
  [name: string]: unknown;
@@ -3397,6 +3375,15 @@ interface paths {
3397
3375
  "application/json": components["schemas"]["ErrorResponse"];
3398
3376
  };
3399
3377
  };
3378
+ /** @description Write conflict: dependent roast/sales rows exist, or an If-Match precondition failed */
3379
+ 409: {
3380
+ headers: {
3381
+ [name: string]: unknown;
3382
+ };
3383
+ content: {
3384
+ "application/json": components["schemas"]["ErrorResponse"];
3385
+ };
3386
+ };
3400
3387
  /** @description Per-user mutation throttle exceeded; retry after a short wait */
3401
3388
  429: {
3402
3389
  headers: {
@@ -3406,7 +3393,7 @@ interface paths {
3406
3393
  "application/json": components["schemas"]["ErrorResponse"];
3407
3394
  };
3408
3395
  };
3409
- /** @description Roast writes are not enabled in this environment */
3396
+ /** @description Inventory writes are not enabled in this environment */
3410
3397
  503: {
3411
3398
  headers: {
3412
3399
  [name: string]: unknown;
@@ -3420,8 +3407,8 @@ interface paths {
3420
3407
  options?: never;
3421
3408
  head?: never;
3422
3409
  /**
3423
- * Update an owner roast
3424
- * @description Update fields on one of the caller's own roast profiles. Optional `If-Match: <last_updated>` enables optimistic concurrency (409 on mismatch). Supplying temperatures or events replaces that relation atomically. Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
3410
+ * Update an owner inventory item
3411
+ * @description Update fields on one of the caller's own inventory rows. Optional `If-Match: <last_updated>` enables optimistic concurrency (409 on mismatch). Requires an authenticated session, or an owner-bound API key carrying the exact inventory:write scope.
3425
3412
  */
3426
3413
  patch: {
3427
3414
  parameters: {
@@ -3434,19 +3421,19 @@ interface paths {
3434
3421
  };
3435
3422
  cookie?: never;
3436
3423
  };
3437
- requestBody: {
3424
+ requestBody?: {
3438
3425
  content: {
3439
- "application/json": components["schemas"]["RoastUpdateRequest"];
3426
+ "application/json": components["schemas"]["InventoryUpdateRequest"];
3440
3427
  };
3441
3428
  };
3442
3429
  responses: {
3443
- /** @description The updated roast profile */
3430
+ /** @description The updated inventory row */
3444
3431
  200: {
3445
3432
  headers: {
3446
3433
  [name: string]: unknown;
3447
3434
  };
3448
3435
  content: {
3449
- "application/json": components["schemas"]["RoastDetailResponse"];
3436
+ "application/json": components["schemas"]["InventoryItemResponse"];
3450
3437
  };
3451
3438
  };
3452
3439
  /** @description Invalid query parameter */
@@ -3476,7 +3463,7 @@ interface paths {
3476
3463
  "application/json": components["schemas"]["ErrorResponse"];
3477
3464
  };
3478
3465
  };
3479
- /** @description No such roast profile owned by the caller */
3466
+ /** @description No such inventory item owned by the caller */
3480
3467
  404: {
3481
3468
  headers: {
3482
3469
  [name: string]: unknown;
@@ -3485,7 +3472,7 @@ interface paths {
3485
3472
  "application/json": components["schemas"]["ErrorResponse"];
3486
3473
  };
3487
3474
  };
3488
- /** @description Write conflict: an If-Match precondition failed */
3475
+ /** @description Write conflict: dependent roast/sales rows exist, or an If-Match precondition failed */
3489
3476
  409: {
3490
3477
  headers: {
3491
3478
  [name: string]: unknown;
@@ -3503,7 +3490,7 @@ interface paths {
3503
3490
  "application/json": components["schemas"]["ErrorResponse"];
3504
3491
  };
3505
3492
  };
3506
- /** @description Roast writes are not enabled in this environment */
3493
+ /** @description Inventory writes are not enabled in this environment */
3507
3494
  503: {
3508
3495
  headers: {
3509
3496
  [name: string]: unknown;
@@ -3516,18 +3503,79 @@ interface paths {
3516
3503
  };
3517
3504
  trace?: never;
3518
3505
  };
3519
- "/v1/roasts/imports": {
3506
+ "/v1/roasts": {
3520
3507
  parameters: {
3521
3508
  query?: never;
3522
3509
  header?: never;
3523
3510
  path?: never;
3524
3511
  cookie?: never;
3525
3512
  };
3526
- get?: never;
3513
+ /**
3514
+ * List owner roasts
3515
+ * @description List the authenticated principal's own roast profiles, most recent first. Requires an authenticated session, or an owner-bound API key carrying the roast:read scope.
3516
+ */
3517
+ get: {
3518
+ parameters: {
3519
+ query?: {
3520
+ coffee_id?: number;
3521
+ roast_id?: number;
3522
+ batch_name?: string;
3523
+ coffee_name?: string;
3524
+ date_start?: string;
3525
+ date_end?: string;
3526
+ stocked_only?: boolean | null;
3527
+ catalog_id?: number;
3528
+ limit?: number;
3529
+ offset?: number | null;
3530
+ };
3531
+ header?: never;
3532
+ path?: never;
3533
+ cookie?: never;
3534
+ };
3535
+ requestBody?: never;
3536
+ responses: {
3537
+ /** @description The principal's own roast profiles */
3538
+ 200: {
3539
+ headers: {
3540
+ [name: string]: unknown;
3541
+ };
3542
+ content: {
3543
+ "application/json": components["schemas"]["RoastListResponse"];
3544
+ };
3545
+ };
3546
+ /** @description Invalid query parameter */
3547
+ 400: {
3548
+ headers: {
3549
+ [name: string]: unknown;
3550
+ };
3551
+ content: {
3552
+ "application/json": components["schemas"]["ErrorResponse"];
3553
+ };
3554
+ };
3555
+ /** @description Authentication required */
3556
+ 401: {
3557
+ headers: {
3558
+ [name: string]: unknown;
3559
+ };
3560
+ content: {
3561
+ "application/json": components["schemas"]["ErrorResponse"];
3562
+ };
3563
+ };
3564
+ /** @description Insufficient entitlement (plan or role) */
3565
+ 403: {
3566
+ headers: {
3567
+ [name: string]: unknown;
3568
+ };
3569
+ content: {
3570
+ "application/json": components["schemas"]["ErrorResponse"];
3571
+ };
3572
+ };
3573
+ };
3574
+ };
3527
3575
  put?: never;
3528
3576
  /**
3529
- * Create a roast from an Artisan file
3530
- * @description Parse an Artisan `.alog` file, create a roast profile owned by the caller against one of their green-coffee lots, and persist the imported temperature curve, event markers, and an artisan_import_log entry atomically. Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
3577
+ * Create an owner roast
3578
+ * @description Create a roast profile owned by the authenticated principal, optionally replacing its temperature curve and event markers atomically. Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
3531
3579
  */
3532
3580
  post: {
3533
3581
  parameters: {
@@ -3540,17 +3588,17 @@ interface paths {
3540
3588
  };
3541
3589
  requestBody: {
3542
3590
  content: {
3543
- "application/json": components["schemas"]["RoastImportCreateRequest"];
3591
+ "application/json": components["schemas"]["RoastCreateRequest"];
3544
3592
  };
3545
3593
  };
3546
3594
  responses: {
3547
- /** @description The created roast profile plus import summary */
3595
+ /** @description The created roast profile */
3548
3596
  201: {
3549
3597
  headers: {
3550
3598
  [name: string]: unknown;
3551
3599
  };
3552
3600
  content: {
3553
- "application/json": components["schemas"]["RoastImportResponse"];
3601
+ "application/json": components["schemas"]["RoastDetailResponse"];
3554
3602
  };
3555
3603
  };
3556
3604
  /** @description Invalid query parameter */
@@ -3624,42 +3672,38 @@ interface paths {
3624
3672
  patch?: never;
3625
3673
  trace?: never;
3626
3674
  };
3627
- "/v1/roasts/{id}/artisan-import": {
3675
+ "/v1/roasts/{id}": {
3628
3676
  parameters: {
3629
3677
  query?: never;
3630
3678
  header?: never;
3631
3679
  path?: never;
3632
3680
  cookie?: never;
3633
3681
  };
3634
- get?: never;
3635
3682
  /**
3636
- * Replace a roast's Artisan import
3637
- * @description Re-derive one of the caller's existing roasts from an Artisan `.alog` file: replace its temperature curve, event markers, milestones, chart bounds, and computed metrics, and write an artisan_import_log entry atomically. The roast's identity (coffee, batch name, roast date, weights, and user notes) is preserved. Optional `If-Match: <last_updated>` enables optimistic concurrency (409 on mismatch). Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
3683
+ * Get an owner roast
3684
+ * @description Fetch one of the authenticated principal's roast profiles by id, optionally with its temperature curve and event markers. Requires an authenticated session, or an owner-bound API key carrying the roast:read scope.
3638
3685
  */
3639
- put: {
3686
+ get: {
3640
3687
  parameters: {
3641
- query?: never;
3642
- header?: {
3643
- "if-match"?: string;
3688
+ query?: {
3689
+ includeTemps?: boolean | null;
3690
+ includeEvents?: boolean | null;
3644
3691
  };
3692
+ header?: never;
3645
3693
  path: {
3646
- id: number;
3694
+ id: string;
3647
3695
  };
3648
3696
  cookie?: never;
3649
3697
  };
3650
- requestBody: {
3651
- content: {
3652
- "application/json": components["schemas"]["RoastArtisanImportReplaceRequest"];
3653
- };
3654
- };
3698
+ requestBody?: never;
3655
3699
  responses: {
3656
- /** @description The updated roast profile plus import summary */
3700
+ /** @description The requested roast profile */
3657
3701
  200: {
3658
3702
  headers: {
3659
3703
  [name: string]: unknown;
3660
3704
  };
3661
3705
  content: {
3662
- "application/json": components["schemas"]["RoastImportResponse"];
3706
+ "application/json": components["schemas"]["RoastDetailResponse"];
3663
3707
  };
3664
3708
  };
3665
3709
  /** @description Invalid query parameter */
@@ -3689,7 +3733,7 @@ interface paths {
3689
3733
  "application/json": components["schemas"]["ErrorResponse"];
3690
3734
  };
3691
3735
  };
3692
- /** @description No such roast profile owned by the caller */
3736
+ /** @description No such roast for this principal */
3693
3737
  404: {
3694
3738
  headers: {
3695
3739
  [name: string]: unknown;
@@ -3698,39 +3742,13 @@ interface paths {
3698
3742
  "application/json": components["schemas"]["ErrorResponse"];
3699
3743
  };
3700
3744
  };
3701
- /** @description Write conflict: an If-Match precondition failed */
3702
- 409: {
3703
- headers: {
3704
- [name: string]: unknown;
3705
- };
3706
- content: {
3707
- "application/json": components["schemas"]["ErrorResponse"];
3708
- };
3709
- };
3710
- /** @description Per-user mutation throttle exceeded; retry after a short wait */
3711
- 429: {
3712
- headers: {
3713
- [name: string]: unknown;
3714
- };
3715
- content: {
3716
- "application/json": components["schemas"]["ErrorResponse"];
3717
- };
3718
- };
3719
- /** @description Roast writes are not enabled in this environment */
3720
- 503: {
3721
- headers: {
3722
- [name: string]: unknown;
3723
- };
3724
- content: {
3725
- "application/json": components["schemas"]["ErrorResponse"];
3726
- };
3727
- };
3728
3745
  };
3729
3746
  };
3747
+ put?: never;
3730
3748
  post?: never;
3731
3749
  /**
3732
- * Clear a roast's Artisan import
3733
- * @description Remove import-derived temperature samples, event markers, and artisan_import_log rows from one of the caller's existing roasts without deleting the roast profile. Import-derived profile metrics are reset to manual/null values. Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
3750
+ * Delete an owner roast
3751
+ * @description Delete one of the caller's own roast profiles and its temperature/event rows atomically. Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
3734
3752
  */
3735
3753
  delete: {
3736
3754
  parameters: {
@@ -3743,13 +3761,22 @@ interface paths {
3743
3761
  };
3744
3762
  requestBody?: never;
3745
3763
  responses: {
3746
- /** @description The cleared roast id plus deleted row counts */
3764
+ /** @description The roast profile was deleted */
3747
3765
  200: {
3748
3766
  headers: {
3749
3767
  [name: string]: unknown;
3750
3768
  };
3751
3769
  content: {
3752
- "application/json": components["schemas"]["RoastArtisanImportClearResponse"];
3770
+ "application/json": components["schemas"]["RoastDeleteResponse"];
3771
+ };
3772
+ };
3773
+ /** @description Invalid query parameter */
3774
+ 400: {
3775
+ headers: {
3776
+ [name: string]: unknown;
3777
+ };
3778
+ content: {
3779
+ "application/json": components["schemas"]["ErrorResponse"];
3753
3780
  };
3754
3781
  };
3755
3782
  /** @description Authentication required */
@@ -3801,45 +3828,37 @@ interface paths {
3801
3828
  };
3802
3829
  options?: never;
3803
3830
  head?: never;
3804
- patch?: never;
3805
- trace?: never;
3806
- };
3807
- "/v1/roasts/classify": {
3808
- parameters: {
3809
- query?: never;
3810
- header?: never;
3811
- path?: never;
3812
- cookie?: never;
3813
- };
3814
- get?: never;
3815
- put?: never;
3816
3831
  /**
3817
- * Classify an imported roast
3818
- * @description Match Artisan roast metadata to one of the supplied owner inventory rows. Requires member entitlement and either an authenticated session or an owner-bound API key carrying the exact roast:read scope.
3832
+ * Update an owner roast
3833
+ * @description Update fields on one of the caller's own roast profiles. Optional `If-Match: <last_updated>` enables optimistic concurrency (409 on mismatch). Supplying temperatures or events replaces that relation atomically. Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
3819
3834
  */
3820
- post: {
3835
+ patch: {
3821
3836
  parameters: {
3822
3837
  query?: never;
3823
- header?: never;
3824
- path?: never;
3838
+ header?: {
3839
+ "if-match"?: string;
3840
+ };
3841
+ path: {
3842
+ id: number;
3843
+ };
3825
3844
  cookie?: never;
3826
3845
  };
3827
3846
  requestBody: {
3828
3847
  content: {
3829
- "application/json": components["schemas"]["RoastClassificationRequest"];
3848
+ "application/json": components["schemas"]["RoastUpdateRequest"];
3830
3849
  };
3831
3850
  };
3832
3851
  responses: {
3833
- /** @description Best inventory match, or null when no reasonable match exists */
3852
+ /** @description The updated roast profile */
3834
3853
  200: {
3835
3854
  headers: {
3836
3855
  [name: string]: unknown;
3837
3856
  };
3838
3857
  content: {
3839
- "application/json": components["schemas"]["RoastClassificationResponse"];
3858
+ "application/json": components["schemas"]["RoastDetailResponse"];
3840
3859
  };
3841
3860
  };
3842
- /** @description Invalid request body or input cap exceeded */
3861
+ /** @description Invalid query parameter */
3843
3862
  400: {
3844
3863
  headers: {
3845
3864
  [name: string]: unknown;
@@ -3866,7 +3885,25 @@ interface paths {
3866
3885
  "application/json": components["schemas"]["ErrorResponse"];
3867
3886
  };
3868
3887
  };
3869
- /** @description API or upstream classification rate limit exceeded */
3888
+ /** @description No such roast profile owned by the caller */
3889
+ 404: {
3890
+ headers: {
3891
+ [name: string]: unknown;
3892
+ };
3893
+ content: {
3894
+ "application/json": components["schemas"]["ErrorResponse"];
3895
+ };
3896
+ };
3897
+ /** @description Write conflict: an If-Match precondition failed */
3898
+ 409: {
3899
+ headers: {
3900
+ [name: string]: unknown;
3901
+ };
3902
+ content: {
3903
+ "application/json": components["schemas"]["ErrorResponse"];
3904
+ };
3905
+ };
3906
+ /** @description Per-user mutation throttle exceeded; retry after a short wait */
3870
3907
  429: {
3871
3908
  headers: {
3872
3909
  [name: string]: unknown;
@@ -3875,7 +3912,7 @@ interface paths {
3875
3912
  "application/json": components["schemas"]["ErrorResponse"];
3876
3913
  };
3877
3914
  };
3878
- /** @description Classification provider is unavailable or not configured */
3915
+ /** @description Roast writes are not enabled in this environment */
3879
3916
  503: {
3880
3917
  headers: {
3881
3918
  [name: string]: unknown;
@@ -3886,83 +3923,22 @@ interface paths {
3886
3923
  };
3887
3924
  };
3888
3925
  };
3889
- delete?: never;
3890
- options?: never;
3891
- head?: never;
3892
- patch?: never;
3893
3926
  trace?: never;
3894
3927
  };
3895
- "/v1/sales": {
3928
+ "/v1/roasts/imports": {
3896
3929
  parameters: {
3897
3930
  query?: never;
3898
3931
  header?: never;
3899
3932
  path?: never;
3900
3933
  cookie?: never;
3901
3934
  };
3935
+ get?: never;
3936
+ put?: never;
3902
3937
  /**
3903
- * List owner sales
3904
- * @description List the authenticated principal's own sales, most recent first. Requires an authenticated session, or an owner-bound API key carrying the sales:read scope.
3938
+ * Create a roast from an Artisan file
3939
+ * @description Parse an Artisan `.alog` file, create a roast profile owned by the caller against one of their green-coffee lots, and persist the imported temperature curve, event markers, and an artisan_import_log entry atomically. Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
3905
3940
  */
3906
- get: {
3907
- parameters: {
3908
- query?: {
3909
- green_coffee_inv_id?: number;
3910
- date_start?: string;
3911
- date_end?: string;
3912
- buyer?: string;
3913
- limit?: number;
3914
- offset?: number | null;
3915
- };
3916
- header?: never;
3917
- path?: never;
3918
- cookie?: never;
3919
- };
3920
- requestBody?: never;
3921
- responses: {
3922
- /** @description The principal's own sales */
3923
- 200: {
3924
- headers: {
3925
- [name: string]: unknown;
3926
- };
3927
- content: {
3928
- "application/json": components["schemas"]["SalesListResponse"];
3929
- };
3930
- };
3931
- /** @description Invalid query parameter */
3932
- 400: {
3933
- headers: {
3934
- [name: string]: unknown;
3935
- };
3936
- content: {
3937
- "application/json": components["schemas"]["ErrorResponse"];
3938
- };
3939
- };
3940
- /** @description Authentication required */
3941
- 401: {
3942
- headers: {
3943
- [name: string]: unknown;
3944
- };
3945
- content: {
3946
- "application/json": components["schemas"]["ErrorResponse"];
3947
- };
3948
- };
3949
- /** @description Insufficient entitlement (plan or role) */
3950
- 403: {
3951
- headers: {
3952
- [name: string]: unknown;
3953
- };
3954
- content: {
3955
- "application/json": components["schemas"]["ErrorResponse"];
3956
- };
3957
- };
3958
- };
3959
- };
3960
- put?: never;
3961
- /**
3962
- * Record an owner sale
3963
- * @description Record a sale against one of the caller's own green-coffee inventory lots. Requires an authenticated session, or an owner-bound API key carrying the exact sales:write scope.
3964
- */
3965
- post: {
3941
+ post: {
3966
3942
  parameters: {
3967
3943
  query?: never;
3968
3944
  header?: {
@@ -3971,19 +3947,19 @@ interface paths {
3971
3947
  path?: never;
3972
3948
  cookie?: never;
3973
3949
  };
3974
- requestBody?: {
3950
+ requestBody: {
3975
3951
  content: {
3976
- "application/json": components["schemas"]["SalesCreateRequest"];
3952
+ "application/json": components["schemas"]["RoastImportCreateRequest"];
3977
3953
  };
3978
3954
  };
3979
3955
  responses: {
3980
- /** @description The created sale */
3956
+ /** @description The created roast profile plus import summary */
3981
3957
  201: {
3982
3958
  headers: {
3983
3959
  [name: string]: unknown;
3984
3960
  };
3985
3961
  content: {
3986
- "application/json": components["schemas"]["SaleItemResponse"];
3962
+ "application/json": components["schemas"]["RoastImportResponse"];
3987
3963
  };
3988
3964
  };
3989
3965
  /** @description Invalid query parameter */
@@ -4013,7 +3989,16 @@ interface paths {
4013
3989
  "application/json": components["schemas"]["ErrorResponse"];
4014
3990
  };
4015
3991
  };
4016
- /** @description Write conflict: a request with this Idempotency-Key is already in flight */
3992
+ /** @description No such coffee lot owned by the caller */
3993
+ 404: {
3994
+ headers: {
3995
+ [name: string]: unknown;
3996
+ };
3997
+ content: {
3998
+ "application/json": components["schemas"]["ErrorResponse"];
3999
+ };
4000
+ };
4001
+ /** @description Write conflict: an If-Match precondition failed */
4017
4002
  409: {
4018
4003
  headers: {
4019
4004
  [name: string]: unknown;
@@ -4031,7 +4016,7 @@ interface paths {
4031
4016
  "application/json": components["schemas"]["ErrorResponse"];
4032
4017
  };
4033
4018
  };
4034
- /** @description Sales writes are not enabled in this environment */
4019
+ /** @description Roast writes are not enabled in this environment */
4035
4020
  503: {
4036
4021
  headers: {
4037
4022
  [name: string]: unknown;
@@ -4048,7 +4033,7 @@ interface paths {
4048
4033
  patch?: never;
4049
4034
  trace?: never;
4050
4035
  };
4051
- "/v1/sales/{id}": {
4036
+ "/v1/roasts/{id}/artisan-import": {
4052
4037
  parameters: {
4053
4038
  query?: never;
4054
4039
  header?: never;
@@ -4056,30 +4041,34 @@ interface paths {
4056
4041
  cookie?: never;
4057
4042
  };
4058
4043
  get?: never;
4059
- put?: never;
4060
- post?: never;
4061
4044
  /**
4062
- * Delete an owner sale
4063
- * @description Delete one of the caller's own sales. Requires an authenticated session, or an owner-bound API key carrying the exact sales:write scope.
4045
+ * Replace a roast's Artisan import
4046
+ * @description Re-derive one of the caller's existing roasts from an Artisan `.alog` file: replace its temperature curve, event markers, milestones, chart bounds, and computed metrics, and write an artisan_import_log entry atomically. The roast's identity (coffee, batch name, roast date, weights, and user notes) is preserved. Optional `If-Match: <last_updated>` enables optimistic concurrency (409 on mismatch). Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
4064
4047
  */
4065
- delete: {
4048
+ put: {
4066
4049
  parameters: {
4067
4050
  query?: never;
4068
- header?: never;
4051
+ header?: {
4052
+ "if-match"?: string;
4053
+ };
4069
4054
  path: {
4070
4055
  id: number;
4071
4056
  };
4072
4057
  cookie?: never;
4073
4058
  };
4074
- requestBody?: never;
4059
+ requestBody: {
4060
+ content: {
4061
+ "application/json": components["schemas"]["RoastArtisanImportReplaceRequest"];
4062
+ };
4063
+ };
4075
4064
  responses: {
4076
- /** @description The sale was deleted */
4065
+ /** @description The updated roast profile plus import summary */
4077
4066
  200: {
4078
4067
  headers: {
4079
4068
  [name: string]: unknown;
4080
4069
  };
4081
4070
  content: {
4082
- "application/json": components["schemas"]["SaleDeleteResponse"];
4071
+ "application/json": components["schemas"]["RoastImportResponse"];
4083
4072
  };
4084
4073
  };
4085
4074
  /** @description Invalid query parameter */
@@ -4109,7 +4098,7 @@ interface paths {
4109
4098
  "application/json": components["schemas"]["ErrorResponse"];
4110
4099
  };
4111
4100
  };
4112
- /** @description No such sale owned by the caller */
4101
+ /** @description No such roast profile owned by the caller */
4113
4102
  404: {
4114
4103
  headers: {
4115
4104
  [name: string]: unknown;
@@ -4118,6 +4107,15 @@ interface paths {
4118
4107
  "application/json": components["schemas"]["ErrorResponse"];
4119
4108
  };
4120
4109
  };
4110
+ /** @description Write conflict: an If-Match precondition failed */
4111
+ 409: {
4112
+ headers: {
4113
+ [name: string]: unknown;
4114
+ };
4115
+ content: {
4116
+ "application/json": components["schemas"]["ErrorResponse"];
4117
+ };
4118
+ };
4121
4119
  /** @description Per-user mutation throttle exceeded; retry after a short wait */
4122
4120
  429: {
4123
4121
  headers: {
@@ -4127,7 +4125,7 @@ interface paths {
4127
4125
  "application/json": components["schemas"]["ErrorResponse"];
4128
4126
  };
4129
4127
  };
4130
- /** @description Sales writes are not enabled in this environment */
4128
+ /** @description Roast writes are not enabled in this environment */
4131
4129
  503: {
4132
4130
  headers: {
4133
4131
  [name: string]: unknown;
@@ -4138,13 +4136,12 @@ interface paths {
4138
4136
  };
4139
4137
  };
4140
4138
  };
4141
- options?: never;
4142
- head?: never;
4139
+ post?: never;
4143
4140
  /**
4144
- * Update an owner sale
4145
- * @description Update fields on one of the caller's own sales. The sales table carries no last_updated column, so no If-Match optimistic concurrency is offered. Requires an authenticated session, or an owner-bound API key carrying the exact sales:write scope.
4141
+ * Clear a roast's Artisan import
4142
+ * @description Remove import-derived temperature samples, event markers, and artisan_import_log rows from one of the caller's existing roasts without deleting the roast profile. Import-derived profile metrics are reset to manual/null values. Requires an authenticated session, or an owner-bound API key carrying the exact roast:write scope.
4146
4143
  */
4147
- patch: {
4144
+ delete: {
4148
4145
  parameters: {
4149
4146
  query?: never;
4150
4147
  header?: never;
@@ -4153,28 +4150,15 @@ interface paths {
4153
4150
  };
4154
4151
  cookie?: never;
4155
4152
  };
4156
- requestBody?: {
4157
- content: {
4158
- "application/json": components["schemas"]["SalesUpdateRequest"];
4159
- };
4160
- };
4153
+ requestBody?: never;
4161
4154
  responses: {
4162
- /** @description The updated sale */
4155
+ /** @description The cleared roast id plus deleted row counts */
4163
4156
  200: {
4164
4157
  headers: {
4165
4158
  [name: string]: unknown;
4166
4159
  };
4167
4160
  content: {
4168
- "application/json": components["schemas"]["SaleItemResponse"];
4169
- };
4170
- };
4171
- /** @description Invalid query parameter */
4172
- 400: {
4173
- headers: {
4174
- [name: string]: unknown;
4175
- };
4176
- content: {
4177
- "application/json": components["schemas"]["ErrorResponse"];
4161
+ "application/json": components["schemas"]["RoastArtisanImportClearResponse"];
4178
4162
  };
4179
4163
  };
4180
4164
  /** @description Authentication required */
@@ -4195,7 +4179,7 @@ interface paths {
4195
4179
  "application/json": components["schemas"]["ErrorResponse"];
4196
4180
  };
4197
4181
  };
4198
- /** @description No such sale owned by the caller */
4182
+ /** @description No such roast profile owned by the caller */
4199
4183
  404: {
4200
4184
  headers: {
4201
4185
  [name: string]: unknown;
@@ -4213,7 +4197,7 @@ interface paths {
4213
4197
  "application/json": components["schemas"]["ErrorResponse"];
4214
4198
  };
4215
4199
  };
4216
- /** @description Sales writes are not enabled in this environment */
4200
+ /** @description Roast writes are not enabled in this environment */
4217
4201
  503: {
4218
4202
  headers: {
4219
4203
  [name: string]: unknown;
@@ -4224,42 +4208,47 @@ interface paths {
4224
4208
  };
4225
4209
  };
4226
4210
  };
4211
+ options?: never;
4212
+ head?: never;
4213
+ patch?: never;
4227
4214
  trace?: never;
4228
4215
  };
4229
- "/v1/tasting/{catalogId}": {
4216
+ "/v1/roasts/classify": {
4230
4217
  parameters: {
4231
4218
  query?: never;
4232
4219
  header?: never;
4233
4220
  path?: never;
4234
4221
  cookie?: never;
4235
4222
  };
4223
+ get?: never;
4224
+ put?: never;
4236
4225
  /**
4237
- * Get owner tasting notes for a catalog coffee
4238
- * @description Fetch supplier tasting notes from the catalog plus the authenticated principal's own latest inventory tasting notes for a catalog coffee id. Requires an authenticated session, or an owner-bound API key carrying the tasting:read scope.
4226
+ * Classify an imported roast
4227
+ * @description Match Artisan roast metadata to one of the supplied owner inventory rows. Requires member entitlement and either an authenticated session or an owner-bound API key carrying the exact roast:read scope.
4239
4228
  */
4240
- get: {
4229
+ post: {
4241
4230
  parameters: {
4242
- query?: {
4243
- filter?: "user" | "supplier" | "both";
4244
- };
4231
+ query?: never;
4245
4232
  header?: never;
4246
- path: {
4247
- catalogId: string;
4248
- };
4233
+ path?: never;
4249
4234
  cookie?: never;
4250
4235
  };
4251
- requestBody?: never;
4236
+ requestBody: {
4237
+ content: {
4238
+ "application/json": components["schemas"]["RoastClassificationRequest"];
4239
+ };
4240
+ };
4252
4241
  responses: {
4253
- /** @description Tasting notes for the requested catalog coffee */
4242
+ /** @description Best inventory match, or null when no reasonable match exists */
4254
4243
  200: {
4255
4244
  headers: {
4256
4245
  [name: string]: unknown;
4257
4246
  };
4258
4247
  content: {
4259
- "application/json": components["schemas"]["TastingResponse"];
4248
+ "application/json": components["schemas"]["RoastClassificationResponse"];
4260
4249
  };
4261
4250
  };
4262
- /** @description Invalid query parameter */
4251
+ /** @description Invalid request body or input cap exceeded */
4263
4252
  400: {
4264
4253
  headers: {
4265
4254
  [name: string]: unknown;
@@ -4286,8 +4275,17 @@ interface paths {
4286
4275
  "application/json": components["schemas"]["ErrorResponse"];
4287
4276
  };
4288
4277
  };
4289
- /** @description No such catalog coffee */
4290
- 404: {
4278
+ /** @description API or upstream classification rate limit exceeded */
4279
+ 429: {
4280
+ headers: {
4281
+ [name: string]: unknown;
4282
+ };
4283
+ content: {
4284
+ "application/json": components["schemas"]["ErrorResponse"];
4285
+ };
4286
+ };
4287
+ /** @description Classification provider is unavailable or not configured */
4288
+ 503: {
4291
4289
  headers: {
4292
4290
  [name: string]: unknown;
4293
4291
  };
@@ -4297,51 +4295,49 @@ interface paths {
4297
4295
  };
4298
4296
  };
4299
4297
  };
4300
- put?: never;
4301
- post?: never;
4302
4298
  delete?: never;
4303
4299
  options?: never;
4304
4300
  head?: never;
4305
4301
  patch?: never;
4306
4302
  trace?: never;
4307
4303
  };
4308
- "/v1/tasting/inventory/{inventoryId}": {
4304
+ "/v1/sales": {
4309
4305
  parameters: {
4310
4306
  query?: never;
4311
4307
  header?: never;
4312
4308
  path?: never;
4313
4309
  cookie?: never;
4314
4310
  };
4315
- get?: never;
4316
4311
  /**
4317
- * Rate an owned inventory lot
4318
- * @description Atomically replace the caller's cupping notes for one owned green-coffee inventory lot. Session members write through RLS; owner-bound API keys require the exact tasting:write scope.
4312
+ * List owner sales
4313
+ * @description List the authenticated principal's own sales, most recent first. Requires an authenticated session, or an owner-bound API key carrying the sales:read scope.
4319
4314
  */
4320
- put: {
4315
+ get: {
4321
4316
  parameters: {
4322
- query?: never;
4323
- header?: never;
4324
- path: {
4325
- inventoryId: number;
4317
+ query?: {
4318
+ green_coffee_inv_id?: number;
4319
+ date_start?: string;
4320
+ date_end?: string;
4321
+ buyer?: string;
4322
+ limit?: number;
4323
+ offset?: number | null;
4326
4324
  };
4325
+ header?: never;
4326
+ path?: never;
4327
4327
  cookie?: never;
4328
4328
  };
4329
- requestBody: {
4330
- content: {
4331
- "application/json": components["schemas"]["TastingRateRequest"];
4332
- };
4333
- };
4329
+ requestBody?: never;
4334
4330
  responses: {
4335
- /** @description Canonical inventory tasting */
4331
+ /** @description The principal's own sales */
4336
4332
  200: {
4337
4333
  headers: {
4338
4334
  [name: string]: unknown;
4339
4335
  };
4340
4336
  content: {
4341
- "application/json": components["schemas"]["TastingRateResponse"];
4337
+ "application/json": components["schemas"]["SalesListResponse"];
4342
4338
  };
4343
4339
  };
4344
- /** @description Invalid rating */
4340
+ /** @description Invalid query parameter */
4345
4341
  400: {
4346
4342
  headers: {
4347
4343
  [name: string]: unknown;
@@ -4368,13 +4364,495 @@ interface paths {
4368
4364
  "application/json": components["schemas"]["ErrorResponse"];
4369
4365
  };
4370
4366
  };
4371
- /** @description Inventory tasting not found */
4372
- 404: {
4367
+ };
4368
+ };
4369
+ put?: never;
4370
+ /**
4371
+ * Record an owner sale
4372
+ * @description Record a sale against one of the caller's own green-coffee inventory lots. Requires an authenticated session, or an owner-bound API key carrying the exact sales:write scope.
4373
+ */
4374
+ post: {
4375
+ parameters: {
4376
+ query?: never;
4377
+ header?: {
4378
+ "idempotency-key"?: string;
4379
+ };
4380
+ path?: never;
4381
+ cookie?: never;
4382
+ };
4383
+ requestBody?: {
4384
+ content: {
4385
+ "application/json": components["schemas"]["SalesCreateRequest"];
4386
+ };
4387
+ };
4388
+ responses: {
4389
+ /** @description The created sale */
4390
+ 201: {
4373
4391
  headers: {
4374
4392
  [name: string]: unknown;
4375
4393
  };
4376
4394
  content: {
4377
- "application/json": components["schemas"]["ErrorResponse"];
4395
+ "application/json": components["schemas"]["SaleItemResponse"];
4396
+ };
4397
+ };
4398
+ /** @description Invalid query parameter */
4399
+ 400: {
4400
+ headers: {
4401
+ [name: string]: unknown;
4402
+ };
4403
+ content: {
4404
+ "application/json": components["schemas"]["ErrorResponse"];
4405
+ };
4406
+ };
4407
+ /** @description Authentication required */
4408
+ 401: {
4409
+ headers: {
4410
+ [name: string]: unknown;
4411
+ };
4412
+ content: {
4413
+ "application/json": components["schemas"]["ErrorResponse"];
4414
+ };
4415
+ };
4416
+ /** @description Insufficient entitlement (plan or role) */
4417
+ 403: {
4418
+ headers: {
4419
+ [name: string]: unknown;
4420
+ };
4421
+ content: {
4422
+ "application/json": components["schemas"]["ErrorResponse"];
4423
+ };
4424
+ };
4425
+ /** @description Write conflict: a request with this Idempotency-Key is already in flight */
4426
+ 409: {
4427
+ headers: {
4428
+ [name: string]: unknown;
4429
+ };
4430
+ content: {
4431
+ "application/json": components["schemas"]["ErrorResponse"];
4432
+ };
4433
+ };
4434
+ /** @description Per-user mutation throttle exceeded; retry after a short wait */
4435
+ 429: {
4436
+ headers: {
4437
+ [name: string]: unknown;
4438
+ };
4439
+ content: {
4440
+ "application/json": components["schemas"]["ErrorResponse"];
4441
+ };
4442
+ };
4443
+ /** @description Sales writes are not enabled in this environment */
4444
+ 503: {
4445
+ headers: {
4446
+ [name: string]: unknown;
4447
+ };
4448
+ content: {
4449
+ "application/json": components["schemas"]["ErrorResponse"];
4450
+ };
4451
+ };
4452
+ };
4453
+ };
4454
+ delete?: never;
4455
+ options?: never;
4456
+ head?: never;
4457
+ patch?: never;
4458
+ trace?: never;
4459
+ };
4460
+ "/v1/profit": {
4461
+ parameters: {
4462
+ query?: never;
4463
+ header?: never;
4464
+ path?: never;
4465
+ cookie?: never;
4466
+ };
4467
+ /**
4468
+ * List owner profit summaries
4469
+ * @description Return one canonical profit summary per owner inventory lot, combining acquisition cost, sales revenue, roasted input/output, and catalog classification. Session principals read their own data. Owner-bound API keys require inventory:read, roast:read, and sales:read.
4470
+ */
4471
+ get: {
4472
+ parameters: {
4473
+ query?: {
4474
+ limit?: number;
4475
+ offset?: number | null;
4476
+ };
4477
+ header?: never;
4478
+ path?: never;
4479
+ cookie?: never;
4480
+ };
4481
+ requestBody?: never;
4482
+ responses: {
4483
+ /** @description The principal's owner-scoped profit summaries */
4484
+ 200: {
4485
+ headers: {
4486
+ [name: string]: unknown;
4487
+ };
4488
+ content: {
4489
+ "application/json": components["schemas"]["ProfitListResponse"];
4490
+ };
4491
+ };
4492
+ /** @description Invalid query parameter */
4493
+ 400: {
4494
+ headers: {
4495
+ [name: string]: unknown;
4496
+ };
4497
+ content: {
4498
+ "application/json": components["schemas"]["ErrorResponse"];
4499
+ };
4500
+ };
4501
+ /** @description Authentication required */
4502
+ 401: {
4503
+ headers: {
4504
+ [name: string]: unknown;
4505
+ };
4506
+ content: {
4507
+ "application/json": components["schemas"]["ErrorResponse"];
4508
+ };
4509
+ };
4510
+ /** @description Insufficient entitlement (plan or role) */
4511
+ 403: {
4512
+ headers: {
4513
+ [name: string]: unknown;
4514
+ };
4515
+ content: {
4516
+ "application/json": components["schemas"]["ErrorResponse"];
4517
+ };
4518
+ };
4519
+ };
4520
+ };
4521
+ put?: never;
4522
+ post?: never;
4523
+ delete?: never;
4524
+ options?: never;
4525
+ head?: never;
4526
+ patch?: never;
4527
+ trace?: never;
4528
+ };
4529
+ "/v1/sales/{id}": {
4530
+ parameters: {
4531
+ query?: never;
4532
+ header?: never;
4533
+ path?: never;
4534
+ cookie?: never;
4535
+ };
4536
+ get?: never;
4537
+ put?: never;
4538
+ post?: never;
4539
+ /**
4540
+ * Delete an owner sale
4541
+ * @description Delete one of the caller's own sales. Requires an authenticated session, or an owner-bound API key carrying the exact sales:write scope.
4542
+ */
4543
+ delete: {
4544
+ parameters: {
4545
+ query?: never;
4546
+ header?: never;
4547
+ path: {
4548
+ id: number;
4549
+ };
4550
+ cookie?: never;
4551
+ };
4552
+ requestBody?: never;
4553
+ responses: {
4554
+ /** @description The sale was deleted */
4555
+ 200: {
4556
+ headers: {
4557
+ [name: string]: unknown;
4558
+ };
4559
+ content: {
4560
+ "application/json": components["schemas"]["SaleDeleteResponse"];
4561
+ };
4562
+ };
4563
+ /** @description Invalid query parameter */
4564
+ 400: {
4565
+ headers: {
4566
+ [name: string]: unknown;
4567
+ };
4568
+ content: {
4569
+ "application/json": components["schemas"]["ErrorResponse"];
4570
+ };
4571
+ };
4572
+ /** @description Authentication required */
4573
+ 401: {
4574
+ headers: {
4575
+ [name: string]: unknown;
4576
+ };
4577
+ content: {
4578
+ "application/json": components["schemas"]["ErrorResponse"];
4579
+ };
4580
+ };
4581
+ /** @description Insufficient entitlement (plan or role) */
4582
+ 403: {
4583
+ headers: {
4584
+ [name: string]: unknown;
4585
+ };
4586
+ content: {
4587
+ "application/json": components["schemas"]["ErrorResponse"];
4588
+ };
4589
+ };
4590
+ /** @description No such sale owned by the caller */
4591
+ 404: {
4592
+ headers: {
4593
+ [name: string]: unknown;
4594
+ };
4595
+ content: {
4596
+ "application/json": components["schemas"]["ErrorResponse"];
4597
+ };
4598
+ };
4599
+ /** @description Per-user mutation throttle exceeded; retry after a short wait */
4600
+ 429: {
4601
+ headers: {
4602
+ [name: string]: unknown;
4603
+ };
4604
+ content: {
4605
+ "application/json": components["schemas"]["ErrorResponse"];
4606
+ };
4607
+ };
4608
+ /** @description Sales writes are not enabled in this environment */
4609
+ 503: {
4610
+ headers: {
4611
+ [name: string]: unknown;
4612
+ };
4613
+ content: {
4614
+ "application/json": components["schemas"]["ErrorResponse"];
4615
+ };
4616
+ };
4617
+ };
4618
+ };
4619
+ options?: never;
4620
+ head?: never;
4621
+ /**
4622
+ * Update an owner sale
4623
+ * @description Update fields on one of the caller's own sales. The sales table carries no last_updated column, so no If-Match optimistic concurrency is offered. Requires an authenticated session, or an owner-bound API key carrying the exact sales:write scope.
4624
+ */
4625
+ patch: {
4626
+ parameters: {
4627
+ query?: never;
4628
+ header?: never;
4629
+ path: {
4630
+ id: number;
4631
+ };
4632
+ cookie?: never;
4633
+ };
4634
+ requestBody?: {
4635
+ content: {
4636
+ "application/json": components["schemas"]["SalesUpdateRequest"];
4637
+ };
4638
+ };
4639
+ responses: {
4640
+ /** @description The updated sale */
4641
+ 200: {
4642
+ headers: {
4643
+ [name: string]: unknown;
4644
+ };
4645
+ content: {
4646
+ "application/json": components["schemas"]["SaleItemResponse"];
4647
+ };
4648
+ };
4649
+ /** @description Invalid query parameter */
4650
+ 400: {
4651
+ headers: {
4652
+ [name: string]: unknown;
4653
+ };
4654
+ content: {
4655
+ "application/json": components["schemas"]["ErrorResponse"];
4656
+ };
4657
+ };
4658
+ /** @description Authentication required */
4659
+ 401: {
4660
+ headers: {
4661
+ [name: string]: unknown;
4662
+ };
4663
+ content: {
4664
+ "application/json": components["schemas"]["ErrorResponse"];
4665
+ };
4666
+ };
4667
+ /** @description Insufficient entitlement (plan or role) */
4668
+ 403: {
4669
+ headers: {
4670
+ [name: string]: unknown;
4671
+ };
4672
+ content: {
4673
+ "application/json": components["schemas"]["ErrorResponse"];
4674
+ };
4675
+ };
4676
+ /** @description No such sale owned by the caller */
4677
+ 404: {
4678
+ headers: {
4679
+ [name: string]: unknown;
4680
+ };
4681
+ content: {
4682
+ "application/json": components["schemas"]["ErrorResponse"];
4683
+ };
4684
+ };
4685
+ /** @description Per-user mutation throttle exceeded; retry after a short wait */
4686
+ 429: {
4687
+ headers: {
4688
+ [name: string]: unknown;
4689
+ };
4690
+ content: {
4691
+ "application/json": components["schemas"]["ErrorResponse"];
4692
+ };
4693
+ };
4694
+ /** @description Sales writes are not enabled in this environment */
4695
+ 503: {
4696
+ headers: {
4697
+ [name: string]: unknown;
4698
+ };
4699
+ content: {
4700
+ "application/json": components["schemas"]["ErrorResponse"];
4701
+ };
4702
+ };
4703
+ };
4704
+ };
4705
+ trace?: never;
4706
+ };
4707
+ "/v1/tasting/{catalogId}": {
4708
+ parameters: {
4709
+ query?: never;
4710
+ header?: never;
4711
+ path?: never;
4712
+ cookie?: never;
4713
+ };
4714
+ /**
4715
+ * Get owner tasting notes for a catalog coffee
4716
+ * @description Fetch supplier tasting notes from the catalog plus the authenticated principal's own latest inventory tasting notes for a catalog coffee id. Requires an authenticated session, or an owner-bound API key carrying the tasting:read scope.
4717
+ */
4718
+ get: {
4719
+ parameters: {
4720
+ query?: {
4721
+ filter?: "user" | "supplier" | "both";
4722
+ };
4723
+ header?: never;
4724
+ path: {
4725
+ catalogId: string;
4726
+ };
4727
+ cookie?: never;
4728
+ };
4729
+ requestBody?: never;
4730
+ responses: {
4731
+ /** @description Tasting notes for the requested catalog coffee */
4732
+ 200: {
4733
+ headers: {
4734
+ [name: string]: unknown;
4735
+ };
4736
+ content: {
4737
+ "application/json": components["schemas"]["TastingResponse"];
4738
+ };
4739
+ };
4740
+ /** @description Invalid query parameter */
4741
+ 400: {
4742
+ headers: {
4743
+ [name: string]: unknown;
4744
+ };
4745
+ content: {
4746
+ "application/json": components["schemas"]["ErrorResponse"];
4747
+ };
4748
+ };
4749
+ /** @description Authentication required */
4750
+ 401: {
4751
+ headers: {
4752
+ [name: string]: unknown;
4753
+ };
4754
+ content: {
4755
+ "application/json": components["schemas"]["ErrorResponse"];
4756
+ };
4757
+ };
4758
+ /** @description Insufficient entitlement (plan or role) */
4759
+ 403: {
4760
+ headers: {
4761
+ [name: string]: unknown;
4762
+ };
4763
+ content: {
4764
+ "application/json": components["schemas"]["ErrorResponse"];
4765
+ };
4766
+ };
4767
+ /** @description No such catalog coffee */
4768
+ 404: {
4769
+ headers: {
4770
+ [name: string]: unknown;
4771
+ };
4772
+ content: {
4773
+ "application/json": components["schemas"]["ErrorResponse"];
4774
+ };
4775
+ };
4776
+ };
4777
+ };
4778
+ put?: never;
4779
+ post?: never;
4780
+ delete?: never;
4781
+ options?: never;
4782
+ head?: never;
4783
+ patch?: never;
4784
+ trace?: never;
4785
+ };
4786
+ "/v1/tasting/inventory/{inventoryId}": {
4787
+ parameters: {
4788
+ query?: never;
4789
+ header?: never;
4790
+ path?: never;
4791
+ cookie?: never;
4792
+ };
4793
+ get?: never;
4794
+ /**
4795
+ * Rate an owned inventory lot
4796
+ * @description Atomically replace the caller's cupping notes for one owned green-coffee inventory lot. Session members write through RLS; owner-bound API keys require the exact tasting:write scope.
4797
+ */
4798
+ put: {
4799
+ parameters: {
4800
+ query?: never;
4801
+ header?: never;
4802
+ path: {
4803
+ inventoryId: number;
4804
+ };
4805
+ cookie?: never;
4806
+ };
4807
+ requestBody: {
4808
+ content: {
4809
+ "application/json": components["schemas"]["TastingRateRequest"];
4810
+ };
4811
+ };
4812
+ responses: {
4813
+ /** @description Canonical inventory tasting */
4814
+ 200: {
4815
+ headers: {
4816
+ [name: string]: unknown;
4817
+ };
4818
+ content: {
4819
+ "application/json": components["schemas"]["TastingRateResponse"];
4820
+ };
4821
+ };
4822
+ /** @description Invalid rating */
4823
+ 400: {
4824
+ headers: {
4825
+ [name: string]: unknown;
4826
+ };
4827
+ content: {
4828
+ "application/json": components["schemas"]["ErrorResponse"];
4829
+ };
4830
+ };
4831
+ /** @description Authentication required */
4832
+ 401: {
4833
+ headers: {
4834
+ [name: string]: unknown;
4835
+ };
4836
+ content: {
4837
+ "application/json": components["schemas"]["ErrorResponse"];
4838
+ };
4839
+ };
4840
+ /** @description Insufficient entitlement (plan or role) */
4841
+ 403: {
4842
+ headers: {
4843
+ [name: string]: unknown;
4844
+ };
4845
+ content: {
4846
+ "application/json": components["schemas"]["ErrorResponse"];
4847
+ };
4848
+ };
4849
+ /** @description Inventory tasting not found */
4850
+ 404: {
4851
+ headers: {
4852
+ [name: string]: unknown;
4853
+ };
4854
+ content: {
4855
+ "application/json": components["schemas"]["ErrorResponse"];
4378
4856
  };
4379
4857
  };
4380
4858
  /** @description Per-user mutation throttle exceeded */
@@ -6002,10 +6480,22 @@ interface components {
6002
6480
  InventoryCatalog: {
6003
6481
  id: number;
6004
6482
  name: string | null;
6483
+ score_value: number | null;
6484
+ arrival_date: string | null;
6485
+ continent: string | null;
6005
6486
  source: string | null;
6006
6487
  country: string | null;
6007
6488
  region: string | null;
6008
6489
  processing: string | null;
6490
+ drying_method: string | null;
6491
+ lot_size: string | null;
6492
+ bag_size: string | null;
6493
+ packaging: string | null;
6494
+ cultivar_detail: string | null;
6495
+ grade: string | null;
6496
+ appearance: string | null;
6497
+ roast_recs: string | null;
6498
+ type: string | null;
6009
6499
  cost_lb: number | null;
6010
6500
  price_per_lb: number | null;
6011
6501
  price_tiers: {
@@ -6013,7 +6503,17 @@ interface components {
6013
6503
  price: number;
6014
6504
  }[] | null;
6015
6505
  description_short: string | null;
6506
+ description_long: string | null;
6507
+ farm_notes: string | null;
6508
+ link: string | null;
6016
6509
  stocked: boolean | null;
6510
+ cupping_notes: string | null;
6511
+ stocked_date: string | null;
6512
+ unstocked_date: string | null;
6513
+ ai_description: string | null;
6514
+ ai_tasting_notes?: unknown;
6515
+ public_coffee: boolean | null;
6516
+ wholesale: boolean | null;
6017
6517
  } | null;
6018
6518
  InventoryResource: {
6019
6519
  id: number;
@@ -6049,13 +6549,22 @@ interface components {
6049
6549
  };
6050
6550
  };
6051
6551
  };
6052
- InventoryItemResponse: {
6053
- data: components["schemas"]["InventoryResource"];
6552
+ ManualInventoryBatchResult: {
6553
+ /** Format: uuid */
6554
+ batchId: string;
6555
+ items: {
6556
+ /** Format: uuid */
6557
+ rowId: string;
6558
+ resource: components["schemas"]["InventoryResource"];
6559
+ }[];
6560
+ };
6561
+ ManualInventoryBatchResponse: {
6562
+ data: components["schemas"]["ManualInventoryBatchResult"];
6054
6563
  meta: {
6055
6564
  /** @enum {string} */
6056
- resource: "inventory";
6565
+ resource: "inventory-manual-batch";
6057
6566
  /** @enum {string} */
6058
- namespace: "/v1/inventory";
6567
+ namespace: "/v1/inventory/manual-batches";
6059
6568
  /** @enum {string} */
6060
6569
  version: "v1";
6061
6570
  auth: {
@@ -6068,22 +6577,6 @@ interface components {
6068
6577
  };
6069
6578
  };
6070
6579
  };
6071
- CatalogInventoryCreateRequest: {
6072
- /** @description Purchased quantity in pounds. */
6073
- qty: number;
6074
- /** @description Purchase date (YYYY-MM-DD); defaults to today (UTC). */
6075
- purchaseDate?: string;
6076
- /** @description Total bean cost for this inventory lot. */
6077
- cost?: number;
6078
- /** @description Tax and shipping cost. */
6079
- taxShip?: number;
6080
- notes?: string;
6081
- /** @description Existing coffee_catalog.id this inventory lot is bought from. */
6082
- catalogId: number;
6083
- /** @enum {string} */
6084
- manualCoffee?: never;
6085
- };
6086
- /** @description Owner-private catalog coffee to create atomically with the inventory lot. The API always stores public_coffee=false and binds coffee_user to the authenticated owner. */
6087
6580
  ManualCoffeeCreate: {
6088
6581
  name: string;
6089
6582
  country?: string;
@@ -6107,6 +6600,106 @@ interface components {
6107
6600
  arrivalDate?: string;
6108
6601
  scoreValue?: number;
6109
6602
  };
6603
+ ManualInventoryBatchItem: {
6604
+ /**
6605
+ * Format: uuid
6606
+ * @description Stable client-generated row identity. It is returned unchanged in the terminal batch result.
6607
+ */
6608
+ rowId: string;
6609
+ manualCoffee: components["schemas"]["ManualCoffeeCreate"];
6610
+ /** @description Purchased quantity in pounds. */
6611
+ qty: number;
6612
+ /** @description Total bean cost for this inventory lot. */
6613
+ cost?: number;
6614
+ };
6615
+ ManualInventoryBatchCreateRequest: {
6616
+ /** @description Purchase date (YYYY-MM-DD); defaults to today (UTC). */
6617
+ purchaseDate?: string;
6618
+ /** @description Shared tax and shipping total with at most two decimal places. Parchment allocates exact cents deterministically by item order. */
6619
+ taxShipTotal?: number;
6620
+ notes?: string;
6621
+ items: components["schemas"]["ManualInventoryBatchItem"][];
6622
+ };
6623
+ ManualInventoryBatchTerminalError: {
6624
+ code: string;
6625
+ message: string;
6626
+ };
6627
+ ManualInventoryBatchLifecycle: {
6628
+ /** Format: uuid */
6629
+ batchId: string;
6630
+ /** @enum {string} */
6631
+ status: "unknown" | "accepted" | "in_progress" | "completed" | "terminal_rejected";
6632
+ result: components["schemas"]["ManualInventoryBatchResult"] | null;
6633
+ error: components["schemas"]["ManualInventoryBatchTerminalError"] | null;
6634
+ /** Format: date-time */
6635
+ updatedAt: string | null;
6636
+ };
6637
+ ManualInventoryBatchLifecycleResponse: {
6638
+ data: components["schemas"]["ManualInventoryBatchLifecycle"];
6639
+ meta: {
6640
+ /** @enum {string} */
6641
+ resource: "inventory-manual-batch-lifecycle";
6642
+ /** @enum {string} */
6643
+ namespace: "/v1/inventory/manual-batches";
6644
+ /** @enum {string} */
6645
+ version: "v1";
6646
+ auth: {
6647
+ /** @enum {string} */
6648
+ kind: "session" | "api-key";
6649
+ /** @enum {string|null} */
6650
+ role: "admin" | "member" | "viewer" | null;
6651
+ /** @enum {string|null} */
6652
+ apiPlan: "viewer" | "member" | "enterprise" | null;
6653
+ };
6654
+ };
6655
+ };
6656
+ ManualInventoryBatchReserveRequest: {
6657
+ /**
6658
+ * Format: uuid
6659
+ * @description Stable client-generated batch identity. Store only this UUID after reservation succeeds.
6660
+ */
6661
+ batchId: string;
6662
+ /** @description Purchase date (YYYY-MM-DD); defaults to today (UTC). */
6663
+ purchaseDate?: string;
6664
+ /** @description Shared tax and shipping total with at most two decimal places. Parchment allocates exact cents deterministically by item order. */
6665
+ taxShipTotal?: number;
6666
+ notes?: string;
6667
+ items: components["schemas"]["ManualInventoryBatchItem"][];
6668
+ };
6669
+ InventoryItemResponse: {
6670
+ data: components["schemas"]["InventoryResource"];
6671
+ meta: {
6672
+ /** @enum {string} */
6673
+ resource: "inventory";
6674
+ /** @enum {string} */
6675
+ namespace: "/v1/inventory";
6676
+ /** @enum {string} */
6677
+ version: "v1";
6678
+ auth: {
6679
+ /** @enum {string} */
6680
+ kind: "session" | "api-key";
6681
+ /** @enum {string|null} */
6682
+ role: "admin" | "member" | "viewer" | null;
6683
+ /** @enum {string|null} */
6684
+ apiPlan: "viewer" | "member" | "enterprise" | null;
6685
+ };
6686
+ };
6687
+ };
6688
+ CatalogInventoryCreateRequest: {
6689
+ /** @description Purchased quantity in pounds. */
6690
+ qty: number;
6691
+ /** @description Purchase date (YYYY-MM-DD); defaults to today (UTC). */
6692
+ purchaseDate?: string;
6693
+ /** @description Total bean cost for this inventory lot. */
6694
+ cost?: number;
6695
+ /** @description Tax and shipping cost. */
6696
+ taxShip?: number;
6697
+ notes?: string;
6698
+ /** @description Existing coffee_catalog.id this inventory lot is bought from. */
6699
+ catalogId: number;
6700
+ /** @enum {string} */
6701
+ manualCoffee?: never;
6702
+ };
6110
6703
  ManualInventoryCreateRequest: {
6111
6704
  /** @description Purchased quantity in pounds. */
6112
6705
  qty: number;
@@ -6119,7 +6712,7 @@ interface components {
6119
6712
  notes?: string;
6120
6713
  /** @enum {string} */
6121
6714
  catalogId?: never;
6122
- manualCoffee: components["schemas"]["ManualCoffeeCreate"];
6715
+ manualCoffee: components["schemas"]["ManualCoffeeCreate"] & unknown;
6123
6716
  };
6124
6717
  InventoryCreateRequest: components["schemas"]["CatalogInventoryCreateRequest"] | components["schemas"]["ManualInventoryCreateRequest"];
6125
6718
  InventoryUpdateRequest: {
@@ -6556,6 +7149,46 @@ interface components {
6556
7149
  };
6557
7150
  };
6558
7151
  };
7152
+ ProfitItem: {
7153
+ id: number;
7154
+ coffee_name: string | null;
7155
+ purchase_date: string | null;
7156
+ purchased_qty_lbs: number | null;
7157
+ purchased_qty_oz: number;
7158
+ bean_cost: number | null;
7159
+ tax_ship_cost: number | null;
7160
+ total_sales: number;
7161
+ oz_sold: number;
7162
+ profit: number;
7163
+ oz_in: number;
7164
+ oz_out: number;
7165
+ profit_margin: number;
7166
+ wholesale: boolean;
7167
+ };
7168
+ ProfitListResponse: {
7169
+ data: components["schemas"]["ProfitItem"][];
7170
+ meta: {
7171
+ /** @enum {string} */
7172
+ resource: "profit";
7173
+ /** @enum {string} */
7174
+ namespace: "/v1/profit";
7175
+ /** @enum {string} */
7176
+ version: "v1";
7177
+ auth: {
7178
+ /** @enum {string} */
7179
+ kind: "session" | "api-key";
7180
+ /** @enum {string|null} */
7181
+ role: "admin" | "member" | "viewer" | null;
7182
+ /** @enum {string|null} */
7183
+ apiPlan: "viewer" | "member" | "enterprise" | null;
7184
+ };
7185
+ pagination: {
7186
+ limit: number;
7187
+ offset: number;
7188
+ total: number;
7189
+ };
7190
+ };
7191
+ };
6559
7192
  SaleItemResponse: {
6560
7193
  data: components["schemas"]["SaleResource"];
6561
7194
  meta: {
@@ -6791,6 +7424,10 @@ type InventoryListQuery = NonNullable<paths["/v1/inventory"]["get"]["parameters"
6791
7424
  type InventoryCreateRequest = NonNullable<paths["/v1/inventory"]["post"]["requestBody"]>["content"]["application/json"];
6792
7425
  type CatalogInventoryCreateRequest = components["schemas"]["CatalogInventoryCreateRequest"];
6793
7426
  type ManualInventoryCreateRequest = components["schemas"]["ManualInventoryCreateRequest"];
7427
+ /** Request body for {@link ParchmentClient.inventory.createManualBatch}. */
7428
+ type ManualInventoryBatchCreateRequest = NonNullable<paths["/v1/inventory/manual-batches"]["post"]["requestBody"]>["content"]["application/json"];
7429
+ /** Request body for reserving durable server-owned manual-batch intent. */
7430
+ type ManualInventoryBatchReserveRequest = NonNullable<paths["/v1/inventory/manual-batches/reservations"]["post"]["requestBody"]>["content"]["application/json"];
6794
7431
  /** Request body for {@link ParchmentClient.inventory.update}. */
6795
7432
  type InventoryUpdateRequest = NonNullable<paths["/v1/inventory/{id}"]["patch"]["requestBody"]>["content"]["application/json"];
6796
7433
  /** Query parameters for {@link ParchmentClient.roasts.list}. */
@@ -6809,6 +7446,10 @@ type RoastImportRequest = NonNullable<paths["/v1/roasts/imports"]["post"]["reque
6809
7446
  type RoastArtisanImportReplaceRequest = NonNullable<paths["/v1/roasts/{id}/artisan-import"]["put"]["requestBody"]>["content"]["application/json"];
6810
7447
  /** Query parameters for {@link ParchmentClient.sales.list}. */
6811
7448
  type SalesListQuery = NonNullable<paths["/v1/sales"]["get"]["parameters"]["query"]>;
7449
+ /** Query parameters for {@link ParchmentClient.profit.list}. */
7450
+ type ProfitListQuery = NonNullable<paths["/v1/profit"]["get"]["parameters"]["query"]>;
7451
+ /** One owner inventory lot's canonical cost, revenue, and roast summary. */
7452
+ type ProfitItem = components["schemas"]["ProfitItem"];
6812
7453
  /** Request body for {@link ParchmentClient.sales.create}. */
6813
7454
  type SalesCreateRequest = NonNullable<paths["/v1/sales"]["post"]["requestBody"]>["content"]["application/json"];
6814
7455
  /** Request body for {@link ParchmentClient.sales.update}. */
@@ -7192,7 +7833,10 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
7192
7833
  [name: string]: unknown;
7193
7834
  };
7194
7835
  content: {
7195
- "application/json": components["schemas"]["ApiKeyCreateResponse"];
7836
+ "application/json": components["schemas"] /**
7837
+ * Catalog filter metadata and counted facets. Pass `headers` to send the
7838
+ * `Prefer: handling=lenient|strict` override (see {@link CatalogFacetsHeaders}).
7839
+ */["ApiKeyCreateResponse"];
7196
7840
  };
7197
7841
  };
7198
7842
  400: {
@@ -7434,7 +8078,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
7434
8078
  [name: string]: unknown;
7435
8079
  };
7436
8080
  content: {
7437
- "application/json": components["schemas"]["ErrorResponse"];
8081
+ "application/json": components["schemas"] /** Return the durable terminal result for a manual inventory batch. */["ErrorResponse"];
7438
8082
  };
7439
8083
  };
7440
8084
  403: {
@@ -7450,10 +8094,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
7450
8094
  [name: string]: unknown;
7451
8095
  };
7452
8096
  content: {
7453
- "application/json": components["schemas"] /**
7454
- * Update one of the caller's own roast profiles. Pass `ifMatch` (the
7455
- * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).
7456
- */["ErrorResponse"];
8097
+ "application/json": components["schemas"]["ErrorResponse"];
7457
8098
  };
7458
8099
  };
7459
8100
  };
@@ -7527,7 +8168,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
7527
8168
  [name: string]: unknown;
7528
8169
  };
7529
8170
  content: {
7530
- "application/json": components["schemas"]["ErrorResponse"];
8171
+ "application/json": components["schemas"] /** Delete one of the caller's own roast profiles. */["ErrorResponse"];
7531
8172
  };
7532
8173
  };
7533
8174
  };
@@ -7541,7 +8182,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
7541
8182
  inspect: (body: CliAuthInspectRequest) => Promise<openapi_fetch.FetchResponse<{
7542
8183
  parameters: {
7543
8184
  query?: never;
7544
- header? /** Delete one of the caller's own sales. */: never;
8185
+ header?: never;
7545
8186
  path?: never;
7546
8187
  cookie?: never;
7547
8188
  };
@@ -7608,7 +8249,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
7608
8249
  approve: (body: CliAuthApproveRequest) => Promise<openapi_fetch.FetchResponse<{
7609
8250
  parameters: {
7610
8251
  query?: never;
7611
- header?: never;
8252
+ header? /** Fetch supplier notes plus the caller's own latest tasting notes. */: never;
7612
8253
  path?: never;
7613
8254
  cookie?: never;
7614
8255
  };
@@ -9150,7 +9791,214 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9150
9791
  };
9151
9792
  header?: never;
9152
9793
  path: {
9153
- id: string;
9794
+ id: string;
9795
+ };
9796
+ cookie?: never;
9797
+ };
9798
+ requestBody?: never;
9799
+ responses: {
9800
+ 200: {
9801
+ headers: {
9802
+ [name: string]: unknown;
9803
+ };
9804
+ content: {
9805
+ "application/json": components["schemas"]["SourcingBriefMatchesResponse"];
9806
+ };
9807
+ };
9808
+ 400: {
9809
+ headers: {
9810
+ [name: string]: unknown;
9811
+ };
9812
+ content: {
9813
+ "application/json": components["schemas"]["ErrorResponse"];
9814
+ };
9815
+ };
9816
+ 401: {
9817
+ headers: {
9818
+ [name: string]: unknown;
9819
+ };
9820
+ content: {
9821
+ "application/json": components["schemas"]["ErrorResponse"];
9822
+ };
9823
+ };
9824
+ 403: {
9825
+ headers: {
9826
+ [name: string]: unknown;
9827
+ };
9828
+ content: {
9829
+ "application/json": components["schemas"]["ErrorResponse"];
9830
+ };
9831
+ };
9832
+ 404: {
9833
+ headers: {
9834
+ [name: string]: unknown;
9835
+ };
9836
+ content: {
9837
+ "application/json": components["schemas"]["ErrorResponse"];
9838
+ };
9839
+ };
9840
+ };
9841
+ }, {
9842
+ params: {
9843
+ path: {
9844
+ id: string;
9845
+ };
9846
+ query: {
9847
+ page?: number;
9848
+ limit?: number;
9849
+ } | undefined;
9850
+ };
9851
+ }, `${string}/${string}`>>;
9852
+ };
9853
+ };
9854
+ portfolio: {
9855
+ trackedLots: {
9856
+ /**
9857
+ * List the caller's complete tracked catalog-id set and bounded recent
9858
+ * summaries enriched with live catalog state.
9859
+ */
9860
+ list: (query?: TrackedLotsListQuery) => Promise<openapi_fetch.FetchResponse<{
9861
+ parameters: {
9862
+ query?: {
9863
+ summaryLimit?: number | null;
9864
+ };
9865
+ header?: never;
9866
+ path?: never;
9867
+ cookie?: never;
9868
+ };
9869
+ requestBody?: never;
9870
+ responses: {
9871
+ 200: {
9872
+ headers: {
9873
+ [name: string]: unknown;
9874
+ };
9875
+ content: {
9876
+ "application/json": components["schemas"]["TrackedLotsListResponse"];
9877
+ };
9878
+ };
9879
+ 400: {
9880
+ headers: {
9881
+ [name: string]: unknown;
9882
+ };
9883
+ content: {
9884
+ "application/json": components["schemas"]["ErrorResponse"];
9885
+ };
9886
+ };
9887
+ 401: {
9888
+ headers: {
9889
+ [name: string]: unknown;
9890
+ };
9891
+ content: {
9892
+ "application/json": components["schemas"]["ErrorResponse"];
9893
+ };
9894
+ };
9895
+ 403: {
9896
+ headers: {
9897
+ [name: string]: unknown;
9898
+ };
9899
+ content: {
9900
+ "application/json": components["schemas"]["ErrorResponse"];
9901
+ };
9902
+ };
9903
+ };
9904
+ }, {
9905
+ params: {
9906
+ query: {
9907
+ summaryLimit?: number | null;
9908
+ } | undefined;
9909
+ };
9910
+ }, `${string}/${string}`>>;
9911
+ /** Idempotently set a visible catalog lot to tracked. */
9912
+ track: (catalogId: number) => Promise<openapi_fetch.FetchResponse<{
9913
+ parameters: {
9914
+ query?: never;
9915
+ header?: never;
9916
+ path: {
9917
+ catalogId: number;
9918
+ };
9919
+ cookie?: never;
9920
+ };
9921
+ requestBody?: never;
9922
+ responses: {
9923
+ 200: {
9924
+ headers: {
9925
+ [name: string]: unknown;
9926
+ };
9927
+ content: {
9928
+ "application/json": components["schemas"]["TrackedLotMutationResponse"];
9929
+ };
9930
+ };
9931
+ 400: {
9932
+ headers: {
9933
+ [name: string]: unknown;
9934
+ };
9935
+ content: {
9936
+ "application/json": components["schemas"]["ErrorResponse"];
9937
+ };
9938
+ };
9939
+ 401: {
9940
+ headers: {
9941
+ [name: string]: unknown;
9942
+ };
9943
+ content: {
9944
+ "application/json": components["schemas"]["ErrorResponse"];
9945
+ };
9946
+ };
9947
+ 403: {
9948
+ headers: {
9949
+ [name: string]: unknown;
9950
+ };
9951
+ content: {
9952
+ "application/json": components["schemas"]["ErrorResponse"];
9953
+ };
9954
+ };
9955
+ 404: {
9956
+ headers: {
9957
+ [name: string]: unknown;
9958
+ };
9959
+ content: {
9960
+ "application/json": components["schemas"]["ErrorResponse"];
9961
+ };
9962
+ };
9963
+ 409: {
9964
+ headers: {
9965
+ [name: string]: unknown;
9966
+ };
9967
+ content: {
9968
+ "application/json": components["schemas"]["ErrorResponse"];
9969
+ };
9970
+ };
9971
+ 429: {
9972
+ headers: {
9973
+ [name: string]: unknown;
9974
+ };
9975
+ content: {
9976
+ "application/json": components["schemas"]["ErrorResponse"];
9977
+ };
9978
+ };
9979
+ 503: {
9980
+ headers: {
9981
+ [name: string]: unknown;
9982
+ };
9983
+ content: {
9984
+ "application/json": components["schemas"]["ErrorResponse"];
9985
+ };
9986
+ };
9987
+ };
9988
+ }, {
9989
+ params: {
9990
+ path: {
9991
+ catalogId: number;
9992
+ };
9993
+ };
9994
+ }, `${string}/${string}`>>;
9995
+ /** Idempotently set an owner catalog lot to untracked. */
9996
+ untrack: (catalogId: number) => Promise<openapi_fetch.FetchResponse<{
9997
+ parameters: {
9998
+ query?: never;
9999
+ header?: never;
10000
+ path: {
10001
+ catalogId: number;
9154
10002
  };
9155
10003
  cookie?: never;
9156
10004
  };
@@ -9161,7 +10009,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9161
10009
  [name: string]: unknown;
9162
10010
  };
9163
10011
  content: {
9164
- "application/json": components["schemas"]["SourcingBriefMatchesResponse"];
10012
+ "application/json": components["schemas"]["TrackedLotMutationResponse"];
9165
10013
  };
9166
10014
  };
9167
10015
  400: {
@@ -9188,7 +10036,15 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9188
10036
  "application/json": components["schemas"]["ErrorResponse"];
9189
10037
  };
9190
10038
  };
9191
- 404: {
10039
+ 429: {
10040
+ headers: {
10041
+ [name: string]: unknown;
10042
+ };
10043
+ content: {
10044
+ "application/json": components["schemas"]["ErrorResponse"];
10045
+ };
10046
+ };
10047
+ 503: {
9192
10048
  headers: {
9193
10049
  [name: string]: unknown;
9194
10050
  };
@@ -9200,39 +10056,109 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9200
10056
  }, {
9201
10057
  params: {
9202
10058
  path: {
9203
- id: string;
10059
+ catalogId: number;
9204
10060
  };
9205
- query: {
9206
- page?: number;
9207
- limit?: number;
9208
- } | undefined;
9209
10061
  };
9210
10062
  }, `${string}/${string}`>>;
9211
10063
  };
9212
10064
  };
9213
- portfolio: {
9214
- trackedLots: {
9215
- /**
9216
- * List the caller's complete tracked catalog-id set and bounded recent
9217
- * summaries enriched with live catalog state.
9218
- */
9219
- list: (query?: TrackedLotsListQuery) => Promise<openapi_fetch.FetchResponse<{
10065
+ inventory: {
10066
+ /** List the caller's own green-coffee inventory (owner-scoped). */
10067
+ list: (query?: InventoryListQuery) => Promise<openapi_fetch.FetchResponse<{
10068
+ parameters: {
10069
+ query?: {
10070
+ stocked_only?: boolean | null;
10071
+ catalogId?: number;
10072
+ purchaseDateStart?: string;
10073
+ purchaseDateEnd?: string;
10074
+ origin?: string;
10075
+ limit?: number;
10076
+ offset?: number | null;
10077
+ };
10078
+ header?: never;
10079
+ path?: never;
10080
+ cookie?: never;
10081
+ };
10082
+ requestBody?: never;
10083
+ responses: {
10084
+ 200: {
10085
+ headers: {
10086
+ [name: string]: unknown;
10087
+ };
10088
+ content: {
10089
+ "application/json": components["schemas"]["InventoryListResponse"];
10090
+ };
10091
+ };
10092
+ 400: {
10093
+ headers: {
10094
+ [name: string]: unknown;
10095
+ };
10096
+ content: {
10097
+ "application/json": components["schemas"]["ErrorResponse"];
10098
+ };
10099
+ };
10100
+ 401: {
10101
+ headers: {
10102
+ [name: string]: unknown;
10103
+ };
10104
+ content: {
10105
+ "application/json": components["schemas"]["ErrorResponse"];
10106
+ };
10107
+ };
10108
+ 403: {
10109
+ headers: {
10110
+ [name: string]: unknown;
10111
+ };
10112
+ content: {
10113
+ "application/json": components["schemas"]["ErrorResponse"];
10114
+ };
10115
+ };
10116
+ };
10117
+ }, {
10118
+ params: {
10119
+ query: {
10120
+ stocked_only?: boolean | null;
10121
+ catalogId?: number;
10122
+ purchaseDateStart?: string;
10123
+ purchaseDateEnd?: string;
10124
+ origin?: string;
10125
+ limit?: number;
10126
+ offset?: number | null;
10127
+ } | undefined;
10128
+ };
10129
+ }, `${string}/${string}`>>;
10130
+ /**
10131
+ * Create an owner inventory lot. Requires a session or an owner-bound API
10132
+ * key carrying the exact `inventory:write` scope. Manual coffee creates
10133
+ * require `idempotencyKey`; catalog-backed creates accept it optionally.
10134
+ * The same key and payload replay the original result.
10135
+ */
10136
+ create: {
10137
+ (body: ManualInventoryCreateRequest, options: {
10138
+ idempotencyKey: string;
10139
+ }): ReturnType<(body: InventoryCreateRequest, options?: {
10140
+ idempotencyKey?: string;
10141
+ }) => Promise<openapi_fetch.FetchResponse<{
9220
10142
  parameters: {
9221
- query?: {
9222
- summaryLimit?: number | null;
10143
+ query?: never;
10144
+ header?: {
10145
+ "idempotency-key"?: string;
9223
10146
  };
9224
- header?: never;
9225
10147
  path?: never;
9226
10148
  cookie?: never;
9227
10149
  };
9228
- requestBody?: never;
10150
+ requestBody?: {
10151
+ content: {
10152
+ "application/json": components["schemas"]["InventoryCreateRequest"];
10153
+ };
10154
+ };
9229
10155
  responses: {
9230
- 200: {
10156
+ 201: {
9231
10157
  headers: {
9232
10158
  [name: string]: unknown;
9233
10159
  };
9234
10160
  content: {
9235
- "application/json": components["schemas"]["TrackedLotsListResponse"];
10161
+ "application/json": components["schemas"]["InventoryItemResponse"];
9236
10162
  };
9237
10163
  };
9238
10164
  400: {
@@ -9259,32 +10185,80 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9259
10185
  "application/json": components["schemas"]["ErrorResponse"];
9260
10186
  };
9261
10187
  };
10188
+ 409: {
10189
+ headers: {
10190
+ [name: string]: unknown;
10191
+ };
10192
+ content: {
10193
+ "application/json": components["schemas"]["ErrorResponse"];
10194
+ };
10195
+ };
10196
+ 429: {
10197
+ headers: {
10198
+ [name: string]: unknown;
10199
+ };
10200
+ content: {
10201
+ "application/json": components["schemas"]["ErrorResponse"];
10202
+ };
10203
+ };
10204
+ 503: {
10205
+ headers: {
10206
+ [name: string]: unknown;
10207
+ };
10208
+ content: {
10209
+ "application/json": components["schemas"]["ErrorResponse"];
10210
+ };
10211
+ };
9262
10212
  };
9263
10213
  }, {
9264
- params: {
9265
- query: {
9266
- summaryLimit?: number | null;
9267
- } | undefined;
10214
+ body: {
10215
+ qty: number;
10216
+ purchaseDate?: string;
10217
+ cost?: number;
10218
+ taxShip?: number;
10219
+ notes?: string;
10220
+ catalogId: number;
10221
+ manualCoffee?: never;
10222
+ } | {
10223
+ qty: number;
10224
+ purchaseDate?: string;
10225
+ cost?: number;
10226
+ taxShip?: number;
10227
+ notes?: string;
10228
+ catalogId?: never;
10229
+ manualCoffee: components["schemas"]["ManualCoffeeCreate"] & unknown;
9268
10230
  };
9269
- }, `${string}/${string}`>>;
9270
- /** Idempotently set a visible catalog lot to tracked. */
9271
- track: (catalogId: number) => Promise<openapi_fetch.FetchResponse<{
10231
+ params: {
10232
+ header: {
10233
+ "idempotency-key": string;
10234
+ };
10235
+ } | undefined;
10236
+ }, `${string}/${string}`>>>;
10237
+ (body: CatalogInventoryCreateRequest, options?: {
10238
+ idempotencyKey?: string;
10239
+ }): ReturnType<(body: InventoryCreateRequest, options?: {
10240
+ idempotencyKey?: string;
10241
+ }) => Promise<openapi_fetch.FetchResponse<{
9272
10242
  parameters: {
9273
10243
  query?: never;
9274
- header?: never;
9275
- path: {
9276
- catalogId: number;
10244
+ header?: {
10245
+ "idempotency-key"?: string;
9277
10246
  };
10247
+ path?: never;
9278
10248
  cookie?: never;
9279
10249
  };
9280
- requestBody?: never;
10250
+ requestBody?: {
10251
+ content: {
10252
+ "application/json": components["schemas"]["InventoryCreateRequest"];
10253
+ };
10254
+ };
9281
10255
  responses: {
9282
- 200: {
10256
+ 201: {
9283
10257
  headers: {
9284
10258
  [name: string]: unknown;
9285
10259
  };
9286
10260
  content: {
9287
- "application/json": components["schemas"]["TrackedLotMutationResponse"];
10261
+ "application/json": components["schemas"]["InventoryItemResponse"];
9288
10262
  };
9289
10263
  };
9290
10264
  400: {
@@ -9311,14 +10285,6 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9311
10285
  "application/json": components["schemas"]["ErrorResponse"];
9312
10286
  };
9313
10287
  };
9314
- 404: {
9315
- headers: {
9316
- [name: string]: unknown;
9317
- };
9318
- content: {
9319
- "application/json": components["schemas"]["ErrorResponse"];
9320
- };
9321
- };
9322
10288
  409: {
9323
10289
  headers: {
9324
10290
  [name: string]: unknown;
@@ -9345,97 +10311,130 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9345
10311
  };
9346
10312
  };
9347
10313
  }, {
10314
+ body: {
10315
+ qty: number;
10316
+ purchaseDate?: string;
10317
+ cost?: number;
10318
+ taxShip?: number;
10319
+ notes?: string;
10320
+ catalogId: number;
10321
+ manualCoffee?: never;
10322
+ } | {
10323
+ qty: number;
10324
+ purchaseDate?: string;
10325
+ cost?: number;
10326
+ taxShip?: number;
10327
+ notes?: string;
10328
+ catalogId?: never;
10329
+ manualCoffee: components["schemas"]["ManualCoffeeCreate"] & unknown;
10330
+ };
9348
10331
  params: {
9349
- path: {
9350
- catalogId: number;
10332
+ header: {
10333
+ "idempotency-key": string;
10334
+ };
10335
+ } | undefined;
10336
+ }, `${string}/${string}`>>>;
10337
+ };
10338
+ /**
10339
+ * Atomically create owner-private manual inventory lots. The required
10340
+ * idempotency UUID is the stable batch identity and can be reconciled
10341
+ * with `getManualBatch` after an uncertain response.
10342
+ */
10343
+ createManualBatch: (body: ManualInventoryBatchCreateRequest, options: {
10344
+ idempotencyKey: string;
10345
+ }) => Promise<openapi_fetch.FetchResponse<{
10346
+ parameters: {
10347
+ query?: never;
10348
+ header: {
10349
+ "idempotency-key": string;
10350
+ };
10351
+ path?: never;
10352
+ cookie?: never;
10353
+ };
10354
+ requestBody?: {
10355
+ content: {
10356
+ "application/json": components["schemas"]["ManualInventoryBatchCreateRequest"];
10357
+ };
10358
+ };
10359
+ responses: {
10360
+ 201: {
10361
+ headers: {
10362
+ [name: string]: unknown;
10363
+ };
10364
+ content: {
10365
+ "application/json": components["schemas"]["ManualInventoryBatchResponse"];
10366
+ };
10367
+ };
10368
+ 400: {
10369
+ headers: {
10370
+ [name: string]: unknown;
10371
+ };
10372
+ content: {
10373
+ "application/json": components["schemas"]["ErrorResponse"];
9351
10374
  };
9352
10375
  };
9353
- }, `${string}/${string}`>>;
9354
- /** Idempotently set an owner catalog lot to untracked. */
9355
- untrack: (catalogId: number) => Promise<openapi_fetch.FetchResponse<{
9356
- parameters: {
9357
- query?: never;
9358
- header?: never;
9359
- path: {
9360
- catalogId: number;
10376
+ 401: {
10377
+ headers: {
10378
+ [name: string]: unknown;
10379
+ };
10380
+ content: {
10381
+ "application/json": components["schemas"]["ErrorResponse"];
9361
10382
  };
9362
- cookie?: never;
9363
10383
  };
9364
- requestBody?: never;
9365
- responses: {
9366
- 200: {
9367
- headers: {
9368
- [name: string]: unknown;
9369
- };
9370
- content: {
9371
- "application/json": components["schemas"]["TrackedLotMutationResponse"];
9372
- };
10384
+ 403: {
10385
+ headers: {
10386
+ [name: string]: unknown;
9373
10387
  };
9374
- 400: {
9375
- headers: {
9376
- [name: string]: unknown;
9377
- };
9378
- content: {
9379
- "application/json": components["schemas"]["ErrorResponse"];
9380
- };
10388
+ content: {
10389
+ "application/json": components["schemas"]["ErrorResponse"];
9381
10390
  };
9382
- 401: {
9383
- headers: {
9384
- [name: string]: unknown;
9385
- };
9386
- content: {
9387
- "application/json": components["schemas"]["ErrorResponse"];
9388
- };
10391
+ };
10392
+ 409: {
10393
+ headers: {
10394
+ [name: string]: unknown;
9389
10395
  };
9390
- 403: {
9391
- headers: {
9392
- [name: string]: unknown;
9393
- };
9394
- content: {
9395
- "application/json": components["schemas"]["ErrorResponse"];
9396
- };
10396
+ content: {
10397
+ "application/json": components["schemas"]["ErrorResponse"];
9397
10398
  };
9398
- 429: {
9399
- headers: {
9400
- [name: string]: unknown;
9401
- };
9402
- content: {
9403
- "application/json": components["schemas"]["ErrorResponse"];
9404
- };
10399
+ };
10400
+ 429: {
10401
+ headers: {
10402
+ [name: string]: unknown;
9405
10403
  };
9406
- 503: {
9407
- headers: {
9408
- [name: string]: unknown;
9409
- };
9410
- content: {
9411
- "application/json": components["schemas"]["ErrorResponse"];
9412
- };
10404
+ content: {
10405
+ "application/json": components["schemas"]["ErrorResponse"];
9413
10406
  };
9414
10407
  };
9415
- }, {
9416
- params: {
9417
- path: {
9418
- catalogId: number;
10408
+ 503: {
10409
+ headers: {
10410
+ [name: string]: unknown;
10411
+ };
10412
+ content: {
10413
+ "application/json": components["schemas"]["ErrorResponse"];
9419
10414
  };
9420
10415
  };
9421
- }, `${string}/${string}`>>;
9422
- };
9423
- };
9424
- inventory: {
9425
- /** List the caller's own green-coffee inventory (owner-scoped). */
9426
- list: (query?: InventoryListQuery) => Promise<openapi_fetch.FetchResponse<{
9427
- parameters: {
9428
- query?: {
9429
- stocked_only?: boolean | null;
9430
- catalogId?: number;
9431
- purchaseDateStart?: string;
9432
- purchaseDateEnd?: string;
9433
- origin?: string;
9434
- limit?: number;
9435
- offset?: number | null;
10416
+ };
10417
+ }, {
10418
+ params: {
10419
+ header: {
10420
+ "idempotency-key": string;
9436
10421
  };
10422
+ };
10423
+ body: {
10424
+ purchaseDate?: string;
10425
+ taxShipTotal?: number;
10426
+ notes?: string;
10427
+ items: components["schemas"]["ManualInventoryBatchItem"][];
10428
+ };
10429
+ }, `${string}/${string}`>>;
10430
+ /** Return the durable terminal result for a manual inventory batch. */
10431
+ getManualBatch: (batchId: string) => Promise<openapi_fetch.FetchResponse<{
10432
+ parameters: {
10433
+ query?: never;
9437
10434
  header?: never;
9438
- path?: never;
10435
+ path: {
10436
+ batchId: string;
10437
+ };
9439
10438
  cookie?: never;
9440
10439
  };
9441
10440
  requestBody?: never;
@@ -9445,10 +10444,10 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9445
10444
  [name: string]: unknown;
9446
10445
  };
9447
10446
  content: {
9448
- "application/json": components["schemas"]["InventoryListResponse"];
10447
+ "application/json": components["schemas"]["ManualInventoryBatchResponse"];
9449
10448
  };
9450
10449
  };
9451
- 400: {
10450
+ 401: {
9452
10451
  headers: {
9453
10452
  [name: string]: unknown;
9454
10453
  };
@@ -9456,7 +10455,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9456
10455
  "application/json": components["schemas"]["ErrorResponse"];
9457
10456
  };
9458
10457
  };
9459
- 401: {
10458
+ 403: {
9460
10459
  headers: {
9461
10460
  [name: string]: unknown;
9462
10461
  };
@@ -9464,7 +10463,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9464
10463
  "application/json": components["schemas"]["ErrorResponse"];
9465
10464
  };
9466
10465
  };
9467
- 403: {
10466
+ 404: {
9468
10467
  headers: {
9469
10468
  [name: string]: unknown;
9470
10469
  };
@@ -9475,225 +10474,210 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9475
10474
  };
9476
10475
  }, {
9477
10476
  params: {
9478
- query: {
9479
- stocked_only?: boolean | null;
9480
- catalogId?: number;
9481
- purchaseDateStart?: string;
9482
- purchaseDateEnd?: string;
9483
- origin?: string;
9484
- limit?: number;
9485
- offset?: number | null;
9486
- } | undefined;
10477
+ path: {
10478
+ batchId: string;
10479
+ };
9487
10480
  };
9488
10481
  }, `${string}/${string}`>>;
9489
10482
  /**
9490
- * Create an owner inventory lot. Requires a session or an owner-bound API
9491
- * key carrying the exact `inventory:write` scope. Manual coffee creates
9492
- * require `idempotencyKey`; catalog-backed creates accept it optionally.
9493
- * The same key and payload replay the original result.
10483
+ * Durably reserve a complete manual-batch request. Once accepted, clients
10484
+ * only need to persist the batch UUID.
9494
10485
  */
9495
- create: {
9496
- (body: ManualInventoryCreateRequest, options: {
9497
- idempotencyKey: string;
9498
- }): ReturnType<(body: InventoryCreateRequest, options?: {
9499
- idempotencyKey?: string;
9500
- }) => Promise<openapi_fetch.FetchResponse<{
9501
- parameters: {
9502
- query?: never;
9503
- header?: {
9504
- "idempotency-key"?: string;
10486
+ reserveManualBatch: (body: ManualInventoryBatchReserveRequest) => Promise<openapi_fetch.FetchResponse<{
10487
+ parameters: {
10488
+ query?: never;
10489
+ header?: never;
10490
+ path?: never;
10491
+ cookie?: never;
10492
+ };
10493
+ requestBody?: {
10494
+ content: {
10495
+ "application/json": components["schemas"]["ManualInventoryBatchReserveRequest"];
10496
+ };
10497
+ };
10498
+ responses: {
10499
+ 201: {
10500
+ headers: {
10501
+ [name: string]: unknown;
10502
+ };
10503
+ content: {
10504
+ "application/json": components["schemas"]["ManualInventoryBatchLifecycleResponse"];
9505
10505
  };
9506
- path?: never;
9507
- cookie?: never;
9508
10506
  };
9509
- requestBody?: {
10507
+ 400: {
10508
+ headers: {
10509
+ [name: string]: unknown;
10510
+ };
9510
10511
  content: {
9511
- "application/json": components["schemas"]["InventoryCreateRequest"];
10512
+ "application/json": components["schemas"]["ErrorResponse"];
9512
10513
  };
9513
10514
  };
9514
- responses: {
9515
- 201: {
9516
- headers: {
9517
- [name: string]: unknown;
9518
- };
9519
- content: {
9520
- "application/json": components["schemas"]["InventoryItemResponse"];
9521
- };
10515
+ 401: {
10516
+ headers: {
10517
+ [name: string]: unknown;
9522
10518
  };
9523
- 400: {
9524
- headers: {
9525
- [name: string]: unknown;
9526
- };
9527
- content: {
9528
- "application/json": components["schemas"]["ErrorResponse"];
9529
- };
10519
+ content: {
10520
+ "application/json": components["schemas"]["ErrorResponse"];
9530
10521
  };
9531
- 401: {
9532
- headers: {
9533
- [name: string]: unknown;
9534
- };
9535
- content: {
9536
- "application/json": components["schemas"]["ErrorResponse"];
9537
- };
10522
+ };
10523
+ 403: {
10524
+ headers: {
10525
+ [name: string]: unknown;
9538
10526
  };
9539
- 403: {
9540
- headers: {
9541
- [name: string]: unknown;
9542
- };
9543
- content: {
9544
- "application/json": components["schemas"]["ErrorResponse"];
9545
- };
10527
+ content: {
10528
+ "application/json": components["schemas"]["ErrorResponse"];
10529
+ };
10530
+ };
10531
+ 409: {
10532
+ headers: {
10533
+ [name: string]: unknown;
10534
+ };
10535
+ content: {
10536
+ "application/json": components["schemas"]["ErrorResponse"];
10537
+ };
10538
+ };
10539
+ 429: {
10540
+ headers: {
10541
+ [name: string]: unknown;
10542
+ };
10543
+ content: {
10544
+ "application/json": components["schemas"]["ErrorResponse"];
10545
+ };
10546
+ };
10547
+ 503: {
10548
+ headers: {
10549
+ [name: string]: unknown;
10550
+ };
10551
+ content: {
10552
+ "application/json": components["schemas"]["ErrorResponse"];
10553
+ };
10554
+ };
10555
+ };
10556
+ }, {
10557
+ body: {
10558
+ batchId: string;
10559
+ purchaseDate?: string;
10560
+ taxShipTotal?: number;
10561
+ notes?: string;
10562
+ items: components["schemas"]["ManualInventoryBatchItem"][];
10563
+ };
10564
+ }, `${string}/${string}`>>;
10565
+ /** Commit a reserved batch by UUID with no request body. */
10566
+ commitManualBatch: (batchId: string) => Promise<openapi_fetch.FetchResponse<{
10567
+ parameters: {
10568
+ query?: never;
10569
+ header?: never;
10570
+ path: {
10571
+ batchId: string;
10572
+ };
10573
+ cookie?: never;
10574
+ };
10575
+ requestBody?: never;
10576
+ responses: {
10577
+ 200: {
10578
+ headers: {
10579
+ [name: string]: unknown;
9546
10580
  };
9547
- 409: {
9548
- headers: {
9549
- [name: string]: unknown;
9550
- };
9551
- content: {
9552
- "application/json": components["schemas"]["ErrorResponse"];
9553
- };
10581
+ content: {
10582
+ "application/json": components["schemas"]["ManualInventoryBatchLifecycleResponse"];
9554
10583
  };
9555
- 429: {
9556
- headers: {
9557
- [name: string]: unknown;
9558
- };
9559
- content: {
9560
- "application/json": components["schemas"]["ErrorResponse"];
9561
- };
10584
+ };
10585
+ 401: {
10586
+ headers: {
10587
+ [name: string]: unknown;
9562
10588
  };
9563
- 503: {
9564
- headers: {
9565
- [name: string]: unknown;
9566
- };
9567
- content: {
9568
- "application/json": components["schemas"]["ErrorResponse"];
9569
- };
10589
+ content: {
10590
+ "application/json": components["schemas"]["ErrorResponse"];
9570
10591
  };
9571
10592
  };
9572
- }, {
9573
- body: {
9574
- qty: number;
9575
- purchaseDate?: string;
9576
- cost?: number;
9577
- taxShip?: number;
9578
- notes?: string;
9579
- catalogId: number;
9580
- manualCoffee?: never;
9581
- } | {
9582
- qty: number;
9583
- purchaseDate?: string;
9584
- cost?: number;
9585
- taxShip?: number;
9586
- notes?: string;
9587
- catalogId?: never;
9588
- manualCoffee: components["schemas"]["ManualCoffeeCreate"];
10593
+ 403: {
10594
+ headers: {
10595
+ [name: string]: unknown;
10596
+ };
10597
+ content: {
10598
+ "application/json": components["schemas"]["ErrorResponse"];
10599
+ };
9589
10600
  };
9590
- params: {
9591
- header: {
9592
- "idempotency-key": string;
10601
+ 404: {
10602
+ headers: {
10603
+ [name: string]: unknown;
9593
10604
  };
9594
- } | undefined;
9595
- }, `${string}/${string}`>>>;
9596
- (body: CatalogInventoryCreateRequest, options?: {
9597
- idempotencyKey?: string;
9598
- }): ReturnType<(body: InventoryCreateRequest, options?: {
9599
- idempotencyKey?: string;
9600
- }) => Promise<openapi_fetch.FetchResponse<{
9601
- parameters: {
9602
- query?: never;
9603
- header?: {
9604
- "idempotency-key"?: string;
10605
+ content: {
10606
+ "application/json": components["schemas"]["ErrorResponse"];
9605
10607
  };
9606
- path?: never;
9607
- cookie?: never;
9608
10608
  };
9609
- requestBody?: {
10609
+ 429: {
10610
+ headers: {
10611
+ [name: string]: unknown;
10612
+ };
9610
10613
  content: {
9611
- "application/json": components["schemas"]["InventoryCreateRequest"];
10614
+ "application/json": components["schemas"]["ErrorResponse"];
9612
10615
  };
9613
10616
  };
9614
- responses: {
9615
- 201: {
9616
- headers: {
9617
- [name: string]: unknown;
9618
- };
9619
- content: {
9620
- "application/json": components["schemas"]["InventoryItemResponse"];
9621
- };
10617
+ 503: {
10618
+ headers: {
10619
+ [name: string]: unknown;
9622
10620
  };
9623
- 400: {
9624
- headers: {
9625
- [name: string]: unknown;
9626
- };
9627
- content: {
9628
- "application/json": components["schemas"]["ErrorResponse"];
9629
- };
10621
+ content: {
10622
+ "application/json": components["schemas"]["ErrorResponse"];
9630
10623
  };
9631
- 401: {
9632
- headers: {
9633
- [name: string]: unknown;
9634
- };
9635
- content: {
9636
- "application/json": components["schemas"]["ErrorResponse"];
9637
- };
10624
+ };
10625
+ };
10626
+ }, {
10627
+ params: {
10628
+ path: {
10629
+ batchId: string;
10630
+ };
10631
+ };
10632
+ }, `${string}/${string}`>>;
10633
+ /**
10634
+ * Get unknown, accepted, in-progress, completed, or terminal-rejected
10635
+ * state. Unknown is explicitly nonterminal, including missing or
10636
+ * cross-tenant UUIDs, so clients retain the UUID and retry.
10637
+ */
10638
+ getManualBatchStatus: (batchId: string) => Promise<openapi_fetch.FetchResponse<{
10639
+ parameters: {
10640
+ query?: never;
10641
+ header?: never;
10642
+ path: {
10643
+ batchId: string;
10644
+ };
10645
+ cookie?: never;
10646
+ };
10647
+ requestBody?: never;
10648
+ responses: {
10649
+ 200: {
10650
+ headers: {
10651
+ [name: string]: unknown;
9638
10652
  };
9639
- 403: {
9640
- headers: {
9641
- [name: string]: unknown;
9642
- };
9643
- content: {
9644
- "application/json": components["schemas"]["ErrorResponse"];
9645
- };
10653
+ content: {
10654
+ "application/json": components["schemas"]["ManualInventoryBatchLifecycleResponse"];
9646
10655
  };
9647
- 409: {
9648
- headers: {
9649
- [name: string]: unknown;
9650
- };
9651
- content: {
9652
- "application/json": components["schemas"]["ErrorResponse"];
9653
- };
10656
+ };
10657
+ 401: {
10658
+ headers: {
10659
+ [name: string]: unknown;
9654
10660
  };
9655
- 429: {
9656
- headers: {
9657
- [name: string]: unknown;
9658
- };
9659
- content: {
9660
- "application/json": components["schemas"]["ErrorResponse"];
9661
- };
10661
+ content: {
10662
+ "application/json": components["schemas"]["ErrorResponse"];
9662
10663
  };
9663
- 503: {
9664
- headers: {
9665
- [name: string]: unknown;
9666
- };
9667
- content: {
9668
- "application/json": components["schemas"]["ErrorResponse"];
9669
- };
10664
+ };
10665
+ 403: {
10666
+ headers: {
10667
+ [name: string]: unknown;
10668
+ };
10669
+ content: {
10670
+ "application/json": components["schemas"]["ErrorResponse"];
9670
10671
  };
9671
10672
  };
9672
- }, {
9673
- body: {
9674
- qty: number;
9675
- purchaseDate?: string;
9676
- cost?: number;
9677
- taxShip?: number;
9678
- notes?: string;
9679
- catalogId: number;
9680
- manualCoffee?: never;
9681
- } | {
9682
- qty: number;
9683
- purchaseDate?: string;
9684
- cost?: number;
9685
- taxShip?: number;
9686
- notes?: string;
9687
- catalogId?: never;
9688
- manualCoffee: components["schemas"]["ManualCoffeeCreate"];
10673
+ };
10674
+ }, {
10675
+ params: {
10676
+ path: {
10677
+ batchId: string;
9689
10678
  };
9690
- params: {
9691
- header: {
9692
- "idempotency-key": string;
9693
- };
9694
- } | undefined;
9695
- }, `${string}/${string}`>>>;
9696
- };
10679
+ };
10680
+ }, `${string}/${string}`>>;
9697
10681
  /**
9698
10682
  * Update one of the caller's own inventory rows. Pass `ifMatch` (the
9699
10683
  * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).
@@ -11062,6 +12046,66 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
11062
12046
  };
11063
12047
  }, `${string}/${string}`>>;
11064
12048
  };
12049
+ profit: {
12050
+ /**
12051
+ * List the caller's owner-scoped profit summaries. API keys require
12052
+ * inventory:read, roast:read, and sales:read. Use pagination.total to
12053
+ * exhaust the complete owner result set.
12054
+ */
12055
+ list: (query?: ProfitListQuery) => Promise<openapi_fetch.FetchResponse<{
12056
+ parameters: {
12057
+ query?: {
12058
+ limit?: number;
12059
+ offset?: number | null;
12060
+ };
12061
+ header?: never;
12062
+ path?: never;
12063
+ cookie?: never;
12064
+ };
12065
+ requestBody?: never;
12066
+ responses: {
12067
+ 200: {
12068
+ headers: {
12069
+ [name: string]: unknown;
12070
+ };
12071
+ content: {
12072
+ "application/json": components["schemas"]["ProfitListResponse"];
12073
+ };
12074
+ };
12075
+ 400: {
12076
+ headers: {
12077
+ [name: string]: unknown;
12078
+ };
12079
+ content: {
12080
+ "application/json": components["schemas"]["ErrorResponse"];
12081
+ };
12082
+ };
12083
+ 401: {
12084
+ headers: {
12085
+ [name: string]: unknown;
12086
+ };
12087
+ content: {
12088
+ "application/json": components["schemas"]["ErrorResponse"];
12089
+ };
12090
+ };
12091
+ 403: {
12092
+ headers: {
12093
+ [name: string]: unknown;
12094
+ };
12095
+ content: {
12096
+ "application/json": components["schemas"]["ErrorResponse"];
12097
+ };
12098
+ };
12099
+ };
12100
+ }, {
12101
+ params: {
12102
+ query: {
12103
+ limit?: number;
12104
+ offset?: number | null;
12105
+ } | undefined;
12106
+ };
12107
+ }, `${string}/${string}`>>;
12108
+ };
11065
12109
  tasting: {
11066
12110
  /** Fetch supplier notes plus the caller's own latest tasting notes. */
11067
12111
  get: (catalogId: string, query?: TastingGetQuery) => Promise<openapi_fetch.FetchResponse<{
@@ -11221,4 +12265,4 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
11221
12265
  };
11222
12266
  type ParchmentClient = ReturnType<typeof createParchmentClient>;
11223
12267
 
11224
- export { type BriefMatchesQuery, type CatalogItem, type CatalogListQuery, type CatalogProofSummary, type CatalogSimilarQuery, type InventoryCreateRequest, type InventoryUpdateRequest, type MarketSignalsQuery, type MetadataIndexQuery, type OwnerApiUsage, type OwnerApiUsageQuery, type ParchmentClient, type ParchmentClientOptions, type PriceIndexQuery, type PriceIndexStatsQuery, type SalesCreateRequest, type SalesListQuery, type SalesUpdateRequest, type SourcingBriefCreateRequest, type TrackedLotMutation, type TrackedLotSummary, type TrackedLotsListQuery, type components, createParchmentClient, type paths };
12268
+ export { type BriefMatchesQuery, type CatalogItem, type CatalogListQuery, type CatalogProofSummary, type CatalogSimilarQuery, type InventoryCreateRequest, type InventoryUpdateRequest, type MarketSignalsQuery, type MetadataIndexQuery, type OwnerApiUsage, type OwnerApiUsageQuery, type ParchmentClient, type ParchmentClientOptions, type PriceIndexQuery, type PriceIndexStatsQuery, type ProfitItem, type ProfitListQuery, type SalesCreateRequest, type SalesListQuery, type SalesUpdateRequest, type SourcingBriefCreateRequest, type TrackedLotMutation, type TrackedLotSummary, type TrackedLotsListQuery, type components, createParchmentClient, type paths };