@leaflow/sdk 0.0.0-dev.513.g3807ace → 0.0.0-dev.516.g28eeab9

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 (162) hide show
  1. package/dist/account/v1/generated/functions.d.ts +117 -1
  2. package/dist/account/v1/generated/functions.js +104 -0
  3. package/dist/account/v1/generated/models.d.ts +85 -0
  4. package/dist/account/v1/generated/models.js +9 -0
  5. package/dist/account/v1/generated/schemas.zod.d.ts +68 -0
  6. package/dist/account/v1/generated/schemas.zod.js +76 -0
  7. package/dist/account/v1/generated/validators/acceptConsentsRequestBody.zod.d.ts +18 -0
  8. package/dist/account/v1/generated/validators/acceptConsentsRequestBody.zod.js +18 -0
  9. package/dist/account/v1/generated/validators/acceptInvitationByTokenRequestBody.zod.d.ts +18 -0
  10. package/dist/account/v1/generated/validators/acceptInvitationByTokenRequestBody.zod.js +18 -0
  11. package/dist/account/v1/generated/validators/acceptedInvitationResponseBody.zod.d.ts +18 -0
  12. package/dist/account/v1/generated/validators/acceptedInvitationResponseBody.zod.js +18 -0
  13. package/dist/account/v1/generated/validators/accountDeletionObjectionResource.zod.d.ts +18 -0
  14. package/dist/account/v1/generated/validators/accountDeletionObjectionResource.zod.js +18 -0
  15. package/dist/account/v1/generated/validators/accountDeletionResource.zod.d.ts +18 -0
  16. package/dist/account/v1/generated/validators/accountDeletionResource.zod.js +18 -0
  17. package/dist/account/v1/generated/validators/accountDeletionState.zod.d.ts +18 -0
  18. package/dist/account/v1/generated/validators/accountDeletionState.zod.js +18 -0
  19. package/dist/account/v1/generated/validators/accountResource.zod.d.ts +18 -0
  20. package/dist/account/v1/generated/validators/accountResource.zod.js +18 -0
  21. package/dist/account/v1/generated/validators/agreementListResponseBody.zod.d.ts +18 -0
  22. package/dist/account/v1/generated/validators/agreementListResponseBody.zod.js +18 -0
  23. package/dist/account/v1/generated/validators/agreementResource.zod.d.ts +18 -0
  24. package/dist/account/v1/generated/validators/agreementResource.zod.js +18 -0
  25. package/dist/account/v1/generated/validators/applicationResource.zod.d.ts +60 -0
  26. package/dist/account/v1/generated/validators/applicationResource.zod.js +60 -0
  27. package/dist/account/v1/generated/validators/authorizeApplicationRequestBody.zod.d.ts +55 -0
  28. package/dist/account/v1/generated/validators/authorizeApplicationRequestBody.zod.js +53 -0
  29. package/dist/account/v1/generated/validators/authorizedApplicationResource.zod.d.ts +93 -0
  30. package/dist/account/v1/generated/validators/authorizedApplicationResource.zod.js +59 -0
  31. package/dist/account/v1/generated/validators/consentBody.zod.d.ts +18 -0
  32. package/dist/account/v1/generated/validators/consentBody.zod.js +18 -0
  33. package/dist/account/v1/generated/validators/consentListResponseBody.zod.d.ts +18 -0
  34. package/dist/account/v1/generated/validators/consentListResponseBody.zod.js +18 -0
  35. package/dist/account/v1/generated/validators/consentResource.zod.d.ts +18 -0
  36. package/dist/account/v1/generated/validators/consentResource.zod.js +18 -0
  37. package/dist/account/v1/generated/validators/countryOption.zod.d.ts +18 -0
  38. package/dist/account/v1/generated/validators/countryOption.zod.js +18 -0
  39. package/dist/account/v1/generated/validators/createProjectRequestBody.zod.d.ts +18 -0
  40. package/dist/account/v1/generated/validators/createProjectRequestBody.zod.js +18 -0
  41. package/dist/account/v1/generated/validators/createSSHKeyRequestBody.zod.d.ts +18 -0
  42. package/dist/account/v1/generated/validators/createSSHKeyRequestBody.zod.js +18 -0
  43. package/dist/account/v1/generated/validators/cursorPagination.zod.d.ts +18 -0
  44. package/dist/account/v1/generated/validators/cursorPagination.zod.js +18 -0
  45. package/dist/account/v1/generated/validators/error.zod.d.ts +18 -0
  46. package/dist/account/v1/generated/validators/error.zod.js +18 -0
  47. package/dist/account/v1/generated/validators/errorStatus.zod.d.ts +18 -0
  48. package/dist/account/v1/generated/validators/errorStatus.zod.js +18 -0
  49. package/dist/account/v1/generated/validators/fieldViolation.zod.d.ts +18 -0
  50. package/dist/account/v1/generated/validators/fieldViolation.zod.js +18 -0
  51. package/dist/account/v1/generated/validators/grantResource.zod.d.ts +18 -0
  52. package/dist/account/v1/generated/validators/grantResource.zod.js +18 -0
  53. package/dist/account/v1/generated/validators/identityVerificationResource.zod.d.ts +18 -0
  54. package/dist/account/v1/generated/validators/identityVerificationResource.zod.js +18 -0
  55. package/dist/account/v1/generated/validators/invitationPreviewResource.zod.d.ts +18 -0
  56. package/dist/account/v1/generated/validators/invitationPreviewResource.zod.js +18 -0
  57. package/dist/account/v1/generated/validators/invitationResource.zod.d.ts +18 -0
  58. package/dist/account/v1/generated/validators/invitationResource.zod.js +18 -0
  59. package/dist/account/v1/generated/validators/languageOption.zod.d.ts +18 -0
  60. package/dist/account/v1/generated/validators/languageOption.zod.js +18 -0
  61. package/dist/account/v1/generated/validators/lengthAwarePageAuthorizedApplicationResource.zod.d.ts +98 -0
  62. package/dist/account/v1/generated/validators/lengthAwarePageAuthorizedApplicationResource.zod.js +55 -0
  63. package/dist/account/v1/generated/validators/lengthAwarePageInvitationResource.zod.d.ts +18 -0
  64. package/dist/account/v1/generated/validators/lengthAwarePageInvitationResource.zod.js +18 -0
  65. package/dist/account/v1/generated/validators/lengthAwarePageProjectAccessResource.zod.d.ts +18 -0
  66. package/dist/account/v1/generated/validators/lengthAwarePageProjectAccessResource.zod.js +18 -0
  67. package/dist/account/v1/generated/validators/lengthAwarePageSSHKeyResource.zod.d.ts +18 -0
  68. package/dist/account/v1/generated/validators/lengthAwarePageSSHKeyResource.zod.js +18 -0
  69. package/dist/account/v1/generated/validators/listAuthorizedApplicationsParams.zod.d.ts +59 -0
  70. package/dist/account/v1/generated/validators/listAuthorizedApplicationsParams.zod.js +65 -0
  71. package/dist/account/v1/generated/validators/listMyInvitationsParams.zod.d.ts +18 -0
  72. package/dist/account/v1/generated/validators/listMyInvitationsParams.zod.js +18 -0
  73. package/dist/account/v1/generated/validators/listProjectsParams.zod.d.ts +18 -0
  74. package/dist/account/v1/generated/validators/listProjectsParams.zod.js +18 -0
  75. package/dist/account/v1/generated/validators/listSshKeysParams.zod.d.ts +18 -0
  76. package/dist/account/v1/generated/validators/listSshKeysParams.zod.js +18 -0
  77. package/dist/account/v1/generated/validators/locale.zod.d.ts +18 -0
  78. package/dist/account/v1/generated/validators/locale.zod.js +18 -0
  79. package/dist/account/v1/generated/validators/localeOptionsResource.zod.d.ts +18 -0
  80. package/dist/account/v1/generated/validators/localeOptionsResource.zod.js +18 -0
  81. package/dist/account/v1/generated/validators/offsetPagination.zod.d.ts +18 -0
  82. package/dist/account/v1/generated/validators/offsetPagination.zod.js +18 -0
  83. package/dist/account/v1/generated/validators/previewInvitationByTokenParams.zod.d.ts +18 -0
  84. package/dist/account/v1/generated/validators/previewInvitationByTokenParams.zod.js +18 -0
  85. package/dist/account/v1/generated/validators/projectAccessList.zod.d.ts +18 -0
  86. package/dist/account/v1/generated/validators/projectAccessList.zod.js +18 -0
  87. package/dist/account/v1/generated/validators/projectAccessResource.zod.d.ts +18 -0
  88. package/dist/account/v1/generated/validators/projectAccessResource.zod.js +18 -0
  89. package/dist/account/v1/generated/validators/projectResource.zod.d.ts +18 -0
  90. package/dist/account/v1/generated/validators/projectResource.zod.js +18 -0
  91. package/dist/account/v1/generated/validators/projectSlugAvailabilityResource.zod.d.ts +18 -0
  92. package/dist/account/v1/generated/validators/projectSlugAvailabilityResource.zod.js +18 -0
  93. package/dist/account/v1/generated/validators/projectStatus.zod.d.ts +18 -0
  94. package/dist/account/v1/generated/validators/projectStatus.zod.js +18 -0
  95. package/dist/account/v1/generated/validators/projectTraitResource.zod.d.ts +18 -0
  96. package/dist/account/v1/generated/validators/projectTraitResource.zod.js +18 -0
  97. package/dist/account/v1/generated/validators/registerRequestBody.zod.d.ts +18 -0
  98. package/dist/account/v1/generated/validators/registerRequestBody.zod.js +18 -0
  99. package/dist/account/v1/generated/validators/renameSSHKeyRequestBody.zod.d.ts +18 -0
  100. package/dist/account/v1/generated/validators/renameSSHKeyRequestBody.zod.js +18 -0
  101. package/dist/account/v1/generated/validators/requestAccountDeletionParams.zod.d.ts +18 -0
  102. package/dist/account/v1/generated/validators/requestAccountDeletionParams.zod.js +18 -0
  103. package/dist/account/v1/generated/validators/resourceRefResource.zod.d.ts +18 -0
  104. package/dist/account/v1/generated/validators/resourceRefResource.zod.js +18 -0
  105. package/dist/account/v1/generated/validators/ruleResource.zod.d.ts +18 -0
  106. package/dist/account/v1/generated/validators/ruleResource.zod.js +18 -0
  107. package/dist/account/v1/generated/validators/sSHKeyResource.zod.d.ts +18 -0
  108. package/dist/account/v1/generated/validators/sSHKeyResource.zod.js +18 -0
  109. package/dist/account/v1/generated/validators/scopedTokenResponseBody.zod.d.ts +18 -0
  110. package/dist/account/v1/generated/validators/scopedTokenResponseBody.zod.js +18 -0
  111. package/dist/account/v1/generated/validators/searchProjectsRequestBody.zod.d.ts +18 -0
  112. package/dist/account/v1/generated/validators/searchProjectsRequestBody.zod.js +18 -0
  113. package/dist/account/v1/generated/validators/settingsResource.zod.d.ts +18 -0
  114. package/dist/account/v1/generated/validators/settingsResource.zod.js +18 -0
  115. package/dist/account/v1/generated/validators/submitIdentityVerificationRequestBody.zod.d.ts +18 -0
  116. package/dist/account/v1/generated/validators/submitIdentityVerificationRequestBody.zod.js +18 -0
  117. package/dist/account/v1/generated/validators/updateAccountRequestBody.zod.d.ts +18 -0
  118. package/dist/account/v1/generated/validators/updateAccountRequestBody.zod.js +18 -0
  119. package/dist/compute/v2/generated/functions.d.ts +4 -2
  120. package/dist/compute/v2/generated/functions.js +3 -18
  121. package/dist/compute/v2/generated/models.d.ts +28 -8
  122. package/dist/compute/v2/generated/schemas.zod.d.ts +6 -3
  123. package/dist/compute/v2/generated/schemas.zod.js +2 -2
  124. package/dist/compute/v2/generated/validators/createInstanceRequestBody.zod.d.ts +1 -0
  125. package/dist/compute/v2/generated/validators/createInstanceRequestBody.zod.js +4 -0
  126. package/dist/compute/v2/generated/validators/createInstanceResponseBody.zod.d.ts +3 -0
  127. package/dist/compute/v2/generated/validators/createLaunchTemplateRequestBody.zod.d.ts +1 -0
  128. package/dist/compute/v2/generated/validators/createLaunchTemplateResponseBody.zod.d.ts +1 -0
  129. package/dist/compute/v2/generated/validators/createPrivateImageResponseBody.zod.d.ts +1 -0
  130. package/dist/compute/v2/generated/validators/deleteInstanceResponseBody.zod.d.ts +3 -0
  131. package/dist/compute/v2/generated/validators/deletePrivateImageResponseBody.zod.d.ts +1 -0
  132. package/dist/compute/v2/generated/validators/instance.zod.d.ts +3 -0
  133. package/dist/compute/v2/generated/validators/instance.zod.js +10 -0
  134. package/dist/compute/v2/generated/validators/instanceListResponseBody.zod.d.ts +3 -0
  135. package/dist/compute/v2/generated/validators/launchTemplateVersion.zod.d.ts +1 -0
  136. package/dist/compute/v2/generated/validators/launchTemplateVersion.zod.js +4 -0
  137. package/dist/compute/v2/generated/validators/launchTemplateVersionListResponseBody.zod.d.ts +1 -0
  138. package/dist/compute/v2/generated/validators/newLaunchTemplateVersion.zod.d.ts +1 -0
  139. package/dist/compute/v2/generated/validators/newLaunchTemplateVersion.zod.js +4 -0
  140. package/dist/compute/v2/generated/validators/privateImageListResponseBody.zod.d.ts +1 -0
  141. package/dist/compute/v2/generated/validators/privateImageResource.zod.d.ts +1 -0
  142. package/dist/compute/v2/generated/validators/privateImageResource.zod.js +3 -0
  143. package/dist/compute/v2/generated/validators/publicImageListResponseBody.zod.d.ts +1 -0
  144. package/dist/compute/v2/generated/validators/publicImageResource.zod.d.ts +1 -0
  145. package/dist/compute/v2/generated/validators/publicImageResource.zod.js +3 -0
  146. package/dist/compute/v2/generated/validators/rebuildInstanceRequestBody.zod.d.ts +1 -0
  147. package/dist/compute/v2/generated/validators/rebuildInstanceRequestBody.zod.js +4 -0
  148. package/dist/compute/v2/generated/validators/rebuildInstanceResponseBody.zod.d.ts +3 -0
  149. package/dist/compute/v2/generated/validators/rescueInstanceResponseBody.zod.d.ts +3 -0
  150. package/dist/compute/v2/generated/validators/updateInstanceResponseBody.zod.d.ts +3 -0
  151. package/dist/iam/v1/generated/functions.d.ts +9 -2
  152. package/dist/iam/v1/generated/functions.js +9 -2
  153. package/dist/iam/v1/generated/models.d.ts +1 -1
  154. package/dist/iam/v1/generated/schemas.zod.d.ts +9 -2
  155. package/dist/iam/v1/generated/schemas.zod.js +9 -2
  156. package/dist/iam/v1/generated/validators/createApplicationRequestBody.zod.js +1 -1
  157. package/dist/proto/leaflow/fleet/virtualdesktop/datatransfer/v1/datatransfer_pb.d.ts +38 -1
  158. package/dist/routes.d.ts +32 -0
  159. package/dist/routes.js +36 -0
  160. package/package.json +1 -1
  161. package/dist/compute/v2/generated/validators/rescueInstanceRequestBody.zod.d.ts +0 -42
  162. package/dist/compute/v2/generated/validators/rescueInstanceRequestBody.zod.js +0 -44
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -16,6 +16,24 @@
16
16
  *
17
17
  * A scoped token cannot be renewed. Repeat step 2 for a new one, and sign in again at auth.leaflow.net once the access token itself has expired.
18
18
  *
19
+ * ## Applications
20
+ *
21
+ * An application registered by a project signs its users in at auth.leaflow.net in the same manner as any other OAuth client. To call the Leaflow API on behalf of a user, the application requests the `iam` scope, and the user must then authorize the application for each project in which it is to act:
22
+ *
23
+ * 1. The application directs the user to the authorization page of the console:
24
+ *
25
+ * ```
26
+ * https://console.leaflow.net/applications/authorize?client_id=<client_id>&redirect_uri=<redirect_uri>&state=<state>
27
+ * ```
28
+ *
29
+ * All three parameters are required. The `redirect_uri` is URL-encoded and must exactly match one of the redirect URIs registered for the application; a custom scheme registered for a public application is accepted in the same way. If a parameter is missing, if the `redirect_uri` does not match, or if the application does not exist or is not active, the page reports the problem to the user and does not redirect. A user who is not signed in, or who has not yet completed registration and accepted the agreements, does so first and then returns to the page.
30
+ * 2. The user selects a project and confirms the authorization. The console calls `POST /account/v1/me/authorized-applications` and returns the user to the `redirect_uri` with the query parameters `project_id` and `state`. If the user declines, the console returns the user to the `redirect_uri` with `error=access_denied` and `state`. In both cases the existing query parameters of the `redirect_uri` are retained, and a parameter of the same name is replaced. The application must verify that `state` equals the value it supplied before it uses the response.
31
+ * 3. The application exchanges its access token for a scoped token at `POST /account/v1/projects/{projectId}/scoped-tokens`, as described in the preceding section.
32
+ *
33
+ * Within an authorized project, the application holds exactly the permissions of the user in that project and none beyond them. The user may revoke an authorization at any time at https://console.leaflow.net/account/applications, and an authorization ends when the user leaves the project.
34
+ *
35
+ * An access token issued to an application is accepted only by `create-scoped-token`, `list-authorized-applications` and `revoke-authorized-application`. Every other endpoint rejects it with 403 `APPLICATION_TOKEN_NOT_ACCEPTED`; consequently, an application cannot authorize itself.
36
+ *
19
37
  * ## SSH keys
20
38
  *
21
39
  * The SSH keys of an account belong to its holder rather than to any project, and a key is active on one account at most. Keys shared by a project, such as one used by CI, belong to the project instead and are managed through the IAM API.
@@ -32,7 +32,7 @@
32
32
  * Resource identifiers in an error's `meta` (`resource_id`, `volume_id`, `network_interface_id` and the like) are TypeIDs, in the same form as the identifiers in resources. `meta.resource_type` is the resource's name as written in paths, with underscores: `instance`, `volume`, `elastic_ip`, `network_interface`, `virtual_private_cloud`, `private_image`, `volume_backup`, and so on.
33
33
  * OpenAPI spec version: 2.0.0
34
34
  */
35
- import type { AssociateElasticIPRequestBody, AttachNetworkInterfaceRequestBody, AttachVolumeRequestBody, AvailabilityZoneID, AvailabilityZoneListResponseBody, AvailabilityZoneResource, ConflictResponse, ConsoleResponseBody, CreateElasticIPRequestBody, CreateElasticIPResponseBody, CreateInstanceRequestBody, CreateInstanceResponseBody, CreateLaunchTemplateRequestBody, CreateLaunchTemplateResponseBody, CreateNetworkInterfaceAddressRequestBody, CreateNetworkInterfaceRequestBody, CreatePrivateImageRequestBody, CreatePrivateImageResponseBody, CreateSecurityGroupRequestBody, CreateSecurityGroupRuleRequestBody, CreateVirtualPrivateCloudPeeringRequestBody, CreateVirtualPrivateCloudRequestBody, CreateVirtualPrivateCloudRouteRequestBody, CreateVirtualPrivateCloudSubnetRequestBody, CreateVolumeBackupRequestBody, CreateVolumeBackupResponseBody, CreateVolumeRequestBody, CreateVolumeResponseBody, CreateVolumeSnapshotRequestBody, CreateVolumeSnapshotResponseBody, DeleteElasticIPResponseBody, DeleteElasticIpParams, DeleteInstanceParams, DeleteInstanceResponseBody, DeletePrivateImageParams, DeletePrivateImageResponseBody, DeleteVolumeBackupParams, DeleteVolumeBackupResponseBody, DeleteVolumeParams, DeleteVolumeResponseBody, DeleteVolumeSnapshotParams, DeleteVolumeSnapshotResponseBody, ElasticIP, ElasticIPAssociation, ElasticIPID, ElasticIPLine, ElasticIPLineID, ElasticIPLineListResponseBody, ElasticIPListResponseBody, Error, FreeSubnetCidr, GetVirtualPrivateCloudFreeSubnetCidrParams, ImageID, Instance, InstanceFamily, InstanceFamilyID, InstanceFamilyListResponseBody, InstanceID, InstanceListResponseBody, InstanceType, InstanceTypeID, InstanceTypeListResponseBody, LaunchTemplate, LaunchTemplateID, LaunchTemplateListResponseBody, LaunchTemplateVersion, LaunchTemplateVersionListResponseBody, ListAvailabilityZonesParams, ListElasticIpLinesParams, ListElasticIpTrafficUsageParams, ListElasticIpsParams, ListInstanceFamiliesParams, ListInstanceNetworkInterfacesParams, ListInstanceTypesParams, ListInstanceVolumesParams, ListInstancesParams, ListLaunchTemplateVersionsParams, ListLaunchTemplatesParams, ListNetworkInterfacesParams, ListOperationLogsParams, ListPrivateImagesParams, ListPublicImagesParams, ListQuotasParams, ListRegionsParams, ListSecurityGroupRulesParams, ListSecurityGroupsParams, ListVirtualPrivateCloudPeeringsParams, ListVirtualPrivateCloudRoutesParams, ListVirtualPrivateCloudSubnetsParams, ListVirtualPrivateCloudsParams, ListVolumeBackupsParams, ListVolumeSnapshotsParams, ListVolumeTypesParams, ListVolumesParams, NetworkInterface, NetworkInterfaceAddressID, NetworkInterfaceAttachmentList, NetworkInterfaceID, NetworkInterfaceListResponseBody, NewLaunchTemplateVersion, OperationLogID, OperationLogListResponseBody, OperationLogResource, PasswordChoice, PrivateImageListResponseBody, PrivateImageResource, ProjectQuota, ProjectQuotaListResponseBody, PublicImageListResponseBody, PublicImageResource, QuotaResourceType, RebootInstanceRequestBody, RebuildInstanceRequestBody, RebuildInstanceResponseBody, RegionID, RegionListResponseBody, RegionResource, RescueInstanceRequestBody, RescueInstanceResponseBody, ResetInstancePasswordResponseBody, RevertVolumeRequestBody, RunInstanceCommandRequestBody, RunInstanceCommandResponseBody, SecurityGroup, SecurityGroupID, SecurityGroupIDOrWildcard, SecurityGroupListResponseBody, SecurityGroupRule, SecurityGroupRuleID, SecurityGroupRuleListResponseBody, SubnetID, TrafficUsageListResponseBody, UpdateElasticIPRequestBody, UpdateElasticIPResponseBody, UpdateInstanceRequestBody, UpdateInstanceResponseBody, UpdateLaunchTemplateRequestBody, UpdateNetworkInterfaceRequestBody, UpdatePrivateImageRequestBody, UpdateSecurityGroupRequestBody, UpdateVirtualPrivateCloudRequestBody, UpdateVirtualPrivateCloudSubnetRequestBody, UpdateVolumeBackupRequestBody, UpdateVolumeRequestBody, UpdateVolumeResponseBody, UpdateVolumeSnapshotRequestBody, VirtualPrivateCloud, VirtualPrivateCloudID, VirtualPrivateCloudIDOrWildcard, VirtualPrivateCloudListResponseBody, VirtualPrivateCloudPeeringID, VirtualPrivateCloudPeeringListResponseBody, VirtualPrivateCloudPeeringResource, VirtualPrivateCloudRouteID, VirtualPrivateCloudRouteListResponseBody, VirtualPrivateCloudRouteResource, VirtualPrivateCloudSubnet, VirtualPrivateCloudSubnetListResponseBody, VolumeAttachmentList, VolumeBackupID, VolumeBackupListResponseBody, VolumeBackupResource, VolumeID, VolumeListResponseBody, VolumeResource, VolumeSnapshotID, VolumeSnapshotListResponseBody, VolumeSnapshotResource, VolumeTypeID, VolumeTypeListResponseBody, VolumeTypeResource } from "./models.js";
35
+ import type { AssociateElasticIPRequestBody, AttachNetworkInterfaceRequestBody, AttachVolumeRequestBody, AvailabilityZoneID, AvailabilityZoneListResponseBody, AvailabilityZoneResource, ConflictResponse, ConsoleResponseBody, CreateElasticIPRequestBody, CreateElasticIPResponseBody, CreateInstanceRequestBody, CreateInstanceResponseBody, CreateLaunchTemplateRequestBody, CreateLaunchTemplateResponseBody, CreateNetworkInterfaceAddressRequestBody, CreateNetworkInterfaceRequestBody, CreatePrivateImageRequestBody, CreatePrivateImageResponseBody, CreateSecurityGroupRequestBody, CreateSecurityGroupRuleRequestBody, CreateVirtualPrivateCloudPeeringRequestBody, CreateVirtualPrivateCloudRequestBody, CreateVirtualPrivateCloudRouteRequestBody, CreateVirtualPrivateCloudSubnetRequestBody, CreateVolumeBackupRequestBody, CreateVolumeBackupResponseBody, CreateVolumeRequestBody, CreateVolumeResponseBody, CreateVolumeSnapshotRequestBody, CreateVolumeSnapshotResponseBody, DeleteElasticIPResponseBody, DeleteElasticIpParams, DeleteInstanceParams, DeleteInstanceResponseBody, DeletePrivateImageParams, DeletePrivateImageResponseBody, DeleteVolumeBackupParams, DeleteVolumeBackupResponseBody, DeleteVolumeParams, DeleteVolumeResponseBody, DeleteVolumeSnapshotParams, DeleteVolumeSnapshotResponseBody, ElasticIP, ElasticIPAssociation, ElasticIPID, ElasticIPLine, ElasticIPLineID, ElasticIPLineListResponseBody, ElasticIPListResponseBody, Error, FreeSubnetCidr, GetVirtualPrivateCloudFreeSubnetCidrParams, ImageID, Instance, InstanceFamily, InstanceFamilyID, InstanceFamilyListResponseBody, InstanceID, InstanceListResponseBody, InstanceType, InstanceTypeID, InstanceTypeListResponseBody, LaunchTemplate, LaunchTemplateID, LaunchTemplateListResponseBody, LaunchTemplateVersion, LaunchTemplateVersionListResponseBody, ListAvailabilityZonesParams, ListElasticIpLinesParams, ListElasticIpTrafficUsageParams, ListElasticIpsParams, ListInstanceFamiliesParams, ListInstanceNetworkInterfacesParams, ListInstanceTypesParams, ListInstanceVolumesParams, ListInstancesParams, ListLaunchTemplateVersionsParams, ListLaunchTemplatesParams, ListNetworkInterfacesParams, ListOperationLogsParams, ListPrivateImagesParams, ListPublicImagesParams, ListQuotasParams, ListRegionsParams, ListSecurityGroupRulesParams, ListSecurityGroupsParams, ListVirtualPrivateCloudPeeringsParams, ListVirtualPrivateCloudRoutesParams, ListVirtualPrivateCloudSubnetsParams, ListVirtualPrivateCloudsParams, ListVolumeBackupsParams, ListVolumeSnapshotsParams, ListVolumeTypesParams, ListVolumesParams, NetworkInterface, NetworkInterfaceAddressID, NetworkInterfaceAttachmentList, NetworkInterfaceID, NetworkInterfaceListResponseBody, NewLaunchTemplateVersion, OperationLogID, OperationLogListResponseBody, OperationLogResource, PasswordChoice, PrivateImageListResponseBody, PrivateImageResource, ProjectQuota, ProjectQuotaListResponseBody, PublicImageListResponseBody, PublicImageResource, QuotaResourceType, RebootInstanceRequestBody, RebuildInstanceRequestBody, RebuildInstanceResponseBody, RegionID, RegionListResponseBody, RegionResource, RescueInstanceResponseBody, ResetInstancePasswordResponseBody, RevertVolumeRequestBody, RunInstanceCommandRequestBody, RunInstanceCommandResponseBody, SecurityGroup, SecurityGroupID, SecurityGroupIDOrWildcard, SecurityGroupListResponseBody, SecurityGroupRule, SecurityGroupRuleID, SecurityGroupRuleListResponseBody, SubnetID, TrafficUsageListResponseBody, UpdateElasticIPRequestBody, UpdateElasticIPResponseBody, UpdateInstanceRequestBody, UpdateInstanceResponseBody, UpdateLaunchTemplateRequestBody, UpdateNetworkInterfaceRequestBody, UpdatePrivateImageRequestBody, UpdateSecurityGroupRequestBody, UpdateVirtualPrivateCloudRequestBody, UpdateVirtualPrivateCloudSubnetRequestBody, UpdateVolumeBackupRequestBody, UpdateVolumeRequestBody, UpdateVolumeResponseBody, UpdateVolumeSnapshotRequestBody, VirtualPrivateCloud, VirtualPrivateCloudID, VirtualPrivateCloudIDOrWildcard, VirtualPrivateCloudListResponseBody, VirtualPrivateCloudPeeringID, VirtualPrivateCloudPeeringListResponseBody, VirtualPrivateCloudPeeringResource, VirtualPrivateCloudRouteID, VirtualPrivateCloudRouteListResponseBody, VirtualPrivateCloudRouteResource, VirtualPrivateCloudSubnet, VirtualPrivateCloudSubnetListResponseBody, VolumeAttachmentList, VolumeBackupID, VolumeBackupListResponseBody, VolumeBackupResource, VolumeID, VolumeListResponseBody, VolumeResource, VolumeSnapshotID, VolumeSnapshotListResponseBody, VolumeSnapshotResource, VolumeTypeID, VolumeTypeListResponseBody, VolumeTypeResource } from "./models.js";
36
36
  export type HTTPStatusCode1xx = 100 | 101 | 102 | 103;
37
37
  export type HTTPStatusCode2xx = 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207;
38
38
  export type HTTPStatusCode3xx = 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308;
@@ -980,12 +980,14 @@ export declare const getRescueInstanceUrl: (instanceId: InstanceID) => string;
980
980
  *
981
981
  * In rescue mode, everything only the instance's own system can take is refused with 409 `INSTANCE_UNRESCUE_REQUIRED`: starting, stopping, rebooting, rebuilding, resetting the password, changing `instance_type_id`, attaching or detaching volumes and network interfaces, capturing a private image and running commands. Leave rescue mode with `:unrescue` first. The console stays available, releasing the instance works as usual, and the instance is charged as when running. A suspension that begins in rescue mode takes the instance out of rescue before stopping it, and starting it again once the suspension ends boots its own system.
982
982
  *
983
+ * The rescue environment does not accept passwords. The remote console signs in as `login_username` automatically, and SSH accepts `login_username` with the public keys the instance was created or last rebuilt with.
984
+ *
983
985
  * A rescue the compute service could not boot leaves the instance as it was, or in `error`; request it again or reboot the instance.
984
986
  *
985
987
  * The request does not name an image. The rescue image is the region's enabled rescue image for the architecture of the instance's boot volume. A region and architecture with no enabled rescue image is refused with `RESCUE_IMAGE_NOT_CONFIGURED` (409).
986
988
  * @summary Put an instance into rescue mode
987
989
  */
988
- export declare const rescueInstance: (instanceId: InstanceID, rescueInstanceRequestBody: RescueInstanceRequestBody, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<rescueInstanceResponse>;
990
+ export declare const rescueInstance: (instanceId: InstanceID, options?: RequestInit, fetchFn?: typeof globalThis.fetch) => Promise<rescueInstanceResponse>;
989
991
  export type unrescueInstanceResponse202 = {
990
992
  data: Instance;
991
993
  status: 202;
@@ -969,32 +969,17 @@ export const getRescueInstanceUrl = (instanceId) => {
969
969
  *
970
970
  * In rescue mode, everything only the instance's own system can take is refused with 409 `INSTANCE_UNRESCUE_REQUIRED`: starting, stopping, rebooting, rebuilding, resetting the password, changing `instance_type_id`, attaching or detaching volumes and network interfaces, capturing a private image and running commands. Leave rescue mode with `:unrescue` first. The console stays available, releasing the instance works as usual, and the instance is charged as when running. A suspension that begins in rescue mode takes the instance out of rescue before stopping it, and starting it again once the suspension ends boots its own system.
971
971
  *
972
+ * The rescue environment does not accept passwords. The remote console signs in as `login_username` automatically, and SSH accepts `login_username` with the public keys the instance was created or last rebuilt with.
973
+ *
972
974
  * A rescue the compute service could not boot leaves the instance as it was, or in `error`; request it again or reboot the instance.
973
975
  *
974
976
  * The request does not name an image. The rescue image is the region's enabled rescue image for the architecture of the instance's boot volume. A region and architecture with no enabled rescue image is refused with `RESCUE_IMAGE_NOT_CONFIGURED` (409).
975
977
  * @summary Put an instance into rescue mode
976
978
  */
977
- export const rescueInstance = async (instanceId, rescueInstanceRequestBody, options, fetchFn) => {
978
- const getHeaders = (h) => {
979
- if (!h)
980
- return {};
981
- if (h instanceof Headers)
982
- return Object.fromEntries(h.entries());
983
- if (Symbol.iterator in h) {
984
- return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
985
- }
986
- const headers = {};
987
- for (const [name, value] of Object.entries(h)) {
988
- if (value !== undefined)
989
- headers[name] = value;
990
- }
991
- return headers;
992
- };
979
+ export const rescueInstance = async (instanceId, options, fetchFn) => {
993
980
  const res = await (fetchFn ?? fetch)(getRescueInstanceUrl(instanceId), {
994
981
  ...options,
995
982
  method: "POST",
996
- headers: { "Content-Type": "application/json", ...getHeaders(options?.headers) },
997
- body: JSON.stringify(rescueInstanceRequestBody),
998
983
  });
999
984
  const body = [204, 205, 304].includes(res.status) ? null : await res.text();
1000
985
  const data = body ? JSON.parse(body) : {};