@coffre/client 0.10.2 → 0.11.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.
@@ -0,0 +1,3 @@
1
+ import { r as CoffreError } from "./index--nfmYCFv.js";
2
+ import { C as vercel, S as oidc, _ as fly, a as fromCoffre, b as keyAudience, c as workload, d as PlatformProof, f as Proof, g as enrollment, h as azure, i as WorkloadOptions, l as AwsCredentials, m as aws, n as UsedCredential, o as upgradeHeaders, p as ProofContext, r as Workload, s as upgradeRefused, t as NarrowOptions, u as KUBERNETES_TOKEN, v as gcp, x as kubernetes, y as github } from "./workload-9LPBYMmN.js";
3
+ export { type AwsCredentials, CoffreError, KUBERNETES_TOKEN, NarrowOptions, type PlatformProof, type Proof, type ProofContext, UsedCredential, Workload, WorkloadOptions, aws, azure, enrollment, fly, fromCoffre, gcp, github, keyAudience, kubernetes, oidc, upgradeHeaders, upgradeRefused, vercel, workload };
@@ -0,0 +1,3 @@
1
+ import { t as CoffreError } from "./src-CDyZe9vW.js";
2
+ import { a as KUBERNETES_TOKEN, c as enrollment, d as github, f as keyAudience, h as vercel, i as workload, l as fly, m as oidc, n as upgradeHeaders, o as aws, p as kubernetes, r as upgradeRefused, s as azure, t as fromCoffre, u as gcp } from "./workload-w4QPSyjj.js";
3
+ export { CoffreError, KUBERNETES_TOKEN, aws, azure, enrollment, fly, fromCoffre, gcp, github, keyAudience, kubernetes, oidc, upgradeHeaders, upgradeRefused, vercel, workload };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coffre/client",
3
- "version": "0.10.2",
3
+ "version": "0.11.0",
4
4
  "description": "The coffre API as typed function calls.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -32,6 +32,21 @@
32
32
  "types": "./dist/credential.d.ts",
33
33
  "default": "./dist/credential.js"
34
34
  },
35
+ "./dpop": {
36
+ "coffre:source": "./src/dpop.ts",
37
+ "types": "./dist/dpop.d.ts",
38
+ "default": "./dist/dpop.js"
39
+ },
40
+ "./workload": {
41
+ "coffre:source": "./src/workload.ts",
42
+ "types": "./dist/workload.d.ts",
43
+ "default": "./dist/workload.js"
44
+ },
45
+ "./workload/postgres": {
46
+ "coffre:source": "./src/workload-postgres.ts",
47
+ "types": "./dist/workload-postgres.d.ts",
48
+ "default": "./dist/workload-postgres.js"
49
+ },
35
50
  "./package.json": "./package.json"
36
51
  },
37
52
  "devDependencies": {
package/src/api.ts CHANGED
@@ -76,6 +76,7 @@ export type Api = {
76
76
  accessible: boolean;
77
77
  parent: string | null;
78
78
  protected: boolean;
79
+ unprotectable: boolean;
79
80
  personal: boolean;
80
81
  details: null | {
81
82
  archivedAt: string | null;
@@ -277,6 +278,8 @@ export type Api = {
277
278
  fallback: boolean;
278
279
  };
279
280
  protected: boolean;
281
+ unprotectable: boolean;
282
+ loosenable: boolean;
280
283
  rotateAfterDays: number | null;
281
284
  };
282
285
  };
@@ -444,6 +447,7 @@ export type Api = {
444
447
  [key: string]: string;
445
448
  };
446
449
  sensitive: string[];
450
+ useOnly: string[];
447
451
  version: string | null;
448
452
  };
449
453
  };
@@ -562,6 +566,9 @@ export type Api = {
562
566
  scope: null | {
563
567
  [key: string]: string;
564
568
  };
569
+ session?: {
570
+ bindingId: string | null;
571
+ };
565
572
  }[];
566
573
  references: {
567
574
  id: string;
@@ -704,6 +711,9 @@ export type Api = {
704
711
  scope: null | {
705
712
  [key: string]: string;
706
713
  };
714
+ session?: {
715
+ bindingId: string | null;
716
+ };
707
717
  }[];
708
718
  references: {
709
719
  id: string;
@@ -739,6 +749,9 @@ export type Api = {
739
749
  scope: null | {
740
750
  [key: string]: string;
741
751
  };
752
+ session?: {
753
+ bindingId: string | null;
754
+ };
742
755
  }[];
743
756
  };
744
757
  };
@@ -752,16 +765,18 @@ export type Api = {
752
765
  };
753
766
  };
754
767
  output: {
755
- id: string;
756
- token: string;
757
- expiresAt: string;
758
768
  scope: {
759
769
  [key: string]: string;
760
770
  };
771
+ withheld?: string[];
761
772
  } | {
773
+ id: string;
774
+ token: string;
775
+ expiresAt: string;
762
776
  scope: {
763
777
  [key: string]: string;
764
778
  };
779
+ withheld?: string[];
765
780
  };
766
781
  };
767
782
  "DELETE /members/:member/tokens/:id": {
@@ -775,7 +790,7 @@ export type Api = {
775
790
  output: {
776
791
  bindings: {
777
792
  id: string;
778
- profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
793
+ profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
779
794
  issuer: string;
780
795
  jwksUri: string;
781
796
  keys: null | {
@@ -789,6 +804,22 @@ export type Api = {
789
804
  scope: null | {
790
805
  [key: string]: string;
791
806
  };
807
+ policy: null | {
808
+ sources?: string[];
809
+ audience?: string;
810
+ keyAudience?: true;
811
+ sessionHours?: number;
812
+ replicas?: number;
813
+ sessionDays?: number;
814
+ overlapMinutes?: number;
815
+ mintedBy?: string;
816
+ approve?: true;
817
+ onContention?: "alert";
818
+ unsignedUploads?: true;
819
+ reads?: {
820
+ [key: string]: "*" | string[];
821
+ };
822
+ };
792
823
  label: string | null;
793
824
  createdAt: string;
794
825
  createdBy: string;
@@ -798,7 +829,7 @@ export type Api = {
798
829
  };
799
830
  "POST /members/:member/bindings": {
800
831
  input: {
801
- profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
832
+ profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
802
833
  claims: {
803
834
  [key: string]: string | string[];
804
835
  };
@@ -813,9 +844,12 @@ export type Api = {
813
844
  [key: string]: unknown;
814
845
  }[];
815
846
  };
847
+ policy?: {
848
+ [key: string]: unknown;
849
+ };
816
850
  };
817
851
  output: {
818
- profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
852
+ profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
819
853
  issuer: string;
820
854
  jwksUri: string;
821
855
  keys: null | {
@@ -829,6 +863,23 @@ export type Api = {
829
863
  scope: {
830
864
  [key: string]: string;
831
865
  };
866
+ policy: null | {
867
+ sources?: string[];
868
+ audience?: string;
869
+ keyAudience?: true;
870
+ sessionHours?: number;
871
+ replicas?: number;
872
+ sessionDays?: number;
873
+ overlapMinutes?: number;
874
+ mintedBy?: string;
875
+ approve?: true;
876
+ onContention?: "alert";
877
+ unsignedUploads?: true;
878
+ reads?: {
879
+ [key: string]: "*" | string[];
880
+ };
881
+ };
882
+ withheld: string[];
832
883
  replaces: {
833
884
  id: string;
834
885
  why: "asked" | "keys_moved";
@@ -836,7 +887,7 @@ export type Api = {
836
887
  } | {
837
888
  binding: {
838
889
  id: string;
839
- profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
890
+ profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
840
891
  issuer: string;
841
892
  jwksUri: string;
842
893
  keys: null | {
@@ -850,6 +901,22 @@ export type Api = {
850
901
  scope: null | {
851
902
  [key: string]: string;
852
903
  };
904
+ policy: null | {
905
+ sources?: string[];
906
+ audience?: string;
907
+ keyAudience?: true;
908
+ sessionHours?: number;
909
+ replicas?: number;
910
+ sessionDays?: number;
911
+ overlapMinutes?: number;
912
+ mintedBy?: string;
913
+ approve?: true;
914
+ onContention?: "alert";
915
+ unsignedUploads?: true;
916
+ reads?: {
917
+ [key: string]: "*" | string[];
918
+ };
919
+ };
853
920
  label: string | null;
854
921
  createdAt: string;
855
922
  createdBy: string;
@@ -1337,10 +1404,11 @@ export type Api = {
1337
1404
  thumbprint: string;
1338
1405
  }[];
1339
1406
  replaces: string[];
1407
+ withheld: string[];
1340
1408
  } | {
1341
1409
  bindings: {
1342
1410
  id: string;
1343
- profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
1411
+ profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
1344
1412
  issuer: string;
1345
1413
  jwksUri: string;
1346
1414
  keys: null | {
@@ -1354,6 +1422,22 @@ export type Api = {
1354
1422
  scope: null | {
1355
1423
  [key: string]: string;
1356
1424
  };
1425
+ policy: null | {
1426
+ sources?: string[];
1427
+ audience?: string;
1428
+ keyAudience?: true;
1429
+ sessionHours?: number;
1430
+ replicas?: number;
1431
+ sessionDays?: number;
1432
+ overlapMinutes?: number;
1433
+ mintedBy?: string;
1434
+ approve?: true;
1435
+ onContention?: "alert";
1436
+ unsignedUploads?: true;
1437
+ reads?: {
1438
+ [key: string]: "*" | string[];
1439
+ };
1440
+ };
1357
1441
  label: string | null;
1358
1442
  createdAt: string;
1359
1443
  createdBy: string;
@@ -1388,6 +1472,7 @@ export type Api = {
1388
1472
  scope: {
1389
1473
  [key: string]: string;
1390
1474
  };
1475
+ withheld?: string[];
1391
1476
  };
1392
1477
  };
1393
1478
  "GET /roles": {
@@ -1586,6 +1671,47 @@ export type Api = {
1586
1671
  };
1587
1672
  };
1588
1673
  };
1674
+ "GET /members/:member/bindings/:id/enrollments": {
1675
+ input: undefined;
1676
+ output: never;
1677
+ };
1678
+ "POST /members/:member/bindings/:id/enrollments": {
1679
+ input: {
1680
+ [key: string]: never;
1681
+ };
1682
+ output: never;
1683
+ };
1684
+ "POST /members/:member/bindings/:id/enrollments/:enrollment/promote": {
1685
+ input: {
1686
+ now?: boolean;
1687
+ };
1688
+ output: never;
1689
+ };
1690
+ "POST /members/:member/tokens/:id/approve": {
1691
+ input: undefined;
1692
+ output: never;
1693
+ };
1694
+ "GET /freezes": {
1695
+ input: undefined;
1696
+ output: never;
1697
+ };
1698
+ "POST /freezes": {
1699
+ input: {
1700
+ target: string;
1701
+ reason: string;
1702
+ };
1703
+ output: never;
1704
+ };
1705
+ "DELETE /freezes/:target": {
1706
+ input: undefined;
1707
+ output: never;
1708
+ };
1709
+ "DELETE /handles/:id": {
1710
+ input: undefined;
1711
+ output: {
1712
+ revoked: true;
1713
+ };
1714
+ };
1589
1715
  };
1590
1716
 
1591
1717
  export type AccessValue = string | null | {
@@ -1707,7 +1833,7 @@ export type AuthorizationView = {
1707
1833
  };
1708
1834
 
1709
1835
  export type BindingPlan = {
1710
- profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
1836
+ profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
1711
1837
  issuer: string;
1712
1838
  jwksUri: string;
1713
1839
  keys: null | {
@@ -1721,6 +1847,23 @@ export type BindingPlan = {
1721
1847
  scope: {
1722
1848
  [key: string]: string;
1723
1849
  };
1850
+ policy: null | {
1851
+ sources?: string[];
1852
+ audience?: string;
1853
+ keyAudience?: true;
1854
+ sessionHours?: number;
1855
+ replicas?: number;
1856
+ sessionDays?: number;
1857
+ overlapMinutes?: number;
1858
+ mintedBy?: string;
1859
+ approve?: true;
1860
+ onContention?: "alert";
1861
+ unsignedUploads?: true;
1862
+ reads?: {
1863
+ [key: string]: "*" | string[];
1864
+ };
1865
+ };
1866
+ withheld: string[];
1724
1867
  replaces: {
1725
1868
  id: string;
1726
1869
  why: "asked" | "keys_moved";
@@ -1729,7 +1872,7 @@ export type BindingPlan = {
1729
1872
 
1730
1873
  export type BindingView = {
1731
1874
  id: string;
1732
- profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
1875
+ profile: "aws" | "azure" | "cloudflare" | "custom" | "enrollment" | "fly" | "gcp" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab" | "kubernetes" | "vercel";
1733
1876
  issuer: string;
1734
1877
  jwksUri: string;
1735
1878
  keys: null | {
@@ -1743,6 +1886,22 @@ export type BindingView = {
1743
1886
  scope: null | {
1744
1887
  [key: string]: string;
1745
1888
  };
1889
+ policy: null | {
1890
+ sources?: string[];
1891
+ audience?: string;
1892
+ keyAudience?: true;
1893
+ sessionHours?: number;
1894
+ replicas?: number;
1895
+ sessionDays?: number;
1896
+ overlapMinutes?: number;
1897
+ mintedBy?: string;
1898
+ approve?: true;
1899
+ onContention?: "alert";
1900
+ unsignedUploads?: true;
1901
+ reads?: {
1902
+ [key: string]: "*" | string[];
1903
+ };
1904
+ };
1746
1905
  label: string | null;
1747
1906
  createdAt: string;
1748
1907
  createdBy: string;
@@ -1770,6 +1929,7 @@ export type KeysPlan = {
1770
1929
  thumbprint: string;
1771
1930
  }[];
1772
1931
  replaces: string[];
1932
+ withheld: string[];
1773
1933
  };
1774
1934
 
1775
1935
  export type Deletion = {
@@ -2082,6 +2242,9 @@ export type OffboardingReport = {
2082
2242
  scope: null | {
2083
2243
  [key: string]: string;
2084
2244
  };
2245
+ session?: {
2246
+ bindingId: string | null;
2247
+ };
2085
2248
  }[];
2086
2249
  references: {
2087
2250
  id: string;
@@ -2137,6 +2300,7 @@ export type ProjectSummary = {
2137
2300
  accessible: boolean;
2138
2301
  parent: string | null;
2139
2302
  protected: boolean;
2303
+ unprotectable: boolean;
2140
2304
  personal: boolean;
2141
2305
  details: null | {
2142
2306
  archivedAt: string | null;
@@ -2337,6 +2501,7 @@ export type TokenPlan = {
2337
2501
  scope: {
2338
2502
  [key: string]: string;
2339
2503
  };
2504
+ withheld?: string[];
2340
2505
  };
2341
2506
 
2342
2507
  export type TokenRow = {
@@ -2351,4 +2516,7 @@ export type TokenRow = {
2351
2516
  scope: null | {
2352
2517
  [key: string]: string;
2353
2518
  };
2519
+ session?: {
2520
+ bindingId: string | null;
2521
+ };
2354
2522
  };