@zitadel/api 0.7.0 → 0.8.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.
Files changed (151) hide show
  1. package/dist/{api-factory-BPmRCU7u.mjs → api-factory-B2kd991F.mjs} +14 -2
  2. package/dist/api-factory-B2kd991F.mjs.map +1 -0
  3. package/dist/{api-factory-DCzYxpdV.d.mts → api-factory-DW48-EMM.d.mts} +8 -3
  4. package/dist/api-factory-DW48-EMM.d.mts.map +1 -0
  5. package/dist/generated/endpoints/zitadelNextGen.d.mts +2 -2
  6. package/dist/generated/endpoints/zitadelNextGen.mjs +1 -1
  7. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts +225 -109
  8. package/dist/generated/endpoints/zitadelNextGen.msw.d.mts.map +1 -1
  9. package/dist/generated/endpoints/zitadelNextGen.msw.mjs +737 -41
  10. package/dist/generated/endpoints/zitadelNextGen.msw.mjs.map +1 -1
  11. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts +594 -182
  12. package/dist/generated/endpoints/zitadelNextGen.zod.d.mts.map +1 -1
  13. package/dist/generated/endpoints/zitadelNextGen.zod.mjs +788 -347
  14. package/dist/generated/endpoints/zitadelNextGen.zod.mjs.map +1 -1
  15. package/dist/generated/model/index.d.mts +2 -2
  16. package/dist/generated/model/index.mjs +17 -3
  17. package/dist/generated/model/index.mjs.map +1 -1
  18. package/dist/generated/operations.d.mts.map +1 -1
  19. package/dist/generated/operations.mjs +46 -4
  20. package/dist/generated/operations.mjs.map +1 -1
  21. package/dist/{index-BwYxe7Dw.d.mts → index-REGtKmAu.d.mts} +1466 -327
  22. package/dist/index-REGtKmAu.d.mts.map +1 -0
  23. package/dist/runtime/api-factory.d.mts +1 -1
  24. package/dist/runtime/api-factory.mjs +1 -1
  25. package/dist/runtime/config.d.mts +1 -1
  26. package/dist/runtime/config.mjs +1 -1
  27. package/dist/{zitadelNextGen-SGK-fW1x.d.mts → zitadelNextGen-C2Qcm9jl.d.mts} +65 -20
  28. package/dist/zitadelNextGen-C2Qcm9jl.d.mts.map +1 -0
  29. package/dist/{zitadelNextGen-DsPFGqLs.mjs → zitadelNextGen-CDqt2m_4.mjs} +141 -558
  30. package/dist/zitadelNextGen-CDqt2m_4.mjs.map +1 -0
  31. package/package.json +2 -2
  32. package/src/generated/endpoints/zitadelNextGen.faker.ts +14 -10
  33. package/src/generated/endpoints/zitadelNextGen.msw.ts +278 -216
  34. package/src/generated/endpoints/zitadelNextGen.ts +209 -736
  35. package/src/generated/endpoints/zitadelNextGen.zod.ts +674 -312
  36. package/src/generated/model/acceptInvitation200.ts +84 -12
  37. package/src/generated/model/acceptInvitationDefault.ts +18 -0
  38. package/src/generated/model/buildReleaseBodyBundle.ts +1 -2
  39. package/src/generated/model/buildReleaseBodyBundleOauth.ts +1 -2
  40. package/src/generated/model/buildReleaseParams.ts +7 -7
  41. package/src/generated/model/cancelInvitationParams.ts +7 -7
  42. package/src/generated/model/createAuthAttempt201ChallengesItemPayload.ts +1 -1
  43. package/src/generated/model/createAuthAttemptChallenge201Payload.ts +1 -1
  44. package/src/generated/model/createDeploymentParams.ts +7 -7
  45. package/src/generated/model/createGrantParams.ts +7 -7
  46. package/src/generated/model/createInvitation201.ts +84 -12
  47. package/src/generated/model/createInvitationBody.ts +4 -4
  48. package/src/generated/model/createInvitationParams.ts +7 -7
  49. package/src/generated/model/createReleaseParams.ts +7 -7
  50. package/src/generated/model/createTeamParams.ts +7 -7
  51. package/src/generated/model/createUserParams.ts +23 -23
  52. package/src/generated/model/deleteGrantParams.ts +7 -7
  53. package/src/generated/model/deleteVariableParams.ts +12 -12
  54. package/src/generated/model/evaluatePolicyParams.ts +7 -7
  55. package/src/generated/model/exchangeHandoffParams.ts +7 -7
  56. package/src/generated/model/getApplicationParams.ts +7 -7
  57. package/src/generated/model/getAuthAttempt200ChallengesItemPayload.ts +1 -1
  58. package/src/generated/model/getDeploymentParams.ts +7 -7
  59. package/src/generated/model/getEvent200.ts +192 -10
  60. package/src/generated/model/getEventParams.ts +7 -7
  61. package/src/generated/model/getGrantParams.ts +13 -13
  62. package/src/generated/model/getIdpParams.ts +7 -7
  63. package/src/generated/model/getIdpRevisionParams.ts +7 -7
  64. package/src/generated/model/getInvitation200.ts +84 -12
  65. package/src/generated/model/getInvitationParams.ts +7 -7
  66. package/src/generated/model/getMyPasswordStateParams.ts +16 -16
  67. package/src/generated/model/getMySessionCsrfTokenParams.ts +16 -16
  68. package/src/generated/model/getMySessionParams.ts +16 -16
  69. package/src/generated/model/getMyUserParams.ts +16 -16
  70. package/src/generated/model/getMyUserSchemaParams.ts +16 -16
  71. package/src/generated/model/getOAuthSettings200.ts +1 -2
  72. package/src/generated/model/getOAuthSettings200Oauth.ts +1 -2
  73. package/src/generated/model/getOAuthSettingsDefault.ts +18 -0
  74. package/src/generated/model/getPolicyParams.ts +7 -7
  75. package/src/generated/model/getPolicyRevisionParams.ts +7 -7
  76. package/src/generated/model/getProjectClaimStatusParams.ts +5 -5
  77. package/src/generated/model/getProjectClaimWindowParams.ts +5 -5
  78. package/src/generated/model/getReleaseParams.ts +7 -7
  79. package/src/generated/model/getSchemaParams.ts +11 -11
  80. package/src/generated/model/getUserParams.ts +21 -21
  81. package/src/generated/model/getVariableParams.ts +12 -12
  82. package/src/generated/model/index.ts +18 -7
  83. package/src/generated/model/listBrandingParams.ts +20 -20
  84. package/src/generated/model/listDeploymentVariablesParams.ts +7 -7
  85. package/src/generated/model/listDeploymentsParams.ts +42 -44
  86. package/src/generated/model/listEvents200EventsItem.ts +192 -10
  87. package/src/generated/model/listEventsParams.ts +83 -105
  88. package/src/generated/model/listFlowDefinitionsParams.ts +44 -48
  89. package/src/generated/model/listIdpRevisionsParams.ts +20 -20
  90. package/src/generated/model/listInvitations200InvitationsItem.ts +84 -12
  91. package/src/generated/model/listInvitationsExpandItem.ts +25 -0
  92. package/src/generated/model/listInvitationsParams.ts +31 -31
  93. package/src/generated/model/listInvitationsStatusItem.ts +22 -0
  94. package/src/generated/model/listMyIdentityLinksParams.ts +29 -29
  95. package/src/generated/model/listMyPasskeysParams.ts +29 -29
  96. package/src/generated/model/listMyProjectsParams.ts +52 -52
  97. package/src/generated/model/listMyTeamsParams.ts +29 -29
  98. package/src/generated/model/listPoliciesParams.ts +22 -24
  99. package/src/generated/model/listPolicyRevisionsParams.ts +20 -20
  100. package/src/generated/model/listProjectAdminsParams.ts +13 -13
  101. package/src/generated/model/listProjectMembers200.ts +20 -0
  102. package/src/generated/model/listProjectMembers200MembersItem.ts +38 -0
  103. package/src/generated/model/listProjectMembers200MembersItemRelation.ts +20 -0
  104. package/src/generated/model/listProjectMembers200MembersItemSourcesItem.ts +55 -0
  105. package/src/generated/model/listProjectMembers200MembersItemUser.ts +40 -0
  106. package/src/generated/model/{acceptInvitation429.ts → listProjectMembers400.ts} +3 -3
  107. package/src/generated/model/{lookupInvitation429Details.ts → listProjectMembers400Details.ts} +1 -1
  108. package/src/generated/model/{lookupInvitation429.ts → listProjectMembers401.ts} +3 -3
  109. package/src/generated/model/{acceptInvitation429Details.ts → listProjectMembers401Details.ts} +1 -1
  110. package/src/generated/model/{rejectInvitation429.ts → listProjectMembers403.ts} +3 -3
  111. package/src/generated/model/{rejectInvitation429Details.ts → listProjectMembers403Details.ts} +1 -1
  112. package/src/generated/model/listProjectMembers404.ts +20 -0
  113. package/src/generated/model/listProjectMembers404Details.ts +12 -0
  114. package/src/generated/model/listProjectMembersDefault.ts +81 -0
  115. package/src/generated/model/listProjectMembersParams.ts +29 -0
  116. package/src/generated/model/listProjectMembersRelation.ts +16 -0
  117. package/src/generated/model/listProjectPreviewsParams.ts +13 -13
  118. package/src/generated/model/listReleasesParams.ts +60 -60
  119. package/src/generated/model/listSchemasParams.ts +54 -56
  120. package/src/generated/model/listUserIdentityLinksParams.ts +13 -13
  121. package/src/generated/model/listUserPasskeysParams.ts +13 -13
  122. package/src/generated/model/listUserTeamsParams.ts +13 -13
  123. package/src/generated/model/listVariablesParams.ts +12 -12
  124. package/src/generated/model/lookupInvitation200.ts +58 -0
  125. package/src/generated/model/publishApplicationParams.ts +7 -7
  126. package/src/generated/model/publishBrandingParams.ts +7 -7
  127. package/src/generated/model/publishIdpParams.ts +7 -7
  128. package/src/generated/model/publishPolicyParams.ts +7 -7
  129. package/src/generated/model/publishSchemaParams.ts +12 -12
  130. package/src/generated/model/queryGrantsParams.ts +7 -7
  131. package/src/generated/model/queryIdpsParams.ts +7 -7
  132. package/src/generated/model/querySessionsParams.ts +7 -7
  133. package/src/generated/model/queryTeamsParams.ts +6 -6
  134. package/src/generated/model/queryUsersParams.ts +6 -6
  135. package/src/generated/model/rejectInvitation200.ts +84 -12
  136. package/src/generated/model/rejectInvitationDefault.ts +18 -0
  137. package/src/generated/model/revokeMySessionParams.ts +16 -16
  138. package/src/generated/model/revokeReleaseParams.ts +7 -7
  139. package/src/generated/model/rollbackDeploymentParams.ts +7 -7
  140. package/src/generated/model/searchParams.ts +7 -7
  141. package/src/generated/model/setVariablesParams.ts +12 -12
  142. package/src/generated/model/updateMyUserParams.ts +16 -16
  143. package/src/generated/model/verifyAuthAttemptChallenge200ChallengesItemPayload.ts +1 -1
  144. package/src/generated/operations.ts +46 -4
  145. package/src/generated/paging.ts +5 -0
  146. package/dist/api-factory-BPmRCU7u.mjs.map +0 -1
  147. package/dist/api-factory-DCzYxpdV.d.mts.map +0 -1
  148. package/dist/index-BwYxe7Dw.d.mts.map +0 -1
  149. package/dist/zitadelNextGen-DsPFGqLs.mjs.map +0 -1
  150. package/dist/zitadelNextGen-SGK-fW1x.d.mts.map +0 -1
  151. package/src/generated/model/listInvitationsStatus.ts +0 -17
@@ -144,6 +144,8 @@ import type {
144
144
  ListPolicyRevisionsParams,
145
145
  ListProjectAdmins200,
146
146
  ListProjectAdminsParams,
147
+ ListProjectMembers200,
148
+ ListProjectMembersParams,
147
149
  ListProjectPreviews200,
148
150
  ListProjectPreviewsParams,
149
151
  ListReleases200,
@@ -231,6 +233,26 @@ import type {
231
233
 
232
234
  import { customFetch } from '../../runtime/fetch.ts';
233
235
 
236
+ const getHeaders = (...sources: (RequestInit['headers'] | Record<string, string | undefined>)[]) => {
237
+ const seen = new Set<string>();
238
+ const layers: [string, string | readonly string[]][][] = [];
239
+ for (const source of sources.reverse()) {
240
+ if (!source) continue;
241
+ const entries = source instanceof Headers
242
+ ? source.entries()
243
+ : Symbol.iterator in source
244
+ ? Array.from(source as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string])
245
+ : Object.entries<string | readonly string[] | undefined>(source);
246
+ const layer: [string, string | readonly string[]][] = [];
247
+ for (const [name, value] of entries) {
248
+ if (value !== undefined && !seen.has(name.toLowerCase())) layer.push([name, value]);
249
+ }
250
+ for (const [name] of layer) seen.add(name.toLowerCase());
251
+ layers.push(layer);
252
+ }
253
+ return Object.fromEntries(layers.reverse().flat()) as Extract<RequestInit['headers'], Record<string, unknown>>;
254
+ };
255
+
234
256
  export const getGetLiveUrl = () => {
235
257
 
236
258
 
@@ -323,25 +345,11 @@ export const getCreateUserUrl = (params: CreateUserParams,) => {
323
345
  export const createUser = async (createUserBody: CreateUserBody,
324
346
  params: CreateUserParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateUser201> => {
325
347
 
326
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
327
- if (!h) return {};
328
- if (h instanceof Headers) return Object.fromEntries(h.entries());
329
- if (Symbol.iterator in h) {
330
- return Object.fromEntries(
331
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
332
- );
333
- }
334
- const headers: Record<string, string | readonly string[]> = {};
335
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
336
- if (value !== undefined) headers[name] = value;
337
- }
338
- return headers;
339
- };
340
- return customFetch<CreateUser201>(getCreateUserUrl(params),
348
+ return customFetch<CreateUser201>(getCreateUserUrl(params),
341
349
  {
342
350
  ...options,
343
351
  method: 'POST',
344
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
352
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
345
353
  body: JSON.stringify(createUserBody)
346
354
  }
347
355
  );}
@@ -383,25 +391,11 @@ export const getQueryUsersUrl = (params?: QueryUsersParams,) => {
383
391
  export const queryUsers = async (queryUsersBody: QueryUsersBody,
384
392
  params?: QueryUsersParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryUsers200> => {
385
393
 
386
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
387
- if (!h) return {};
388
- if (h instanceof Headers) return Object.fromEntries(h.entries());
389
- if (Symbol.iterator in h) {
390
- return Object.fromEntries(
391
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
392
- );
393
- }
394
- const headers: Record<string, string | readonly string[]> = {};
395
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
396
- if (value !== undefined) headers[name] = value;
397
- }
398
- return headers;
399
- };
400
- return customFetch<QueryUsers200>(getQueryUsersUrl(params),
394
+ return customFetch<QueryUsers200>(getQueryUsersUrl(params),
401
395
  {
402
396
  ...options,
403
397
  method: 'POST',
404
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
398
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
405
399
  body: JSON.stringify(queryUsersBody)
406
400
  }
407
401
  );}
@@ -476,25 +470,11 @@ export const getUpdateUserUrl = (userId: string,) => {
476
470
  export const updateUser = async (userId: string,
477
471
  updateUserBody: UpdateUserBody, options?: Parameters<typeof customFetch>[1]): Promise<UpdateUser200> => {
478
472
 
479
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
480
- if (!h) return {};
481
- if (h instanceof Headers) return Object.fromEntries(h.entries());
482
- if (Symbol.iterator in h) {
483
- return Object.fromEntries(
484
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
485
- );
486
- }
487
- const headers: Record<string, string | readonly string[]> = {};
488
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
489
- if (value !== undefined) headers[name] = value;
490
- }
491
- return headers;
492
- };
493
- return customFetch<UpdateUser200>(getUpdateUserUrl(userId),
473
+ return customFetch<UpdateUser200>(getUpdateUserUrl(userId),
494
474
  {
495
475
  ...options,
496
476
  method: 'PATCH',
497
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
477
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
498
478
  body: JSON.stringify(updateUserBody)
499
479
  }
500
480
  );}
@@ -632,25 +612,11 @@ export const getCreateUserPasskeyRegistrationUrl = (userId: string,) => {
632
612
  export const createUserPasskeyRegistration = async (userId: string,
633
613
  createUserPasskeyRegistrationBody: CreateUserPasskeyRegistrationBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateUserPasskeyRegistration201> => {
634
614
 
635
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
636
- if (!h) return {};
637
- if (h instanceof Headers) return Object.fromEntries(h.entries());
638
- if (Symbol.iterator in h) {
639
- return Object.fromEntries(
640
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
641
- );
642
- }
643
- const headers: Record<string, string | readonly string[]> = {};
644
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
645
- if (value !== undefined) headers[name] = value;
646
- }
647
- return headers;
648
- };
649
- return customFetch<CreateUserPasskeyRegistration201>(getCreateUserPasskeyRegistrationUrl(userId),
615
+ return customFetch<CreateUserPasskeyRegistration201>(getCreateUserPasskeyRegistrationUrl(userId),
650
616
  {
651
617
  ...options,
652
618
  method: 'POST',
653
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
619
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
654
620
  body: JSON.stringify(createUserPasskeyRegistrationBody)
655
621
  }
656
622
  );}
@@ -682,25 +648,11 @@ export const completeUserPasskeyRegistration = async (userId: string,
682
648
  registrationId: string,
683
649
  completeUserPasskeyRegistrationBody: CompleteUserPasskeyRegistrationBody, options?: Parameters<typeof customFetch>[1]): Promise<CompleteUserPasskeyRegistration201> => {
684
650
 
685
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
686
- if (!h) return {};
687
- if (h instanceof Headers) return Object.fromEntries(h.entries());
688
- if (Symbol.iterator in h) {
689
- return Object.fromEntries(
690
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
691
- );
692
- }
693
- const headers: Record<string, string | readonly string[]> = {};
694
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
695
- if (value !== undefined) headers[name] = value;
696
- }
697
- return headers;
698
- };
699
- return customFetch<CompleteUserPasskeyRegistration201>(getCompleteUserPasskeyRegistrationUrl(userId,registrationId),
651
+ return customFetch<CompleteUserPasskeyRegistration201>(getCompleteUserPasskeyRegistrationUrl(userId,registrationId),
700
652
  {
701
653
  ...options,
702
654
  method: 'POST',
703
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
655
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
704
656
  body: JSON.stringify(completeUserPasskeyRegistrationBody)
705
657
  }
706
658
  );}
@@ -773,25 +725,11 @@ export const getSetUserPasswordUrl = (userId: string,) => {
773
725
  export const setUserPassword = async (userId: string,
774
726
  setUserPasswordBody: SetUserPasswordBody, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
775
727
 
776
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
777
- if (!h) return {};
778
- if (h instanceof Headers) return Object.fromEntries(h.entries());
779
- if (Symbol.iterator in h) {
780
- return Object.fromEntries(
781
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
782
- );
783
- }
784
- const headers: Record<string, string | readonly string[]> = {};
785
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
786
- if (value !== undefined) headers[name] = value;
787
- }
788
- return headers;
789
- };
790
- return customFetch<void>(getSetUserPasswordUrl(userId),
728
+ return customFetch<void>(getSetUserPasswordUrl(userId),
791
729
  {
792
730
  ...options,
793
731
  method: 'PUT',
794
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
732
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
795
733
  body: JSON.stringify(setUserPasswordBody)
796
734
  }
797
735
  );}
@@ -904,25 +842,11 @@ export const getUpdateMyUserUrl = (params?: UpdateMyUserParams,) => {
904
842
  export const updateMyUser = async (updateMyUserBody: UpdateMyUserBody,
905
843
  params?: UpdateMyUserParams, options?: Parameters<typeof customFetch>[1]): Promise<UpdateMyUser200> => {
906
844
 
907
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
908
- if (!h) return {};
909
- if (h instanceof Headers) return Object.fromEntries(h.entries());
910
- if (Symbol.iterator in h) {
911
- return Object.fromEntries(
912
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
913
- );
914
- }
915
- const headers: Record<string, string | readonly string[]> = {};
916
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
917
- if (value !== undefined) headers[name] = value;
918
- }
919
- return headers;
920
- };
921
- return customFetch<UpdateMyUser200>(getUpdateMyUserUrl(params),
845
+ return customFetch<UpdateMyUser200>(getUpdateMyUserUrl(params),
922
846
  {
923
847
  ...options,
924
848
  method: 'PATCH',
925
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
849
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
926
850
  body: JSON.stringify(updateMyUserBody)
927
851
  }
928
852
  );}
@@ -1227,25 +1151,11 @@ export const getCreateFlowUrl = () => {
1227
1151
  */
1228
1152
  export const createFlow = async (createFlowBody: CreateFlowBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateFlow201> => {
1229
1153
 
1230
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1231
- if (!h) return {};
1232
- if (h instanceof Headers) return Object.fromEntries(h.entries());
1233
- if (Symbol.iterator in h) {
1234
- return Object.fromEntries(
1235
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1236
- );
1237
- }
1238
- const headers: Record<string, string | readonly string[]> = {};
1239
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1240
- if (value !== undefined) headers[name] = value;
1241
- }
1242
- return headers;
1243
- };
1244
- return customFetch<CreateFlow201>(getCreateFlowUrl(),
1154
+ return customFetch<CreateFlow201>(getCreateFlowUrl(),
1245
1155
  {
1246
1156
  ...options,
1247
1157
  method: 'POST',
1248
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1158
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
1249
1159
  body: JSON.stringify(createFlowBody)
1250
1160
  }
1251
1161
  );}
@@ -1371,25 +1281,11 @@ export const getSubmitFlowStepUrl = (flowId: string,) => {
1371
1281
  export const submitFlowStep = async (flowId: string,
1372
1282
  submitFlowStepBody: SubmitFlowStepBody, options?: Parameters<typeof customFetch>[1]): Promise<SubmitFlowStep200> => {
1373
1283
 
1374
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1375
- if (!h) return {};
1376
- if (h instanceof Headers) return Object.fromEntries(h.entries());
1377
- if (Symbol.iterator in h) {
1378
- return Object.fromEntries(
1379
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1380
- );
1381
- }
1382
- const headers: Record<string, string | readonly string[]> = {};
1383
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1384
- if (value !== undefined) headers[name] = value;
1385
- }
1386
- return headers;
1387
- };
1388
- return customFetch<SubmitFlowStep200>(getSubmitFlowStepUrl(flowId),
1284
+ return customFetch<SubmitFlowStep200>(getSubmitFlowStepUrl(flowId),
1389
1285
  {
1390
1286
  ...options,
1391
1287
  method: 'POST',
1392
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1288
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
1393
1289
  body: JSON.stringify(submitFlowStepBody)
1394
1290
  }
1395
1291
  );}
@@ -1438,25 +1334,11 @@ export const getCreateAuthAttemptUrl = () => {
1438
1334
  */
1439
1335
  export const createAuthAttempt = async (createAuthAttemptBody: CreateAuthAttemptBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateAuthAttempt201> => {
1440
1336
 
1441
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1442
- if (!h) return {};
1443
- if (h instanceof Headers) return Object.fromEntries(h.entries());
1444
- if (Symbol.iterator in h) {
1445
- return Object.fromEntries(
1446
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1447
- );
1448
- }
1449
- const headers: Record<string, string | readonly string[]> = {};
1450
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1451
- if (value !== undefined) headers[name] = value;
1452
- }
1453
- return headers;
1454
- };
1455
- return customFetch<CreateAuthAttempt201>(getCreateAuthAttemptUrl(),
1337
+ return customFetch<CreateAuthAttempt201>(getCreateAuthAttemptUrl(),
1456
1338
  {
1457
1339
  ...options,
1458
1340
  method: 'POST',
1459
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1341
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
1460
1342
  body: JSON.stringify(createAuthAttemptBody)
1461
1343
  }
1462
1344
  );}
@@ -1514,25 +1396,11 @@ export const getCreateAuthAttemptChallengeUrl = (attemptId: string,) => {
1514
1396
  export const createAuthAttemptChallenge = async (attemptId: string,
1515
1397
  createAuthAttemptChallengeBody: CreateAuthAttemptChallengeBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateAuthAttemptChallenge201> => {
1516
1398
 
1517
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1518
- if (!h) return {};
1519
- if (h instanceof Headers) return Object.fromEntries(h.entries());
1520
- if (Symbol.iterator in h) {
1521
- return Object.fromEntries(
1522
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1523
- );
1524
- }
1525
- const headers: Record<string, string | readonly string[]> = {};
1526
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1527
- if (value !== undefined) headers[name] = value;
1528
- }
1529
- return headers;
1530
- };
1531
- return customFetch<CreateAuthAttemptChallenge201>(getCreateAuthAttemptChallengeUrl(attemptId),
1399
+ return customFetch<CreateAuthAttemptChallenge201>(getCreateAuthAttemptChallengeUrl(attemptId),
1532
1400
  {
1533
1401
  ...options,
1534
1402
  method: 'POST',
1535
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1403
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
1536
1404
  body: JSON.stringify(createAuthAttemptChallengeBody)
1537
1405
  }
1538
1406
  );}
@@ -1570,25 +1438,11 @@ export const verifyAuthAttemptChallenge = async (attemptId: string,
1570
1438
  challengeId: string,
1571
1439
  verifyAuthAttemptChallengeBody: VerifyAuthAttemptChallengeBody, options?: Parameters<typeof customFetch>[1]): Promise<VerifyAuthAttemptChallenge200> => {
1572
1440
 
1573
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1574
- if (!h) return {};
1575
- if (h instanceof Headers) return Object.fromEntries(h.entries());
1576
- if (Symbol.iterator in h) {
1577
- return Object.fromEntries(
1578
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1579
- );
1580
- }
1581
- const headers: Record<string, string | readonly string[]> = {};
1582
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1583
- if (value !== undefined) headers[name] = value;
1584
- }
1585
- return headers;
1586
- };
1587
- return customFetch<VerifyAuthAttemptChallenge200>(getVerifyAuthAttemptChallengeUrl(attemptId,challengeId),
1441
+ return customFetch<VerifyAuthAttemptChallenge200>(getVerifyAuthAttemptChallengeUrl(attemptId,challengeId),
1588
1442
  {
1589
1443
  ...options,
1590
1444
  method: 'POST',
1591
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1445
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
1592
1446
  body: JSON.stringify(verifyAuthAttemptChallengeBody)
1593
1447
  }
1594
1448
  );}
@@ -1658,25 +1512,11 @@ export const getCreateProjectUrl = () => {
1658
1512
  */
1659
1513
  export const createProject = async (createProjectBody: CreateProjectBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateProject201> => {
1660
1514
 
1661
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1662
- if (!h) return {};
1663
- if (h instanceof Headers) return Object.fromEntries(h.entries());
1664
- if (Symbol.iterator in h) {
1665
- return Object.fromEntries(
1666
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1667
- );
1668
- }
1669
- const headers: Record<string, string | readonly string[]> = {};
1670
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1671
- if (value !== undefined) headers[name] = value;
1672
- }
1673
- return headers;
1674
- };
1675
- return customFetch<CreateProject201>(getCreateProjectUrl(),
1515
+ return customFetch<CreateProject201>(getCreateProjectUrl(),
1676
1516
  {
1677
1517
  ...options,
1678
1518
  method: 'POST',
1679
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1519
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
1680
1520
  body: JSON.stringify(createProjectBody)
1681
1521
  }
1682
1522
  );}
@@ -1702,25 +1542,11 @@ export const getQueryProjectsUrl = () => {
1702
1542
  */
1703
1543
  export const queryProjects = async (queryProjectsBody: QueryProjectsBody, options?: Parameters<typeof customFetch>[1]): Promise<QueryProjects200> => {
1704
1544
 
1705
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1706
- if (!h) return {};
1707
- if (h instanceof Headers) return Object.fromEntries(h.entries());
1708
- if (Symbol.iterator in h) {
1709
- return Object.fromEntries(
1710
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1711
- );
1712
- }
1713
- const headers: Record<string, string | readonly string[]> = {};
1714
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1715
- if (value !== undefined) headers[name] = value;
1716
- }
1717
- return headers;
1718
- };
1719
- return customFetch<QueryProjects200>(getQueryProjectsUrl(),
1545
+ return customFetch<QueryProjects200>(getQueryProjectsUrl(),
1720
1546
  {
1721
1547
  ...options,
1722
1548
  method: 'POST',
1723
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1549
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
1724
1550
  body: JSON.stringify(queryProjectsBody)
1725
1551
  }
1726
1552
  );}
@@ -1779,25 +1605,11 @@ export const getUpdateProjectUrl = (projectId: string,) => {
1779
1605
  export const updateProject = async (projectId: string,
1780
1606
  updateProjectBody: UpdateProjectBody, options?: Parameters<typeof customFetch>[1]): Promise<UpdateProject200> => {
1781
1607
 
1782
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1783
- if (!h) return {};
1784
- if (h instanceof Headers) return Object.fromEntries(h.entries());
1785
- if (Symbol.iterator in h) {
1786
- return Object.fromEntries(
1787
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1788
- );
1789
- }
1790
- const headers: Record<string, string | readonly string[]> = {};
1791
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1792
- if (value !== undefined) headers[name] = value;
1793
- }
1794
- return headers;
1795
- };
1796
- return customFetch<UpdateProject200>(getUpdateProjectUrl(projectId),
1608
+ return customFetch<UpdateProject200>(getUpdateProjectUrl(projectId),
1797
1609
  {
1798
1610
  ...options,
1799
1611
  method: 'PATCH',
1800
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1612
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
1801
1613
  body: JSON.stringify(updateProjectBody)
1802
1614
  }
1803
1615
  );}
@@ -1839,12 +1651,12 @@ export const getListProjectAdminsUrl = (projectId: string,
1839
1651
  * whose team or user was deactivated, is not listed through it. Grants that
1840
1652
  * expired or carry a lower role are left out. A person whose only access is a
1841
1653
  * `viewer` or `editor` grant is not an admin and is not listed. Like the
1842
- * check, the list does not look at a person's user status beyond that, so a
1843
- * direct grant to a suspended person is listed.
1654
+ * check, a direct user grant requires an active user, so a suspended
1655
+ * person's direct grant is not listed.
1844
1656
  *
1845
- * A person whose access comes only through teams the caller is not a
1846
- * member of is left out. A team the caller is not in is named by `team_id`
1847
- * only. The grant to such a team still shows in the project's grants.
1657
+ * Every caller who passes the project read check sees every listed admin
1658
+ * and every team name on `sources`. Co-membership no longer filters the
1659
+ * roster.
1848
1660
  *
1849
1661
  * The list is ordered by `user_id` and paginated with `page_token`.
1850
1662
  * Authenticate with a project secret (`oauth2`), or with the session cookie
@@ -1865,6 +1677,74 @@ export const listProjectAdmins = async (projectId: string,
1865
1677
 
1866
1678
 
1867
1679
 
1680
+ export const getListProjectMembersUrl = (projectId: string,
1681
+ params?: ListProjectMembersParams,) => {
1682
+ const normalizedParams = new URLSearchParams();
1683
+
1684
+ Object.entries(params || {}).forEach(([key, value]) => {
1685
+
1686
+ if (value !== undefined) {
1687
+ normalizedParams.append(key, value === null ? 'null' : String(value))
1688
+ }
1689
+ });
1690
+
1691
+ const stringifiedParams = normalizedParams.toString();
1692
+
1693
+ return stringifiedParams.length > 0 ? `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/members?${stringifiedParams}` : `${getApiBaseUrl()}/projects/${encodeURIComponent(String(projectId))}/members`
1694
+ }
1695
+
1696
+ /**
1697
+ * Lists the people who have a role on a project, with each person's strongest
1698
+ * role and how they hold it.
1699
+ *
1700
+ * A person appears once, with their strongest `relation` (`viewer`, `editor`
1701
+ * or `admin`; a stronger role includes the weaker ones) and one entry in
1702
+ * `sources` per way they hold that role:
1703
+ *
1704
+ * - `owning_team`: an active member of the team that owns the project, the
1705
+ * team a claim attaches the project to. It holds `admin`. Removing a grant
1706
+ * does not remove this access. It ends only when the person leaves the
1707
+ * team or the project changes owner.
1708
+ * - `grant`: an unexpired grant on the project, which is a role given to the
1709
+ * person (`grant_id` only) or to a team they are an active member of
1710
+ * (`grant_id` and `team`). Revoking that grant removes this source.
1711
+ *
1712
+ * Grants of a weaker role than the person's strongest are not in `sources`;
1713
+ * they still show in the project's grants (`queryGrants`,
1714
+ * `POST /grants/query`).
1715
+ *
1716
+ * Pass `relation` to list only the people whose strongest role is at least
1717
+ * that strong: `relation=admin` lists the people who can administer the
1718
+ * project.
1719
+ *
1720
+ * The list follows the authorization check. A person who left a team, or
1721
+ * whose team or user was deactivated, is not listed through it. Expired
1722
+ * grants are left out. Like the check, a direct user grant requires an
1723
+ * active user, so a suspended person's direct grant is not listed.
1724
+ *
1725
+ * Every caller who passes the project read check sees every listed person
1726
+ * and every team name on `sources`. Co-membership no longer filters the
1727
+ * roster.
1728
+ *
1729
+ * The list is ordered by `user_id` and paginated with `page_token`.
1730
+ * Authenticate with a project secret (`oauth2`), or with the session cookie
1731
+ * (`sessionCookie`) of a signed-in person who can read the project.
1732
+ * @summary List the members of a project
1733
+ */
1734
+ export const listProjectMembers = async (projectId: string,
1735
+ params?: ListProjectMembersParams, options?: Parameters<typeof customFetch>[1]): Promise<ListProjectMembers200> => {
1736
+
1737
+ return customFetch<ListProjectMembers200>(getListProjectMembersUrl(projectId,params),
1738
+ {
1739
+ ...options,
1740
+ method: 'GET'
1741
+
1742
+
1743
+ }
1744
+ );}
1745
+
1746
+
1747
+
1868
1748
  export const getCreateProjectClaimUrl = (projectId: string,) => {
1869
1749
 
1870
1750
 
@@ -1980,25 +1860,11 @@ export const getCompleteProjectClaimUrl = (projectId: string,) => {
1980
1860
  export const completeProjectClaim = async (projectId: string,
1981
1861
  completeProjectClaimBody: CompleteProjectClaimBody, options?: Parameters<typeof customFetch>[1]): Promise<CompleteProjectClaim200> => {
1982
1862
 
1983
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
1984
- if (!h) return {};
1985
- if (h instanceof Headers) return Object.fromEntries(h.entries());
1986
- if (Symbol.iterator in h) {
1987
- return Object.fromEntries(
1988
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
1989
- );
1990
- }
1991
- const headers: Record<string, string | readonly string[]> = {};
1992
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
1993
- if (value !== undefined) headers[name] = value;
1994
- }
1995
- return headers;
1996
- };
1997
- return customFetch<CompleteProjectClaim200>(getCompleteProjectClaimUrl(projectId),
1863
+ return customFetch<CompleteProjectClaim200>(getCompleteProjectClaimUrl(projectId),
1998
1864
  {
1999
1865
  ...options,
2000
1866
  method: 'POST',
2001
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1867
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2002
1868
  body: JSON.stringify(completeProjectClaimBody)
2003
1869
  }
2004
1870
  );}
@@ -2080,25 +1946,11 @@ export const getAddProjectOriginUrl = (projectId: string,) => {
2080
1946
  export const addProjectOrigin = async (projectId: string,
2081
1947
  addProjectOriginBody: AddProjectOriginBody, options?: Parameters<typeof customFetch>[1]): Promise<AddProjectOrigin201> => {
2082
1948
 
2083
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2084
- if (!h) return {};
2085
- if (h instanceof Headers) return Object.fromEntries(h.entries());
2086
- if (Symbol.iterator in h) {
2087
- return Object.fromEntries(
2088
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2089
- );
2090
- }
2091
- const headers: Record<string, string | readonly string[]> = {};
2092
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2093
- if (value !== undefined) headers[name] = value;
2094
- }
2095
- return headers;
2096
- };
2097
- return customFetch<AddProjectOrigin201>(getAddProjectOriginUrl(projectId),
1949
+ return customFetch<AddProjectOrigin201>(getAddProjectOriginUrl(projectId),
2098
1950
  {
2099
1951
  ...options,
2100
1952
  method: 'POST',
2101
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1953
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2102
1954
  body: JSON.stringify(addProjectOriginBody)
2103
1955
  }
2104
1956
  );}
@@ -2128,25 +1980,11 @@ export const getRemoveProjectOriginUrl = (projectId: string,) => {
2128
1980
  export const removeProjectOrigin = async (projectId: string,
2129
1981
  removeProjectOriginBody: RemoveProjectOriginBody, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
2130
1982
 
2131
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2132
- if (!h) return {};
2133
- if (h instanceof Headers) return Object.fromEntries(h.entries());
2134
- if (Symbol.iterator in h) {
2135
- return Object.fromEntries(
2136
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2137
- );
2138
- }
2139
- const headers: Record<string, string | readonly string[]> = {};
2140
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2141
- if (value !== undefined) headers[name] = value;
2142
- }
2143
- return headers;
2144
- };
2145
- return customFetch<void>(getRemoveProjectOriginUrl(projectId),
1983
+ return customFetch<void>(getRemoveProjectOriginUrl(projectId),
2146
1984
  {
2147
1985
  ...options,
2148
1986
  method: 'POST',
2149
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
1987
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2150
1988
  body: JSON.stringify(removeProjectOriginBody)
2151
1989
  }
2152
1990
  );}
@@ -2214,25 +2052,11 @@ export const getRemoveProjectPreviewUrl = (projectId: string,) => {
2214
2052
  export const removeProjectPreview = async (projectId: string,
2215
2053
  removeProjectPreviewBody: RemoveProjectPreviewBody, options?: Parameters<typeof customFetch>[1]): Promise<void> => {
2216
2054
 
2217
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2218
- if (!h) return {};
2219
- if (h instanceof Headers) return Object.fromEntries(h.entries());
2220
- if (Symbol.iterator in h) {
2221
- return Object.fromEntries(
2222
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2223
- );
2224
- }
2225
- const headers: Record<string, string | readonly string[]> = {};
2226
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2227
- if (value !== undefined) headers[name] = value;
2228
- }
2229
- return headers;
2230
- };
2231
- return customFetch<void>(getRemoveProjectPreviewUrl(projectId),
2055
+ return customFetch<void>(getRemoveProjectPreviewUrl(projectId),
2232
2056
  {
2233
2057
  ...options,
2234
2058
  method: 'POST',
2235
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2059
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2236
2060
  body: JSON.stringify(removeProjectPreviewBody)
2237
2061
  }
2238
2062
  );}
@@ -2281,25 +2105,11 @@ export const getCreateSessionUrl = () => {
2281
2105
  */
2282
2106
  export const createSession = async (createSessionBody: CreateSessionBody, options?: Parameters<typeof customFetch>[1]): Promise<CreateSession201> => {
2283
2107
 
2284
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2285
- if (!h) return {};
2286
- if (h instanceof Headers) return Object.fromEntries(h.entries());
2287
- if (Symbol.iterator in h) {
2288
- return Object.fromEntries(
2289
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2290
- );
2291
- }
2292
- const headers: Record<string, string | readonly string[]> = {};
2293
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2294
- if (value !== undefined) headers[name] = value;
2295
- }
2296
- return headers;
2297
- };
2298
- return customFetch<CreateSession201>(getCreateSessionUrl(),
2108
+ return customFetch<CreateSession201>(getCreateSessionUrl(),
2299
2109
  {
2300
2110
  ...options,
2301
2111
  method: 'POST',
2302
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2112
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2303
2113
  body: JSON.stringify(createSessionBody)
2304
2114
  }
2305
2115
  );}
@@ -2331,25 +2141,11 @@ export const getQuerySessionsUrl = (params: QuerySessionsParams,) => {
2331
2141
  export const querySessions = async (querySessionsBody: QuerySessionsBody,
2332
2142
  params: QuerySessionsParams, options?: Parameters<typeof customFetch>[1]): Promise<QuerySessions200> => {
2333
2143
 
2334
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2335
- if (!h) return {};
2336
- if (h instanceof Headers) return Object.fromEntries(h.entries());
2337
- if (Symbol.iterator in h) {
2338
- return Object.fromEntries(
2339
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2340
- );
2341
- }
2342
- const headers: Record<string, string | readonly string[]> = {};
2343
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2344
- if (value !== undefined) headers[name] = value;
2345
- }
2346
- return headers;
2347
- };
2348
- return customFetch<QuerySessions200>(getQuerySessionsUrl(params),
2144
+ return customFetch<QuerySessions200>(getQuerySessionsUrl(params),
2349
2145
  {
2350
2146
  ...options,
2351
2147
  method: 'POST',
2352
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2148
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2353
2149
  body: JSON.stringify(querySessionsBody)
2354
2150
  }
2355
2151
  );}
@@ -2408,25 +2204,11 @@ export const getExchangeHandoffUrl = (params: ExchangeHandoffParams,) => {
2408
2204
  export const exchangeHandoff = async (exchangeHandoffBody: ExchangeHandoffBody,
2409
2205
  params: ExchangeHandoffParams, options?: Parameters<typeof customFetch>[1]): Promise<ExchangeHandoff200> => {
2410
2206
 
2411
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2412
- if (!h) return {};
2413
- if (h instanceof Headers) return Object.fromEntries(h.entries());
2414
- if (Symbol.iterator in h) {
2415
- return Object.fromEntries(
2416
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2417
- );
2418
- }
2419
- const headers: Record<string, string | readonly string[]> = {};
2420
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2421
- if (value !== undefined) headers[name] = value;
2422
- }
2423
- return headers;
2424
- };
2425
- return customFetch<ExchangeHandoff200>(getExchangeHandoffUrl(params),
2207
+ return customFetch<ExchangeHandoff200>(getExchangeHandoffUrl(params),
2426
2208
  {
2427
2209
  ...options,
2428
2210
  method: 'POST',
2429
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2211
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2430
2212
  body: JSON.stringify(exchangeHandoffBody)
2431
2213
  }
2432
2214
  );}
@@ -2656,25 +2438,11 @@ export const getPublishSchemaUrl = (params: PublishSchemaParams,) => {
2656
2438
  export const publishSchema = async (publishSchemaBody: PublishSchemaBody,
2657
2439
  params: PublishSchemaParams, options?: Parameters<typeof customFetch>[1]): Promise<PublishSchema201> => {
2658
2440
 
2659
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2660
- if (!h) return {};
2661
- if (h instanceof Headers) return Object.fromEntries(h.entries());
2662
- if (Symbol.iterator in h) {
2663
- return Object.fromEntries(
2664
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2665
- );
2666
- }
2667
- const headers: Record<string, string | readonly string[]> = {};
2668
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2669
- if (value !== undefined) headers[name] = value;
2670
- }
2671
- return headers;
2672
- };
2673
- return customFetch<PublishSchema201>(getPublishSchemaUrl(params),
2441
+ return customFetch<PublishSchema201>(getPublishSchemaUrl(params),
2674
2442
  {
2675
2443
  ...options,
2676
2444
  method: 'POST',
2677
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2445
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2678
2446
  body: JSON.stringify(publishSchemaBody)
2679
2447
  }
2680
2448
  );}
@@ -2796,25 +2564,11 @@ export const getPublishFlowDefinitionUrl = () => {
2796
2564
  */
2797
2565
  export const publishFlowDefinition = async (publishFlowDefinitionBody: PublishFlowDefinitionBody, options?: Parameters<typeof customFetch>[1]): Promise<PublishFlowDefinition201> => {
2798
2566
 
2799
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2800
- if (!h) return {};
2801
- if (h instanceof Headers) return Object.fromEntries(h.entries());
2802
- if (Symbol.iterator in h) {
2803
- return Object.fromEntries(
2804
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2805
- );
2806
- }
2807
- const headers: Record<string, string | readonly string[]> = {};
2808
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2809
- if (value !== undefined) headers[name] = value;
2810
- }
2811
- return headers;
2812
- };
2813
- return customFetch<PublishFlowDefinition201>(getPublishFlowDefinitionUrl(),
2567
+ return customFetch<PublishFlowDefinition201>(getPublishFlowDefinitionUrl(),
2814
2568
  {
2815
2569
  ...options,
2816
2570
  method: 'POST',
2817
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2571
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2818
2572
  body: JSON.stringify(publishFlowDefinitionBody)
2819
2573
  }
2820
2574
  );}
@@ -2918,25 +2672,11 @@ export const getCreateTeamUrl = (params: CreateTeamParams,) => {
2918
2672
  export const createTeam = async (createTeamBody: CreateTeamBody,
2919
2673
  params: CreateTeamParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateTeam201> => {
2920
2674
 
2921
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2922
- if (!h) return {};
2923
- if (h instanceof Headers) return Object.fromEntries(h.entries());
2924
- if (Symbol.iterator in h) {
2925
- return Object.fromEntries(
2926
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2927
- );
2928
- }
2929
- const headers: Record<string, string | readonly string[]> = {};
2930
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2931
- if (value !== undefined) headers[name] = value;
2932
- }
2933
- return headers;
2934
- };
2935
- return customFetch<CreateTeam201>(getCreateTeamUrl(params),
2675
+ return customFetch<CreateTeam201>(getCreateTeamUrl(params),
2936
2676
  {
2937
2677
  ...options,
2938
2678
  method: 'POST',
2939
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2679
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2940
2680
  body: JSON.stringify(createTeamBody)
2941
2681
  }
2942
2682
  );}
@@ -2969,25 +2709,11 @@ export const getQueryTeamsUrl = (params?: QueryTeamsParams,) => {
2969
2709
  export const queryTeams = async (queryTeamsBody: QueryTeamsBody,
2970
2710
  params?: QueryTeamsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryTeams200> => {
2971
2711
 
2972
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
2973
- if (!h) return {};
2974
- if (h instanceof Headers) return Object.fromEntries(h.entries());
2975
- if (Symbol.iterator in h) {
2976
- return Object.fromEntries(
2977
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
2978
- );
2979
- }
2980
- const headers: Record<string, string | readonly string[]> = {};
2981
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
2982
- if (value !== undefined) headers[name] = value;
2983
- }
2984
- return headers;
2985
- };
2986
- return customFetch<QueryTeams200>(getQueryTeamsUrl(params),
2712
+ return customFetch<QueryTeams200>(getQueryTeamsUrl(params),
2987
2713
  {
2988
2714
  ...options,
2989
2715
  method: 'POST',
2990
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2716
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
2991
2717
  body: JSON.stringify(queryTeamsBody)
2992
2718
  }
2993
2719
  );}
@@ -3077,25 +2803,11 @@ export const getUpdateTeamUrl = (teamId: string,) => {
3077
2803
  export const updateTeam = async (teamId: string,
3078
2804
  updateTeamBody: UpdateTeamBody, options?: Parameters<typeof customFetch>[1]): Promise<UpdateTeam200> => {
3079
2805
 
3080
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3081
- if (!h) return {};
3082
- if (h instanceof Headers) return Object.fromEntries(h.entries());
3083
- if (Symbol.iterator in h) {
3084
- return Object.fromEntries(
3085
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3086
- );
3087
- }
3088
- const headers: Record<string, string | readonly string[]> = {};
3089
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3090
- if (value !== undefined) headers[name] = value;
3091
- }
3092
- return headers;
3093
- };
3094
- return customFetch<UpdateTeam200>(getUpdateTeamUrl(teamId),
2806
+ return customFetch<UpdateTeam200>(getUpdateTeamUrl(teamId),
3095
2807
  {
3096
2808
  ...options,
3097
2809
  method: 'PATCH',
3098
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2810
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
3099
2811
  body: JSON.stringify(updateTeamBody)
3100
2812
  }
3101
2813
  );}
@@ -3168,25 +2880,11 @@ export const getSearchUrl = (params?: SearchParams,) => {
3168
2880
  export const search = async (searchBody: SearchBody,
3169
2881
  params?: SearchParams, options?: Parameters<typeof customFetch>[1]): Promise<Search200> => {
3170
2882
 
3171
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3172
- if (!h) return {};
3173
- if (h instanceof Headers) return Object.fromEntries(h.entries());
3174
- if (Symbol.iterator in h) {
3175
- return Object.fromEntries(
3176
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3177
- );
3178
- }
3179
- const headers: Record<string, string | readonly string[]> = {};
3180
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3181
- if (value !== undefined) headers[name] = value;
3182
- }
3183
- return headers;
3184
- };
3185
- return customFetch<Search200>(getSearchUrl(params),
2883
+ return customFetch<Search200>(getSearchUrl(params),
3186
2884
  {
3187
2885
  ...options,
3188
2886
  method: 'POST',
3189
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2887
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
3190
2888
  body: JSON.stringify(searchBody)
3191
2889
  }
3192
2890
  );}
@@ -3226,25 +2924,11 @@ export const getPublishBrandingUrl = (params: PublishBrandingParams,) => {
3226
2924
  export const publishBranding = async (publishBrandingBody: PublishBrandingBody,
3227
2925
  params: PublishBrandingParams, options?: Parameters<typeof customFetch>[1]): Promise<PublishBranding201> => {
3228
2926
 
3229
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3230
- if (!h) return {};
3231
- if (h instanceof Headers) return Object.fromEntries(h.entries());
3232
- if (Symbol.iterator in h) {
3233
- return Object.fromEntries(
3234
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3235
- );
3236
- }
3237
- const headers: Record<string, string | readonly string[]> = {};
3238
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3239
- if (value !== undefined) headers[name] = value;
3240
- }
3241
- return headers;
3242
- };
3243
- return customFetch<PublishBranding201>(getPublishBrandingUrl(params),
2927
+ return customFetch<PublishBranding201>(getPublishBrandingUrl(params),
3244
2928
  {
3245
2929
  ...options,
3246
2930
  method: 'POST',
3247
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
2931
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
3248
2932
  body: JSON.stringify(publishBrandingBody)
3249
2933
  }
3250
2934
  );}
@@ -3403,25 +3087,11 @@ export const getPublishIdpUrl = (params: PublishIdpParams,) => {
3403
3087
  export const publishIdp = async (publishIdpBody: PublishIdpBody,
3404
3088
  params: PublishIdpParams, options?: Parameters<typeof customFetch>[1]): Promise<PublishIdp200 | PublishIdp201> => {
3405
3089
 
3406
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3407
- if (!h) return {};
3408
- if (h instanceof Headers) return Object.fromEntries(h.entries());
3409
- if (Symbol.iterator in h) {
3410
- return Object.fromEntries(
3411
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3412
- );
3413
- }
3414
- const headers: Record<string, string | readonly string[]> = {};
3415
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3416
- if (value !== undefined) headers[name] = value;
3417
- }
3418
- return headers;
3419
- };
3420
- return customFetch<PublishIdp200 | PublishIdp201>(getPublishIdpUrl(params),
3090
+ return customFetch<PublishIdp200 | PublishIdp201>(getPublishIdpUrl(params),
3421
3091
  {
3422
3092
  ...options,
3423
3093
  method: 'POST',
3424
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3094
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
3425
3095
  body: JSON.stringify(publishIdpBody)
3426
3096
  }
3427
3097
  );}
@@ -3452,25 +3122,11 @@ export const getQueryIdpsUrl = (params: QueryIdpsParams,) => {
3452
3122
  export const queryIdps = async (queryIdpsBody: QueryIdpsBody,
3453
3123
  params: QueryIdpsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryIdps200> => {
3454
3124
 
3455
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3456
- if (!h) return {};
3457
- if (h instanceof Headers) return Object.fromEntries(h.entries());
3458
- if (Symbol.iterator in h) {
3459
- return Object.fromEntries(
3460
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3461
- );
3462
- }
3463
- const headers: Record<string, string | readonly string[]> = {};
3464
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3465
- if (value !== undefined) headers[name] = value;
3466
- }
3467
- return headers;
3468
- };
3469
- return customFetch<QueryIdps200>(getQueryIdpsUrl(params),
3125
+ return customFetch<QueryIdps200>(getQueryIdpsUrl(params),
3470
3126
  {
3471
3127
  ...options,
3472
3128
  method: 'POST',
3473
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3129
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
3474
3130
  body: JSON.stringify(queryIdpsBody)
3475
3131
  }
3476
3132
  );}
@@ -3643,25 +3299,11 @@ export const getPublishApplicationUrl = (params: PublishApplicationParams,) => {
3643
3299
  export const publishApplication = async (publishApplicationBody: PublishApplicationBody,
3644
3300
  params: PublishApplicationParams, options?: Parameters<typeof customFetch>[1]): Promise<PublishApplication200 | PublishApplication201> => {
3645
3301
 
3646
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3647
- if (!h) return {};
3648
- if (h instanceof Headers) return Object.fromEntries(h.entries());
3649
- if (Symbol.iterator in h) {
3650
- return Object.fromEntries(
3651
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3652
- );
3653
- }
3654
- const headers: Record<string, string | readonly string[]> = {};
3655
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3656
- if (value !== undefined) headers[name] = value;
3657
- }
3658
- return headers;
3659
- };
3660
- return customFetch<PublishApplication200 | PublishApplication201>(getPublishApplicationUrl(params),
3302
+ return customFetch<PublishApplication200 | PublishApplication201>(getPublishApplicationUrl(params),
3661
3303
  {
3662
3304
  ...options,
3663
3305
  method: 'POST',
3664
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3306
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
3665
3307
  body: JSON.stringify(publishApplicationBody)
3666
3308
  }
3667
3309
  );}
@@ -3794,25 +3436,11 @@ export const getPublishPolicyUrl = (params: PublishPolicyParams,) => {
3794
3436
  export const publishPolicy = async (publishPolicyBody: PublishPolicyBody,
3795
3437
  params: PublishPolicyParams, options?: Parameters<typeof customFetch>[1]): Promise<PublishPolicy201> => {
3796
3438
 
3797
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3798
- if (!h) return {};
3799
- if (h instanceof Headers) return Object.fromEntries(h.entries());
3800
- if (Symbol.iterator in h) {
3801
- return Object.fromEntries(
3802
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3803
- );
3804
- }
3805
- const headers: Record<string, string | readonly string[]> = {};
3806
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3807
- if (value !== undefined) headers[name] = value;
3808
- }
3809
- return headers;
3810
- };
3811
- return customFetch<PublishPolicy201>(getPublishPolicyUrl(params),
3439
+ return customFetch<PublishPolicy201>(getPublishPolicyUrl(params),
3812
3440
  {
3813
3441
  ...options,
3814
3442
  method: 'POST',
3815
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3443
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
3816
3444
  body: JSON.stringify(publishPolicyBody)
3817
3445
  }
3818
3446
  );}
@@ -3864,25 +3492,11 @@ export const getEvaluatePolicyUrl = (params: EvaluatePolicyParams,) => {
3864
3492
  export const evaluatePolicy = async (evaluatePolicyBody: EvaluatePolicyBody,
3865
3493
  params: EvaluatePolicyParams, options?: Parameters<typeof customFetch>[1]): Promise<EvaluatePolicy200> => {
3866
3494
 
3867
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
3868
- if (!h) return {};
3869
- if (h instanceof Headers) return Object.fromEntries(h.entries());
3870
- if (Symbol.iterator in h) {
3871
- return Object.fromEntries(
3872
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
3873
- );
3874
- }
3875
- const headers: Record<string, string | readonly string[]> = {};
3876
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
3877
- if (value !== undefined) headers[name] = value;
3878
- }
3879
- return headers;
3880
- };
3881
- return customFetch<EvaluatePolicy200>(getEvaluatePolicyUrl(params),
3495
+ return customFetch<EvaluatePolicy200>(getEvaluatePolicyUrl(params),
3882
3496
  {
3883
3497
  ...options,
3884
3498
  method: 'POST',
3885
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3499
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
3886
3500
  body: JSON.stringify(evaluatePolicyBody)
3887
3501
  }
3888
3502
  );}
@@ -4060,25 +3674,11 @@ export const getCreateReleaseUrl = (params: CreateReleaseParams,) => {
4060
3674
  export const createRelease = async (createReleaseBody: CreateReleaseBody,
4061
3675
  params: CreateReleaseParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateRelease200 | CreateRelease201> => {
4062
3676
 
4063
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
4064
- if (!h) return {};
4065
- if (h instanceof Headers) return Object.fromEntries(h.entries());
4066
- if (Symbol.iterator in h) {
4067
- return Object.fromEntries(
4068
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
4069
- );
4070
- }
4071
- const headers: Record<string, string | readonly string[]> = {};
4072
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
4073
- if (value !== undefined) headers[name] = value;
4074
- }
4075
- return headers;
4076
- };
4077
- return customFetch<CreateRelease200 | CreateRelease201>(getCreateReleaseUrl(params),
3677
+ return customFetch<CreateRelease200 | CreateRelease201>(getCreateReleaseUrl(params),
4078
3678
  {
4079
3679
  ...options,
4080
3680
  method: 'POST',
4081
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3681
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
4082
3682
  body: JSON.stringify(createReleaseBody)
4083
3683
  }
4084
3684
  );}
@@ -4189,25 +3789,11 @@ export const getBuildReleaseUrl = (params: BuildReleaseParams,) => {
4189
3789
  export const buildRelease = async (buildReleaseBody: BuildReleaseBody,
4190
3790
  params: BuildReleaseParams, options?: Parameters<typeof customFetch>[1]): Promise<BuildRelease200 | BuildRelease201> => {
4191
3791
 
4192
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
4193
- if (!h) return {};
4194
- if (h instanceof Headers) return Object.fromEntries(h.entries());
4195
- if (Symbol.iterator in h) {
4196
- return Object.fromEntries(
4197
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
4198
- );
4199
- }
4200
- const headers: Record<string, string | readonly string[]> = {};
4201
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
4202
- if (value !== undefined) headers[name] = value;
4203
- }
4204
- return headers;
4205
- };
4206
- return customFetch<BuildRelease200 | BuildRelease201>(getBuildReleaseUrl(params),
3792
+ return customFetch<BuildRelease200 | BuildRelease201>(getBuildReleaseUrl(params),
4207
3793
  {
4208
3794
  ...options,
4209
3795
  method: 'POST',
4210
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3796
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
4211
3797
  body: JSON.stringify(buildReleaseBody)
4212
3798
  }
4213
3799
  );}
@@ -4366,25 +3952,11 @@ export const getCreateGrantUrl = (params: CreateGrantParams,) => {
4366
3952
  export const createGrant = async (createGrantBody: CreateGrantBody,
4367
3953
  params: CreateGrantParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateGrant201 | void> => {
4368
3954
 
4369
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
4370
- if (!h) return {};
4371
- if (h instanceof Headers) return Object.fromEntries(h.entries());
4372
- if (Symbol.iterator in h) {
4373
- return Object.fromEntries(
4374
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
4375
- );
4376
- }
4377
- const headers: Record<string, string | readonly string[]> = {};
4378
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
4379
- if (value !== undefined) headers[name] = value;
4380
- }
4381
- return headers;
4382
- };
4383
- return customFetch<CreateGrant201 | void>(getCreateGrantUrl(params),
3955
+ return customFetch<CreateGrant201 | void>(getCreateGrantUrl(params),
4384
3956
  {
4385
3957
  ...options,
4386
3958
  method: 'POST',
4387
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
3959
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
4388
3960
  body: JSON.stringify(createGrantBody)
4389
3961
  }
4390
3962
  );}
@@ -4426,25 +3998,11 @@ export const getQueryGrantsUrl = (params: QueryGrantsParams,) => {
4426
3998
  export const queryGrants = async (queryGrantsBody: QueryGrantsBody,
4427
3999
  params: QueryGrantsParams, options?: Parameters<typeof customFetch>[1]): Promise<QueryGrants200> => {
4428
4000
 
4429
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
4430
- if (!h) return {};
4431
- if (h instanceof Headers) return Object.fromEntries(h.entries());
4432
- if (Symbol.iterator in h) {
4433
- return Object.fromEntries(
4434
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
4435
- );
4436
- }
4437
- const headers: Record<string, string | readonly string[]> = {};
4438
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
4439
- if (value !== undefined) headers[name] = value;
4440
- }
4441
- return headers;
4442
- };
4443
- return customFetch<QueryGrants200>(getQueryGrantsUrl(params),
4001
+ return customFetch<QueryGrants200>(getQueryGrantsUrl(params),
4444
4002
  {
4445
4003
  ...options,
4446
4004
  method: 'POST',
4447
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
4005
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
4448
4006
  body: JSON.stringify(queryGrantsBody)
4449
4007
  }
4450
4008
  );}
@@ -4590,25 +4148,11 @@ export const getCreateInvitationUrl = (params: CreateInvitationParams,) => {
4590
4148
  export const createInvitation = async (createInvitationBody: CreateInvitationBody,
4591
4149
  params: CreateInvitationParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateInvitation201> => {
4592
4150
 
4593
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
4594
- if (!h) return {};
4595
- if (h instanceof Headers) return Object.fromEntries(h.entries());
4596
- if (Symbol.iterator in h) {
4597
- return Object.fromEntries(
4598
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
4599
- );
4600
- }
4601
- const headers: Record<string, string | readonly string[]> = {};
4602
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
4603
- if (value !== undefined) headers[name] = value;
4604
- }
4605
- return headers;
4606
- };
4607
- return customFetch<CreateInvitation201>(getCreateInvitationUrl(params),
4151
+ return customFetch<CreateInvitation201>(getCreateInvitationUrl(params),
4608
4152
  {
4609
4153
  ...options,
4610
4154
  method: 'POST',
4611
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
4155
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
4612
4156
  body: JSON.stringify(createInvitationBody)
4613
4157
  }
4614
4158
  );}
@@ -4619,6 +4163,14 @@ export const getListInvitationsUrl = (params: ListInvitationsParams,) => {
4619
4163
  const normalizedParams = new URLSearchParams();
4620
4164
 
4621
4165
  Object.entries(params || {}).forEach(([key, value]) => {
4166
+ const explodeParameters = ["status","expand"];
4167
+
4168
+ if (Array.isArray(value) && explodeParameters.includes(key)) {
4169
+ value.forEach((v) => {
4170
+ normalizedParams.append(key, v === null ? 'null' : String(v));
4171
+ });
4172
+ return;
4173
+ }
4622
4174
 
4623
4175
  if (value !== undefined) {
4624
4176
  normalizedParams.append(key, value === null ? 'null' : String(value))
@@ -4634,8 +4186,11 @@ export const getListInvitationsUrl = (params: ListInvitationsParams,) => {
4634
4186
  * Lists a project's invitations, newest first, in any status, paginated with
4635
4187
  * `limit` and `page_token`.
4636
4188
  *
4637
- * Optional `status` and `type` filters narrow the page. `expired` is derived
4638
- * on read from `expires_at`. Authenticate with a project secret (`oauth2`) or
4189
+ * Optional `status` and `type` filters narrow the page. Repeat `status` to
4190
+ * match any of several statuses, for example
4191
+ * `status=pending&status=expired&status=rejected`. `expired` is derived on
4192
+ * read from `expires_at`. `expand=inviter` adds `inviter` to each
4193
+ * invitation. Authenticate with a project secret (`oauth2`) or
4639
4194
  * a console session cookie (`sessionCookie`). Listing needs the same project
4640
4195
  * `admin` check as `createGrant` (`POST /grants`).
4641
4196
  * @summary List invitations
@@ -4669,30 +4224,16 @@ export const getLookupInvitationUrl = () => {
4669
4224
  * or finished token answers the same opaque `404`. Authenticate with a
4670
4225
  * platform-project user session cookie (`sessionCookie`). Lookup is a read:
4671
4226
  * same-origin cookie requests need no `X-Zitadel-CSRF` token (accept and
4672
- * reject still do). The call is rate-limited.
4227
+ * reject still do).
4673
4228
  * @summary Look up an invitation by token
4674
4229
  */
4675
4230
  export const lookupInvitation = async (lookupInvitationBody: LookupInvitationBody, options?: Parameters<typeof customFetch>[1]): Promise<LookupInvitation200> => {
4676
4231
 
4677
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
4678
- if (!h) return {};
4679
- if (h instanceof Headers) return Object.fromEntries(h.entries());
4680
- if (Symbol.iterator in h) {
4681
- return Object.fromEntries(
4682
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
4683
- );
4684
- }
4685
- const headers: Record<string, string | readonly string[]> = {};
4686
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
4687
- if (value !== undefined) headers[name] = value;
4688
- }
4689
- return headers;
4690
- };
4691
- return customFetch<LookupInvitation200>(getLookupInvitationUrl(),
4232
+ return customFetch<LookupInvitation200>(getLookupInvitationUrl(),
4692
4233
  {
4693
4234
  ...options,
4694
4235
  method: 'POST',
4695
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
4236
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
4696
4237
  body: JSON.stringify(lookupInvitationBody)
4697
4238
  }
4698
4239
  );}
@@ -4719,30 +4260,16 @@ export const getAcceptInvitationUrl = () => {
4719
4260
  * answers the same opaque `404`.
4720
4261
  *
4721
4262
  * Authenticate with a platform-project user session cookie (`sessionCookie`).
4722
- * Cookie requests follow that scheme's CSRF rules. The call is rate-limited.
4263
+ * Cookie requests follow that scheme's CSRF rules.
4723
4264
  * @summary Accept an invitation
4724
4265
  */
4725
4266
  export const acceptInvitation = async (acceptInvitationBody: AcceptInvitationBody, options?: Parameters<typeof customFetch>[1]): Promise<AcceptInvitation200> => {
4726
4267
 
4727
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
4728
- if (!h) return {};
4729
- if (h instanceof Headers) return Object.fromEntries(h.entries());
4730
- if (Symbol.iterator in h) {
4731
- return Object.fromEntries(
4732
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
4733
- );
4734
- }
4735
- const headers: Record<string, string | readonly string[]> = {};
4736
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
4737
- if (value !== undefined) headers[name] = value;
4738
- }
4739
- return headers;
4740
- };
4741
- return customFetch<AcceptInvitation200>(getAcceptInvitationUrl(),
4268
+ return customFetch<AcceptInvitation200>(getAcceptInvitationUrl(),
4742
4269
  {
4743
4270
  ...options,
4744
4271
  method: 'POST',
4745
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
4272
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
4746
4273
  body: JSON.stringify(acceptInvitationBody)
4747
4274
  }
4748
4275
  );}
@@ -4761,33 +4288,22 @@ export const getRejectInvitationUrl = () => {
4761
4288
  * Declines a pending invitation for the signed-in user and returns the
4762
4289
  * updated invitation with status `rejected`.
4763
4290
  *
4764
- * Send the plaintext token from the invitation link fragment. Metadata is
4765
- * cleared. Every unknown or finished token answers the same opaque `404`.
4291
+ * Send the plaintext token from the invitation link fragment. The
4292
+ * invitation keeps its metadata for administrators, but this response
4293
+ * returns `metadata` as null. The inviter cannot decline their own invitation; an administrator
4294
+ * cancels it instead. Every unknown or finished token answers the same
4295
+ * opaque `404`.
4766
4296
  * Authenticate with a platform-project user session cookie (`sessionCookie`).
4767
- * Cookie requests follow that scheme's CSRF rules. The call is rate-limited.
4297
+ * Cookie requests follow that scheme's CSRF rules.
4768
4298
  * @summary Decline an invitation
4769
4299
  */
4770
4300
  export const rejectInvitation = async (rejectInvitationBody: RejectInvitationBody, options?: Parameters<typeof customFetch>[1]): Promise<RejectInvitation200> => {
4771
4301
 
4772
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
4773
- if (!h) return {};
4774
- if (h instanceof Headers) return Object.fromEntries(h.entries());
4775
- if (Symbol.iterator in h) {
4776
- return Object.fromEntries(
4777
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
4778
- );
4779
- }
4780
- const headers: Record<string, string | readonly string[]> = {};
4781
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
4782
- if (value !== undefined) headers[name] = value;
4783
- }
4784
- return headers;
4785
- };
4786
- return customFetch<RejectInvitation200>(getRejectInvitationUrl(),
4302
+ return customFetch<RejectInvitation200>(getRejectInvitationUrl(),
4787
4303
  {
4788
4304
  ...options,
4789
4305
  method: 'POST',
4790
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
4306
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
4791
4307
  body: JSON.stringify(rejectInvitationBody)
4792
4308
  }
4793
4309
  );}
@@ -4850,10 +4366,9 @@ export const getCancelInvitationUrl = (invitationId: string,
4850
4366
  }
4851
4367
 
4852
4368
  /**
4853
- * Deletes a pending invitation. Its link can no longer be redeemed. Only a
4854
- * `pending` invitation can be cancelled; a finished invitation answers the
4855
- * same opaque `404` as a miss. Expired invitations keep their row until a
4856
- * later cleanup job removes them.
4369
+ * Deletes a pending, expired or rejected invitation, with its metadata. A
4370
+ * pending invitation's link can no longer be redeemed. An accepted
4371
+ * invitation answers the same opaque `404` as a miss.
4857
4372
  *
4858
4373
  * Authenticate with a project secret (`oauth2`) or a console session cookie
4859
4374
  * (`sessionCookie`). Cancelling needs the same project `admin` check as
@@ -5059,25 +4574,11 @@ export const getSetVariablesUrl = (params: SetVariablesParams,) => {
5059
4574
  export const setVariables = async (setVariablesBody: SetVariablesBody,
5060
4575
  params: SetVariablesParams, options?: Parameters<typeof customFetch>[1]): Promise<SetVariables200> => {
5061
4576
 
5062
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
5063
- if (!h) return {};
5064
- if (h instanceof Headers) return Object.fromEntries(h.entries());
5065
- if (Symbol.iterator in h) {
5066
- return Object.fromEntries(
5067
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
5068
- );
5069
- }
5070
- const headers: Record<string, string | readonly string[]> = {};
5071
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
5072
- if (value !== undefined) headers[name] = value;
5073
- }
5074
- return headers;
5075
- };
5076
- return customFetch<SetVariables200>(getSetVariablesUrl(params),
4577
+ return customFetch<SetVariables200>(getSetVariablesUrl(params),
5077
4578
  {
5078
4579
  ...options,
5079
4580
  method: 'PATCH',
5080
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
4581
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
5081
4582
  body: JSON.stringify(setVariablesBody)
5082
4583
  }
5083
4584
  );}
@@ -5238,25 +4739,11 @@ export const getCreateDeploymentUrl = (params: CreateDeploymentParams,) => {
5238
4739
  export const createDeployment = async (createDeploymentBody: CreateDeploymentBody,
5239
4740
  params: CreateDeploymentParams, options?: Parameters<typeof customFetch>[1]): Promise<CreateDeployment200 | CreateDeployment201> => {
5240
4741
 
5241
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
5242
- if (!h) return {};
5243
- if (h instanceof Headers) return Object.fromEntries(h.entries());
5244
- if (Symbol.iterator in h) {
5245
- return Object.fromEntries(
5246
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
5247
- );
5248
- }
5249
- const headers: Record<string, string | readonly string[]> = {};
5250
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
5251
- if (value !== undefined) headers[name] = value;
5252
- }
5253
- return headers;
5254
- };
5255
- return customFetch<CreateDeployment200 | CreateDeployment201>(getCreateDeploymentUrl(params),
4742
+ return customFetch<CreateDeployment200 | CreateDeployment201>(getCreateDeploymentUrl(params),
5256
4743
  {
5257
4744
  ...options,
5258
4745
  method: 'POST',
5259
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
4746
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
5260
4747
  body: JSON.stringify(createDeploymentBody)
5261
4748
  }
5262
4749
  );}
@@ -5432,25 +4919,11 @@ export const rollbackDeployment = async (deploymentId: string,
5432
4919
  params: RollbackDeploymentParams,
5433
4920
  rollbackDeploymentBody?: RollbackDeploymentBody, options?: Parameters<typeof customFetch>[1]): Promise<RollbackDeployment200 | RollbackDeployment201> => {
5434
4921
 
5435
- const getHeaders = (h?: NonNullable<RequestInit['headers']>): Record<string, string | readonly string[]> => {
5436
- if (!h) return {};
5437
- if (h instanceof Headers) return Object.fromEntries(h.entries());
5438
- if (Symbol.iterator in h) {
5439
- return Object.fromEntries(
5440
- Array.from(h as Iterable<Iterable<string>>, (entry) => Array.from(entry) as [string, string]),
5441
- );
5442
- }
5443
- const headers: Record<string, string | readonly string[]> = {};
5444
- for (const [name, value] of Object.entries<string | readonly string[] | undefined>(h)) {
5445
- if (value !== undefined) headers[name] = value;
5446
- }
5447
- return headers;
5448
- };
5449
- return customFetch<RollbackDeployment200 | RollbackDeployment201>(getRollbackDeploymentUrl(deploymentId,params),
4922
+ return customFetch<RollbackDeployment200 | RollbackDeployment201>(getRollbackDeploymentUrl(deploymentId,params),
5450
4923
  {
5451
4924
  ...options,
5452
4925
  method: 'POST',
5453
- headers: { 'Content-Type': 'application/json', ...getHeaders(options?.headers) },
4926
+ headers: getHeaders({ 'Content-Type': 'application/json' }, options?.headers),
5454
4927
  body: JSON.stringify(rollbackDeploymentBody)
5455
4928
  }
5456
4929
  );}