@purveyors/sdk 0.28.0 → 0.30.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
@@ -537,6 +537,176 @@ interface paths {
537
537
  patch?: never;
538
538
  trace?: never;
539
539
  };
540
+ "/v1/webhooks/resend/market-brief": {
541
+ parameters: {
542
+ query?: never;
543
+ header?: never;
544
+ path?: never;
545
+ cookie?: never;
546
+ };
547
+ get?: never;
548
+ put?: never;
549
+ /**
550
+ * Receive verified Market Brief provider events
551
+ * @description Verifies the Resend Svix signature against the untouched raw body, then idempotently settles provider opt-out or suppression state under Parchment authority.
552
+ */
553
+ post: {
554
+ parameters: {
555
+ query?: never;
556
+ header: {
557
+ "svix-id": string;
558
+ "svix-timestamp": string;
559
+ "svix-signature": string;
560
+ };
561
+ path?: never;
562
+ cookie?: never;
563
+ };
564
+ requestBody?: never;
565
+ responses: {
566
+ /** @description The authentic delivery was settled or ignored */
567
+ 200: {
568
+ headers: {
569
+ [name: string]: unknown;
570
+ };
571
+ content: {
572
+ "application/json": {
573
+ /** @enum {boolean} */
574
+ received: true;
575
+ };
576
+ };
577
+ };
578
+ /** @description The signature or provider payload is invalid */
579
+ 400: {
580
+ headers: {
581
+ [name: string]: unknown;
582
+ };
583
+ content: {
584
+ "application/json": components["schemas"]["ErrorResponse"];
585
+ };
586
+ };
587
+ /** @description The provider payload exceeds the bounded body limit */
588
+ 413: {
589
+ headers: {
590
+ [name: string]: unknown;
591
+ };
592
+ content: {
593
+ "application/json": components["schemas"]["ErrorResponse"];
594
+ };
595
+ };
596
+ /** @description Provider configuration or durable settlement is unavailable */
597
+ 503: {
598
+ headers: {
599
+ [name: string]: unknown;
600
+ };
601
+ content: {
602
+ "application/json": components["schemas"]["ErrorResponse"];
603
+ };
604
+ };
605
+ };
606
+ };
607
+ delete?: never;
608
+ options?: never;
609
+ head?: never;
610
+ patch?: never;
611
+ trace?: never;
612
+ };
613
+ "/v1/market-brief/drafts": {
614
+ parameters: {
615
+ query?: never;
616
+ header?: never;
617
+ path?: never;
618
+ cookie?: never;
619
+ };
620
+ get?: never;
621
+ put?: never;
622
+ /**
623
+ * Accept or replay one deployed Market Brief draft
624
+ * @description Authenticates the dedicated coffee-app machine credential, verifies the exact deployed Market Brief projection, and creates or recovers one unsent provider draft under Parchment authority.
625
+ */
626
+ post: {
627
+ parameters: {
628
+ query?: never;
629
+ header?: never;
630
+ path?: never;
631
+ cookie?: never;
632
+ };
633
+ requestBody: {
634
+ content: {
635
+ "application/json": components["schemas"]["MarketBriefDraftInput"];
636
+ };
637
+ };
638
+ responses: {
639
+ /** @description The exact immutable draft already exists */
640
+ 200: {
641
+ headers: {
642
+ [name: string]: unknown;
643
+ };
644
+ content: {
645
+ "application/json": components["schemas"]["MarketBriefDraftResponse"];
646
+ };
647
+ };
648
+ /** @description Draft creation or ambiguity recovery remains durable */
649
+ 202: {
650
+ headers: {
651
+ [name: string]: unknown;
652
+ };
653
+ content: {
654
+ "application/json": components["schemas"]["MarketBriefDraftResponse"];
655
+ };
656
+ };
657
+ /** @description The submitted deployment or projection is invalid */
658
+ 400: {
659
+ headers: {
660
+ [name: string]: unknown;
661
+ };
662
+ content: {
663
+ "application/json": components["schemas"]["ErrorResponse"];
664
+ };
665
+ };
666
+ /** @description The dedicated machine credential is absent or invalid */
667
+ 401: {
668
+ headers: {
669
+ [name: string]: unknown;
670
+ };
671
+ content: {
672
+ "application/json": components["schemas"]["ErrorResponse"];
673
+ };
674
+ };
675
+ /** @description The deployment, immutable version, or provider draft conflicts with durable state */
676
+ 409: {
677
+ headers: {
678
+ [name: string]: unknown;
679
+ };
680
+ content: {
681
+ "application/json": components["schemas"]["ErrorResponse"];
682
+ };
683
+ };
684
+ /** @description The request body exceeds the bounded projection limit */
685
+ 413: {
686
+ headers: {
687
+ [name: string]: unknown;
688
+ };
689
+ content: {
690
+ "application/json": components["schemas"]["ErrorResponse"];
691
+ };
692
+ };
693
+ /** @description Draft admission, deployed verification, storage, or provider recovery is unavailable */
694
+ 503: {
695
+ headers: {
696
+ [name: string]: unknown;
697
+ };
698
+ content: {
699
+ "application/json": components["schemas"]["ErrorResponse"];
700
+ };
701
+ };
702
+ };
703
+ };
704
+ delete?: never;
705
+ options?: never;
706
+ head?: never;
707
+ patch?: never;
708
+ trace?: never;
709
+ };
540
710
  "/v1/billing/subscriptions": {
541
711
  parameters: {
542
712
  query?: never;
@@ -1521,6 +1691,67 @@ interface paths {
1521
1691
  patch?: never;
1522
1692
  trace?: never;
1523
1693
  };
1694
+ "/v1/email-subscriptions/market-read/unsubscribe": {
1695
+ parameters: {
1696
+ query?: never;
1697
+ header?: never;
1698
+ path?: never;
1699
+ cookie?: never;
1700
+ };
1701
+ get?: never;
1702
+ put?: never;
1703
+ /**
1704
+ * Unsubscribe from Market Read without a user session
1705
+ * @description Accepts an opaque account-lifetime capability and idempotently reduces Market Read consent. The response does not reveal whether the capability exists or whether consent changed.
1706
+ */
1707
+ post: {
1708
+ parameters: {
1709
+ query?: never;
1710
+ header?: never;
1711
+ path?: never;
1712
+ cookie?: never;
1713
+ };
1714
+ requestBody: {
1715
+ content: {
1716
+ "application/json": components["schemas"]["MarketReadUnsubscribeInput"];
1717
+ };
1718
+ };
1719
+ responses: {
1720
+ /** @description The unsubscribe request was accepted */
1721
+ 200: {
1722
+ headers: {
1723
+ [name: string]: unknown;
1724
+ };
1725
+ content: {
1726
+ "application/json": components["schemas"]["MarketReadUnsubscribeResponse"];
1727
+ };
1728
+ };
1729
+ /** @description Invalid unsubscribe request */
1730
+ 400: {
1731
+ headers: {
1732
+ [name: string]: unknown;
1733
+ };
1734
+ content: {
1735
+ "application/json": components["schemas"]["ErrorResponse"];
1736
+ };
1737
+ };
1738
+ /** @description Email preference storage is unavailable */
1739
+ 503: {
1740
+ headers: {
1741
+ [name: string]: unknown;
1742
+ };
1743
+ content: {
1744
+ "application/json": components["schemas"]["ErrorResponse"];
1745
+ };
1746
+ };
1747
+ };
1748
+ };
1749
+ delete?: never;
1750
+ options?: never;
1751
+ head?: never;
1752
+ patch?: never;
1753
+ trace?: never;
1754
+ };
1524
1755
  "/v1/cli-auth/requests": {
1525
1756
  parameters: {
1526
1757
  query?: never;
@@ -2880,7 +3111,7 @@ interface paths {
2880
3111
  patch?: never;
2881
3112
  trace?: never;
2882
3113
  };
2883
- "/v1/price-index/stats": {
3114
+ "/v1/market/overview": {
2884
3115
  parameters: {
2885
3116
  query?: never;
2886
3117
  header?: never;
@@ -2888,33 +3119,25 @@ interface paths {
2888
3119
  cookie?: never;
2889
3120
  };
2890
3121
  /**
2891
- * Price movement significance stats
2892
- * @description Precomputed movement-significance stats over price_index_move_stats. The unfiltered retail slice is public; origin/process/wholesale filters require Parchment Intelligence (ppiAccess).
3122
+ * Public green-coffee market overview
3123
+ * @description Returns aggregate-only daily change, live catalog coverage, movement velocity, processing mix, and origin price distributions over the public catalog. The public-demo credential, authenticated sessions, and API keys with catalog public-read access receive the same public evidence; direct anonymous API calls are rejected. Named lots and entitled supplier evidence are separate resources.
2893
3124
  */
2894
3125
  get: {
2895
3126
  parameters: {
2896
- query?: {
2897
- page?: number;
2898
- limit?: number;
2899
- origin?: string;
2900
- process?: string;
2901
- market?: "retail" | "wholesale" | "all";
2902
- window?: "7d" | "30d";
2903
- baseline_weeks?: number;
2904
- };
3127
+ query?: never;
2905
3128
  header?: never;
2906
3129
  path?: never;
2907
3130
  cookie?: never;
2908
3131
  };
2909
3132
  requestBody?: never;
2910
3133
  responses: {
2911
- /** @description A page of price movement significance stats */
3134
+ /** @description Public aggregate market overview */
2912
3135
  200: {
2913
3136
  headers: {
2914
3137
  [name: string]: unknown;
2915
3138
  };
2916
3139
  content: {
2917
- "application/json": components["schemas"]["PriceIndexStatsResponse"];
3140
+ "application/json": components["schemas"]["MarketOverviewResponse"];
2918
3141
  };
2919
3142
  };
2920
3143
  /** @description Authentication required */
@@ -2935,6 +3158,15 @@ interface paths {
2935
3158
  "application/json": components["schemas"]["ErrorResponse"];
2936
3159
  };
2937
3160
  };
3161
+ /** @description Public market overview capacity exceeded */
3162
+ 503: {
3163
+ headers: {
3164
+ [name: string]: unknown;
3165
+ };
3166
+ content: {
3167
+ "application/json": components["schemas"]["ErrorResponse"];
3168
+ };
3169
+ };
2938
3170
  };
2939
3171
  };
2940
3172
  put?: never;
@@ -2945,7 +3177,7 @@ interface paths {
2945
3177
  patch?: never;
2946
3178
  trace?: never;
2947
3179
  };
2948
- "/v1/market/metadata-index": {
3180
+ "/v1/price-index/stats": {
2949
3181
  parameters: {
2950
3182
  query?: never;
2951
3183
  header?: never;
@@ -2953,20 +3185,19 @@ interface paths {
2953
3185
  cookie?: never;
2954
3186
  };
2955
3187
  /**
2956
- * Metadata-trend index (process/disclosure/Purveyor Score over time)
2957
- * @description Metadata-trend index over metadata_index_snapshots. The process/retail/month slice is public; other dimensions, origins, and grains require Parchment Intelligence (ppiAccess). Purveyor Score dimensions use coffee_catalog.purveyor_score and companion fields, never supplier-stated score_value.
3188
+ * Price movement significance stats
3189
+ * @description Precomputed movement-significance stats over price_index_move_stats. The unfiltered retail slice is public; origin/process/wholesale filters require Parchment Intelligence (ppiAccess).
2958
3190
  */
2959
3191
  get: {
2960
3192
  parameters: {
2961
3193
  query?: {
2962
3194
  page?: number;
2963
3195
  limit?: number;
2964
- dimension?: "process" | "disclosure" | "purveyor_score" | "purveyor_score_confidence" | "purveyor_score_tier";
2965
3196
  origin?: string;
3197
+ process?: string;
2966
3198
  market?: "retail" | "wholesale" | "all";
2967
- grain?: "week" | "month";
2968
- from?: string;
2969
- to?: string;
3199
+ window?: "7d" | "30d";
3200
+ baseline_weeks?: number;
2970
3201
  };
2971
3202
  header?: never;
2972
3203
  path?: never;
@@ -2974,13 +3205,13 @@ interface paths {
2974
3205
  };
2975
3206
  requestBody?: never;
2976
3207
  responses: {
2977
- /** @description A metadata-trend series */
3208
+ /** @description A page of price movement significance stats */
2978
3209
  200: {
2979
3210
  headers: {
2980
3211
  [name: string]: unknown;
2981
3212
  };
2982
3213
  content: {
2983
- "application/json": components["schemas"]["MetadataIndexResponse"];
3214
+ "application/json": components["schemas"]["PriceIndexStatsResponse"];
2984
3215
  };
2985
3216
  };
2986
3217
  /** @description Authentication required */
@@ -3011,7 +3242,7 @@ interface paths {
3011
3242
  patch?: never;
3012
3243
  trace?: never;
3013
3244
  };
3014
- "/v1/catalog/{id}/similar": {
3245
+ "/v1/market/metadata-index": {
3015
3246
  parameters: {
3016
3247
  query?: never;
3017
3248
  header?: never;
@@ -3019,21 +3250,87 @@ interface paths {
3019
3250
  cookie?: never;
3020
3251
  };
3021
3252
  /**
3022
- * Find catalog coffees similar to a target coffee
3023
- * @description Vector-similarity matches between supplier catalog coffees, with deterministic identity gating, supplier-diversity re-ranking, and a canonical/similar split. User-owned coffees are excluded. Requires the bean-matching capability (a member session or a paid API plan).
3253
+ * Metadata-trend index (process/disclosure/Purveyor Score over time)
3254
+ * @description Metadata-trend index over metadata_index_snapshots. The process/retail/month slice is public; other dimensions, origins, and grains require Parchment Intelligence (ppiAccess). Purveyor Score dimensions use coffee_catalog.purveyor_score and companion fields, never supplier-stated score_value.
3024
3255
  */
3025
3256
  get: {
3026
3257
  parameters: {
3027
3258
  query?: {
3028
- threshold?: string;
3259
+ page?: number;
3029
3260
  limit?: number;
3030
- stocked_only?: "true" | "false";
3031
- mode?: "all" | "likely_same" | "similar_profile";
3032
- };
3033
- header?: never;
3034
- path: {
3035
- id: string;
3036
- };
3261
+ dimension?: "process" | "disclosure" | "purveyor_score" | "purveyor_score_confidence" | "purveyor_score_tier";
3262
+ origin?: string;
3263
+ market?: "retail" | "wholesale" | "all";
3264
+ grain?: "week" | "month";
3265
+ from?: string;
3266
+ to?: string;
3267
+ };
3268
+ header?: never;
3269
+ path?: never;
3270
+ cookie?: never;
3271
+ };
3272
+ requestBody?: never;
3273
+ responses: {
3274
+ /** @description A metadata-trend series */
3275
+ 200: {
3276
+ headers: {
3277
+ [name: string]: unknown;
3278
+ };
3279
+ content: {
3280
+ "application/json": components["schemas"]["MetadataIndexResponse"];
3281
+ };
3282
+ };
3283
+ /** @description Authentication required */
3284
+ 401: {
3285
+ headers: {
3286
+ [name: string]: unknown;
3287
+ };
3288
+ content: {
3289
+ "application/json": components["schemas"]["ErrorResponse"];
3290
+ };
3291
+ };
3292
+ /** @description Insufficient entitlement (plan or role) */
3293
+ 403: {
3294
+ headers: {
3295
+ [name: string]: unknown;
3296
+ };
3297
+ content: {
3298
+ "application/json": components["schemas"]["ErrorResponse"];
3299
+ };
3300
+ };
3301
+ };
3302
+ };
3303
+ put?: never;
3304
+ post?: never;
3305
+ delete?: never;
3306
+ options?: never;
3307
+ head?: never;
3308
+ patch?: never;
3309
+ trace?: never;
3310
+ };
3311
+ "/v1/catalog/{id}/similar": {
3312
+ parameters: {
3313
+ query?: never;
3314
+ header?: never;
3315
+ path?: never;
3316
+ cookie?: never;
3317
+ };
3318
+ /**
3319
+ * Find catalog coffees similar to a target coffee
3320
+ * @description Vector-similarity matches between supplier catalog coffees, with deterministic identity gating, supplier-diversity re-ranking, and a canonical/similar split. User-owned coffees are excluded. Requires the bean-matching capability (a member session or a paid API plan).
3321
+ */
3322
+ get: {
3323
+ parameters: {
3324
+ query?: {
3325
+ threshold?: string;
3326
+ limit?: number;
3327
+ stocked_only?: "true" | "false";
3328
+ mode?: "all" | "likely_same" | "similar_profile";
3329
+ };
3330
+ header?: never;
3331
+ path: {
3332
+ id: string;
3333
+ };
3037
3334
  cookie?: never;
3038
3335
  };
3039
3336
  requestBody?: never;
@@ -4169,7 +4466,7 @@ interface paths {
4169
4466
  patch?: never;
4170
4467
  trace?: never;
4171
4468
  };
4172
- "/v1/inventory/{id}": {
4469
+ "/v1/inventory/catalog-batches/reservations": {
4173
4470
  parameters: {
4174
4471
  query?: never;
4175
4472
  header?: never;
@@ -4178,29 +4475,30 @@ interface paths {
4178
4475
  };
4179
4476
  get?: never;
4180
4477
  put?: never;
4181
- post?: never;
4182
4478
  /**
4183
- * Delete an owner inventory item
4184
- * @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.
4479
+ * Reserve a catalog inventory batch
4480
+ * @description Durably accept complete canonical intent for 1–50 existing visible catalog coffees before mutation starts. After acceptance, clients retain only batchId. Requires an authenticated session, or an owner-bound API key carrying the exact inventory:write scope.
4185
4481
  */
4186
- delete: {
4482
+ post: {
4187
4483
  parameters: {
4188
4484
  query?: never;
4189
4485
  header?: never;
4190
- path: {
4191
- id: number;
4192
- };
4486
+ path?: never;
4193
4487
  cookie?: never;
4194
4488
  };
4195
- requestBody?: never;
4489
+ requestBody?: {
4490
+ content: {
4491
+ "application/json": components["schemas"]["CatalogInventoryBatchReserveRequest"];
4492
+ };
4493
+ };
4196
4494
  responses: {
4197
- /** @description The inventory row was deleted */
4198
- 200: {
4495
+ /** @description The durable accepted lifecycle */
4496
+ 201: {
4199
4497
  headers: {
4200
4498
  [name: string]: unknown;
4201
4499
  };
4202
4500
  content: {
4203
- "application/json": components["schemas"]["InventoryDeleteResponse"];
4501
+ "application/json": components["schemas"]["CatalogInventoryBatchLifecycleResponse"];
4204
4502
  };
4205
4503
  };
4206
4504
  /** @description Invalid query parameter */
@@ -4230,16 +4528,7 @@ interface paths {
4230
4528
  "application/json": components["schemas"]["ErrorResponse"];
4231
4529
  };
4232
4530
  };
4233
- /** @description No such inventory item owned by the caller */
4234
- 404: {
4235
- headers: {
4236
- [name: string]: unknown;
4237
- };
4238
- content: {
4239
- "application/json": components["schemas"]["ErrorResponse"];
4240
- };
4241
- };
4242
- /** @description Write conflict: dependent roast/sales rows exist, or an If-Match precondition failed */
4531
+ /** @description The batch UUID is already reserved for different canonical catalog inventory intent */
4243
4532
  409: {
4244
4533
  headers: {
4245
4534
  [name: string]: unknown;
@@ -4257,7 +4546,7 @@ interface paths {
4257
4546
  "application/json": components["schemas"]["ErrorResponse"];
4258
4547
  };
4259
4548
  };
4260
- /** @description Inventory writes are not enabled in this environment */
4549
+ /** @description Catalog inventory batch writes are disabled or lifecycle storage is temporarily unavailable */
4261
4550
  503: {
4262
4551
  headers: {
4263
4552
  [name: string]: unknown;
@@ -4268,36 +4557,43 @@ interface paths {
4268
4557
  };
4269
4558
  };
4270
4559
  };
4560
+ delete?: never;
4271
4561
  options?: never;
4272
4562
  head?: never;
4563
+ patch?: never;
4564
+ trace?: never;
4565
+ };
4566
+ "/v1/inventory/catalog-batches/{batchId}/commit": {
4567
+ parameters: {
4568
+ query?: never;
4569
+ header?: never;
4570
+ path?: never;
4571
+ cookie?: never;
4572
+ };
4573
+ get?: never;
4574
+ put?: never;
4273
4575
  /**
4274
- * Update an owner inventory item
4275
- * @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.
4576
+ * Commit a reserved catalog inventory batch
4577
+ * @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.
4276
4578
  */
4277
- patch: {
4579
+ post: {
4278
4580
  parameters: {
4279
4581
  query?: never;
4280
- header?: {
4281
- "if-match"?: string;
4282
- };
4582
+ header?: never;
4283
4583
  path: {
4284
- id: number;
4584
+ batchId: string;
4285
4585
  };
4286
4586
  cookie?: never;
4287
4587
  };
4288
- requestBody?: {
4289
- content: {
4290
- "application/json": components["schemas"]["InventoryUpdateRequest"];
4291
- };
4292
- };
4588
+ requestBody?: never;
4293
4589
  responses: {
4294
- /** @description The updated inventory row */
4590
+ /** @description The current identity-only lifecycle, including completion or terminal rejection */
4295
4591
  200: {
4296
4592
  headers: {
4297
4593
  [name: string]: unknown;
4298
4594
  };
4299
4595
  content: {
4300
- "application/json": components["schemas"]["InventoryItemResponse"];
4596
+ "application/json": components["schemas"]["CatalogInventoryBatchLifecycleResponse"];
4301
4597
  };
4302
4598
  };
4303
4599
  /** @description Invalid query parameter */
@@ -4327,7 +4623,7 @@ interface paths {
4327
4623
  "application/json": components["schemas"]["ErrorResponse"];
4328
4624
  };
4329
4625
  };
4330
- /** @description No such inventory item owned by the caller */
4626
+ /** @description No reserved catalog inventory batch exists for this owner and batch UUID */
4331
4627
  404: {
4332
4628
  headers: {
4333
4629
  [name: string]: unknown;
@@ -4336,15 +4632,6 @@ interface paths {
4336
4632
  "application/json": components["schemas"]["ErrorResponse"];
4337
4633
  };
4338
4634
  };
4339
- /** @description Write conflict: dependent roast/sales rows exist, or an If-Match precondition failed */
4340
- 409: {
4341
- headers: {
4342
- [name: string]: unknown;
4343
- };
4344
- content: {
4345
- "application/json": components["schemas"]["ErrorResponse"];
4346
- };
4347
- };
4348
4635
  /** @description Per-user mutation throttle exceeded; retry after a short wait */
4349
4636
  429: {
4350
4637
  headers: {
@@ -4354,7 +4641,7 @@ interface paths {
4354
4641
  "application/json": components["schemas"]["ErrorResponse"];
4355
4642
  };
4356
4643
  };
4357
- /** @description Inventory writes are not enabled in this environment */
4644
+ /** @description Catalog inventory batch writes are disabled or lifecycle storage is temporarily unavailable */
4358
4645
  503: {
4359
4646
  headers: {
4360
4647
  [name: string]: unknown;
@@ -4365,9 +4652,13 @@ interface paths {
4365
4652
  };
4366
4653
  };
4367
4654
  };
4655
+ delete?: never;
4656
+ options?: never;
4657
+ head?: never;
4658
+ patch?: never;
4368
4659
  trace?: never;
4369
4660
  };
4370
- "/v1/roasts": {
4661
+ "/v1/inventory/catalog-batches/{batchId}/status": {
4371
4662
  parameters: {
4372
4663
  query?: never;
4373
4664
  header?: never;
@@ -4375,36 +4666,27 @@ interface paths {
4375
4666
  cookie?: never;
4376
4667
  };
4377
4668
  /**
4378
- * List owner roasts
4379
- * @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.
4669
+ * Get catalog inventory batch lifecycle
4670
+ * @description Return unknown, accepted, in_progress, completed, or terminal_rejected for owner-scoped durable intent. Missing and cross-tenant UUIDs are the same nonterminal unknown state.
4380
4671
  */
4381
4672
  get: {
4382
4673
  parameters: {
4383
- query?: {
4384
- coffee_id?: number;
4385
- roast_id?: number;
4386
- batch_name?: string;
4387
- coffee_name?: string;
4388
- date_start?: string;
4389
- date_end?: string;
4390
- stocked_only?: boolean | null;
4391
- catalog_id?: number;
4392
- limit?: number;
4393
- offset?: number | null;
4394
- };
4674
+ query?: never;
4395
4675
  header?: never;
4396
- path?: never;
4676
+ path: {
4677
+ batchId: string;
4678
+ };
4397
4679
  cookie?: never;
4398
4680
  };
4399
4681
  requestBody?: never;
4400
4682
  responses: {
4401
- /** @description The principal's own roast profiles */
4683
+ /** @description The identity-only catalog inventory batch lifecycle */
4402
4684
  200: {
4403
4685
  headers: {
4404
4686
  [name: string]: unknown;
4405
4687
  };
4406
4688
  content: {
4407
- "application/json": components["schemas"]["RoastListResponse"];
4689
+ "application/json": components["schemas"]["CatalogInventoryBatchLifecycleResponse"];
4408
4690
  };
4409
4691
  };
4410
4692
  /** @description Invalid query parameter */
@@ -4434,35 +4716,57 @@ interface paths {
4434
4716
  "application/json": components["schemas"]["ErrorResponse"];
4435
4717
  };
4436
4718
  };
4719
+ /** @description Catalog inventory batch writes are disabled or lifecycle storage is temporarily unavailable */
4720
+ 503: {
4721
+ headers: {
4722
+ [name: string]: unknown;
4723
+ };
4724
+ content: {
4725
+ "application/json": components["schemas"]["ErrorResponse"];
4726
+ };
4727
+ };
4437
4728
  };
4438
4729
  };
4439
4730
  put?: never;
4731
+ post?: never;
4732
+ delete?: never;
4733
+ options?: never;
4734
+ head?: never;
4735
+ patch?: never;
4736
+ trace?: never;
4737
+ };
4738
+ "/v1/inventory/{id}": {
4739
+ parameters: {
4740
+ query?: never;
4741
+ header?: never;
4742
+ path?: never;
4743
+ cookie?: never;
4744
+ };
4745
+ get?: never;
4746
+ put?: never;
4747
+ post?: never;
4440
4748
  /**
4441
- * Create an owner roast
4442
- * @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.
4749
+ * Delete an owner inventory item
4750
+ * @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.
4443
4751
  */
4444
- post: {
4752
+ delete: {
4445
4753
  parameters: {
4446
4754
  query?: never;
4447
- header?: {
4448
- "idempotency-key"?: string;
4755
+ header?: never;
4756
+ path: {
4757
+ id: number;
4449
4758
  };
4450
- path?: never;
4451
4759
  cookie?: never;
4452
4760
  };
4453
- requestBody: {
4454
- content: {
4455
- "application/json": components["schemas"]["RoastCreateRequest"];
4456
- };
4457
- };
4761
+ requestBody?: never;
4458
4762
  responses: {
4459
- /** @description The created roast profile */
4460
- 201: {
4763
+ /** @description The inventory row was deleted */
4764
+ 200: {
4461
4765
  headers: {
4462
4766
  [name: string]: unknown;
4463
4767
  };
4464
4768
  content: {
4465
- "application/json": components["schemas"]["RoastDetailResponse"];
4769
+ "application/json": components["schemas"]["InventoryDeleteResponse"];
4466
4770
  };
4467
4771
  };
4468
4772
  /** @description Invalid query parameter */
@@ -4492,7 +4796,7 @@ interface paths {
4492
4796
  "application/json": components["schemas"]["ErrorResponse"];
4493
4797
  };
4494
4798
  };
4495
- /** @description No such coffee lot owned by the caller */
4799
+ /** @description No such inventory item owned by the caller */
4496
4800
  404: {
4497
4801
  headers: {
4498
4802
  [name: string]: unknown;
@@ -4501,7 +4805,7 @@ interface paths {
4501
4805
  "application/json": components["schemas"]["ErrorResponse"];
4502
4806
  };
4503
4807
  };
4504
- /** @description Write conflict: an If-Match precondition failed */
4808
+ /** @description Write conflict: dependent roast/sales rows exist, or an If-Match precondition failed */
4505
4809
  409: {
4506
4810
  headers: {
4507
4811
  [name: string]: unknown;
@@ -4519,7 +4823,7 @@ interface paths {
4519
4823
  "application/json": components["schemas"]["ErrorResponse"];
4520
4824
  };
4521
4825
  };
4522
- /** @description Roast writes are not enabled in this environment */
4826
+ /** @description Inventory writes are not enabled in this environment */
4523
4827
  503: {
4524
4828
  headers: {
4525
4829
  [name: string]: unknown;
@@ -4530,38 +4834,300 @@ interface paths {
4530
4834
  };
4531
4835
  };
4532
4836
  };
4533
- delete?: never;
4534
4837
  options?: never;
4535
4838
  head?: never;
4536
- patch?: never;
4537
- trace?: never;
4538
- };
4539
- "/v1/roasts/{id}": {
4540
- parameters: {
4541
- query?: never;
4542
- header?: never;
4543
- path?: never;
4544
- cookie?: never;
4545
- };
4546
4839
  /**
4547
- * Get an owner roast
4548
- * @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.
4840
+ * Update an owner inventory item
4841
+ * @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.
4549
4842
  */
4550
- get: {
4843
+ patch: {
4551
4844
  parameters: {
4552
- query?: {
4553
- includeTemps?: boolean | null;
4554
- includeEvents?: boolean | null;
4845
+ query?: never;
4846
+ header?: {
4847
+ "if-match"?: string;
4555
4848
  };
4556
- header?: never;
4557
4849
  path: {
4558
- id: string;
4850
+ id: number;
4559
4851
  };
4560
4852
  cookie?: never;
4561
4853
  };
4562
- requestBody?: never;
4563
- responses: {
4564
- /** @description The requested roast profile */
4854
+ requestBody?: {
4855
+ content: {
4856
+ "application/json": components["schemas"]["InventoryUpdateRequest"];
4857
+ };
4858
+ };
4859
+ responses: {
4860
+ /** @description The updated inventory row */
4861
+ 200: {
4862
+ headers: {
4863
+ [name: string]: unknown;
4864
+ };
4865
+ content: {
4866
+ "application/json": components["schemas"]["InventoryItemResponse"];
4867
+ };
4868
+ };
4869
+ /** @description Invalid query parameter */
4870
+ 400: {
4871
+ headers: {
4872
+ [name: string]: unknown;
4873
+ };
4874
+ content: {
4875
+ "application/json": components["schemas"]["ErrorResponse"];
4876
+ };
4877
+ };
4878
+ /** @description Authentication required */
4879
+ 401: {
4880
+ headers: {
4881
+ [name: string]: unknown;
4882
+ };
4883
+ content: {
4884
+ "application/json": components["schemas"]["ErrorResponse"];
4885
+ };
4886
+ };
4887
+ /** @description Insufficient entitlement (plan or role) */
4888
+ 403: {
4889
+ headers: {
4890
+ [name: string]: unknown;
4891
+ };
4892
+ content: {
4893
+ "application/json": components["schemas"]["ErrorResponse"];
4894
+ };
4895
+ };
4896
+ /** @description No such inventory item owned by the caller */
4897
+ 404: {
4898
+ headers: {
4899
+ [name: string]: unknown;
4900
+ };
4901
+ content: {
4902
+ "application/json": components["schemas"]["ErrorResponse"];
4903
+ };
4904
+ };
4905
+ /** @description Write conflict: dependent roast/sales rows exist, or an If-Match precondition failed */
4906
+ 409: {
4907
+ headers: {
4908
+ [name: string]: unknown;
4909
+ };
4910
+ content: {
4911
+ "application/json": components["schemas"]["ErrorResponse"];
4912
+ };
4913
+ };
4914
+ /** @description Per-user mutation throttle exceeded; retry after a short wait */
4915
+ 429: {
4916
+ headers: {
4917
+ [name: string]: unknown;
4918
+ };
4919
+ content: {
4920
+ "application/json": components["schemas"]["ErrorResponse"];
4921
+ };
4922
+ };
4923
+ /** @description Inventory writes are not enabled in this environment */
4924
+ 503: {
4925
+ headers: {
4926
+ [name: string]: unknown;
4927
+ };
4928
+ content: {
4929
+ "application/json": components["schemas"]["ErrorResponse"];
4930
+ };
4931
+ };
4932
+ };
4933
+ };
4934
+ trace?: never;
4935
+ };
4936
+ "/v1/roasts": {
4937
+ parameters: {
4938
+ query?: never;
4939
+ header?: never;
4940
+ path?: never;
4941
+ cookie?: never;
4942
+ };
4943
+ /**
4944
+ * List owner roasts
4945
+ * @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.
4946
+ */
4947
+ get: {
4948
+ parameters: {
4949
+ query?: {
4950
+ coffee_id?: number;
4951
+ roast_id?: number;
4952
+ batch_name?: string;
4953
+ coffee_name?: string;
4954
+ date_start?: string;
4955
+ date_end?: string;
4956
+ stocked_only?: boolean | null;
4957
+ catalog_id?: number;
4958
+ limit?: number;
4959
+ offset?: number | null;
4960
+ };
4961
+ header?: never;
4962
+ path?: never;
4963
+ cookie?: never;
4964
+ };
4965
+ requestBody?: never;
4966
+ responses: {
4967
+ /** @description The principal's own roast profiles */
4968
+ 200: {
4969
+ headers: {
4970
+ [name: string]: unknown;
4971
+ };
4972
+ content: {
4973
+ "application/json": components["schemas"]["RoastListResponse"];
4974
+ };
4975
+ };
4976
+ /** @description Invalid query parameter */
4977
+ 400: {
4978
+ headers: {
4979
+ [name: string]: unknown;
4980
+ };
4981
+ content: {
4982
+ "application/json": components["schemas"]["ErrorResponse"];
4983
+ };
4984
+ };
4985
+ /** @description Authentication required */
4986
+ 401: {
4987
+ headers: {
4988
+ [name: string]: unknown;
4989
+ };
4990
+ content: {
4991
+ "application/json": components["schemas"]["ErrorResponse"];
4992
+ };
4993
+ };
4994
+ /** @description Insufficient entitlement (plan or role) */
4995
+ 403: {
4996
+ headers: {
4997
+ [name: string]: unknown;
4998
+ };
4999
+ content: {
5000
+ "application/json": components["schemas"]["ErrorResponse"];
5001
+ };
5002
+ };
5003
+ };
5004
+ };
5005
+ put?: never;
5006
+ /**
5007
+ * Create an owner roast
5008
+ * @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.
5009
+ */
5010
+ post: {
5011
+ parameters: {
5012
+ query?: never;
5013
+ header?: {
5014
+ "idempotency-key"?: string;
5015
+ };
5016
+ path?: never;
5017
+ cookie?: never;
5018
+ };
5019
+ requestBody: {
5020
+ content: {
5021
+ "application/json": components["schemas"]["RoastCreateRequest"];
5022
+ };
5023
+ };
5024
+ responses: {
5025
+ /** @description The created roast profile */
5026
+ 201: {
5027
+ headers: {
5028
+ [name: string]: unknown;
5029
+ };
5030
+ content: {
5031
+ "application/json": components["schemas"]["RoastDetailResponse"];
5032
+ };
5033
+ };
5034
+ /** @description Invalid query parameter */
5035
+ 400: {
5036
+ headers: {
5037
+ [name: string]: unknown;
5038
+ };
5039
+ content: {
5040
+ "application/json": components["schemas"]["ErrorResponse"];
5041
+ };
5042
+ };
5043
+ /** @description Authentication required */
5044
+ 401: {
5045
+ headers: {
5046
+ [name: string]: unknown;
5047
+ };
5048
+ content: {
5049
+ "application/json": components["schemas"]["ErrorResponse"];
5050
+ };
5051
+ };
5052
+ /** @description Insufficient entitlement (plan or role) */
5053
+ 403: {
5054
+ headers: {
5055
+ [name: string]: unknown;
5056
+ };
5057
+ content: {
5058
+ "application/json": components["schemas"]["ErrorResponse"];
5059
+ };
5060
+ };
5061
+ /** @description No such coffee lot owned by the caller */
5062
+ 404: {
5063
+ headers: {
5064
+ [name: string]: unknown;
5065
+ };
5066
+ content: {
5067
+ "application/json": components["schemas"]["ErrorResponse"];
5068
+ };
5069
+ };
5070
+ /** @description Write conflict: an If-Match precondition failed */
5071
+ 409: {
5072
+ headers: {
5073
+ [name: string]: unknown;
5074
+ };
5075
+ content: {
5076
+ "application/json": components["schemas"]["ErrorResponse"];
5077
+ };
5078
+ };
5079
+ /** @description Per-user mutation throttle exceeded; retry after a short wait */
5080
+ 429: {
5081
+ headers: {
5082
+ [name: string]: unknown;
5083
+ };
5084
+ content: {
5085
+ "application/json": components["schemas"]["ErrorResponse"];
5086
+ };
5087
+ };
5088
+ /** @description Roast writes are not enabled in this environment */
5089
+ 503: {
5090
+ headers: {
5091
+ [name: string]: unknown;
5092
+ };
5093
+ content: {
5094
+ "application/json": components["schemas"]["ErrorResponse"];
5095
+ };
5096
+ };
5097
+ };
5098
+ };
5099
+ delete?: never;
5100
+ options?: never;
5101
+ head?: never;
5102
+ patch?: never;
5103
+ trace?: never;
5104
+ };
5105
+ "/v1/roasts/{id}": {
5106
+ parameters: {
5107
+ query?: never;
5108
+ header?: never;
5109
+ path?: never;
5110
+ cookie?: never;
5111
+ };
5112
+ /**
5113
+ * Get an owner roast
5114
+ * @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.
5115
+ */
5116
+ get: {
5117
+ parameters: {
5118
+ query?: {
5119
+ includeTemps?: boolean | null;
5120
+ includeEvents?: boolean | null;
5121
+ };
5122
+ header?: never;
5123
+ path: {
5124
+ id: string;
5125
+ };
5126
+ cookie?: never;
5127
+ };
5128
+ requestBody?: never;
5129
+ responses: {
5130
+ /** @description The requested roast profile */
4565
5131
  200: {
4566
5132
  headers: {
4567
5133
  [name: string]: unknown;
@@ -5877,6 +6443,34 @@ interface components {
5877
6443
  status: "accepted" | "attempting" | "published" | "settled" | "closed" | "conflict";
5878
6444
  clientSecret: string | null;
5879
6445
  };
6446
+ MarketBriefDraftState: {
6447
+ /** Format: uuid */
6448
+ draftId: string;
6449
+ edition: number;
6450
+ productionCommit: string;
6451
+ /** @enum {string} */
6452
+ status: "creating" | "uncertain" | "created" | "conflict";
6453
+ };
6454
+ MarketBriefDraftResponse: {
6455
+ data: components["schemas"]["MarketBriefDraftState"];
6456
+ };
6457
+ MarketBriefDraftInput: {
6458
+ /** @enum {number} */
6459
+ schemaVersion: 1;
6460
+ /** @enum {string} */
6461
+ publication: "market-brief";
6462
+ edition: number;
6463
+ slug: string;
6464
+ /** Format: uri */
6465
+ canonicalUrl: string;
6466
+ productionCommit: string;
6467
+ /** @enum {string} */
6468
+ rendererVersion: "market-brief-email-v1";
6469
+ projectionSha256: string;
6470
+ subject: string;
6471
+ html: string;
6472
+ text: string;
6473
+ };
5880
6474
  BillingSubscriptionOperation: {
5881
6475
  /** Format: uuid */
5882
6476
  operationId: string;
@@ -6024,6 +6618,16 @@ interface components {
6024
6618
  /** @enum {boolean} */
6025
6619
  subscribed: false;
6026
6620
  };
6621
+ MarketReadUnsubscribeResponse: {
6622
+ data: {
6623
+ /** @enum {boolean} */
6624
+ accepted: true;
6625
+ };
6626
+ };
6627
+ MarketReadUnsubscribeInput: {
6628
+ /** Format: uuid */
6629
+ capability: string;
6630
+ };
6027
6631
  CatalogAccessResponse: {
6028
6632
  visibility: {
6029
6633
  isPrivilegedSession: boolean;
@@ -6937,6 +7541,135 @@ interface components {
6937
7541
  };
6938
7542
  };
6939
7543
  };
7544
+ MarketOverviewResponse: {
7545
+ data: {
7546
+ daily: {
7547
+ asOf: string | null;
7548
+ totalStocked: number;
7549
+ totalSuppliers: number;
7550
+ totalOrigins: number;
7551
+ retailMedian: number | null;
7552
+ changes: {
7553
+ retailMedian7d: number | null;
7554
+ retailMedian30d: number | null;
7555
+ supply7d: number | null;
7556
+ supply30d: number | null;
7557
+ };
7558
+ };
7559
+ coverage: {
7560
+ totalListings: number;
7561
+ stockedListings: {
7562
+ total: number;
7563
+ retail: number;
7564
+ wholesale: number;
7565
+ };
7566
+ stockedOrigins: {
7567
+ total: number;
7568
+ retail: number;
7569
+ wholesale: number;
7570
+ };
7571
+ stockedSuppliers: {
7572
+ total: number;
7573
+ retail: number;
7574
+ wholesale: number;
7575
+ };
7576
+ };
7577
+ movement: {
7578
+ referenceDate: string;
7579
+ arrivals: {
7580
+ sevenDay: {
7581
+ retail: number;
7582
+ wholesale: number;
7583
+ };
7584
+ thirtyDay: {
7585
+ retail: number;
7586
+ wholesale: number;
7587
+ };
7588
+ };
7589
+ delistings: {
7590
+ sevenDay: {
7591
+ retail: number;
7592
+ wholesale: number;
7593
+ };
7594
+ thirtyDay: {
7595
+ retail: number;
7596
+ wholesale: number;
7597
+ };
7598
+ };
7599
+ };
7600
+ processDistribution: {
7601
+ process: string;
7602
+ total: number;
7603
+ retail: number;
7604
+ wholesale: number;
7605
+ }[];
7606
+ originPriceDistribution: {
7607
+ origin: string;
7608
+ /** @enum {string} */
7609
+ market: "all" | "retail" | "wholesale";
7610
+ price: {
7611
+ min: number;
7612
+ max: number;
7613
+ average: number;
7614
+ median: number;
7615
+ p25: number;
7616
+ p75: number;
7617
+ };
7618
+ sampleSize: number;
7619
+ supplierCount: number;
7620
+ }[];
7621
+ };
7622
+ meta: {
7623
+ /** @enum {string} */
7624
+ resource: "market-overview";
7625
+ /** @enum {string} */
7626
+ namespace: "/v1/market/overview";
7627
+ /** @enum {string} */
7628
+ version: "v1";
7629
+ auth: {
7630
+ /** @enum {string} */
7631
+ kind: "anonymous" | "session" | "api-key";
7632
+ /** @enum {string|null} */
7633
+ role: "viewer" | "member" | "admin" | null;
7634
+ /** @enum {string|null} */
7635
+ apiPlan: "viewer" | "member" | "enterprise" | null;
7636
+ ppiAccess: boolean;
7637
+ };
7638
+ access: {
7639
+ /** @enum {boolean} */
7640
+ publicSlice: true;
7641
+ /** @enum {boolean} */
7642
+ publicOnly: true;
7643
+ totalAvailable: number;
7644
+ rowLimit: number;
7645
+ /** @enum {boolean} */
7646
+ limited: false;
7647
+ };
7648
+ freshness: {
7649
+ /** Format: date-time */
7650
+ generatedAt: string;
7651
+ asOf: string | null;
7652
+ /** @enum {string} */
7653
+ cacheStatus: "public" | "private";
7654
+ ttlSeconds: number;
7655
+ };
7656
+ thresholds: {
7657
+ movementWindowsDays: [
7658
+ 7,
7659
+ 30
7660
+ ];
7661
+ minimumOriginLots: number;
7662
+ };
7663
+ source: {
7664
+ tables: [
7665
+ "market_daily_summary",
7666
+ "coffee_catalog"
7667
+ ];
7668
+ /** @enum {boolean} */
7669
+ aggregateOnly: true;
7670
+ };
7671
+ };
7672
+ };
6940
7673
  PriceMoveStatsItem: {
6941
7674
  segment: {
6942
7675
  origin: string | null;
@@ -7589,27 +8322,82 @@ interface components {
7589
8322
  notes?: string;
7590
8323
  items: components["schemas"]["ManualInventoryBatchItem"][];
7591
8324
  };
7592
- ManualInventoryBatchTerminalError: {
8325
+ ManualInventoryBatchTerminalError: {
8326
+ code: string;
8327
+ message: string;
8328
+ };
8329
+ ManualInventoryBatchLifecycle: {
8330
+ /** Format: uuid */
8331
+ batchId: string;
8332
+ /** @enum {string} */
8333
+ status: "unknown" | "accepted" | "in_progress" | "completed" | "terminal_rejected";
8334
+ result: components["schemas"]["ManualInventoryBatchResult"] | null;
8335
+ error: components["schemas"]["ManualInventoryBatchTerminalError"] | null;
8336
+ /** Format: date-time */
8337
+ updatedAt: string | null;
8338
+ };
8339
+ ManualInventoryBatchLifecycleResponse: {
8340
+ data: components["schemas"]["ManualInventoryBatchLifecycle"];
8341
+ meta: {
8342
+ /** @enum {string} */
8343
+ resource: "inventory-manual-batch-lifecycle";
8344
+ /** @enum {string} */
8345
+ namespace: "/v1/inventory/manual-batches";
8346
+ /** @enum {string} */
8347
+ version: "v1";
8348
+ auth: {
8349
+ /** @enum {string} */
8350
+ kind: "session" | "api-key";
8351
+ /** @enum {string|null} */
8352
+ role: "admin" | "member" | "viewer" | null;
8353
+ /** @enum {string|null} */
8354
+ apiPlan: "viewer" | "member" | "enterprise" | null;
8355
+ };
8356
+ };
8357
+ };
8358
+ ManualInventoryBatchReserveRequest: {
8359
+ /**
8360
+ * Format: uuid
8361
+ * @description Stable client-generated batch identity. Store only this UUID after reservation succeeds.
8362
+ */
8363
+ batchId: string;
8364
+ /** @description Purchase date (YYYY-MM-DD); defaults to today (UTC). */
8365
+ purchaseDate?: string;
8366
+ /** @description Shared tax and shipping total with at most two decimal places. Parchment allocates exact cents deterministically by item order. */
8367
+ taxShipTotal?: number;
8368
+ notes?: string;
8369
+ items: components["schemas"]["ManualInventoryBatchItem"][];
8370
+ };
8371
+ CatalogInventoryBatchResult: {
8372
+ /** Format: uuid */
8373
+ batchId: string;
8374
+ items: {
8375
+ /** Format: uuid */
8376
+ rowId: string;
8377
+ inventoryId: number;
8378
+ }[];
8379
+ };
8380
+ CatalogInventoryBatchTerminalError: {
7593
8381
  code: string;
7594
8382
  message: string;
7595
8383
  };
7596
- ManualInventoryBatchLifecycle: {
8384
+ CatalogInventoryBatchLifecycle: {
7597
8385
  /** Format: uuid */
7598
8386
  batchId: string;
7599
8387
  /** @enum {string} */
7600
8388
  status: "unknown" | "accepted" | "in_progress" | "completed" | "terminal_rejected";
7601
- result: components["schemas"]["ManualInventoryBatchResult"] | null;
7602
- error: components["schemas"]["ManualInventoryBatchTerminalError"] | null;
8389
+ result: components["schemas"]["CatalogInventoryBatchResult"] | null;
8390
+ error: components["schemas"]["CatalogInventoryBatchTerminalError"] | null;
7603
8391
  /** Format: date-time */
7604
8392
  updatedAt: string | null;
7605
8393
  };
7606
- ManualInventoryBatchLifecycleResponse: {
7607
- data: components["schemas"]["ManualInventoryBatchLifecycle"];
8394
+ CatalogInventoryBatchLifecycleResponse: {
8395
+ data: components["schemas"]["CatalogInventoryBatchLifecycle"];
7608
8396
  meta: {
7609
8397
  /** @enum {string} */
7610
- resource: "inventory-manual-batch-lifecycle";
8398
+ resource: "inventory-catalog-batch-lifecycle";
7611
8399
  /** @enum {string} */
7612
- namespace: "/v1/inventory/manual-batches";
8400
+ namespace: "/v1/inventory/catalog-batches";
7613
8401
  /** @enum {string} */
7614
8402
  version: "v1";
7615
8403
  auth: {
@@ -7622,18 +8410,39 @@ interface components {
7622
8410
  };
7623
8411
  };
7624
8412
  };
7625
- ManualInventoryBatchReserveRequest: {
8413
+ CatalogInventoryBatchItem: {
7626
8414
  /**
7627
8415
  * Format: uuid
7628
- * @description Stable client-generated batch identity. Store only this UUID after reservation succeeds.
8416
+ * @description Stable client-generated row identity returned unchanged with the created inventory id.
8417
+ */
8418
+ rowId: string;
8419
+ /** @description Visible coffee_catalog.id to add to owner inventory. */
8420
+ catalogId: number;
8421
+ /** @description Purchased quantity in pounds. */
8422
+ qty: number;
8423
+ /** @description Total bean cost for this inventory lot. */
8424
+ cost?: number;
8425
+ /** @description Owner-assigned integer ranking for this inventory lot (PostgreSQL integer range). */
8426
+ rank?: number | null;
8427
+ /** @description Explicit stock-state override. When omitted, stock is derived from purchased quantity. */
8428
+ stocked?: boolean;
8429
+ /** @description Owner cupping data stored as JSON. */
8430
+ cuppingNotes?: string | number | boolean | unknown[] | {
8431
+ [key: string]: unknown;
8432
+ } | null;
8433
+ };
8434
+ CatalogInventoryBatchReserveRequest: {
8435
+ /**
8436
+ * Format: uuid
8437
+ * @description Stable client-generated batch identity. Persist only this UUID after reservation succeeds.
7629
8438
  */
7630
8439
  batchId: string;
7631
8440
  /** @description Purchase date (YYYY-MM-DD); defaults to today (UTC). */
7632
8441
  purchaseDate?: string;
7633
- /** @description Shared tax and shipping total with at most two decimal places. Parchment allocates exact cents deterministically by item order. */
8442
+ /** @description Shared tax and shipping total. Parchment normalizes exact cents before reservation and allocates them by input order. */
7634
8443
  taxShipTotal?: number;
7635
8444
  notes?: string;
7636
- items: components["schemas"]["ManualInventoryBatchItem"][];
8445
+ items: components["schemas"]["CatalogInventoryBatchItem"][];
7637
8446
  };
7638
8447
  InventoryItemResponse: {
7639
8448
  data: components["schemas"]["InventoryResource"];
@@ -8416,9 +9225,10 @@ interface ParchmentClientOptions {
8416
9225
  /** Base URL of the Parchment API, e.g. https://api.purveyors.io */
8417
9226
  baseUrl: string;
8418
9227
  /**
8419
- * Optional bearer token (a Supabase JWT or, later, an API key). Sent as
8420
- * `Authorization: Bearer <token>`. Auth is resolved server-side against the
8421
- * unified principal model; the SDK only forwards the credential.
9228
+ * Optional bearer token (a Supabase JWT, API key, or dedicated machine
9229
+ * credential). Sent as
9230
+ * `Authorization: Bearer <token>`. Auth is resolved server-side at the route
9231
+ * boundary; the SDK only forwards the credential.
8422
9232
  */
8423
9233
  token?: string;
8424
9234
  /** Override the fetch implementation (useful for tests or custom runtimes). */
@@ -8469,6 +9279,8 @@ type PriceIndexQuery = NonNullable<paths["/v1/price-index"]["get"]["parameters"]
8469
9279
  type PriceIndexHistoryQuery = NonNullable<paths["/v1/price-index/history"]["get"]["parameters"]["query"]>;
8470
9280
  /** Query parameters for {@link ParchmentClient.market.signals}. */
8471
9281
  type MarketSignalsQuery = NonNullable<paths["/v1/market/signals"]["get"]["parameters"]["query"]>;
9282
+ /** Aggregate-only public green-coffee market evidence. */
9283
+ type MarketOverview = components["schemas"]["MarketOverviewResponse"];
8472
9284
  /** Query parameters for {@link ParchmentClient.priceIndex.stats}. */
8473
9285
  type PriceIndexStatsQuery = NonNullable<paths["/v1/price-index/stats"]["get"]["parameters"]["query"]>;
8474
9286
  /** Query parameters for {@link ParchmentClient.market.metadataIndex}. */
@@ -8493,6 +9305,12 @@ type ManualInventoryCreateRequest = components["schemas"]["ManualInventoryCreate
8493
9305
  type ManualInventoryBatchCreateRequest = NonNullable<paths["/v1/inventory/manual-batches"]["post"]["requestBody"]>["content"]["application/json"];
8494
9306
  /** Request body for reserving durable server-owned manual-batch intent. */
8495
9307
  type ManualInventoryBatchReserveRequest = NonNullable<paths["/v1/inventory/manual-batches/reservations"]["post"]["requestBody"]>["content"]["application/json"];
9308
+ /** Complete canonical intent accepted by the catalog-batch reservation lane. */
9309
+ type CatalogInventoryBatchReserveRequest = NonNullable<paths["/v1/inventory/catalog-batches/reservations"]["post"]["requestBody"]>["content"]["application/json"];
9310
+ /** Durable catalog-batch state returned by reserve, commit, and status. */
9311
+ type CatalogInventoryBatchLifecycle = components["schemas"]["CatalogInventoryBatchLifecycle"];
9312
+ /** Identity-only terminal result; catalog resources remain a separate read. */
9313
+ type CatalogInventoryBatchResult = components["schemas"]["CatalogInventoryBatchResult"];
8496
9314
  /** Request body for {@link ParchmentClient.inventory.update}. */
8497
9315
  type InventoryUpdateRequest = NonNullable<paths["/v1/inventory/{id}"]["patch"]["requestBody"]>["content"]["application/json"];
8498
9316
  /** Query parameters for {@link ParchmentClient.roasts.list}. */
@@ -8533,6 +9351,10 @@ type OwnerApiUsageQuery = NonNullable<paths["/v1/api-usage"]["get"]["parameters"
8533
9351
  type OwnerApiUsage = components["schemas"]["OwnerApiUsageResponse"];
8534
9352
  /** Request body for {@link ParchmentClient.emailSubscriptions.setMarketRead}. */
8535
9353
  type MarketReadPreferenceRequest = NonNullable<paths["/v1/email-subscriptions/market-read"]["put"]["requestBody"]>["content"]["application/json"];
9354
+ /** Request body for {@link ParchmentClient.emailSubscriptions.unsubscribeMarketRead}. */
9355
+ type MarketReadUnsubscribeRequest = NonNullable<paths["/v1/email-subscriptions/market-read/unsubscribe"]["post"]["requestBody"]>["content"]["application/json"];
9356
+ /** Immutable deployed projection accepted by {@link ParchmentClient.marketBrief.drafts.create}. */
9357
+ type MarketBriefDraftCreateRequest = NonNullable<paths["/v1/market-brief/drafts"]["post"]["requestBody"]>["content"]["application/json"];
8536
9358
  /** Durable state returned by an account-deletion request. */
8537
9359
  type AccountDeletionOperation = components["schemas"]["AccountDeletionOperation"];
8538
9360
  /** Purpose-bound recent-reauthentication assertion for account deletion. */
@@ -9184,6 +10006,140 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9184
10006
  subscribed: false;
9185
10007
  };
9186
10008
  }, `${string}/${string}`>>;
10009
+ /** Idempotently unsubscribe using an opaque capability without requiring a session. */
10010
+ unsubscribeMarketRead: (body: MarketReadUnsubscribeRequest) => Promise<openapi_fetch.FetchResponse<{
10011
+ parameters: {
10012
+ query?: never;
10013
+ header?: never;
10014
+ path?: never;
10015
+ cookie?: never;
10016
+ };
10017
+ requestBody: {
10018
+ content: {
10019
+ "application/json": components["schemas"]["MarketReadUnsubscribeInput"];
10020
+ };
10021
+ };
10022
+ responses: {
10023
+ 200: {
10024
+ headers: {
10025
+ [name: string]: unknown;
10026
+ };
10027
+ content: {
10028
+ "application/json": components["schemas"]["MarketReadUnsubscribeResponse"];
10029
+ };
10030
+ };
10031
+ 400: {
10032
+ headers: {
10033
+ [name: string]: unknown;
10034
+ };
10035
+ content: {
10036
+ "application/json": components["schemas"]["ErrorResponse"];
10037
+ };
10038
+ };
10039
+ 503: {
10040
+ headers: {
10041
+ [name: string]: unknown;
10042
+ };
10043
+ content: {
10044
+ "application/json": components["schemas"]["ErrorResponse"];
10045
+ };
10046
+ };
10047
+ };
10048
+ }, {
10049
+ body: {
10050
+ capability: string;
10051
+ };
10052
+ }, `${string}/${string}`>>;
10053
+ };
10054
+ marketBrief: {
10055
+ drafts: {
10056
+ /** Accept, create, or recover one immutable deployed edition version. */
10057
+ create: (body: MarketBriefDraftCreateRequest) => Promise<openapi_fetch.FetchResponse<{
10058
+ parameters: {
10059
+ query? /** Live catalog price context by origin. */: never;
10060
+ header?: never;
10061
+ path?: never;
10062
+ cookie?: never;
10063
+ };
10064
+ requestBody: {
10065
+ content: {
10066
+ "application/json": components["schemas"]["MarketBriefDraftInput"];
10067
+ };
10068
+ };
10069
+ responses: {
10070
+ 200: {
10071
+ headers: {
10072
+ [name: string]: unknown;
10073
+ };
10074
+ content: {
10075
+ "application/json": components["schemas"]["MarketBriefDraftResponse"];
10076
+ };
10077
+ };
10078
+ 202: {
10079
+ headers: {
10080
+ [name: string]: unknown;
10081
+ };
10082
+ content: {
10083
+ "application/json": components["schemas"]["MarketBriefDraftResponse"];
10084
+ };
10085
+ };
10086
+ 400: {
10087
+ headers: {
10088
+ [name: string]: unknown;
10089
+ };
10090
+ content: {
10091
+ "application/json": components["schemas"]["ErrorResponse"];
10092
+ };
10093
+ };
10094
+ 401: {
10095
+ headers: {
10096
+ [name: string]: unknown;
10097
+ };
10098
+ content: {
10099
+ "application/json": components["schemas"]["ErrorResponse"];
10100
+ };
10101
+ };
10102
+ 409: {
10103
+ headers: {
10104
+ [name: string]: unknown;
10105
+ };
10106
+ content: {
10107
+ "application/json": components["schemas"] /** Parchment Price Index (aggregate snapshots). */["ErrorResponse"];
10108
+ };
10109
+ };
10110
+ 413: {
10111
+ headers: {
10112
+ [name: string]: unknown;
10113
+ };
10114
+ content: {
10115
+ "application/json": components["schemas"]["ErrorResponse"];
10116
+ };
10117
+ };
10118
+ 503: {
10119
+ headers: {
10120
+ [name: string]: unknown;
10121
+ };
10122
+ content: {
10123
+ "application/json": components["schemas"]["ErrorResponse"];
10124
+ };
10125
+ };
10126
+ };
10127
+ }, {
10128
+ body: {
10129
+ schemaVersion: 1;
10130
+ publication: "market-brief";
10131
+ edition: number;
10132
+ slug: string;
10133
+ canonicalUrl: string;
10134
+ productionCommit: string;
10135
+ rendererVersion: "market-brief-email-v1";
10136
+ projectionSha256: string;
10137
+ subject: string;
10138
+ html: string;
10139
+ text: string;
10140
+ };
10141
+ }, `${string}/${string}`>>;
10142
+ };
9187
10143
  };
9188
10144
  accountDeletion: {
9189
10145
  /** Accept or replay deletion using a purpose-bound reauthentication assertion. */
@@ -9427,7 +10383,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9427
10383
  [name: string]: unknown;
9428
10384
  };
9429
10385
  content: {
9430
- "application/json": components["schemas"] /** Liveness and service identity. */["BillingCheckoutSession"];
10386
+ "application/json": components["schemas"]["BillingCheckoutSession"];
9431
10387
  };
9432
10388
  };
9433
10389
  401: {
@@ -9611,7 +10567,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9611
10567
  [name: string]: unknown;
9612
10568
  };
9613
10569
  content: {
9614
- "application/json": components["schemas"] /** List the caller's saved sourcing briefs. */["BillingSubscriptionOperation"];
10570
+ "application/json": components["schemas"]["BillingSubscriptionOperation"];
9615
10571
  };
9616
10572
  };
9617
10573
  202: {
@@ -9628,7 +10584,12 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9628
10584
  [name: string]: unknown;
9629
10585
  };
9630
10586
  content: {
9631
- "application/json": components["schemas"]["ErrorResponse"];
10587
+ "application/json":
10588
+ /**
10589
+ * Delete one of the caller's own inventory rows. Returns 409 if dependent
10590
+ * roast profiles or sales exist (no force-cascade).
10591
+ */
10592
+ components["schemas"]["ErrorResponse"];
9632
10593
  };
9633
10594
  };
9634
10595
  404: {
@@ -9859,21 +10820,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9859
10820
  setManual: (ownerId: string, body: BillingManualEntitlementsRequest) => Promise<openapi_fetch.FetchResponse<{
9860
10821
  parameters: {
9861
10822
  query?: never;
9862
- header
9863
- /**
9864
- * Record a sale against one of the caller's own green-coffee inventory
9865
- * lots. Requires a session or an owner-bound API key carrying the exact
9866
- * `sales:write` scope. Pass `idempotencyKey` to make retries safe: the
9867
- * same key replays the original result, and a concurrent duplicate gets
9868
- * 409 while the first is in flight.
9869
- */
9870
- ? /**
9871
- * Record a sale against one of the caller's own green-coffee inventory
9872
- * lots. Requires a session or an owner-bound API key carrying the exact
9873
- * `sales:write` scope. Pass `idempotencyKey` to make retries safe: the
9874
- * same key replays the original result, and a concurrent duplicate gets
9875
- * 409 while the first is in flight.
9876
- */: never;
10823
+ header?: never;
9877
10824
  path: {
9878
10825
  ownerId: string;
9879
10826
  };
@@ -11253,7 +12200,118 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
11253
12200
  "application/json": components["schemas"]["ErrorResponse"];
11254
12201
  };
11255
12202
  };
11256
- 403: {
12203
+ 403: {
12204
+ headers: {
12205
+ [name: string]: unknown;
12206
+ };
12207
+ content: {
12208
+ "application/json": components["schemas"]["ErrorResponse"];
12209
+ };
12210
+ };
12211
+ };
12212
+ }, {
12213
+ params: {
12214
+ query: {
12215
+ windowDays?: number;
12216
+ page?: number;
12217
+ limit?: number;
12218
+ order?: "asc" | "desc";
12219
+ } | undefined;
12220
+ };
12221
+ }, `${string}/${string}`>>;
12222
+ /** Price movement significance stats (precomputed). */
12223
+ stats: (query?: PriceIndexStatsQuery) => Promise<openapi_fetch.FetchResponse<{
12224
+ parameters: {
12225
+ query?: {
12226
+ page?: number;
12227
+ limit?: number;
12228
+ origin?: string;
12229
+ process?: string;
12230
+ market?: "retail" | "wholesale" | "all";
12231
+ window?: "7d" | "30d";
12232
+ baseline_weeks?: number;
12233
+ };
12234
+ header?: never;
12235
+ path?: never;
12236
+ cookie?: never;
12237
+ };
12238
+ requestBody?: never;
12239
+ responses: {
12240
+ 200: {
12241
+ headers: {
12242
+ [name: string]: unknown;
12243
+ };
12244
+ content: {
12245
+ "application/json": components["schemas"]["PriceIndexStatsResponse"];
12246
+ };
12247
+ };
12248
+ 401: {
12249
+ headers: {
12250
+ [name: string]: unknown;
12251
+ };
12252
+ content: {
12253
+ "application/json": components["schemas"]["ErrorResponse"];
12254
+ };
12255
+ };
12256
+ 403: {
12257
+ headers: {
12258
+ [name: string]: unknown;
12259
+ };
12260
+ content: {
12261
+ "application/json": components["schemas"]["ErrorResponse"];
12262
+ };
12263
+ };
12264
+ };
12265
+ }, {
12266
+ params: {
12267
+ query: {
12268
+ page?: number;
12269
+ limit?: number;
12270
+ origin?: string;
12271
+ process?: string;
12272
+ market?: "retail" | "wholesale" | "all";
12273
+ window?: "7d" | "30d";
12274
+ baseline_weeks?: number;
12275
+ } | undefined;
12276
+ };
12277
+ }, `${string}/${string}`>>;
12278
+ };
12279
+ market: {
12280
+ /** Aggregate daily changes, catalog coverage, movement, processing, and origin prices. */
12281
+ overview: () => Promise<openapi_fetch.FetchResponse<{
12282
+ parameters: {
12283
+ query?: never;
12284
+ header?: never;
12285
+ path?: never;
12286
+ cookie?: never;
12287
+ };
12288
+ requestBody?: never;
12289
+ responses: {
12290
+ 200: {
12291
+ headers: {
12292
+ [name: string]: unknown;
12293
+ };
12294
+ content: {
12295
+ "application/json": components["schemas"]["MarketOverviewResponse"];
12296
+ };
12297
+ };
12298
+ 401: {
12299
+ headers: {
12300
+ [name: string]: unknown;
12301
+ };
12302
+ content: {
12303
+ "application/json": components["schemas"]["ErrorResponse"];
12304
+ };
12305
+ };
12306
+ 403: {
12307
+ headers: {
12308
+ [name: string]: unknown;
12309
+ };
12310
+ content: {
12311
+ "application/json": components["schemas"]["ErrorResponse"];
12312
+ };
12313
+ };
12314
+ 503: {
11257
12315
  headers: {
11258
12316
  [name: string]: unknown;
11259
12317
  };
@@ -11262,28 +12320,9 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
11262
12320
  };
11263
12321
  };
11264
12322
  };
11265
- }, {
11266
- params: {
11267
- query: {
11268
- windowDays?: number;
11269
- page?: number;
11270
- limit?: number;
11271
- order?: "asc" | "desc";
11272
- } | undefined;
11273
- };
11274
- }, `${string}/${string}`>>;
11275
- /** Price movement significance stats (precomputed). */
11276
- stats: (query?: PriceIndexStatsQuery) => Promise<openapi_fetch.FetchResponse<{
12323
+ }, openapi_fetch.FetchOptions<{
11277
12324
  parameters: {
11278
- query?: {
11279
- page?: number;
11280
- limit?: number;
11281
- origin?: string;
11282
- process?: string;
11283
- market?: "retail" | "wholesale" | "all";
11284
- window?: "7d" | "30d";
11285
- baseline_weeks?: number;
11286
- };
12325
+ query?: never;
11287
12326
  header?: never;
11288
12327
  path?: never;
11289
12328
  cookie?: never;
@@ -11295,7 +12334,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
11295
12334
  [name: string]: unknown;
11296
12335
  };
11297
12336
  content: {
11298
- "application/json": components["schemas"]["PriceIndexStatsResponse"];
12337
+ "application/json": components["schemas"]["MarketOverviewResponse"];
11299
12338
  };
11300
12339
  };
11301
12340
  401: {
@@ -11314,22 +12353,16 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
11314
12353
  "application/json": components["schemas"]["ErrorResponse"];
11315
12354
  };
11316
12355
  };
12356
+ 503: {
12357
+ headers: {
12358
+ [name: string]: unknown;
12359
+ };
12360
+ content: {
12361
+ "application/json": components["schemas"]["ErrorResponse"];
12362
+ };
12363
+ };
11317
12364
  };
11318
- }, {
11319
- params: {
11320
- query: {
11321
- page?: number;
11322
- limit?: number;
11323
- origin?: string;
11324
- process?: string;
11325
- market?: "retail" | "wholesale" | "all";
11326
- window?: "7d" | "30d";
11327
- baseline_weeks?: number;
11328
- } | undefined;
11329
- };
11330
- }, `${string}/${string}`>>;
11331
- };
11332
- market: {
12365
+ }> | undefined, `${string}/${string}`>>;
11333
12366
  /** Actionable market value signals. */
11334
12367
  signals: (query?: MarketSignalsQuery) => Promise<openapi_fetch.FetchResponse<{
11335
12368
  parameters: {
@@ -12535,6 +13568,222 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
12535
13568
  };
12536
13569
  };
12537
13570
  }, `${string}/${string}`>>;
13571
+ /** Durably reserve canonical catalog-backed inventory intent. */
13572
+ reserveCatalogBatch: (body: CatalogInventoryBatchReserveRequest) => Promise<openapi_fetch.FetchResponse<{
13573
+ parameters: {
13574
+ query?: never;
13575
+ header?: never;
13576
+ path?: never;
13577
+ cookie?: never;
13578
+ };
13579
+ requestBody?: {
13580
+ content: {
13581
+ "application/json": components["schemas"]["CatalogInventoryBatchReserveRequest"];
13582
+ };
13583
+ };
13584
+ responses: {
13585
+ 201: {
13586
+ headers: {
13587
+ [name: string]: unknown;
13588
+ };
13589
+ content: {
13590
+ "application/json": components["schemas"]["CatalogInventoryBatchLifecycleResponse"];
13591
+ };
13592
+ };
13593
+ 400: {
13594
+ headers: {
13595
+ [name: string]: unknown;
13596
+ };
13597
+ content: {
13598
+ "application/json": components["schemas"]["ErrorResponse"];
13599
+ };
13600
+ };
13601
+ 401: {
13602
+ headers: {
13603
+ [name: string]: unknown;
13604
+ };
13605
+ content: {
13606
+ "application/json": components["schemas"]["ErrorResponse"];
13607
+ };
13608
+ };
13609
+ 403: {
13610
+ headers: {
13611
+ [name: string]: unknown;
13612
+ };
13613
+ content: {
13614
+ "application/json": components["schemas"]["ErrorResponse"];
13615
+ };
13616
+ };
13617
+ 409: {
13618
+ headers: {
13619
+ [name: string]: unknown;
13620
+ };
13621
+ content: {
13622
+ "application/json": components["schemas"]["ErrorResponse"];
13623
+ };
13624
+ };
13625
+ 429: {
13626
+ headers: {
13627
+ [name: string]: unknown;
13628
+ };
13629
+ content: {
13630
+ "application/json": components["schemas"]["ErrorResponse"];
13631
+ };
13632
+ };
13633
+ 503: {
13634
+ headers: {
13635
+ [name: string]: unknown;
13636
+ };
13637
+ content: {
13638
+ "application/json": components["schemas"]["ErrorResponse"];
13639
+ };
13640
+ };
13641
+ };
13642
+ }, {
13643
+ body: {
13644
+ batchId: string;
13645
+ purchaseDate?: string;
13646
+ taxShipTotal?: number;
13647
+ notes?: string;
13648
+ items: components["schemas"]["CatalogInventoryBatchItem"][];
13649
+ };
13650
+ }, `${string}/${string}`>>;
13651
+ /** Atomically commit a reserved catalog batch by UUID, with no body. */
13652
+ commitCatalogBatch: (batchId: string) => Promise<openapi_fetch.FetchResponse<{
13653
+ parameters: {
13654
+ query?: never;
13655
+ header?: never;
13656
+ path: {
13657
+ batchId: string;
13658
+ };
13659
+ cookie?: never;
13660
+ };
13661
+ requestBody?: never;
13662
+ responses: {
13663
+ 200: {
13664
+ headers: {
13665
+ [name: string]: unknown;
13666
+ };
13667
+ content: {
13668
+ "application/json": components["schemas"]["CatalogInventoryBatchLifecycleResponse"];
13669
+ };
13670
+ };
13671
+ 400: {
13672
+ headers: {
13673
+ [name: string]: unknown;
13674
+ };
13675
+ content: {
13676
+ "application/json": components["schemas"]["ErrorResponse"];
13677
+ };
13678
+ };
13679
+ 401: {
13680
+ headers: {
13681
+ [name: string]: unknown;
13682
+ };
13683
+ content: {
13684
+ "application/json": components["schemas"]["ErrorResponse"];
13685
+ };
13686
+ };
13687
+ 403: {
13688
+ headers: {
13689
+ [name: string]: unknown;
13690
+ };
13691
+ content: {
13692
+ "application/json": components["schemas"]["ErrorResponse"];
13693
+ };
13694
+ };
13695
+ 404: {
13696
+ headers: {
13697
+ [name: string]: unknown;
13698
+ };
13699
+ content: {
13700
+ "application/json": components["schemas"]["ErrorResponse"];
13701
+ };
13702
+ };
13703
+ 429: {
13704
+ headers: {
13705
+ [name: string]: unknown;
13706
+ };
13707
+ content: {
13708
+ "application/json": components["schemas"]["ErrorResponse"];
13709
+ };
13710
+ };
13711
+ 503: {
13712
+ headers: {
13713
+ [name: string]: unknown;
13714
+ };
13715
+ content: {
13716
+ "application/json": components["schemas"]["ErrorResponse"];
13717
+ };
13718
+ };
13719
+ };
13720
+ }, {
13721
+ params: {
13722
+ path: {
13723
+ batchId: string;
13724
+ };
13725
+ };
13726
+ }, `${string}/${string}`>>;
13727
+ /** Recover the owner-scoped lifecycle; missing batches remain unknown. */
13728
+ getCatalogBatchStatus: (batchId: string) => Promise<openapi_fetch.FetchResponse<{
13729
+ parameters: {
13730
+ query?: never;
13731
+ header?: never;
13732
+ path: {
13733
+ batchId: string;
13734
+ };
13735
+ cookie?: never;
13736
+ };
13737
+ requestBody?: never;
13738
+ responses: {
13739
+ 200: {
13740
+ headers: {
13741
+ [name: string]: unknown;
13742
+ };
13743
+ content: {
13744
+ "application/json": components["schemas"]["CatalogInventoryBatchLifecycleResponse"];
13745
+ };
13746
+ };
13747
+ 400: {
13748
+ headers: {
13749
+ [name: string]: unknown;
13750
+ };
13751
+ content: {
13752
+ "application/json": components["schemas"]["ErrorResponse"];
13753
+ };
13754
+ };
13755
+ 401: {
13756
+ headers: {
13757
+ [name: string]: unknown;
13758
+ };
13759
+ content: {
13760
+ "application/json": components["schemas"]["ErrorResponse"];
13761
+ };
13762
+ };
13763
+ 403: {
13764
+ headers: {
13765
+ [name: string]: unknown;
13766
+ };
13767
+ content: {
13768
+ "application/json": components["schemas"]["ErrorResponse"];
13769
+ };
13770
+ };
13771
+ 503: {
13772
+ headers: {
13773
+ [name: string]: unknown;
13774
+ };
13775
+ content: {
13776
+ "application/json": components["schemas"]["ErrorResponse"];
13777
+ };
13778
+ };
13779
+ };
13780
+ }, {
13781
+ params: {
13782
+ path: {
13783
+ batchId: string;
13784
+ };
13785
+ };
13786
+ }, `${string}/${string}`>>;
12538
13787
  /**
12539
13788
  * Update one of the caller's own inventory rows. Pass `ifMatch` (the
12540
13789
  * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).
@@ -14192,4 +15441,4 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
14192
15441
  };
14193
15442
  type ParchmentClient = ReturnType<typeof createParchmentClient>;
14194
15443
 
14195
- export { type AccountDeletionOperation, type AccountDeletionRequest, type BillingCheckoutCreateRequest, type BillingCheckoutSession, type BillingManualEntitlementsRequest, type BillingSubscriptionMutationRequest, type BillingSubscriptionOperation, 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 RoastChartDataQuery, type SalesCreateRequest, type SalesListQuery, type SalesUpdateRequest, type SourcingBriefCreateRequest, type TrackedLotMutation, type TrackedLotSummary, type TrackedLotsListQuery, type components, createParchmentClient, type paths };
15444
+ export { type AccountDeletionOperation, type AccountDeletionRequest, type BillingCheckoutCreateRequest, type BillingCheckoutSession, type BillingManualEntitlementsRequest, type BillingSubscriptionMutationRequest, type BillingSubscriptionOperation, type BriefMatchesQuery, type CatalogInventoryBatchLifecycle, type CatalogInventoryBatchReserveRequest, type CatalogInventoryBatchResult, type CatalogItem, type CatalogListQuery, type CatalogProofSummary, type CatalogSimilarQuery, type InventoryCreateRequest, type InventoryUpdateRequest, type MarketOverview, type MarketSignalsQuery, type MetadataIndexQuery, type OwnerApiUsage, type OwnerApiUsageQuery, type ParchmentClient, type ParchmentClientOptions, type PriceIndexQuery, type PriceIndexStatsQuery, type ProfitItem, type ProfitListQuery, type RoastChartDataQuery, type SalesCreateRequest, type SalesListQuery, type SalesUpdateRequest, type SourcingBriefCreateRequest, type TrackedLotMutation, type TrackedLotSummary, type TrackedLotsListQuery, type components, createParchmentClient, type paths };