|
|
@@ -51,6 +51,8 @@ import type {
|
|
|
PermissionRespondResponses,
|
|
|
ProjectCurrentResponses,
|
|
|
ProjectListResponses,
|
|
|
+ ProjectUpdateErrors,
|
|
|
+ ProjectUpdateResponses,
|
|
|
ProviderAuthResponses,
|
|
|
ProviderListResponses,
|
|
|
ProviderOauthAuthorizeErrors,
|
|
|
@@ -231,6 +233,47 @@ export class Project extends HeyApiClient {
|
|
|
...params,
|
|
|
})
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Update project
|
|
|
+ *
|
|
|
+ * Update project properties such as name, icon and color.
|
|
|
+ */
|
|
|
+ public update<ThrowOnError extends boolean = false>(
|
|
|
+ parameters: {
|
|
|
+ projectID: string
|
|
|
+ directory?: string
|
|
|
+ name?: string
|
|
|
+ icon?: string
|
|
|
+ color?: string
|
|
|
+ },
|
|
|
+ options?: Options<never, ThrowOnError>,
|
|
|
+ ) {
|
|
|
+ const params = buildClientParams(
|
|
|
+ [parameters],
|
|
|
+ [
|
|
|
+ {
|
|
|
+ args: [
|
|
|
+ { in: "path", key: "projectID" },
|
|
|
+ { in: "query", key: "directory" },
|
|
|
+ { in: "body", key: "name" },
|
|
|
+ { in: "body", key: "icon" },
|
|
|
+ { in: "body", key: "color" },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ )
|
|
|
+ return (options?.client ?? this.client).patch<ProjectUpdateResponses, ProjectUpdateErrors, ThrowOnError>({
|
|
|
+ url: "/project/{projectID}",
|
|
|
+ ...options,
|
|
|
+ ...params,
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ ...options?.headers,
|
|
|
+ ...params.headers,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
export class Pty extends HeyApiClient {
|