diff --git a/moon/packages/types/generated.ts b/moon/packages/types/generated.ts index 13fb080e3..1b461f479 100644 --- a/moon/packages/types/generated.ts +++ b/moon/packages/types/generated.ts @@ -3033,6 +3033,80 @@ export type FigmaKeyPair = { write_key: string } +export type CommonResultCommonPageIssueItem = { + data?: { + items: { + /** @format int64 */ + closed_at?: number | null + link: string + /** @format int64 */ + open_timestamp: number + /** @format int64 */ + owner: number + status: string + title: string + /** @format int64 */ + updated_at: number + }[] + /** + * @format int64 + * @min 0 + */ + total: number + } + err_message: string + req_result: boolean +} + +export type CommonResultCommonPageMrInfoItem = { + data?: { + items: { + link: string + /** @format int64 */ + merge_timestamp?: number | null + /** @format int64 */ + open_timestamp: number + status: MergeStatusEnum + title: string + /** @format int64 */ + updated_at: number + }[] + /** + * @format int64 + * @min 0 + */ + total: number + } + err_message: string + req_result: boolean +} + +export type CommonResultFilesChangedList = { + data?: { + content: string + files: FilesChangedItem[] + } + err_message: string + req_result: boolean +} + +export type CommonResultMRDetail = { + data?: { + conversations: MegaConversation[] + /** @format int64 */ + id: number + link: string + /** @format int64 */ + merge_timestamp?: number | null + /** @format int64 */ + open_timestamp: number + status: MergeStatusEnum + title: string + } + err_message: string + req_result: boolean +} + export type CommonResultString = { data?: string err_message: string @@ -3067,6 +3141,20 @@ export type CommonResultBool = { req_result: boolean } +export enum ConvTypeEnum { + Comment = 'Comment', + Deploy = 'Deploy', + Commit = 'Commit', + ForcePush = 'ForcePush', + Edit = 'Edit', + Review = 'Review', + Approve = 'Approve', + MergeQueue = 'MergeQueue', + Merged = 'Merged', + Closed = 'Closed', + Reopen = 'Reopen' +} + export type CreateFileInfo = { content?: string | null /** can be a file or directory */ @@ -3076,6 +3164,30 @@ export type CreateFileInfo = { path: string } +export type FilesChangedItem = { + path: string + status: string +} + +export type FilesChangedList = { + content: string + files: FilesChangedItem[] +} + +export type IssueItem = { + /** @format int64 */ + closed_at?: number | null + link: string + /** @format int64 */ + open_timestamp: number + /** @format int64 */ + owner: number + status: string + title: string + /** @format int64 */ + updated_at: number +} + export type LatestCommitInfo = { author: UserInfo committer: UserInfo @@ -3085,6 +3197,94 @@ export type LatestCommitInfo = { status: string } +export type MRDetail = { + conversations: MegaConversation[] + /** @format int64 */ + id: number + link: string + /** @format int64 */ + merge_timestamp?: number | null + /** @format int64 */ + open_timestamp: number + status: MergeStatusEnum + title: string +} + +export type MRStatusParams = { + status: string +} + +export type MegaConversation = { + comment?: string | null + conv_type: ConvTypeEnum + /** @format int64 */ + created_at: number + /** @format int64 */ + id: number + /** @format int64 */ + updated_at: number + /** @format int64 */ + user_id: number +} + +export enum MergeStatusEnum { + Open = 'Open', + Merged = 'Merged', + Closed = 'Closed' +} + +export type MrInfoItem = { + link: string + /** @format int64 */ + merge_timestamp?: number | null + /** @format int64 */ + open_timestamp: number + status: MergeStatusEnum + title: string + /** @format int64 */ + updated_at: number +} + +export type NewIssue = { + description: string + title: string +} + +export type PageParamsMRStatusParams = { + additional: { + status: string + } + pagination: Pagination +} + +export type PageParamsStatusParams = { + additional: { + status: string + } + pagination: Pagination +} + +export type Pagination = { + /** + * @format int64 + * @min 0 + */ + page: number + /** + * @format int64 + * @min 0 + */ + per_page: number +} + +export type SaveCommentRequest = { + content: string +} + +export type StatusParams = { + status: string +} + export type TreeBriefItem = { content_type: string name: string @@ -4243,7 +4443,21 @@ export type GetApiBlobParams = { export type GetApiBlobData = CommonResultString -export type GetApiCreateFileData = CommonResultString +export type PostApiCreateFileData = CommonResultString + +export type DeleteApiIssueCommentDeleteData = CommonResultString + +export type PostApiIssueListData = CommonResultCommonPageIssueItem + +export type PostApiIssueNewData = CommonResultString + +export type PostApiIssueCloseData = CommonResultString + +export type PostApiIssueCommentData = CommonResultString + +export type GetApiIssueDetailData = CommonResultString + +export type PostApiIssueReopenData = CommonResultString export type GetApiLatestCommitParams = { refs?: string @@ -4252,6 +4466,22 @@ export type GetApiLatestCommitParams = { export type GetApiLatestCommitData = LatestCommitInfo +export type DeleteApiMrCommentDeleteData = CommonResultString + +export type PostApiMrListData = CommonResultCommonPageMrInfoItem + +export type PostApiMrCloseData = CommonResultString + +export type PostApiMrCommentData = CommonResultString + +export type GetApiMrDetailData = CommonResultMRDetail + +export type GetApiMrFilesChangedData = CommonResultFilesChangedList + +export type PostApiMrMergeData = CommonResultString + +export type PostApiMrReopenData = CommonResultString + export type GetApiStatusData = string export type GetApiTreeParams = { @@ -12581,20 +12811,141 @@ export class Api extends HttpClient { - const base = 'GET:/api/v1/create-file' as const + postApiCreateFile: () => { + const base = 'POST:/api/v1/create-file' as const return { - baseKey: dataTaggedQueryKey([base]), - requestKey: () => dataTaggedQueryKey([base]), + baseKey: dataTaggedQueryKey([base]), + requestKey: () => dataTaggedQueryKey([base]), request: (data: CreateFileInfo, params: RequestParams = {}) => - this.request({ + this.request({ path: `/api/v1/create-file`, - method: 'GET', + method: 'POST', + body: data, + type: ContentType.Json, + ...params + }) + } + }, + + /** + * No description + * + * @tags issue + * @name DeleteApiIssueCommentDelete + * @summary Delete Issue Comment + * @request DELETE:/api/v1/issue/comment/{id}/delete + */ + deleteApiIssueCommentDelete: () => { + const base = 'DELETE:/api/v1/issue/comment/{id}/delete' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (id: number) => dataTaggedQueryKey([base, id]), + request: (id: number, params: RequestParams = {}) => + this.request({ + path: `/api/v1/issue/comment/${id}/delete`, + method: 'DELETE', + ...params + }) + } + }, + + /** + * No description + * + * @tags issue + * @name PostApiIssueList + * @summary Fetch Issue list + * @request POST:/api/v1/issue/list + */ + postApiIssueList: () => { + const base = 'POST:/api/v1/issue/list' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: () => dataTaggedQueryKey([base]), + request: (data: PageParamsStatusParams, params: RequestParams = {}) => + this.request({ + path: `/api/v1/issue/list`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params + }) + } + }, + + /** + * No description + * + * @tags issue + * @name PostApiIssueNew + * @summary New Issue + * @request POST:/api/v1/issue/new + */ + postApiIssueNew: () => { + const base = 'POST:/api/v1/issue/new' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: () => dataTaggedQueryKey([base]), + request: (data: NewIssue, params: RequestParams = {}) => + this.request({ + path: `/api/v1/issue/new`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params + }) + } + }, + + /** + * No description + * + * @tags issue + * @name PostApiIssueClose + * @summary Close an issue + * @request POST:/api/v1/issue/{link}/close + */ + postApiIssueClose: () => { + const base = 'POST:/api/v1/issue/{link}/close' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (link: string) => dataTaggedQueryKey([base, link]), + request: (link: string, params: RequestParams = {}) => + this.request({ + path: `/api/v1/issue/${link}/close`, + method: 'POST', + ...params + }) + } + }, + + /** + * No description + * + * @tags issue + * @name PostApiIssueComment + * @summary Add new comment on Issue + * @request POST:/api/v1/issue/{link}/comment + */ + postApiIssueComment: () => { + const base = 'POST:/api/v1/issue/{link}/comment' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (link: string) => dataTaggedQueryKey([base, link]), + request: (link: string, data: SaveCommentRequest, params: RequestParams = {}) => + this.request({ + path: `/api/v1/issue/${link}/comment`, + method: 'POST', body: data, type: ContentType.Json, ...params @@ -12602,6 +12953,52 @@ export class Api extends HttpClient { + const base = 'GET:/api/v1/issue/{link}/detail' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (link: string) => dataTaggedQueryKey([base, link]), + request: (link: string, params: RequestParams = {}) => + this.request({ + path: `/api/v1/issue/${link}/detail`, + method: 'GET', + ...params + }) + } + }, + + /** + * No description + * + * @tags issue + * @name PostApiIssueReopen + * @summary Reopen an issue + * @request POST:/api/v1/issue/{link}/reopen + */ + postApiIssueReopen: () => { + const base = 'POST:/api/v1/issue/{link}/reopen' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (link: string) => dataTaggedQueryKey([base, link]), + request: (link: string, params: RequestParams = {}) => + this.request({ + path: `/api/v1/issue/${link}/reopen`, + method: 'POST', + ...params + }) + } + }, + /** * No description * @@ -12626,6 +13023,194 @@ export class Api extends HttpClient { + const base = 'DELETE:/api/v1/mr/comment/{conv_id}/delete' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (convId: number) => dataTaggedQueryKey([base, convId]), + request: (convId: number, params: RequestParams = {}) => + this.request({ + path: `/api/v1/mr/comment/${convId}/delete`, + method: 'DELETE', + ...params + }) + } + }, + + /** + * No description + * + * @tags merge_request + * @name PostApiMrList + * @summary Fetch MR list + * @request POST:/api/v1/mr/list + */ + postApiMrList: () => { + const base = 'POST:/api/v1/mr/list' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: () => dataTaggedQueryKey([base]), + request: (data: PageParamsMRStatusParams, params: RequestParams = {}) => + this.request({ + path: `/api/v1/mr/list`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params + }) + } + }, + + /** + * No description + * + * @tags merge_request + * @name PostApiMrClose + * @summary Close Merge Request + * @request POST:/api/v1/mr/{link}/close + */ + postApiMrClose: () => { + const base = 'POST:/api/v1/mr/{link}/close' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (link: string) => dataTaggedQueryKey([base, link]), + request: (link: string, params: RequestParams = {}) => + this.request({ + path: `/api/v1/mr/${link}/close`, + method: 'POST', + ...params + }) + } + }, + + /** + * No description + * + * @tags merge_request + * @name PostApiMrComment + * @summary Add new comment on Merge Request + * @request POST:/api/v1/mr/{link}/comment + */ + postApiMrComment: () => { + const base = 'POST:/api/v1/mr/{link}/comment' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (link: string) => dataTaggedQueryKey([base, link]), + request: (link: string, data: SaveCommentRequest, params: RequestParams = {}) => + this.request({ + path: `/api/v1/mr/${link}/comment`, + method: 'POST', + body: data, + type: ContentType.Json, + ...params + }) + } + }, + + /** + * No description + * + * @tags merge_request + * @name GetApiMrDetail + * @summary Get merge request details + * @request GET:/api/v1/mr/{link}/detail + */ + getApiMrDetail: () => { + const base = 'GET:/api/v1/mr/{link}/detail' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (link: string) => dataTaggedQueryKey([base, link]), + request: (link: string, params: RequestParams = {}) => + this.request({ + path: `/api/v1/mr/${link}/detail`, + method: 'GET', + ...params + }) + } + }, + + /** + * No description + * + * @tags merge_request + * @name GetApiMrFilesChanged + * @summary Get Merge Request file changed list + * @request GET:/api/v1/mr/{link}/files-changed + */ + getApiMrFilesChanged: () => { + const base = 'GET:/api/v1/mr/{link}/files-changed' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (link: string) => dataTaggedQueryKey([base, link]), + request: (link: string, params: RequestParams = {}) => + this.request({ + path: `/api/v1/mr/${link}/files-changed`, + method: 'GET', + ...params + }) + } + }, + + /** + * No description + * + * @tags merge_request + * @name PostApiMrMerge + * @summary Approve Merge Request + * @request POST:/api/v1/mr/{link}/merge + */ + postApiMrMerge: () => { + const base = 'POST:/api/v1/mr/{link}/merge' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (link: string) => dataTaggedQueryKey([base, link]), + request: (link: string, params: RequestParams = {}) => + this.request({ + path: `/api/v1/mr/${link}/merge`, + method: 'POST', + ...params + }) + } + }, + + /** + * No description + * + * @tags merge_request + * @name PostApiMrReopen + * @summary Reopen Merge Request + * @request POST:/api/v1/mr/{link}/reopen + */ + postApiMrReopen: () => { + const base = 'POST:/api/v1/mr/{link}/reopen' as const + + return { + baseKey: dataTaggedQueryKey([base]), + requestKey: (link: string) => dataTaggedQueryKey([base, link]), + request: (link: string, params: RequestParams = {}) => + this.request({ + path: `/api/v1/mr/${link}/reopen`, + method: 'POST', + ...params + }) + } + }, + /** * No description *