@7k-inari/api-client 0.7.0 → 0.8.0-5ee597d

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.
Files changed (2) hide show
  1. package/gen/ts/rest/client.ts +644 -15
  2. package/package.json +2 -2
@@ -369,6 +369,14 @@ export interface AzureKVProvider {
369
369
  vaultUrl: string;
370
370
  }
371
371
 
372
+ export interface Binding {
373
+ baseBranch?: string;
374
+ baselineRepoId?: string;
375
+ clusterId?: string;
376
+ commitPolicy?: string;
377
+ renderer?: string;
378
+ }
379
+
372
380
  export interface IdPClaimMapping {
373
381
  email?: string;
374
382
  groups?: string;
@@ -652,7 +660,27 @@ export interface CreateIdentityClientOutputBody {
652
660
  secret?: string;
653
661
  }
654
662
 
663
+ export interface TargetResourceRef {
664
+ id: string;
665
+ kind: string;
666
+ }
667
+
655
668
  export interface CreateInputBody {
669
+ /** A URL to the JSON Schema for this object. */
670
+ readonly $schema?: string;
671
+ /** @minLength 1 */
672
+ capability: string;
673
+ config?: unknown;
674
+ isDefault?: boolean;
675
+ /**
676
+ * @minLength 1
677
+ * @maxLength 100
678
+ */
679
+ name: string;
680
+ resourceRef: TargetResourceRef;
681
+ }
682
+
683
+ export interface CreateInputBody1 {
656
684
  /** A URL to the JSON Schema for this object. */
657
685
  readonly $schema?: string;
658
686
  enabled?: boolean;
@@ -692,7 +720,7 @@ export interface SecretStoreTargets {
692
720
  clusterSetRef?: string;
693
721
  }
694
722
 
695
- export interface CreateInputBody1 {
723
+ export interface CreateInputBody2 {
696
724
  /** A URL to the JSON Schema for this object. */
697
725
  readonly $schema?: string;
698
726
  name: string;
@@ -935,6 +963,12 @@ export interface DecommissionOutputBody1 {
935
963
  approvalId?: string;
936
964
  }
937
965
 
966
+ export interface DeleteOutputBody {
967
+ /** A URL to the JSON Schema for this object. */
968
+ readonly $schema?: string;
969
+ deleted: boolean;
970
+ }
971
+
938
972
  export interface DeleteTenantInputBody {
939
973
  /** A URL to the JSON Schema for this object. */
940
974
  readonly $schema?: string;
@@ -997,6 +1031,7 @@ export interface DeployResult {
997
1031
  PRURL: string;
998
1032
  Status: string;
999
1033
  Version: string;
1034
+ artifactDigest?: string;
1000
1035
  }
1001
1036
 
1002
1037
  export interface DeployOutputBody {
@@ -1291,8 +1326,10 @@ export interface TemplateDetail {
1291
1326
  id: string;
1292
1327
  kind?: string;
1293
1328
  name: string;
1329
+ packageVersion?: string;
1294
1330
  schema?: unknown;
1295
1331
  sourceId?: string;
1332
+ sourceState?: string;
1296
1333
  /** @nullable */
1297
1334
  tags?: string[] | null;
1298
1335
  trustTier?: string;
@@ -1413,6 +1450,36 @@ export interface GitConfigOutputBody {
1413
1450
  gitProviderStatus?: GitProviderStatus;
1414
1451
  }
1415
1452
 
1453
+ export interface Grant {
1454
+ createdAt: string;
1455
+ createdBy?: string;
1456
+ relation: string;
1457
+ targetId: string;
1458
+ teamId: string;
1459
+ updatedAt: string;
1460
+ }
1461
+
1462
+ export type GrantInputBodyRelation = typeof GrantInputBodyRelation[keyof typeof GrantInputBodyRelation];
1463
+
1464
+
1465
+ export const GrantInputBodyRelation = {
1466
+ view: 'view',
1467
+ use: 'use',
1468
+ provision: 'provision',
1469
+ } as const;
1470
+
1471
+ export interface GrantInputBody {
1472
+ /** A URL to the JSON Schema for this object. */
1473
+ readonly $schema?: string;
1474
+ relation: GrantInputBodyRelation;
1475
+ }
1476
+
1477
+ export interface GrantOutputBody {
1478
+ /** A URL to the JSON Schema for this object. */
1479
+ readonly $schema?: string;
1480
+ grant: Grant;
1481
+ }
1482
+
1416
1483
  export interface IdentityClientOutputBody {
1417
1484
  /** A URL to the JSON Schema for this object. */
1418
1485
  readonly $schema?: string;
@@ -1446,6 +1513,7 @@ export interface ItemView {
1446
1513
  pinnedVersion?: string;
1447
1514
  source: string;
1448
1515
  sourceId?: string;
1516
+ sourceState?: string;
1449
1517
  trustTier?: string;
1450
1518
  unsigned?: boolean;
1451
1519
  /** @nullable */
@@ -1688,7 +1756,42 @@ export interface ListOutputBody3 {
1688
1756
  repos: TenantGitRepo[] | null;
1689
1757
  }
1690
1758
 
1759
+ export interface Readiness {
1760
+ observedAt?: string;
1761
+ /** @nullable */
1762
+ reasons?: string[] | null;
1763
+ state: string;
1764
+ }
1765
+
1766
+ export interface Target {
1767
+ binding: Binding;
1768
+ /** @nullable */
1769
+ capabilities: string[] | null;
1770
+ config: unknown;
1771
+ createdAt: string;
1772
+ /** @nullable */
1773
+ effectiveActions?: string[] | null;
1774
+ enabled: boolean;
1775
+ /** @nullable */
1776
+ grants?: Grant[] | null;
1777
+ id: string;
1778
+ isDefault: boolean;
1779
+ name: string;
1780
+ orgId: string;
1781
+ readiness: Readiness;
1782
+ resourceRef: TargetResourceRef;
1783
+ revision: number;
1784
+ updatedAt: string;
1785
+ }
1786
+
1691
1787
  export interface ListOutputBody4 {
1788
+ /** A URL to the JSON Schema for this object. */
1789
+ readonly $schema?: string;
1790
+ /** @nullable */
1791
+ targets: Target[] | null;
1792
+ }
1793
+
1794
+ export interface ListOutputBody5 {
1692
1795
  /** A URL to the JSON Schema for this object. */
1693
1796
  readonly $schema?: string;
1694
1797
  /** @nullable */
@@ -1706,14 +1809,14 @@ export interface SecretStore {
1706
1809
  updatedAt: string;
1707
1810
  }
1708
1811
 
1709
- export interface ListOutputBody5 {
1812
+ export interface ListOutputBody6 {
1710
1813
  /** A URL to the JSON Schema for this object. */
1711
1814
  readonly $schema?: string;
1712
1815
  /** @nullable */
1713
1816
  stores: SecretStore[] | null;
1714
1817
  }
1715
1818
 
1716
- export interface ListOutputBody6 {
1819
+ export interface ListOutputBody7 {
1717
1820
  /** A URL to the JSON Schema for this object. */
1718
1821
  readonly $schema?: string;
1719
1822
  /** @nullable */
@@ -1856,7 +1959,9 @@ export interface TemplateSummary {
1856
1959
  id: string;
1857
1960
  kind?: string;
1858
1961
  name: string;
1962
+ packageVersion?: string;
1859
1963
  sourceId?: string;
1964
+ sourceState?: string;
1860
1965
  /** @nullable */
1861
1966
  tags?: string[] | null;
1862
1967
  trustTier?: string;
@@ -2014,6 +2119,25 @@ export interface ProviderCompatOutputBody {
2014
2119
  provider: BrokeredIdP;
2015
2120
  }
2016
2121
 
2122
+ export interface ProviderDescriptor {
2123
+ /** @nullable */
2124
+ actions: string[] | null;
2125
+ capability: string;
2126
+ configSchema: unknown;
2127
+ /** @nullable */
2128
+ resourceKinds: string[] | null;
2129
+ selectionSchema: unknown;
2130
+ supportsDefault: boolean;
2131
+ uiSchema: unknown;
2132
+ }
2133
+
2134
+ export interface ProvidersOutputBody {
2135
+ /** A URL to the JSON Schema for this object. */
2136
+ readonly $schema?: string;
2137
+ /** @nullable */
2138
+ providers: ProviderDescriptor[] | null;
2139
+ }
2140
+
2017
2141
  export interface PutClientScopesInputBody {
2018
2142
  /** A URL to the JSON Schema for this object. */
2019
2143
  readonly $schema?: string;
@@ -2464,6 +2588,7 @@ export interface SourceCreateRunInputBody {
2464
2588
 
2465
2589
  export interface TrustedSourceStatus {
2466
2590
  generation: number;
2591
+ indexRef?: string;
2467
2592
  itemCount: number;
2468
2593
  kind: string;
2469
2594
  lastAttemptAt?: string;
@@ -2475,6 +2600,8 @@ export interface TrustedSourceStatus {
2475
2600
  snapshotAgeSeconds: number;
2476
2601
  sourceId: string;
2477
2602
  state: string;
2603
+ trustTier?: string;
2604
+ unsigned?: boolean;
2478
2605
  }
2479
2606
 
2480
2607
  export interface SourceListOutputBody {
@@ -2525,6 +2652,12 @@ export interface SyncOutputBody {
2525
2652
  synced: number;
2526
2653
  }
2527
2654
 
2655
+ export interface TargetOutputBody {
2656
+ /** A URL to the JSON Schema for this object. */
2657
+ readonly $schema?: string;
2658
+ target: Target;
2659
+ }
2660
+
2528
2661
  export interface TargetsOutputBody {
2529
2662
  /** A URL to the JSON Schema for this object. */
2530
2663
  readonly $schema?: string;
@@ -2632,6 +2765,17 @@ export interface UpdateInputBody {
2632
2765
  }
2633
2766
 
2634
2767
  export interface UpdateInputBody1 {
2768
+ /** A URL to the JSON Schema for this object. */
2769
+ readonly $schema?: string;
2770
+ config?: unknown;
2771
+ enabled?: boolean;
2772
+ isDefault?: boolean;
2773
+ name?: string;
2774
+ /** @minimum 1 */
2775
+ revision: number;
2776
+ }
2777
+
2778
+ export interface UpdateInputBody2 {
2635
2779
  /** A URL to the JSON Schema for this object. */
2636
2780
  readonly $schema?: string;
2637
2781
  enabled?: boolean;
@@ -2642,7 +2786,7 @@ export interface UpdateInputBody1 {
2642
2786
  url?: string;
2643
2787
  }
2644
2788
 
2645
- export interface UpdateInputBody2 {
2789
+ export interface UpdateInputBody3 {
2646
2790
  /** A URL to the JSON Schema for this object. */
2647
2791
  readonly $schema?: string;
2648
2792
  provider?: SecretStoreProvider;
@@ -2952,6 +3096,23 @@ export type DeletePolicyPackParams = {
2952
3096
  force?: boolean;
2953
3097
  };
2954
3098
 
3099
+ export type ListResourceTargetsParams = {
3100
+ capability?: string;
3101
+ action?: ListResourceTargetsAction;
3102
+ resourceKind?: string;
3103
+ resourceId?: string;
3104
+ includeUnavailable?: boolean;
3105
+ };
3106
+
3107
+ export type ListResourceTargetsAction = typeof ListResourceTargetsAction[keyof typeof ListResourceTargetsAction];
3108
+
3109
+
3110
+ export const ListResourceTargetsAction = {
3111
+ view: 'view',
3112
+ use: 'use',
3113
+ provision: 'provision',
3114
+ } as const;
3115
+
2955
3116
  export type ListRolloutTargetsParams = {
2956
3117
  stage?: number;
2957
3118
  };
@@ -8151,7 +8312,7 @@ const res = await fetch(getDecideExemptionUrl(org,id),
8151
8312
 
8152
8313
 
8153
8314
  export type listExtensionsResponse200 = {
8154
- data: ListOutputBody6
8315
+ data: ListOutputBody7
8155
8316
  status: 200
8156
8317
  }
8157
8318
 
@@ -11143,7 +11304,7 @@ const res = await fetch(getSetMemberRoleUrl(org,subject),
11143
11304
 
11144
11305
 
11145
11306
  export type listNotificationEndpointsResponse200 = {
11146
- data: ListOutputBody4
11307
+ data: ListOutputBody5
11147
11308
  status: 200
11148
11309
  }
11149
11310
 
@@ -11223,7 +11384,7 @@ export const getCreateNotificationEndpointUrl = (org: string,) => {
11223
11384
  * @summary Create a notification endpoint (slack|webhook)
11224
11385
  */
11225
11386
  export const createNotificationEndpoint = async (org: string,
11226
- createInputBody: NonReadonly<CreateInputBody>, options?: RequestInit): Promise<createNotificationEndpointResponse> => {
11387
+ createInputBody1: NonReadonly<CreateInputBody1>, options?: RequestInit): Promise<createNotificationEndpointResponse> => {
11227
11388
 
11228
11389
  const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
11229
11390
  if (!h) return {};
@@ -11244,7 +11405,7 @@ const res = await fetch(getCreateNotificationEndpointUrl(org),
11244
11405
  ...options,
11245
11406
  method: 'POST',
11246
11407
  headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
11247
- body: JSON.stringify(createInputBody)
11408
+ body: JSON.stringify(createInputBody1)
11248
11409
  }
11249
11410
  )
11250
11411
 
@@ -11394,7 +11555,7 @@ export const getUpdateNotificationEndpointUrl = (org: string,
11394
11555
  */
11395
11556
  export const updateNotificationEndpoint = async (org: string,
11396
11557
  id: string,
11397
- updateInputBody1: NonReadonly<UpdateInputBody1>, options?: RequestInit): Promise<updateNotificationEndpointResponse> => {
11558
+ updateInputBody2: NonReadonly<UpdateInputBody2>, options?: RequestInit): Promise<updateNotificationEndpointResponse> => {
11398
11559
 
11399
11560
  const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
11400
11561
  if (!h) return {};
@@ -11415,7 +11576,7 @@ const res = await fetch(getUpdateNotificationEndpointUrl(org,id),
11415
11576
  ...options,
11416
11577
  method: 'PUT',
11417
11578
  headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
11418
- body: JSON.stringify(updateInputBody1)
11579
+ body: JSON.stringify(updateInputBody2)
11419
11580
  }
11420
11581
  )
11421
11582
 
@@ -12549,6 +12710,474 @@ const res = await fetch(getPutRBACMappingsUrl(org),
12549
12710
 
12550
12711
 
12551
12712
 
12713
+ export type listResourceTargetProvidersResponse200 = {
12714
+ data: ProvidersOutputBody
12715
+ status: 200
12716
+ }
12717
+
12718
+ export type listResourceTargetProvidersResponseDefault = {
12719
+ data: ErrorModel
12720
+ status: Exclude<HTTPStatusCodes, 200>
12721
+ }
12722
+
12723
+ export type listResourceTargetProvidersResponseSuccess = (listResourceTargetProvidersResponse200) & {
12724
+ headers: Headers;
12725
+ };
12726
+ export type listResourceTargetProvidersResponseError = (listResourceTargetProvidersResponseDefault) & {
12727
+ headers: Headers;
12728
+ };
12729
+
12730
+ export type listResourceTargetProvidersResponse = (listResourceTargetProvidersResponseSuccess | listResourceTargetProvidersResponseError)
12731
+
12732
+ export const getListResourceTargetProvidersUrl = (org: string,) => {
12733
+
12734
+
12735
+
12736
+
12737
+ return `/api/v1/tenants/${org}/resource-target-providers`
12738
+ }
12739
+
12740
+ /**
12741
+ * @summary List resource target provider config and UI schemas
12742
+ */
12743
+ export const listResourceTargetProviders = async (org: string, options?: RequestInit): Promise<listResourceTargetProvidersResponse> => {
12744
+
12745
+ const res = await fetch(getListResourceTargetProvidersUrl(org),
12746
+ {
12747
+ ...options,
12748
+ method: 'GET'
12749
+
12750
+
12751
+ }
12752
+ )
12753
+
12754
+
12755
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
12756
+
12757
+ const data: listResourceTargetProvidersResponse['data'] = body ? JSON.parse(body) : {}
12758
+ return { data, status: res.status, headers: res.headers } as listResourceTargetProvidersResponse
12759
+ }
12760
+
12761
+
12762
+
12763
+ export type listResourceTargetsResponse200 = {
12764
+ data: ListOutputBody4
12765
+ status: 200
12766
+ }
12767
+
12768
+ export type listResourceTargetsResponseDefault = {
12769
+ data: ErrorModel
12770
+ status: Exclude<HTTPStatusCodes, 200>
12771
+ }
12772
+
12773
+ export type listResourceTargetsResponseSuccess = (listResourceTargetsResponse200) & {
12774
+ headers: Headers;
12775
+ };
12776
+ export type listResourceTargetsResponseError = (listResourceTargetsResponseDefault) & {
12777
+ headers: Headers;
12778
+ };
12779
+
12780
+ export type listResourceTargetsResponse = (listResourceTargetsResponseSuccess | listResourceTargetsResponseError)
12781
+
12782
+ export const getListResourceTargetsUrl = (org: string,
12783
+ params?: ListResourceTargetsParams,) => {
12784
+ const normalizedParams = new URLSearchParams();
12785
+
12786
+ Object.entries(params || {}).forEach(([key, value]) => {
12787
+
12788
+ if (value !== undefined) {
12789
+ normalizedParams.append(key, value === null ? 'null' : String(value))
12790
+ }
12791
+ });
12792
+
12793
+ const stringifiedParams = normalizedParams.toString();
12794
+
12795
+ return stringifiedParams.length > 0 ? `/api/v1/tenants/${org}/resource-targets?${stringifiedParams}` : `/api/v1/tenants/${org}/resource-targets`
12796
+ }
12797
+
12798
+ /**
12799
+ * @summary List caller-entitled shared resource targets
12800
+ */
12801
+ export const listResourceTargets = async (org: string,
12802
+ params?: ListResourceTargetsParams, options?: RequestInit): Promise<listResourceTargetsResponse> => {
12803
+
12804
+ const res = await fetch(getListResourceTargetsUrl(org,params),
12805
+ {
12806
+ ...options,
12807
+ method: 'GET'
12808
+
12809
+
12810
+ }
12811
+ )
12812
+
12813
+
12814
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
12815
+
12816
+ const data: listResourceTargetsResponse['data'] = body ? JSON.parse(body) : {}
12817
+ return { data, status: res.status, headers: res.headers } as listResourceTargetsResponse
12818
+ }
12819
+
12820
+
12821
+
12822
+ export type registerResourceTargetResponse200 = {
12823
+ data: TargetOutputBody
12824
+ status: 200
12825
+ }
12826
+
12827
+ export type registerResourceTargetResponseDefault = {
12828
+ data: ErrorModel
12829
+ status: Exclude<HTTPStatusCodes, 200>
12830
+ }
12831
+
12832
+ export type registerResourceTargetResponseSuccess = (registerResourceTargetResponse200) & {
12833
+ headers: Headers;
12834
+ };
12835
+ export type registerResourceTargetResponseError = (registerResourceTargetResponseDefault) & {
12836
+ headers: Headers;
12837
+ };
12838
+
12839
+ export type registerResourceTargetResponse = (registerResourceTargetResponseSuccess | registerResourceTargetResponseError)
12840
+
12841
+ export const getRegisterResourceTargetUrl = (org: string,) => {
12842
+
12843
+
12844
+
12845
+
12846
+ return `/api/v1/tenants/${org}/resource-targets`
12847
+ }
12848
+
12849
+ /**
12850
+ * @summary Adopt an existing inventory resource as a shared target
12851
+ */
12852
+ export const registerResourceTarget = async (org: string,
12853
+ createInputBody: NonReadonly<CreateInputBody>, options?: RequestInit): Promise<registerResourceTargetResponse> => {
12854
+
12855
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
12856
+ if (!h) return {};
12857
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
12858
+ if (Symbol.iterator in h) {
12859
+ return Object.fromEntries(
12860
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
12861
+ );
12862
+ }
12863
+ const headers: Record<string, string | readonly string[]> = {};
12864
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
12865
+ if (value !== undefined) headers[name] = value;
12866
+ }
12867
+ return headers;
12868
+ };
12869
+ const res = await fetch(getRegisterResourceTargetUrl(org),
12870
+ {
12871
+ ...options,
12872
+ method: 'POST',
12873
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
12874
+ body: JSON.stringify(createInputBody)
12875
+ }
12876
+ )
12877
+
12878
+
12879
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
12880
+
12881
+ const data: registerResourceTargetResponse['data'] = body ? JSON.parse(body) : {}
12882
+ return { data, status: res.status, headers: res.headers } as registerResourceTargetResponse
12883
+ }
12884
+
12885
+
12886
+
12887
+ export type deleteResourceTargetResponse200 = {
12888
+ data: DeleteOutputBody
12889
+ status: 200
12890
+ }
12891
+
12892
+ export type deleteResourceTargetResponseDefault = {
12893
+ data: ErrorModel
12894
+ status: Exclude<HTTPStatusCodes, 200>
12895
+ }
12896
+
12897
+ export type deleteResourceTargetResponseSuccess = (deleteResourceTargetResponse200) & {
12898
+ headers: Headers;
12899
+ };
12900
+ export type deleteResourceTargetResponseError = (deleteResourceTargetResponseDefault) & {
12901
+ headers: Headers;
12902
+ };
12903
+
12904
+ export type deleteResourceTargetResponse = (deleteResourceTargetResponseSuccess | deleteResourceTargetResponseError)
12905
+
12906
+ export const getDeleteResourceTargetUrl = (org: string,
12907
+ id: string,) => {
12908
+
12909
+
12910
+
12911
+
12912
+ return `/api/v1/tenants/${org}/resource-targets/${id}`
12913
+ }
12914
+
12915
+ /**
12916
+ * @summary Delete a target overlay without deleting its resource
12917
+ */
12918
+ export const deleteResourceTarget = async (org: string,
12919
+ id: string, options?: RequestInit): Promise<deleteResourceTargetResponse> => {
12920
+
12921
+ const res = await fetch(getDeleteResourceTargetUrl(org,id),
12922
+ {
12923
+ ...options,
12924
+ method: 'DELETE'
12925
+
12926
+
12927
+ }
12928
+ )
12929
+
12930
+
12931
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
12932
+
12933
+ const data: deleteResourceTargetResponse['data'] = body ? JSON.parse(body) : {}
12934
+ return { data, status: res.status, headers: res.headers } as deleteResourceTargetResponse
12935
+ }
12936
+
12937
+
12938
+
12939
+ export type getResourceTargetResponse200 = {
12940
+ data: TargetOutputBody
12941
+ status: 200
12942
+ }
12943
+
12944
+ export type getResourceTargetResponseDefault = {
12945
+ data: ErrorModel
12946
+ status: Exclude<HTTPStatusCodes, 200>
12947
+ }
12948
+
12949
+ export type getResourceTargetResponseSuccess = (getResourceTargetResponse200) & {
12950
+ headers: Headers;
12951
+ };
12952
+ export type getResourceTargetResponseError = (getResourceTargetResponseDefault) & {
12953
+ headers: Headers;
12954
+ };
12955
+
12956
+ export type getResourceTargetResponse = (getResourceTargetResponseSuccess | getResourceTargetResponseError)
12957
+
12958
+ export const getGetResourceTargetUrl = (org: string,
12959
+ id: string,) => {
12960
+
12961
+
12962
+
12963
+
12964
+ return `/api/v1/tenants/${org}/resource-targets/${id}`
12965
+ }
12966
+
12967
+ /**
12968
+ * @summary Get a caller-visible resource target
12969
+ */
12970
+ export const getResourceTarget = async (org: string,
12971
+ id: string, options?: RequestInit): Promise<getResourceTargetResponse> => {
12972
+
12973
+ const res = await fetch(getGetResourceTargetUrl(org,id),
12974
+ {
12975
+ ...options,
12976
+ method: 'GET'
12977
+
12978
+
12979
+ }
12980
+ )
12981
+
12982
+
12983
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
12984
+
12985
+ const data: getResourceTargetResponse['data'] = body ? JSON.parse(body) : {}
12986
+ return { data, status: res.status, headers: res.headers } as getResourceTargetResponse
12987
+ }
12988
+
12989
+
12990
+
12991
+ export type updateResourceTargetResponse200 = {
12992
+ data: TargetOutputBody
12993
+ status: 200
12994
+ }
12995
+
12996
+ export type updateResourceTargetResponseDefault = {
12997
+ data: ErrorModel
12998
+ status: Exclude<HTTPStatusCodes, 200>
12999
+ }
13000
+
13001
+ export type updateResourceTargetResponseSuccess = (updateResourceTargetResponse200) & {
13002
+ headers: Headers;
13003
+ };
13004
+ export type updateResourceTargetResponseError = (updateResourceTargetResponseDefault) & {
13005
+ headers: Headers;
13006
+ };
13007
+
13008
+ export type updateResourceTargetResponse = (updateResourceTargetResponseSuccess | updateResourceTargetResponseError)
13009
+
13010
+ export const getUpdateResourceTargetUrl = (org: string,
13011
+ id: string,) => {
13012
+
13013
+
13014
+
13015
+
13016
+ return `/api/v1/tenants/${org}/resource-targets/${id}`
13017
+ }
13018
+
13019
+ /**
13020
+ * @summary Update target policy with optimistic concurrency
13021
+ */
13022
+ export const updateResourceTarget = async (org: string,
13023
+ id: string,
13024
+ updateInputBody1: NonReadonly<UpdateInputBody1>, options?: RequestInit): Promise<updateResourceTargetResponse> => {
13025
+
13026
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
13027
+ if (!h) return {};
13028
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
13029
+ if (Symbol.iterator in h) {
13030
+ return Object.fromEntries(
13031
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
13032
+ );
13033
+ }
13034
+ const headers: Record<string, string | readonly string[]> = {};
13035
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
13036
+ if (value !== undefined) headers[name] = value;
13037
+ }
13038
+ return headers;
13039
+ };
13040
+ const res = await fetch(getUpdateResourceTargetUrl(org,id),
13041
+ {
13042
+ ...options,
13043
+ method: 'PATCH',
13044
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
13045
+ body: JSON.stringify(updateInputBody1)
13046
+ }
13047
+ )
13048
+
13049
+
13050
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
13051
+
13052
+ const data: updateResourceTargetResponse['data'] = body ? JSON.parse(body) : {}
13053
+ return { data, status: res.status, headers: res.headers } as updateResourceTargetResponse
13054
+ }
13055
+
13056
+
13057
+
13058
+ export type revokeResourceTargetGrantResponse200 = {
13059
+ data: DeleteOutputBody
13060
+ status: 200
13061
+ }
13062
+
13063
+ export type revokeResourceTargetGrantResponseDefault = {
13064
+ data: ErrorModel
13065
+ status: Exclude<HTTPStatusCodes, 200>
13066
+ }
13067
+
13068
+ export type revokeResourceTargetGrantResponseSuccess = (revokeResourceTargetGrantResponse200) & {
13069
+ headers: Headers;
13070
+ };
13071
+ export type revokeResourceTargetGrantResponseError = (revokeResourceTargetGrantResponseDefault) & {
13072
+ headers: Headers;
13073
+ };
13074
+
13075
+ export type revokeResourceTargetGrantResponse = (revokeResourceTargetGrantResponseSuccess | revokeResourceTargetGrantResponseError)
13076
+
13077
+ export const getRevokeResourceTargetGrantUrl = (org: string,
13078
+ id: string,
13079
+ teamId: string,) => {
13080
+
13081
+
13082
+
13083
+
13084
+ return `/api/v1/tenants/${org}/resource-targets/${id}/grants/${teamId}`
13085
+ }
13086
+
13087
+ /**
13088
+ * @summary Revoke a team's target grant
13089
+ */
13090
+ export const revokeResourceTargetGrant = async (org: string,
13091
+ id: string,
13092
+ teamId: string, options?: RequestInit): Promise<revokeResourceTargetGrantResponse> => {
13093
+
13094
+ const res = await fetch(getRevokeResourceTargetGrantUrl(org,id,teamId),
13095
+ {
13096
+ ...options,
13097
+ method: 'DELETE'
13098
+
13099
+
13100
+ }
13101
+ )
13102
+
13103
+
13104
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
13105
+
13106
+ const data: revokeResourceTargetGrantResponse['data'] = body ? JSON.parse(body) : {}
13107
+ return { data, status: res.status, headers: res.headers } as revokeResourceTargetGrantResponse
13108
+ }
13109
+
13110
+
13111
+
13112
+ export type setResourceTargetGrantResponse200 = {
13113
+ data: GrantOutputBody
13114
+ status: 200
13115
+ }
13116
+
13117
+ export type setResourceTargetGrantResponseDefault = {
13118
+ data: ErrorModel
13119
+ status: Exclude<HTTPStatusCodes, 200>
13120
+ }
13121
+
13122
+ export type setResourceTargetGrantResponseSuccess = (setResourceTargetGrantResponse200) & {
13123
+ headers: Headers;
13124
+ };
13125
+ export type setResourceTargetGrantResponseError = (setResourceTargetGrantResponseDefault) & {
13126
+ headers: Headers;
13127
+ };
13128
+
13129
+ export type setResourceTargetGrantResponse = (setResourceTargetGrantResponseSuccess | setResourceTargetGrantResponseError)
13130
+
13131
+ export const getSetResourceTargetGrantUrl = (org: string,
13132
+ id: string,
13133
+ teamId: string,) => {
13134
+
13135
+
13136
+
13137
+
13138
+ return `/api/v1/tenants/${org}/resource-targets/${id}/grants/${teamId}`
13139
+ }
13140
+
13141
+ /**
13142
+ * @summary Set a team's view, use, or provision grant
13143
+ */
13144
+ export const setResourceTargetGrant = async (org: string,
13145
+ id: string,
13146
+ teamId: string,
13147
+ grantInputBody: NonReadonly<GrantInputBody>, options?: RequestInit): Promise<setResourceTargetGrantResponse> => {
13148
+
13149
+ const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
13150
+ if (!h) return {};
13151
+ if (h instanceof Headers) return Object.fromEntries(h.entries());
13152
+ if (Symbol.iterator in h) {
13153
+ return Object.fromEntries(
13154
+ Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
13155
+ );
13156
+ }
13157
+ const headers: Record<string, string | readonly string[]> = {};
13158
+ for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
13159
+ if (value !== undefined) headers[name] = value;
13160
+ }
13161
+ return headers;
13162
+ };
13163
+ const res = await fetch(getSetResourceTargetGrantUrl(org,id,teamId),
13164
+ {
13165
+ ...options,
13166
+ method: 'PUT',
13167
+ headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
13168
+ body: JSON.stringify(grantInputBody)
13169
+ }
13170
+ )
13171
+
13172
+
13173
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
13174
+
13175
+ const data: setResourceTargetGrantResponse['data'] = body ? JSON.parse(body) : {}
13176
+ return { data, status: res.status, headers: res.headers } as setResourceTargetGrantResponse
13177
+ }
13178
+
13179
+
13180
+
12552
13181
  export type listRolesResponse200 = {
12553
13182
  data: ListRolesOutputBody
12554
13183
  status: 200
@@ -13560,7 +14189,7 @@ export const getScaffold = async (org: string,
13560
14189
 
13561
14190
 
13562
14191
  export type listSecretStoresResponse200 = {
13563
- data: ListOutputBody5
14192
+ data: ListOutputBody6
13564
14193
  status: 200
13565
14194
  }
13566
14195
 
@@ -13640,7 +14269,7 @@ export const getCreateSecretStoreUrl = (org: string,) => {
13640
14269
  * @summary Register a secret store
13641
14270
  */
13642
14271
  export const createSecretStore = async (org: string,
13643
- createInputBody1: NonReadonly<CreateInputBody1>, options?: RequestInit): Promise<createSecretStoreResponse> => {
14272
+ createInputBody2: NonReadonly<CreateInputBody2>, options?: RequestInit): Promise<createSecretStoreResponse> => {
13644
14273
 
13645
14274
  const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
13646
14275
  if (!h) return {};
@@ -13661,7 +14290,7 @@ const res = await fetch(getCreateSecretStoreUrl(org),
13661
14290
  ...options,
13662
14291
  method: 'POST',
13663
14292
  headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
13664
- body: JSON.stringify(createInputBody1)
14293
+ body: JSON.stringify(createInputBody2)
13665
14294
  }
13666
14295
  )
13667
14296
 
@@ -13811,7 +14440,7 @@ export const getUpdateSecretStoreUrl = (org: string,
13811
14440
  */
13812
14441
  export const updateSecretStore = async (org: string,
13813
14442
  name: string,
13814
- updateInputBody2: NonReadonly<UpdateInputBody2>, options?: RequestInit): Promise<updateSecretStoreResponse> => {
14443
+ updateInputBody3: NonReadonly<UpdateInputBody3>, options?: RequestInit): Promise<updateSecretStoreResponse> => {
13815
14444
 
13816
14445
  const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
13817
14446
  if (!h) return {};
@@ -13832,7 +14461,7 @@ const res = await fetch(getUpdateSecretStoreUrl(org,name),
13832
14461
  ...options,
13833
14462
  method: 'PATCH',
13834
14463
  headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
13835
- body: JSON.stringify(updateInputBody2)
14464
+ body: JSON.stringify(updateInputBody3)
13836
14465
  }
13837
14466
  )
13838
14467
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7k-inari/api-client",
3
- "version": "0.7.0",
3
+ "version": "0.8.0-5ee597d",
4
4
  "description": "Generated TypeScript client for the Inari control plane contract (inari-api).",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -26,4 +26,4 @@
26
26
  "type": "git",
27
27
  "url": "https://github.com/7K-Inari/inari-api"
28
28
  }
29
- }
29
+ }