@purveyors/sdk 0.10.0 → 0.11.1

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
@@ -434,6 +434,377 @@ interface paths {
434
434
  patch?: never;
435
435
  trace?: never;
436
436
  };
437
+ "/v1/cli-auth/requests": {
438
+ parameters: {
439
+ query?: never;
440
+ header?: never;
441
+ path?: never;
442
+ cookie?: never;
443
+ };
444
+ get?: never;
445
+ put?: never;
446
+ /** Create a short-lived PKCE-bound CLI login request */
447
+ post: {
448
+ parameters: {
449
+ query?: never;
450
+ header?: never;
451
+ path?: never;
452
+ cookie?: never;
453
+ };
454
+ requestBody: {
455
+ content: {
456
+ "application/json": {
457
+ machineName: string;
458
+ codeChallenge: string;
459
+ };
460
+ };
461
+ };
462
+ responses: {
463
+ /** @description CLI login request created */
464
+ 201: {
465
+ headers: {
466
+ [name: string]: unknown;
467
+ };
468
+ content: {
469
+ "application/json": {
470
+ requestToken: string;
471
+ /** Format: uuid */
472
+ requestId: string;
473
+ /** Format: uri */
474
+ verificationUri: string;
475
+ /** Format: date-time */
476
+ expiresAt: string;
477
+ intervalSeconds: number;
478
+ };
479
+ };
480
+ };
481
+ /** @description Invalid CLI authentication request */
482
+ 400: {
483
+ headers: {
484
+ [name: string]: unknown;
485
+ };
486
+ content: {
487
+ "application/json": components["schemas"]["ErrorResponse"];
488
+ };
489
+ };
490
+ /** @description Authorization pending or request conflict */
491
+ 409: {
492
+ headers: {
493
+ [name: string]: unknown;
494
+ };
495
+ content: {
496
+ "application/json": components["schemas"]["ErrorResponse"];
497
+ };
498
+ };
499
+ /** @description Request expired or already consumed */
500
+ 410: {
501
+ headers: {
502
+ [name: string]: unknown;
503
+ };
504
+ content: {
505
+ "application/json": components["schemas"]["ErrorResponse"];
506
+ };
507
+ };
508
+ /** @description CLI authentication unavailable */
509
+ 503: {
510
+ headers: {
511
+ [name: string]: unknown;
512
+ };
513
+ content: {
514
+ "application/json": components["schemas"]["ErrorResponse"];
515
+ };
516
+ };
517
+ };
518
+ };
519
+ delete?: never;
520
+ options?: never;
521
+ head?: never;
522
+ patch?: never;
523
+ trace?: never;
524
+ };
525
+ "/v1/cli-auth/inspect": {
526
+ parameters: {
527
+ query?: never;
528
+ header?: never;
529
+ path?: never;
530
+ cookie?: never;
531
+ };
532
+ get?: never;
533
+ put?: never;
534
+ /** Inspect a signed CLI login request before showing consent */
535
+ post: {
536
+ parameters: {
537
+ query?: never;
538
+ header?: never;
539
+ path?: never;
540
+ cookie?: never;
541
+ };
542
+ requestBody: {
543
+ content: {
544
+ "application/json": {
545
+ requestToken: string;
546
+ };
547
+ };
548
+ };
549
+ responses: {
550
+ /** @description CLI login request details */
551
+ 200: {
552
+ headers: {
553
+ [name: string]: unknown;
554
+ };
555
+ content: {
556
+ "application/json": {
557
+ /** Format: uuid */
558
+ requestId: string;
559
+ machineName: string;
560
+ /** Format: date-time */
561
+ expiresAt: string;
562
+ scopes: ("catalog:read" | "inventory:read" | "inventory:write" | "roast:read" | "roast:write" | "sales:read" | "sales:write" | "tasting:read" | "tasting:write")[];
563
+ };
564
+ };
565
+ };
566
+ /** @description Invalid CLI authentication request */
567
+ 400: {
568
+ headers: {
569
+ [name: string]: unknown;
570
+ };
571
+ content: {
572
+ "application/json": components["schemas"]["ErrorResponse"];
573
+ };
574
+ };
575
+ /** @description Authorization pending or request conflict */
576
+ 409: {
577
+ headers: {
578
+ [name: string]: unknown;
579
+ };
580
+ content: {
581
+ "application/json": components["schemas"]["ErrorResponse"];
582
+ };
583
+ };
584
+ /** @description Request expired or already consumed */
585
+ 410: {
586
+ headers: {
587
+ [name: string]: unknown;
588
+ };
589
+ content: {
590
+ "application/json": components["schemas"]["ErrorResponse"];
591
+ };
592
+ };
593
+ /** @description CLI authentication unavailable */
594
+ 503: {
595
+ headers: {
596
+ [name: string]: unknown;
597
+ };
598
+ content: {
599
+ "application/json": components["schemas"]["ErrorResponse"];
600
+ };
601
+ };
602
+ };
603
+ };
604
+ delete?: never;
605
+ options?: never;
606
+ head?: never;
607
+ patch?: never;
608
+ trace?: never;
609
+ };
610
+ "/v1/cli-auth/approve": {
611
+ parameters: {
612
+ query?: never;
613
+ header?: never;
614
+ path?: never;
615
+ cookie?: never;
616
+ };
617
+ get?: never;
618
+ put?: never;
619
+ /** Approve a CLI login request for the signed-in user */
620
+ post: {
621
+ parameters: {
622
+ query?: never;
623
+ header?: never;
624
+ path?: never;
625
+ cookie?: never;
626
+ };
627
+ requestBody: {
628
+ content: {
629
+ "application/json": {
630
+ requestToken: string;
631
+ };
632
+ };
633
+ };
634
+ responses: {
635
+ /** @description CLI login request approved */
636
+ 200: {
637
+ headers: {
638
+ [name: string]: unknown;
639
+ };
640
+ content: {
641
+ "application/json": {
642
+ /** Format: uuid */
643
+ requestId: string;
644
+ /** @enum {boolean} */
645
+ approved: true;
646
+ };
647
+ };
648
+ };
649
+ /** @description Invalid CLI authentication request */
650
+ 400: {
651
+ headers: {
652
+ [name: string]: unknown;
653
+ };
654
+ content: {
655
+ "application/json": components["schemas"]["ErrorResponse"];
656
+ };
657
+ };
658
+ /** @description Authentication required */
659
+ 401: {
660
+ headers: {
661
+ [name: string]: unknown;
662
+ };
663
+ content: {
664
+ "application/json": components["schemas"]["ErrorResponse"];
665
+ };
666
+ };
667
+ /** @description Insufficient entitlement (plan or role) */
668
+ 403: {
669
+ headers: {
670
+ [name: string]: unknown;
671
+ };
672
+ content: {
673
+ "application/json": components["schemas"]["ErrorResponse"];
674
+ };
675
+ };
676
+ /** @description Authorization pending or request conflict */
677
+ 409: {
678
+ headers: {
679
+ [name: string]: unknown;
680
+ };
681
+ content: {
682
+ "application/json": components["schemas"]["ErrorResponse"];
683
+ };
684
+ };
685
+ /** @description Request expired or already consumed */
686
+ 410: {
687
+ headers: {
688
+ [name: string]: unknown;
689
+ };
690
+ content: {
691
+ "application/json": components["schemas"]["ErrorResponse"];
692
+ };
693
+ };
694
+ /** @description CLI authentication unavailable */
695
+ 503: {
696
+ headers: {
697
+ [name: string]: unknown;
698
+ };
699
+ content: {
700
+ "application/json": components["schemas"]["ErrorResponse"];
701
+ };
702
+ };
703
+ };
704
+ };
705
+ delete?: never;
706
+ options?: never;
707
+ head?: never;
708
+ patch?: never;
709
+ trace?: never;
710
+ };
711
+ "/v1/cli-auth/token": {
712
+ parameters: {
713
+ query?: never;
714
+ header?: never;
715
+ path?: never;
716
+ cookie?: never;
717
+ };
718
+ get?: never;
719
+ put?: never;
720
+ /** Exchange an approved request and PKCE verifier for a CLI API key */
721
+ post: {
722
+ parameters: {
723
+ query?: never;
724
+ header?: never;
725
+ path?: never;
726
+ cookie?: never;
727
+ };
728
+ requestBody: {
729
+ content: {
730
+ "application/json": {
731
+ requestToken: string;
732
+ codeVerifier: string;
733
+ };
734
+ };
735
+ };
736
+ responses: {
737
+ /** @description Machine key atomically replaced; raw key returned once */
738
+ 201: {
739
+ headers: {
740
+ [name: string]: unknown;
741
+ };
742
+ content: {
743
+ "application/json": {
744
+ apiKey: string;
745
+ key: {
746
+ /** Format: uuid */
747
+ id: string;
748
+ name: string;
749
+ /** Format: date-time */
750
+ createdAt: string | null;
751
+ /** Format: date-time */
752
+ lastUsedAt: string | null;
753
+ isActive: boolean;
754
+ scopes: string[];
755
+ };
756
+ user: {
757
+ id: string;
758
+ email: string;
759
+ role: string;
760
+ };
761
+ };
762
+ };
763
+ };
764
+ /** @description Invalid CLI authentication request */
765
+ 400: {
766
+ headers: {
767
+ [name: string]: unknown;
768
+ };
769
+ content: {
770
+ "application/json": components["schemas"]["ErrorResponse"];
771
+ };
772
+ };
773
+ /** @description Authorization pending or request conflict */
774
+ 409: {
775
+ headers: {
776
+ [name: string]: unknown;
777
+ };
778
+ content: {
779
+ "application/json": components["schemas"]["ErrorResponse"];
780
+ };
781
+ };
782
+ /** @description Request expired or already consumed */
783
+ 410: {
784
+ headers: {
785
+ [name: string]: unknown;
786
+ };
787
+ content: {
788
+ "application/json": components["schemas"]["ErrorResponse"];
789
+ };
790
+ };
791
+ /** @description CLI authentication unavailable */
792
+ 503: {
793
+ headers: {
794
+ [name: string]: unknown;
795
+ };
796
+ content: {
797
+ "application/json": components["schemas"]["ErrorResponse"];
798
+ };
799
+ };
800
+ };
801
+ };
802
+ delete?: never;
803
+ options?: never;
804
+ head?: never;
805
+ patch?: never;
806
+ trace?: never;
807
+ };
437
808
  "/v1/catalog/access": {
438
809
  parameters: {
439
810
  query?: never;
@@ -497,7 +868,7 @@ interface paths {
497
868
  };
498
869
  /**
499
870
  * List public catalog coffees
500
- * @description Public catalog listing. Excludes wholesale-restricted rows and returns only public fields. API-key callers are capped to their plan's per-call row limit. Requesting entitlement-gated params (price/score ranges, process facets, advanced sorts) you are not entitled to is handled per PADR-0013 §7: strict callers (API keys, bearer-session JWTs) receive a 401/403; lenient callers (anonymous, first-party web) get the params stripped with a `meta.notices` entry. Send `Prefer: handling=strict` to opt into strict enforcement; `Prefer: handling=lenient` is honored only for callers already lenient-eligible and cannot downgrade a strict caller's enforcement.
871
+ * @description Public catalog listing. Returns publishable retail and wholesale rows by default using the caller's field projection; set `showWholesale=false` to narrow to hobbyist-friendly suppliers. API-key callers are capped to their plan's per-call row limit. These catalog routes require a Supabase session JWT or Parchment API key. For entitlement-gated params, strict callers (non-demo API keys, bearer-session JWTs) receive a 401/403; lenient callers (first-party cookie-session and the configured public-demo API key) get the params stripped with a `meta.notices` entry. Send `Prefer: handling=strict` to opt into strict enforcement; `Prefer: handling=lenient` is honored only for callers already lenient-eligible and cannot downgrade a strict caller's enforcement.
501
872
  */
502
873
  get: {
503
874
  parameters: {
@@ -509,6 +880,7 @@ interface paths {
509
880
  order?: "asc" | "desc";
510
881
  showWholesale?: "true" | "false";
511
882
  wholesaleOnly?: "true" | "false";
883
+ include?: "proof";
512
884
  origin?: string;
513
885
  continent?: string;
514
886
  country?: string | string[];
@@ -592,7 +964,7 @@ interface paths {
592
964
  };
593
965
  /**
594
966
  * Catalog filter metadata and counted facets
595
- * @description Returns access-aware catalog filter metadata. Values are computed after visibility and entitled content filters are applied; premium process metadata is included only for member sessions and paid API tiers. Requesting entitlement-gated filters you are not entitled to is handled per PADR-0013 §7: strict callers (API keys, bearer-session JWTs) receive a 401/403; lenient callers (anonymous, first-party web) get the filters stripped with a `meta.notices` entry. Send `Prefer: handling=strict` to opt into strict enforcement; `Prefer: handling=lenient` is honored only for callers already lenient-eligible and cannot downgrade a strict caller's enforcement.
967
+ * @description Returns access-aware catalog filter metadata. Values are computed after visibility and entitled content filters are applied; importer, elevation, appearance, and premium process metadata are included only for member sessions and paid API tiers. These catalog routes require a Supabase session JWT or Parchment API key. For entitlement-gated params, strict callers (non-demo API keys, bearer-session JWTs) receive a 401/403; lenient callers (first-party cookie-session and the configured public-demo API key) get the params stripped with a `meta.notices` entry. Send `Prefer: handling=strict` to opt into strict enforcement; `Prefer: handling=lenient` is honored only for callers already lenient-eligible and cannot downgrade a strict caller's enforcement.
596
968
  */
597
969
  get: {
598
970
  parameters: {
@@ -743,7 +1115,7 @@ interface paths {
743
1115
  };
744
1116
  /**
745
1117
  * Aggregate stats over the caller-visible catalog
746
- * @description Aggregate catalog stats (total, stocked count, per-origin histogram, average and min/max per-lb display price) computed over the same entitlement-scoped catalog the /v1/catalog listing exposes (public-only visibility, wholesale scope). Not a raw table scan. `stocked` defaults to all rows so the stocked count is meaningful; pass `stocked=true|false` to restrict the universe.
1118
+ * @description Aggregate catalog stats (total, stocked count, per-origin histogram, average and min/max per-lb display price) computed over the same caller-visible catalog the /v1/catalog listing exposes. Not a raw table scan. `stocked` defaults to all rows so the stocked count is meaningful; pass `stocked=true|false` to restrict the universe.
747
1119
  */
748
1120
  get: {
749
1121
  parameters: {
@@ -1280,7 +1652,7 @@ interface paths {
1280
1652
  };
1281
1653
  /**
1282
1654
  * Market value signals (actionable buy signals)
1283
- * @description Daily actionable value signals over market_signals. The unfiltered summary slice is public; item rows and filtered queries require Parchment Intelligence (ppiAccess).
1655
+ * @description Daily actionable value signals over market_signals. Only the exact unfiltered summary=true request is public; item rows and filtered queries require Parchment Intelligence (ppiAccess).
1284
1656
  */
1285
1657
  get: {
1286
1658
  parameters: {
@@ -3560,6 +3932,47 @@ interface components {
3560
3932
  canExport: boolean;
3561
3933
  };
3562
3934
  };
3935
+ /** @description API-owned row-level trust summary. Raw evidence is never included. */
3936
+ CatalogProofSummary: {
3937
+ /** @enum {string} */
3938
+ version: "proof-summary-v1";
3939
+ overall: {
3940
+ /** @enum {string} */
3941
+ label: "strong" | "partial" | "limited" | "not_available";
3942
+ families_with_signals: number;
3943
+ };
3944
+ families: {
3945
+ process: {
3946
+ /** @enum {string} */
3947
+ label: "disclosed" | "partial" | "not_available";
3948
+ confidence: number | null;
3949
+ signals: string[];
3950
+ message: string;
3951
+ };
3952
+ provenance: {
3953
+ /** @enum {string} */
3954
+ label: "identified" | "partial" | "not_available";
3955
+ confidence: number | null;
3956
+ signals: string[];
3957
+ message: string;
3958
+ };
3959
+ freshness: {
3960
+ /** @enum {string} */
3961
+ label: "dated" | "not_available";
3962
+ confidence: number | null;
3963
+ signals: string[];
3964
+ message: string;
3965
+ };
3966
+ pricing: {
3967
+ /** @enum {string} */
3968
+ label: "tiered" | "listed" | "not_available";
3969
+ confidence: number | null;
3970
+ signals: string[];
3971
+ message: string;
3972
+ };
3973
+ };
3974
+ limitations: ("not_certification" | "raw_evidence_not_included" | "supplier_verification_not_performed")[];
3975
+ };
3563
3976
  CatalogItem: {
3564
3977
  id: number;
3565
3978
  name?: string | null;
@@ -3610,6 +4023,7 @@ interface components {
3610
4023
  unstocked_date?: string | null;
3611
4024
  ai_description?: string | null;
3612
4025
  ai_tasting_notes?: unknown;
4026
+ proof?: components["schemas"]["CatalogProofSummary"];
3613
4027
  };
3614
4028
  CatalogListResponse: {
3615
4029
  data: components["schemas"]["CatalogItem"][];
@@ -3630,7 +4044,7 @@ interface components {
3630
4044
  version: "v1";
3631
4045
  auth: {
3632
4046
  /** @enum {string} */
3633
- kind: "anonymous" | "session" | "api-key";
4047
+ kind: "session" | "api-key";
3634
4048
  /** @enum {string|null} */
3635
4049
  role: "viewer" | "member" | "admin" | null;
3636
4050
  /** @enum {string|null} */
@@ -3808,7 +4222,7 @@ interface components {
3808
4222
  version: "v1";
3809
4223
  auth: {
3810
4224
  /** @enum {string} */
3811
- kind: "anonymous" | "session" | "api-key";
4225
+ kind: "session" | "api-key";
3812
4226
  /** @enum {string|null} */
3813
4227
  role: "viewer" | "member" | "admin" | null;
3814
4228
  /** @enum {string|null} */
@@ -3856,7 +4270,7 @@ interface components {
3856
4270
  version: "v1";
3857
4271
  auth: {
3858
4272
  /** @enum {string} */
3859
- kind: "anonymous" | "session" | "api-key";
4273
+ kind: "session" | "api-key";
3860
4274
  /** @enum {string|null} */
3861
4275
  role: "viewer" | "member" | "admin" | null;
3862
4276
  /** @enum {string|null} */
@@ -3922,7 +4336,7 @@ interface components {
3922
4336
  returned: number;
3923
4337
  auth: {
3924
4338
  /** @enum {string} */
3925
- kind: "anonymous" | "session" | "api-key";
4339
+ kind: "session" | "api-key";
3926
4340
  /** @enum {string|null} */
3927
4341
  role: "viewer" | "member" | "admin" | null;
3928
4342
  /** @enum {string|null} */
@@ -4008,7 +4422,7 @@ interface components {
4008
4422
  returned: number;
4009
4423
  auth: {
4010
4424
  /** @enum {string} */
4011
- kind: "anonymous" | "session" | "api-key";
4425
+ kind: "session" | "api-key";
4012
4426
  /** @enum {string|null} */
4013
4427
  role: "viewer" | "member" | "admin" | null;
4014
4428
  /** @enum {string|null} */
@@ -4072,7 +4486,7 @@ interface components {
4072
4486
  returned: number;
4073
4487
  auth: {
4074
4488
  /** @enum {string} */
4075
- kind: "anonymous" | "session" | "api-key";
4489
+ kind: "session" | "api-key";
4076
4490
  /** @enum {string|null} */
4077
4491
  role: "viewer" | "member" | "admin" | null;
4078
4492
  /** @enum {string|null} */
@@ -4110,7 +4524,7 @@ interface components {
4110
4524
  version: "v1";
4111
4525
  auth: {
4112
4526
  /** @enum {string} */
4113
- kind: "anonymous" | "session" | "api-key";
4527
+ kind: "session" | "api-key";
4114
4528
  /** @enum {string|null} */
4115
4529
  role: "viewer" | "member" | "admin" | null;
4116
4530
  /** @enum {string|null} */
@@ -4526,42 +4940,7 @@ interface components {
4526
4940
  /** @enum {string|null} */
4527
4941
  baseline_source: "price_per_lb" | "price_tiers" | "cost_lb" | null;
4528
4942
  };
4529
- proof: {
4530
- /** @enum {string} */
4531
- version: "proof-summary-v1";
4532
- overall: {
4533
- /** @enum {string} */
4534
- label: "strong" | "partial" | "limited" | "not_available";
4535
- families_with_signals: number;
4536
- };
4537
- families: {
4538
- process: {
4539
- label: string;
4540
- confidence: number | null;
4541
- signals: string[];
4542
- message: string;
4543
- };
4544
- provenance: {
4545
- label: string;
4546
- confidence: number | null;
4547
- signals: string[];
4548
- message: string;
4549
- };
4550
- freshness: {
4551
- label: string;
4552
- confidence: number | null;
4553
- signals: string[];
4554
- message: string;
4555
- };
4556
- pricing: {
4557
- label: string;
4558
- confidence: number | null;
4559
- signals: string[];
4560
- message: string;
4561
- };
4562
- };
4563
- limitations: string[];
4564
- };
4943
+ proof: components["schemas"]["CatalogProofSummary"];
4565
4944
  };
4566
4945
  CatalogSimilarityMatch: {
4567
4946
  coffee: {
@@ -4571,49 +4950,14 @@ interface components {
4571
4950
  origin: string | null;
4572
4951
  country: string | null;
4573
4952
  continent: string | null;
4574
- processing: string | null;
4575
- processing_base_method: string | null;
4576
- fermentation_type: string | null;
4577
- drying_method: string | null;
4578
- stocked: boolean | null;
4579
- arrival_date: string | null;
4580
- stocked_date: string | null;
4581
- proof: {
4582
- /** @enum {string} */
4583
- version: "proof-summary-v1";
4584
- overall: {
4585
- /** @enum {string} */
4586
- label: "strong" | "partial" | "limited" | "not_available";
4587
- families_with_signals: number;
4588
- };
4589
- families: {
4590
- process: {
4591
- label: string;
4592
- confidence: number | null;
4593
- signals: string[];
4594
- message: string;
4595
- };
4596
- provenance: {
4597
- label: string;
4598
- confidence: number | null;
4599
- signals: string[];
4600
- message: string;
4601
- };
4602
- freshness: {
4603
- label: string;
4604
- confidence: number | null;
4605
- signals: string[];
4606
- message: string;
4607
- };
4608
- pricing: {
4609
- label: string;
4610
- confidence: number | null;
4611
- signals: string[];
4612
- message: string;
4613
- };
4614
- };
4615
- limitations: string[];
4616
- };
4953
+ processing: string | null;
4954
+ processing_base_method: string | null;
4955
+ fermentation_type: string | null;
4956
+ drying_method: string | null;
4957
+ stocked: boolean | null;
4958
+ arrival_date: string | null;
4959
+ stocked_date: string | null;
4960
+ proof: components["schemas"]["CatalogProofSummary"];
4617
4961
  };
4618
4962
  pricing: {
4619
4963
  price_per_lb: number | null;
@@ -5047,7 +5391,8 @@ interface components {
5047
5391
  environmentalTemp?: number | null;
5048
5392
  ambientTemp?: number | null;
5049
5393
  rorBeanTemp?: number | null;
5050
- dataSource?: string;
5394
+ /** @enum {string} */
5395
+ dataSource?: "live" | "artisan_import" | "manual";
5051
5396
  };
5052
5397
  RoastEventInput: {
5053
5398
  timeSeconds: number;
@@ -5535,6 +5880,10 @@ interface ParchmentClientOptions {
5535
5880
  }
5536
5881
  /** Query parameters for {@link ParchmentClient.catalog.list}. */
5537
5882
  type CatalogListQuery = NonNullable<paths["/v1/catalog"]["get"]["parameters"]["query"]>;
5883
+ /** A catalog row returned by the canonical listing resource. */
5884
+ type CatalogItem = components["schemas"]["CatalogItem"];
5885
+ /** API-owned row-level trust summary returned when `include=proof`. */
5886
+ type CatalogProofSummary = components["schemas"]["CatalogProofSummary"];
5538
5887
  /** Query parameters for {@link ParchmentClient.catalog.facets}. */
5539
5888
  type CatalogFacetsQuery = NonNullable<paths["/v1/catalog/facets"]["get"]["parameters"]["query"]>;
5540
5889
  /**
@@ -5612,6 +5961,10 @@ type TastingGetQuery = NonNullable<paths["/v1/tasting/{catalogId}"]["get"]["para
5612
5961
  type TastingRateRequest = NonNullable<paths["/v1/tasting/inventory/{inventoryId}"]["put"]["requestBody"]>["content"]["application/json"];
5613
5962
  /** Request body for {@link ParchmentClient.apiKeys.create}. */
5614
5963
  type ApiKeyCreateRequest = NonNullable<paths["/v1/api-keys"]["post"]["requestBody"]>["content"]["application/json"];
5964
+ type CliAuthRequestCreate = NonNullable<paths["/v1/cli-auth/requests"]["post"]["requestBody"]>["content"]["application/json"];
5965
+ type CliAuthInspectRequest = NonNullable<paths["/v1/cli-auth/inspect"]["post"]["requestBody"]>["content"]["application/json"];
5966
+ type CliAuthApproveRequest = NonNullable<paths["/v1/cli-auth/approve"]["post"]["requestBody"]>["content"]["application/json"];
5967
+ type CliAuthExchangeRequest = NonNullable<paths["/v1/cli-auth/token"]["post"]["requestBody"]>["content"]["application/json"];
5615
5968
  /**
5616
5969
  * Create a typed Parchment API client.
5617
5970
  *
@@ -5880,7 +6233,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
5880
6233
  [name: string]: unknown;
5881
6234
  };
5882
6235
  content: {
5883
- "application/json": components["schemas"] /** The underlying typed openapi-fetch client for direct path access. */["ErrorResponse"];
6236
+ "application/json": components["schemas"]["ErrorResponse"];
5884
6237
  };
5885
6238
  };
5886
6239
  };
@@ -5983,7 +6336,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
5983
6336
  [name: string]: unknown;
5984
6337
  };
5985
6338
  content: {
5986
- "application/json": components["schemas"]["ErrorResponse"];
6339
+ "application/json": components["schemas"] /** List supplier aggregates over caller-visible catalog coffees. */["ErrorResponse"];
5987
6340
  };
5988
6341
  };
5989
6342
  401: {
@@ -5999,7 +6352,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
5999
6352
  [name: string]: unknown;
6000
6353
  };
6001
6354
  content: {
6002
- "application/json": components["schemas"] /** Fetch one of the caller's sourcing briefs by id. */["ErrorResponse"];
6355
+ "application/json": components["schemas"]["ErrorResponse"];
6003
6356
  };
6004
6357
  };
6005
6358
  404: {
@@ -6027,6 +6380,307 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
6027
6380
  };
6028
6381
  }, `${string}/${string}`>>;
6029
6382
  };
6383
+ cliAuth: {
6384
+ /** Create a signed, short-lived login request bound to a PKCE challenge. */
6385
+ create: (body: CliAuthRequestCreate) => Promise<openapi_fetch.FetchResponse<{
6386
+ parameters: {
6387
+ query?: never;
6388
+ header?: never;
6389
+ path?: never;
6390
+ cookie?: never;
6391
+ };
6392
+ requestBody: {
6393
+ content: {
6394
+ "application/json": {
6395
+ machineName: string;
6396
+ codeChallenge: string;
6397
+ };
6398
+ };
6399
+ };
6400
+ responses: {
6401
+ 201: {
6402
+ headers: {
6403
+ [name: string]: unknown;
6404
+ };
6405
+ content: {
6406
+ "application/json": {
6407
+ requestToken: string;
6408
+ requestId: string;
6409
+ verificationUri: string;
6410
+ expiresAt: string;
6411
+ intervalSeconds: number;
6412
+ };
6413
+ };
6414
+ };
6415
+ 400: {
6416
+ headers: {
6417
+ [name: string]: unknown;
6418
+ };
6419
+ content: {
6420
+ "application/json": components["schemas"]["ErrorResponse"];
6421
+ };
6422
+ };
6423
+ 409: {
6424
+ headers: {
6425
+ [name: string]: unknown;
6426
+ };
6427
+ content: {
6428
+ "application/json": components["schemas"]["ErrorResponse"];
6429
+ };
6430
+ };
6431
+ 410: {
6432
+ headers: {
6433
+ [name: string]: unknown;
6434
+ };
6435
+ content: {
6436
+ "application/json": components["schemas"]["ErrorResponse"];
6437
+ };
6438
+ };
6439
+ 503: {
6440
+ headers: {
6441
+ [name: string]: unknown;
6442
+ };
6443
+ content: {
6444
+ "application/json":
6445
+ /** Match Artisan roast metadata to one of the supplied inventory rows. */
6446
+ components["schemas"]["ErrorResponse"];
6447
+ };
6448
+ };
6449
+ };
6450
+ }, {
6451
+ body: {
6452
+ machineName: string;
6453
+ codeChallenge: string;
6454
+ };
6455
+ }, `${string}/${string}`>>;
6456
+ /** Inspect a signed request before displaying the web consent screen. */
6457
+ inspect: (body: CliAuthInspectRequest) => Promise<openapi_fetch.FetchResponse<{
6458
+ parameters: {
6459
+ query?: never;
6460
+ header?: never;
6461
+ path?: never;
6462
+ cookie?: never;
6463
+ };
6464
+ requestBody: {
6465
+ content: {
6466
+ "application/json": {
6467
+ requestToken: string;
6468
+ };
6469
+ };
6470
+ };
6471
+ responses: {
6472
+ 200: {
6473
+ headers: {
6474
+ [name: string]: unknown;
6475
+ };
6476
+ content: {
6477
+ "application/json": {
6478
+ requestId: string;
6479
+ machineName: string;
6480
+ expiresAt: string;
6481
+ scopes: ("catalog:read" | "inventory:read" | "inventory:write" | "roast:read" | "roast:write" | "sales:read" | "sales:write" | "tasting:read" | "tasting:write")[];
6482
+ };
6483
+ };
6484
+ };
6485
+ 400: {
6486
+ headers: {
6487
+ [name: string]: unknown;
6488
+ };
6489
+ content: {
6490
+ "application/json": components["schemas"]["ErrorResponse"];
6491
+ };
6492
+ };
6493
+ 409: {
6494
+ headers: {
6495
+ [name: string]: unknown;
6496
+ };
6497
+ content: {
6498
+ "application/json": components["schemas"]["ErrorResponse"];
6499
+ };
6500
+ };
6501
+ 410: {
6502
+ headers: {
6503
+ [name: string]: unknown;
6504
+ };
6505
+ content: {
6506
+ "application/json": components["schemas"]["ErrorResponse"];
6507
+ };
6508
+ };
6509
+ 503: {
6510
+ headers: {
6511
+ [name: string]: unknown;
6512
+ };
6513
+ content: {
6514
+ "application/json": components["schemas"]["ErrorResponse"];
6515
+ };
6516
+ };
6517
+ };
6518
+ }, {
6519
+ body: {
6520
+ requestToken: string;
6521
+ };
6522
+ }, `${string}/${string}`>>;
6523
+ /** Approve a request using the client's authenticated user session. */
6524
+ approve: (body: CliAuthApproveRequest) => Promise<openapi_fetch.FetchResponse<{
6525
+ parameters: {
6526
+ query?: never;
6527
+ header?: never;
6528
+ path?: never;
6529
+ cookie?: never;
6530
+ };
6531
+ requestBody: {
6532
+ content: {
6533
+ "application/json": {
6534
+ requestToken: string;
6535
+ };
6536
+ };
6537
+ };
6538
+ responses: {
6539
+ 200: {
6540
+ headers: {
6541
+ [name: string]: unknown;
6542
+ };
6543
+ content: {
6544
+ "application/json": {
6545
+ requestId: string;
6546
+ approved: true;
6547
+ };
6548
+ };
6549
+ };
6550
+ 400: {
6551
+ headers: {
6552
+ [name: string]: unknown;
6553
+ };
6554
+ content: {
6555
+ "application/json": components["schemas"]["ErrorResponse"];
6556
+ };
6557
+ };
6558
+ 401: {
6559
+ headers: {
6560
+ [name: string]: unknown;
6561
+ };
6562
+ content: {
6563
+ "application/json": components["schemas"]["ErrorResponse"];
6564
+ };
6565
+ };
6566
+ 403: {
6567
+ headers: {
6568
+ [name: string]: unknown;
6569
+ };
6570
+ content: {
6571
+ "application/json": components["schemas"]["ErrorResponse"];
6572
+ };
6573
+ };
6574
+ 409: {
6575
+ headers: {
6576
+ [name: string]: unknown;
6577
+ };
6578
+ content: {
6579
+ "application/json": components["schemas"]["ErrorResponse"];
6580
+ };
6581
+ };
6582
+ 410: {
6583
+ headers: {
6584
+ [name: string]: unknown;
6585
+ };
6586
+ content: {
6587
+ "application/json": components["schemas"]["ErrorResponse"];
6588
+ };
6589
+ };
6590
+ 503: {
6591
+ headers: {
6592
+ [name: string]: unknown;
6593
+ };
6594
+ content: {
6595
+ "application/json": components["schemas"]["ErrorResponse"];
6596
+ };
6597
+ };
6598
+ };
6599
+ }, {
6600
+ body: {
6601
+ requestToken: string;
6602
+ };
6603
+ }, `${string}/${string}`>>;
6604
+ /** Exchange an approved request and verifier for the one-time raw key. */
6605
+ exchange: (body: CliAuthExchangeRequest) => Promise<openapi_fetch.FetchResponse<{
6606
+ parameters: {
6607
+ query?: never;
6608
+ header?: never;
6609
+ path?: never;
6610
+ cookie?: never;
6611
+ };
6612
+ requestBody: {
6613
+ content: {
6614
+ "application/json": {
6615
+ requestToken: string;
6616
+ codeVerifier: string;
6617
+ };
6618
+ };
6619
+ };
6620
+ responses: {
6621
+ 201: {
6622
+ headers: {
6623
+ [name: string]: unknown;
6624
+ };
6625
+ content: {
6626
+ "application/json": {
6627
+ apiKey: string;
6628
+ key: {
6629
+ id: string;
6630
+ name: string;
6631
+ createdAt: string | null;
6632
+ lastUsedAt: string | null;
6633
+ isActive: boolean;
6634
+ scopes: string[];
6635
+ };
6636
+ user: {
6637
+ id: string;
6638
+ email: string;
6639
+ role: string;
6640
+ };
6641
+ };
6642
+ };
6643
+ };
6644
+ 400: {
6645
+ headers: {
6646
+ [name: string]: unknown;
6647
+ };
6648
+ content: {
6649
+ "application/json": components["schemas"]["ErrorResponse"];
6650
+ };
6651
+ };
6652
+ 409: {
6653
+ headers: {
6654
+ [name: string]: unknown;
6655
+ };
6656
+ content: {
6657
+ "application/json": components["schemas"]["ErrorResponse"];
6658
+ };
6659
+ };
6660
+ 410: {
6661
+ headers: {
6662
+ [name: string]: unknown;
6663
+ };
6664
+ content: {
6665
+ "application/json": components["schemas"]["ErrorResponse"];
6666
+ };
6667
+ };
6668
+ 503: {
6669
+ headers: {
6670
+ [name: string]: unknown;
6671
+ };
6672
+ content: {
6673
+ "application/json": components["schemas"]["ErrorResponse"];
6674
+ };
6675
+ };
6676
+ };
6677
+ }, {
6678
+ body: {
6679
+ requestToken: string;
6680
+ codeVerifier: string;
6681
+ };
6682
+ }, `${string}/${string}`>>;
6683
+ };
6030
6684
  catalog: {
6031
6685
  /** Catalog capabilities and visibility for the caller. */
6032
6686
  access: () => Promise<openapi_fetch.FetchResponse<{
@@ -6112,6 +6766,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
6112
6766
  order?: "asc" | "desc";
6113
6767
  showWholesale?: "true" | "false";
6114
6768
  wholesaleOnly?: "true" | "false";
6769
+ include?: "proof";
6115
6770
  origin?: string;
6116
6771
  continent?: string;
6117
6772
  country?: string | string[];
@@ -6184,6 +6839,7 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
6184
6839
  order?: "asc" | "desc";
6185
6840
  showWholesale?: "true" | "false";
6186
6841
  wholesaleOnly?: "true" | "false";
6842
+ include?: "proof";
6187
6843
  origin?: string;
6188
6844
  continent?: string;
6189
6845
  country?: string | string[];
@@ -9079,4 +9735,4 @@ declare function createParchmentClient(options: ParchmentClientOptions): {
9079
9735
  };
9080
9736
  type ParchmentClient = ReturnType<typeof createParchmentClient>;
9081
9737
 
9082
- export { type BriefMatchesQuery, type CatalogListQuery, type CatalogSimilarQuery, type InventoryCreateRequest, type InventoryUpdateRequest, type MarketSignalsQuery, type MetadataIndexQuery, type ParchmentClient, type ParchmentClientOptions, type PriceIndexQuery, type PriceIndexStatsQuery, type SalesCreateRequest, type SalesListQuery, type SalesUpdateRequest, type SourcingBriefCreateRequest, type components, createParchmentClient, type paths };
9738
+ export { type BriefMatchesQuery, type CatalogItem, type CatalogListQuery, type CatalogProofSummary, type CatalogSimilarQuery, type InventoryCreateRequest, type InventoryUpdateRequest, type MarketSignalsQuery, type MetadataIndexQuery, type ParchmentClient, type ParchmentClientOptions, type PriceIndexQuery, type PriceIndexStatsQuery, type SalesCreateRequest, type SalesListQuery, type SalesUpdateRequest, type SourcingBriefCreateRequest, type components, createParchmentClient, type paths };
package/dist/index.js CHANGED
@@ -28,6 +28,16 @@ function createParchmentClient(options) {
28
28
  params: { path: { id } }
29
29
  })
30
30
  },
31
+ cliAuth: {
32
+ /** Create a signed, short-lived login request bound to a PKCE challenge. */
33
+ create: (body) => client.POST("/v1/cli-auth/requests", { body }),
34
+ /** Inspect a signed request before displaying the web consent screen. */
35
+ inspect: (body) => client.POST("/v1/cli-auth/inspect", { body }),
36
+ /** Approve a request using the client's authenticated user session. */
37
+ approve: (body) => client.POST("/v1/cli-auth/approve", { body }),
38
+ /** Exchange an approved request and verifier for the one-time raw key. */
39
+ exchange: (body) => client.POST("/v1/cli-auth/token", { body })
40
+ },
31
41
  catalog: {
32
42
  /** Catalog capabilities and visibility for the caller. */
33
43
  access: () => client.GET("/v1/catalog/access"),
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/client.ts"],"sourcesContent":["import createClient, { type ClientOptions } from \"openapi-fetch\";\nimport type { components, paths } from \"./schema\";\n\nexport interface ParchmentClientOptions {\n /** Base URL of the Parchment API, e.g. https://api.purveyors.io */\n baseUrl: string;\n /**\n * Optional bearer token (a Supabase JWT or, later, an API key). Sent as\n * `Authorization: Bearer <token>`. Auth is resolved server-side against the\n * unified principal model; the SDK only forwards the credential.\n */\n token?: string;\n /** Override the fetch implementation (useful for tests or custom runtimes). */\n fetch?: ClientOptions[\"fetch\"];\n}\n\n/** Query parameters for {@link ParchmentClient.catalog.list}. */\nexport type CatalogListQuery = NonNullable<\n paths[\"/v1/catalog\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.facets}. */\nexport type CatalogFacetsQuery = NonNullable<\n paths[\"/v1/catalog/facets\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/**\n * Optional headers for {@link ParchmentClient.catalog.list}, notably the\n * RFC 7240 `Prefer: handling=lenient|strict` override (PADR-0013 §7). Sending\n * `handling=lenient` opts a strict caller (API key or bearer-session JWT) back\n * into strip-with-notice degradation instead of a 401/403 hard-deny.\n */\nexport type CatalogListHeaders = NonNullable<\n paths[\"/v1/catalog\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Optional headers for {@link ParchmentClient.catalog.facets}; see {@link CatalogListHeaders}. */\nexport type CatalogFacetsHeaders = NonNullable<\n paths[\"/v1/catalog/facets\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.originPriceStats}. */\nexport type CatalogOriginPriceStatsQuery = NonNullable<\n paths[\"/v1/catalog/origin-price-stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.stats}. */\nexport type CatalogStatsQuery = NonNullable<\n paths[\"/v1/catalog/stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.rank}. */\nexport type CatalogRankQuery = NonNullable<\n paths[\"/v1/catalog/rank\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.rankPremium}. */\nexport type CatalogRankPremiumQuery = NonNullable<\n paths[\"/v1/catalog/rank-premium\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.suppliers}. */\nexport type CatalogSuppliersQuery = NonNullable<\n paths[\"/v1/catalog/suppliers\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.supplierDetail}. */\nexport type CatalogSupplierDetailQuery = NonNullable<\n paths[\"/v1/catalog/suppliers/detail\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.supplierRank}. */\nexport type CatalogSupplierRankQuery = NonNullable<\n paths[\"/v1/catalog/suppliers/rank\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Optional headers for ranking endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogRankHeaders = NonNullable<\n paths[\"/v1/catalog/rank\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Optional headers for premium ranking endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogRankPremiumHeaders = NonNullable<\n paths[\"/v1/catalog/rank-premium\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Optional headers for supplier aggregate endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogSupplierHeaders = NonNullable<\n paths[\"/v1/catalog/suppliers\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.similar}. */\nexport type CatalogSimilarQuery = NonNullable<\n paths[\"/v1/catalog/{id}/similar\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.priceIndex.list}. */\nexport type PriceIndexQuery = NonNullable<\n paths[\"/v1/price-index\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.market.signals}. */\nexport type MarketSignalsQuery = NonNullable<\n paths[\"/v1/market/signals\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.priceIndex.stats}. */\nexport type PriceIndexStatsQuery = NonNullable<\n paths[\"/v1/price-index/stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.market.metadataIndex}. */\nexport type MetadataIndexQuery = NonNullable<\n paths[\"/v1/market/metadata-index\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.procurement.briefs.matches}. */\nexport type BriefMatchesQuery = NonNullable<\n paths[\"/v1/procurement/briefs/{id}/matches\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.procurement.briefs.create}. */\nexport type SourcingBriefCreateRequest =\n components[\"schemas\"][\"SourcingBriefCreateRequest\"];\n/** Query parameters for {@link ParchmentClient.inventory.list}. */\nexport type InventoryListQuery = NonNullable<\n paths[\"/v1/inventory\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.inventory.create}. */\nexport type InventoryCreateRequest = NonNullable<\n paths[\"/v1/inventory\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.inventory.update}. */\nexport type InventoryUpdateRequest = NonNullable<\n paths[\"/v1/inventory/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.roasts.list}. */\nexport type RoastListQuery = NonNullable<\n paths[\"/v1/roasts\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.roasts.get}. */\nexport type RoastGetQuery = NonNullable<\n paths[\"/v1/roasts/{id}\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.roasts.classify}. */\nexport type RoastClassificationRequest = NonNullable<\n paths[\"/v1/roasts/classify\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.create}. */\nexport type RoastCreateRequest = NonNullable<\n paths[\"/v1/roasts\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.update}. */\nexport type RoastUpdateRequest = NonNullable<\n paths[\"/v1/roasts/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.import}. */\nexport type RoastImportRequest = NonNullable<\n paths[\"/v1/roasts/imports\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.replaceArtisanImport}. */\nexport type RoastArtisanImportReplaceRequest = NonNullable<\n paths[\"/v1/roasts/{id}/artisan-import\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.sales.list}. */\nexport type SalesListQuery = NonNullable<\n paths[\"/v1/sales\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.sales.create}. */\nexport type SalesCreateRequest = NonNullable<\n paths[\"/v1/sales\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.sales.update}. */\nexport type SalesUpdateRequest = NonNullable<\n paths[\"/v1/sales/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.tasting.get}. */\nexport type TastingGetQuery = NonNullable<\n paths[\"/v1/tasting/{catalogId}\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.tasting.rate}. */\nexport type TastingRateRequest = NonNullable<\n paths[\"/v1/tasting/inventory/{inventoryId}\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.apiKeys.create}. */\nexport type ApiKeyCreateRequest = NonNullable<\n paths[\"/v1/api-keys\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n\n/**\n * Create a typed Parchment API client.\n *\n * The generated core (openapi-fetch over the generated `paths` types) is the\n * contract truth; the named helpers below are the hand-maintained ergonomic\n * layer and grow as endpoints land. `raw` always exposes the underlying typed\n * client for direct path access to anything not yet wrapped.\n */\nexport function createParchmentClient(options: ParchmentClientOptions) {\n const { baseUrl, token, fetch: fetchImpl } = options;\n\n const client = createClient<paths>({\n baseUrl,\n fetch: fetchImpl,\n headers: token ? { Authorization: `Bearer ${token}` } : undefined,\n });\n\n return {\n /** The underlying typed openapi-fetch client for direct path access. */\n raw: client,\n /** Liveness and service identity. */\n health: () => client.GET(\"/health\"),\n /** Resolved principal and entitlements for the caller. */\n me: () => client.GET(\"/v1/me\"),\n apiKeys: {\n /** List API keys owned by the authenticated session user. */\n list: () => client.GET(\"/v1/api-keys\"),\n /** Create an API key. The raw secret is returned only once. */\n create: (body: ApiKeyCreateRequest) =>\n client.POST(\"/v1/api-keys\", { body }),\n /** Revoke an API key owned by the authenticated session user. */\n revoke: (id: string) =>\n client.DELETE(\"/v1/api-keys/{id}\", {\n params: { path: { id } },\n }),\n /** Rotate an API key and return the replacement secret once. */\n rotate: (id: string) =>\n client.POST(\"/v1/api-keys/{id}/rotate\", {\n params: { path: { id } },\n }),\n },\n catalog: {\n /** Catalog capabilities and visibility for the caller. */\n access: () => client.GET(\"/v1/catalog/access\"),\n /**\n * List public catalog coffees (paginated). Pass `headers` to send the\n * `Prefer: handling=lenient|strict` override (see {@link CatalogListHeaders}).\n */\n list: (query?: CatalogListQuery, headers?: CatalogListHeaders) =>\n client.GET(\"/v1/catalog\", { params: { query, header: headers } }),\n /**\n * Catalog filter metadata and counted facets. Pass `headers` to send the\n * `Prefer: handling=lenient|strict` override (see {@link CatalogFacetsHeaders}).\n */\n facets: (query?: CatalogFacetsQuery, headers?: CatalogFacetsHeaders) =>\n client.GET(\"/v1/catalog/facets\", {\n params: { query, header: headers },\n }),\n /** Live catalog price context by origin. */\n originPriceStats: (query?: CatalogOriginPriceStatsQuery) =>\n client.GET(\"/v1/catalog/origin-price-stats\", { params: { query } }),\n /** Aggregate stats over the caller-visible catalog. */\n stats: (query?: CatalogStatsQuery) =>\n client.GET(\"/v1/catalog/stats\", { params: { query } }),\n /** Rank caller-visible catalog coffees by deterministic objectives. */\n rank: (query?: CatalogRankQuery, headers?: CatalogRankHeaders) =>\n client.GET(\"/v1/catalog/rank\", {\n params: { query, header: headers },\n }),\n /** Rank premium catalog candidates by Purveyor Score. */\n rankPremium: (\n query?: CatalogRankPremiumQuery,\n headers?: CatalogRankPremiumHeaders,\n ) =>\n client.GET(\"/v1/catalog/rank-premium\", {\n params: { query, header: headers },\n }),\n /** List supplier aggregates over caller-visible catalog coffees. */\n suppliers: (\n query?: CatalogSuppliersQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers\", {\n params: { query, header: headers },\n }),\n /** Return aggregate detail for a supplier query. */\n supplierDetail: (\n query: CatalogSupplierDetailQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers/detail\", {\n params: { query, header: headers },\n }),\n /** Rank suppliers by catalog score and availability. */\n supplierRank: (\n query?: CatalogSupplierRankQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers/rank\", {\n params: { query, header: headers },\n }),\n /** Aggregate proof-coverage over the public catalog. */\n proofCoverage: () => client.GET(\"/v1/catalog/proof-coverage\"),\n /** Find catalog coffees similar to a target coffee. */\n similar: (id: string, query?: CatalogSimilarQuery) =>\n client.GET(\"/v1/catalog/{id}/similar\", {\n params: { path: { id }, query },\n }),\n },\n priceIndex: {\n /** Parchment Price Index (aggregate snapshots). */\n list: (query?: PriceIndexQuery) =>\n client.GET(\"/v1/price-index\", { params: { query } }),\n /** Price movement significance stats (precomputed). */\n stats: (query?: PriceIndexStatsQuery) =>\n client.GET(\"/v1/price-index/stats\", { params: { query } }),\n },\n market: {\n /** Actionable market value signals. */\n signals: (query?: MarketSignalsQuery) =>\n client.GET(\"/v1/market/signals\", { params: { query } }),\n /** Metadata-trend index (process/disclosure/Purveyor Score over time). */\n metadataIndex: (query?: MetadataIndexQuery) =>\n client.GET(\"/v1/market/metadata-index\", { params: { query } }),\n },\n procurement: {\n briefs: {\n /** List the caller's saved sourcing briefs. */\n list: () => client.GET(\"/v1/procurement/briefs\"),\n /** Create a saved sourcing brief. */\n create: (body: SourcingBriefCreateRequest) =>\n client.POST(\"/v1/procurement/briefs\", { body }),\n /** Fetch one of the caller's sourcing briefs by id. */\n get: (id: string) =>\n client.GET(\"/v1/procurement/briefs/{id}\", {\n params: { path: { id } },\n }),\n /** Run a saved brief against the catalog (paginated matches). */\n matches: (id: string, query?: BriefMatchesQuery) =>\n client.GET(\"/v1/procurement/briefs/{id}/matches\", {\n params: { path: { id }, query },\n }),\n },\n },\n inventory: {\n /** List the caller's own green-coffee inventory (owner-scoped). */\n list: (query?: InventoryListQuery) =>\n client.GET(\"/v1/inventory\", { params: { query } }),\n /**\n * Create an owner inventory lot. Requires a session or an owner-bound API\n * key carrying the exact `inventory:write` scope. Pass `idempotencyKey`\n * to make retries safe: the same key replays the original result, and a\n * concurrent duplicate gets 409 while the first is in flight.\n */\n create: (\n body: InventoryCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/inventory\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Update one of the caller's own inventory rows. Pass `ifMatch` (the\n * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).\n */\n update: (\n id: number,\n body: InventoryUpdateRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PATCH(\"/v1/inventory/{id}\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /**\n * Delete one of the caller's own inventory rows. Returns 409 if dependent\n * roast profiles or sales exist (no force-cascade).\n */\n delete: (id: number) =>\n client.DELETE(\"/v1/inventory/{id}\", { params: { path: { id } } }),\n },\n roasts: {\n /** Match Artisan roast metadata to one of the supplied inventory rows. */\n classify: (body: RoastClassificationRequest) =>\n client.POST(\"/v1/roasts/classify\", { body }),\n /** List the caller's own roast profiles (owner-scoped). */\n list: (query?: RoastListQuery) =>\n client.GET(\"/v1/roasts\", { params: { query } }),\n /**\n * Fetch one of the caller's roast profiles by id, optionally with its\n * temperature curve (`includeTemps`) and event markers (`includeEvents`).\n */\n get: (id: string, query?: RoastGetQuery) =>\n client.GET(\"/v1/roasts/{id}\", { params: { path: { id }, query } }),\n /**\n * Create an owner roast profile, optionally with nested temperature/event\n * rows. Requires a session or an owner-bound API key carrying the exact\n * `roast:write` scope. Pass `idempotencyKey` to make retries safe.\n */\n create: (\n body: RoastCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/roasts\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Update one of the caller's own roast profiles. Pass `ifMatch` (the\n * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).\n */\n update: (\n id: number,\n body: RoastUpdateRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PATCH(\"/v1/roasts/{id}\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /** Delete one of the caller's own roast profiles. */\n delete: (id: number) =>\n client.DELETE(\"/v1/roasts/{id}\", { params: { path: { id } } }),\n /**\n * Create a roast profile from an Artisan `.alog` file against one of the\n * caller's green-coffee lots, persisting the imported curve, events, and\n * an artisan_import_log entry atomically. Requires a session or an\n * owner-bound API key carrying the exact `roast:write` scope. Pass\n * `idempotencyKey` to make retries safe.\n */\n import: (\n body: RoastImportRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/roasts/imports\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Replace the Artisan import data on one of the caller's existing roasts,\n * re-deriving its curve, events, and computed metrics while preserving the\n * roast's identity. Pass `ifMatch` (the roast's `last_updated`) to enable\n * optimistic concurrency (409 on mismatch).\n */\n replaceArtisanImport: (\n id: number,\n body: RoastArtisanImportReplaceRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PUT(\"/v1/roasts/{id}/artisan-import\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /**\n * Clear import-derived curve, events, metrics, and provenance data from\n * one of the caller's existing roasts without deleting the roast profile.\n */\n clearArtisanImport: (id: number) =>\n client.DELETE(\"/v1/roasts/{id}/artisan-import\", {\n params: { path: { id } },\n }),\n },\n sales: {\n /** List the caller's own sales (owner-scoped). */\n list: (query?: SalesListQuery) =>\n client.GET(\"/v1/sales\", { params: { query } }),\n /**\n * Record a sale against one of the caller's own green-coffee inventory\n * lots. Requires a session or an owner-bound API key carrying the exact\n * `sales:write` scope. Pass `idempotencyKey` to make retries safe: the\n * same key replays the original result, and a concurrent duplicate gets\n * 409 while the first is in flight.\n */\n create: (\n body: SalesCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/sales\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Update one of the caller's own sales. The sales table carries no\n * `last_updated` column, so no If-Match optimistic concurrency is\n * offered.\n */\n update: (id: number, body: SalesUpdateRequest) =>\n client.PATCH(\"/v1/sales/{id}\", {\n params: { path: { id } },\n body,\n }),\n /** Delete one of the caller's own sales. */\n delete: (id: number) =>\n client.DELETE(\"/v1/sales/{id}\", { params: { path: { id } } }),\n },\n tasting: {\n /** Fetch supplier notes plus the caller's own latest tasting notes. */\n get: (catalogId: string, query?: TastingGetQuery) =>\n client.GET(\"/v1/tasting/{catalogId}\", {\n params: { path: { catalogId }, query },\n }),\n /** Replace the caller's rating for one owned inventory lot. */\n rate: (inventoryId: number, body: TastingRateRequest) =>\n client.PUT(\"/v1/tasting/inventory/{inventoryId}\", {\n params: { path: { inventoryId } },\n body,\n }),\n },\n };\n}\n\nexport type ParchmentClient = ReturnType<typ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F;","names":["options"]}
1
+ {"version":3,"sources":["../src/client.ts"],"sourcesContent":["import createClient, { type ClientOptions } from \"openapi-fetch\";\nimport type { components, paths } from \"./schema\";\n\nexport interface ParchmentClientOptions {\n /** Base URL of the Parchment API, e.g. https://api.purveyors.io */\n baseUrl: string;\n /**\n * Optional bearer token (a Supabase JWT or, later, an API key). Sent as\n * `Authorization: Bearer <token>`. Auth is resolved server-side against the\n * unified principal model; the SDK only forwards the credential.\n */\n token?: string;\n /** Override the fetch implementation (useful for tests or custom runtimes). */\n fetch?: ClientOptions[\"fetch\"];\n}\n\n/** Query parameters for {@link ParchmentClient.catalog.list}. */\nexport type CatalogListQuery = NonNullable<\n paths[\"/v1/catalog\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** A catalog row returned by the canonical listing resource. */\nexport type CatalogItem = components[\"schemas\"][\"CatalogItem\"];\n/** API-owned row-level trust summary returned when `include=proof`. */\nexport type CatalogProofSummary = components[\"schemas\"][\"CatalogProofSummary\"];\n/** Query parameters for {@link ParchmentClient.catalog.facets}. */\nexport type CatalogFacetsQuery = NonNullable<\n paths[\"/v1/catalog/facets\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/**\n * Optional headers for {@link ParchmentClient.catalog.list}, notably the\n * RFC 7240 `Prefer: handling=lenient|strict` override (PADR-0013 §7). Sending\n * `handling=lenient` opts a strict caller (API key or bearer-session JWT) back\n * into strip-with-notice degradation instead of a 401/403 hard-deny.\n */\nexport type CatalogListHeaders = NonNullable<\n paths[\"/v1/catalog\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Optional headers for {@link ParchmentClient.catalog.facets}; see {@link CatalogListHeaders}. */\nexport type CatalogFacetsHeaders = NonNullable<\n paths[\"/v1/catalog/facets\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.originPriceStats}. */\nexport type CatalogOriginPriceStatsQuery = NonNullable<\n paths[\"/v1/catalog/origin-price-stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.stats}. */\nexport type CatalogStatsQuery = NonNullable<\n paths[\"/v1/catalog/stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.rank}. */\nexport type CatalogRankQuery = NonNullable<\n paths[\"/v1/catalog/rank\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.rankPremium}. */\nexport type CatalogRankPremiumQuery = NonNullable<\n paths[\"/v1/catalog/rank-premium\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.suppliers}. */\nexport type CatalogSuppliersQuery = NonNullable<\n paths[\"/v1/catalog/suppliers\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.supplierDetail}. */\nexport type CatalogSupplierDetailQuery = NonNullable<\n paths[\"/v1/catalog/suppliers/detail\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.supplierRank}. */\nexport type CatalogSupplierRankQuery = NonNullable<\n paths[\"/v1/catalog/suppliers/rank\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Optional headers for ranking endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogRankHeaders = NonNullable<\n paths[\"/v1/catalog/rank\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Optional headers for premium ranking endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogRankPremiumHeaders = NonNullable<\n paths[\"/v1/catalog/rank-premium\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Optional headers for supplier aggregate endpoints; see {@link CatalogListHeaders}. */\nexport type CatalogSupplierHeaders = NonNullable<\n paths[\"/v1/catalog/suppliers\"][\"get\"][\"parameters\"][\"header\"]\n>;\n/** Query parameters for {@link ParchmentClient.catalog.similar}. */\nexport type CatalogSimilarQuery = NonNullable<\n paths[\"/v1/catalog/{id}/similar\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.priceIndex.list}. */\nexport type PriceIndexQuery = NonNullable<\n paths[\"/v1/price-index\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.market.signals}. */\nexport type MarketSignalsQuery = NonNullable<\n paths[\"/v1/market/signals\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.priceIndex.stats}. */\nexport type PriceIndexStatsQuery = NonNullable<\n paths[\"/v1/price-index/stats\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.market.metadataIndex}. */\nexport type MetadataIndexQuery = NonNullable<\n paths[\"/v1/market/metadata-index\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.procurement.briefs.matches}. */\nexport type BriefMatchesQuery = NonNullable<\n paths[\"/v1/procurement/briefs/{id}/matches\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.procurement.briefs.create}. */\nexport type SourcingBriefCreateRequest =\n components[\"schemas\"][\"SourcingBriefCreateRequest\"];\n/** Query parameters for {@link ParchmentClient.inventory.list}. */\nexport type InventoryListQuery = NonNullable<\n paths[\"/v1/inventory\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.inventory.create}. */\nexport type InventoryCreateRequest = NonNullable<\n paths[\"/v1/inventory\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.inventory.update}. */\nexport type InventoryUpdateRequest = NonNullable<\n paths[\"/v1/inventory/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.roasts.list}. */\nexport type RoastListQuery = NonNullable<\n paths[\"/v1/roasts\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Query parameters for {@link ParchmentClient.roasts.get}. */\nexport type RoastGetQuery = NonNullable<\n paths[\"/v1/roasts/{id}\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.roasts.classify}. */\nexport type RoastClassificationRequest = NonNullable<\n paths[\"/v1/roasts/classify\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.create}. */\nexport type RoastCreateRequest = NonNullable<\n paths[\"/v1/roasts\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.update}. */\nexport type RoastUpdateRequest = NonNullable<\n paths[\"/v1/roasts/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.import}. */\nexport type RoastImportRequest = NonNullable<\n paths[\"/v1/roasts/imports\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.roasts.replaceArtisanImport}. */\nexport type RoastArtisanImportReplaceRequest = NonNullable<\n paths[\"/v1/roasts/{id}/artisan-import\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.sales.list}. */\nexport type SalesListQuery = NonNullable<\n paths[\"/v1/sales\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.sales.create}. */\nexport type SalesCreateRequest = NonNullable<\n paths[\"/v1/sales\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.sales.update}. */\nexport type SalesUpdateRequest = NonNullable<\n paths[\"/v1/sales/{id}\"][\"patch\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Query parameters for {@link ParchmentClient.tasting.get}. */\nexport type TastingGetQuery = NonNullable<\n paths[\"/v1/tasting/{catalogId}\"][\"get\"][\"parameters\"][\"query\"]\n>;\n/** Request body for {@link ParchmentClient.tasting.rate}. */\nexport type TastingRateRequest = NonNullable<\n paths[\"/v1/tasting/inventory/{inventoryId}\"][\"put\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n/** Request body for {@link ParchmentClient.apiKeys.create}. */\nexport type ApiKeyCreateRequest = NonNullable<\n paths[\"/v1/api-keys\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthRequestCreate = NonNullable<\n paths[\"/v1/cli-auth/requests\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthInspectRequest = NonNullable<\n paths[\"/v1/cli-auth/inspect\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthApproveRequest = NonNullable<\n paths[\"/v1/cli-auth/approve\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\nexport type CliAuthExchangeRequest = NonNullable<\n paths[\"/v1/cli-auth/token\"][\"post\"][\"requestBody\"]\n>[\"content\"][\"application/json\"];\n\n/**\n * Create a typed Parchment API client.\n *\n * The generated core (openapi-fetch over the generated `paths` types) is the\n * contract truth; the named helpers below are the hand-maintained ergonomic\n * layer and grow as endpoints land. `raw` always exposes the underlying typed\n * client for direct path access to anything not yet wrapped.\n */\nexport function createParchmentClient(options: ParchmentClientOptions) {\n const { baseUrl, token, fetch: fetchImpl } = options;\n\n const client = createClient<paths>({\n baseUrl,\n fetch: fetchImpl,\n headers: token ? { Authorization: `Bearer ${token}` } : undefined,\n });\n\n return {\n /** The underlying typed openapi-fetch client for direct path access. */\n raw: client,\n /** Liveness and service identity. */\n health: () => client.GET(\"/health\"),\n /** Resolved principal and entitlements for the caller. */\n me: () => client.GET(\"/v1/me\"),\n apiKeys: {\n /** List API keys owned by the authenticated session user. */\n list: () => client.GET(\"/v1/api-keys\"),\n /** Create an API key. The raw secret is returned only once. */\n create: (body: ApiKeyCreateRequest) =>\n client.POST(\"/v1/api-keys\", { body }),\n /** Revoke an API key owned by the authenticated session user. */\n revoke: (id: string) =>\n client.DELETE(\"/v1/api-keys/{id}\", {\n params: { path: { id } },\n }),\n /** Rotate an API key and return the replacement secret once. */\n rotate: (id: string) =>\n client.POST(\"/v1/api-keys/{id}/rotate\", {\n params: { path: { id } },\n }),\n },\n cliAuth: {\n /** Create a signed, short-lived login request bound to a PKCE challenge. */\n create: (body: CliAuthRequestCreate) =>\n client.POST(\"/v1/cli-auth/requests\", { body }),\n /** Inspect a signed request before displaying the web consent screen. */\n inspect: (body: CliAuthInspectRequest) =>\n client.POST(\"/v1/cli-auth/inspect\", { body }),\n /** Approve a request using the client's authenticated user session. */\n approve: (body: CliAuthApproveRequest) =>\n client.POST(\"/v1/cli-auth/approve\", { body }),\n /** Exchange an approved request and verifier for the one-time raw key. */\n exchange: (body: CliAuthExchangeRequest) =>\n client.POST(\"/v1/cli-auth/token\", { body }),\n },\n catalog: {\n /** Catalog capabilities and visibility for the caller. */\n access: () => client.GET(\"/v1/catalog/access\"),\n /**\n * List public catalog coffees (paginated). Pass `headers` to send the\n * `Prefer: handling=lenient|strict` override (see {@link CatalogListHeaders}).\n */\n list: (query?: CatalogListQuery, headers?: CatalogListHeaders) =>\n client.GET(\"/v1/catalog\", { params: { query, header: headers } }),\n /**\n * Catalog filter metadata and counted facets. Pass `headers` to send the\n * `Prefer: handling=lenient|strict` override (see {@link CatalogFacetsHeaders}).\n */\n facets: (query?: CatalogFacetsQuery, headers?: CatalogFacetsHeaders) =>\n client.GET(\"/v1/catalog/facets\", {\n params: { query, header: headers },\n }),\n /** Live catalog price context by origin. */\n originPriceStats: (query?: CatalogOriginPriceStatsQuery) =>\n client.GET(\"/v1/catalog/origin-price-stats\", { params: { query } }),\n /** Aggregate stats over the caller-visible catalog. */\n stats: (query?: CatalogStatsQuery) =>\n client.GET(\"/v1/catalog/stats\", { params: { query } }),\n /** Rank caller-visible catalog coffees by deterministic objectives. */\n rank: (query?: CatalogRankQuery, headers?: CatalogRankHeaders) =>\n client.GET(\"/v1/catalog/rank\", {\n params: { query, header: headers },\n }),\n /** Rank premium catalog candidates by Purveyor Score. */\n rankPremium: (\n query?: CatalogRankPremiumQuery,\n headers?: CatalogRankPremiumHeaders,\n ) =>\n client.GET(\"/v1/catalog/rank-premium\", {\n params: { query, header: headers },\n }),\n /** List supplier aggregates over caller-visible catalog coffees. */\n suppliers: (\n query?: CatalogSuppliersQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers\", {\n params: { query, header: headers },\n }),\n /** Return aggregate detail for a supplier query. */\n supplierDetail: (\n query: CatalogSupplierDetailQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers/detail\", {\n params: { query, header: headers },\n }),\n /** Rank suppliers by catalog score and availability. */\n supplierRank: (\n query?: CatalogSupplierRankQuery,\n headers?: CatalogSupplierHeaders,\n ) =>\n client.GET(\"/v1/catalog/suppliers/rank\", {\n params: { query, header: headers },\n }),\n /** Aggregate proof-coverage over the public catalog. */\n proofCoverage: () => client.GET(\"/v1/catalog/proof-coverage\"),\n /** Find catalog coffees similar to a target coffee. */\n similar: (id: string, query?: CatalogSimilarQuery) =>\n client.GET(\"/v1/catalog/{id}/similar\", {\n params: { path: { id }, query },\n }),\n },\n priceIndex: {\n /** Parchment Price Index (aggregate snapshots). */\n list: (query?: PriceIndexQuery) =>\n client.GET(\"/v1/price-index\", { params: { query } }),\n /** Price movement significance stats (precomputed). */\n stats: (query?: PriceIndexStatsQuery) =>\n client.GET(\"/v1/price-index/stats\", { params: { query } }),\n },\n market: {\n /** Actionable market value signals. */\n signals: (query?: MarketSignalsQuery) =>\n client.GET(\"/v1/market/signals\", { params: { query } }),\n /** Metadata-trend index (process/disclosure/Purveyor Score over time). */\n metadataIndex: (query?: MetadataIndexQuery) =>\n client.GET(\"/v1/market/metadata-index\", { params: { query } }),\n },\n procurement: {\n briefs: {\n /** List the caller's saved sourcing briefs. */\n list: () => client.GET(\"/v1/procurement/briefs\"),\n /** Create a saved sourcing brief. */\n create: (body: SourcingBriefCreateRequest) =>\n client.POST(\"/v1/procurement/briefs\", { body }),\n /** Fetch one of the caller's sourcing briefs by id. */\n get: (id: string) =>\n client.GET(\"/v1/procurement/briefs/{id}\", {\n params: { path: { id } },\n }),\n /** Run a saved brief against the catalog (paginated matches). */\n matches: (id: string, query?: BriefMatchesQuery) =>\n client.GET(\"/v1/procurement/briefs/{id}/matches\", {\n params: { path: { id }, query },\n }),\n },\n },\n inventory: {\n /** List the caller's own green-coffee inventory (owner-scoped). */\n list: (query?: InventoryListQuery) =>\n client.GET(\"/v1/inventory\", { params: { query } }),\n /**\n * Create an owner inventory lot. Requires a session or an owner-bound API\n * key carrying the exact `inventory:write` scope. Pass `idempotencyKey`\n * to make retries safe: the same key replays the original result, and a\n * concurrent duplicate gets 409 while the first is in flight.\n */\n create: (\n body: InventoryCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/inventory\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Update one of the caller's own inventory rows. Pass `ifMatch` (the\n * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).\n */\n update: (\n id: number,\n body: InventoryUpdateRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PATCH(\"/v1/inventory/{id}\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /**\n * Delete one of the caller's own inventory rows. Returns 409 if dependent\n * roast profiles or sales exist (no force-cascade).\n */\n delete: (id: number) =>\n client.DELETE(\"/v1/inventory/{id}\", { params: { path: { id } } }),\n },\n roasts: {\n /** Match Artisan roast metadata to one of the supplied inventory rows. */\n classify: (body: RoastClassificationRequest) =>\n client.POST(\"/v1/roasts/classify\", { body }),\n /** List the caller's own roast profiles (owner-scoped). */\n list: (query?: RoastListQuery) =>\n client.GET(\"/v1/roasts\", { params: { query } }),\n /**\n * Fetch one of the caller's roast profiles by id, optionally with its\n * temperature curve (`includeTemps`) and event markers (`includeEvents`).\n */\n get: (id: string, query?: RoastGetQuery) =>\n client.GET(\"/v1/roasts/{id}\", { params: { path: { id }, query } }),\n /**\n * Create an owner roast profile, optionally with nested temperature/event\n * rows. Requires a session or an owner-bound API key carrying the exact\n * `roast:write` scope. Pass `idempotencyKey` to make retries safe.\n */\n create: (\n body: RoastCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/roasts\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Update one of the caller's own roast profiles. Pass `ifMatch` (the\n * row's `last_updated`) to enable optimistic concurrency (409 on mismatch).\n */\n update: (\n id: number,\n body: RoastUpdateRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PATCH(\"/v1/roasts/{id}\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /** Delete one of the caller's own roast profiles. */\n delete: (id: number) =>\n client.DELETE(\"/v1/roasts/{id}\", { params: { path: { id } } }),\n /**\n * Create a roast profile from an Artisan `.alog` file against one of the\n * caller's green-coffee lots, persisting the imported curve, events, and\n * an artisan_import_log entry atomically. Requires a session or an\n * owner-bound API key carrying the exact `roast:write` scope. Pass\n * `idempotencyKey` to make retries safe.\n */\n import: (\n body: RoastImportRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/roasts/imports\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Replace the Artisan import data on one of the caller's existing roasts,\n * re-deriving its curve, events, and computed metrics while preserving the\n * roast's identity. Pass `ifMatch` (the roast's `last_updated`) to enable\n * optimistic concurrency (409 on mismatch).\n */\n replaceArtisanImport: (\n id: number,\n body: RoastArtisanImportReplaceRequest,\n options?: { ifMatch?: string },\n ) =>\n client.PUT(\"/v1/roasts/{id}/artisan-import\", {\n params: {\n path: { id },\n header: options?.ifMatch\n ? { \"if-match\": options.ifMatch }\n : undefined,\n },\n body,\n }),\n /**\n * Clear import-derived curve, events, metrics, and provenance data from\n * one of the caller's existing roasts without deleting the roast profile.\n */\n clearArtisanImport: (id: number) =>\n client.DELETE(\"/v1/roasts/{id}/artisan-import\", {\n params: { path: { id } },\n }),\n },\n sales: {\n /** List the caller's own sales (owner-scoped). */\n list: (query?: SalesListQuery) =>\n client.GET(\"/v1/sales\", { params: { query } }),\n /**\n * Record a sale against one of the caller's own green-coffee inventory\n * lots. Requires a session or an owner-bound API key carrying the exact\n * `sales:write` scope. Pass `idempotencyKey` to make retries safe: the\n * same key replays the original result, and a concurrent duplicate gets\n * 409 while the first is in flight.\n */\n create: (\n body: SalesCreateRequest,\n options?: { idempotencyKey?: string },\n ) =>\n client.POST(\"/v1/sales\", {\n body,\n params: options?.idempotencyKey\n ? { header: { \"idempotency-key\": options.idempotencyKey } }\n : undefined,\n }),\n /**\n * Update one of the caller's own sales. The sales table carries no\n * `last_updated` column, so no If-Match optimistic concurrency is\n * offered.\n */\n update: (id: number, body: SalesUpdateRequest) =>\n client.PATCH(\"/v1/sales/{id}\", {\n params: { path: { id } },\n body,\n }),\n /** Delete one of the caller's own sales. */\n delete: (id: number) =>\n client.DELETE(\"/v1/sales/{id}\", { params: { path: { id } } }),\n },\n tasting: {\n /** Fetch supplier notes plus the caller's own latest tasting notes. */\n get: (catalogId: string, query?: TastingGetQuery) =>\n client.GET(\"/v1/tasting/{catalogId}\", {\n params: { path: { catalogId }, query },\n }),\n /** Replace the caller's rating for one owned inventory lot. */\n rate: (inventoryId: number, body: TastingRateRequest) =>\n client.PUT(\"/v1/tasting/inventory/{inventoryId}\", {\n params: { path: { inventoryId } },\n body,\n }),\n },\n };\n}\n\nexport type ParchmentClient = ReturnType<typeof createParchmentClient>;\n"],"mappings":";AAAA,OAAO,kBAA0C;AAiM1C,SAAS,sBAAsB,SAAiC;AACrE,QAAM,EAAE,SAAS,OAAO,OAAO,UAAU,IAAI;AAE7C,QAAM,SAAS,aAAoB;AAAA,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AAC;AAAA;AAAA,MAEH,MAAM,CAAC,aAAqB,SAC1B,OAAO,IAAI,uCAAuC;AAAA,QAChD,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE;AAAA,QAChC;AAAA,MACF,CAAC;AAAA,IACL;AAAA,EACF;AACF;","names":["options"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purveyors/sdk",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "description": "Typed client for the Purveyors Parchment API, generated from its OpenAPI spec.",
5
5
  "license": "MIT",
6
6
  "type": "module",