8 changed files with 420 additions and 0 deletions
@ -0,0 +1,93 @@ |
|||||||
|
/* |
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||||
|
* contributor license agreements. See the NOTICE file distributed with |
||||||
|
* this work for additional information regarding copyright ownership. |
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||||
|
* (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software |
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
* See the License for the specific language governing permissions and |
||||||
|
* limitations under the License. |
||||||
|
*/ |
||||||
|
|
||||||
|
import { axios } from '@/service/service' |
||||||
|
import { |
||||||
|
ListReq, |
||||||
|
ProjectsReq, |
||||||
|
UserIdReq, |
||||||
|
CodeReq, |
||||||
|
UpdateProjectsReq |
||||||
|
} from './types' |
||||||
|
|
||||||
|
export function queryProjectListPaging(params: ListReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/projects`, |
||||||
|
method: 'get', |
||||||
|
params, |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function createProject(data: ProjectsReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/projects`, |
||||||
|
method: 'post', |
||||||
|
data, |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function queryAuthorizedProject(params: UserIdReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/projects/authed-project`, |
||||||
|
method: 'get', |
||||||
|
params, |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function queryProjectCreatedAndAuthorizedByUser(): any { |
||||||
|
return axios({ |
||||||
|
url: `/projects/created-and-authed`, |
||||||
|
method: 'get', |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function queryAllProjectList(): any { |
||||||
|
return axios({ |
||||||
|
url: `/projects/list`, |
||||||
|
method: 'get', |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function queryUnauthorizedProject(params: UserIdReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/projects/unauth-project`, |
||||||
|
method: 'get', |
||||||
|
params |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function queryProjectByCode(code: CodeReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/projects/${code}`, |
||||||
|
method: 'get', |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function updateProject(data: UpdateProjectsReq, code: CodeReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/projects/${code}`, |
||||||
|
method: 'put', |
||||||
|
data |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function deleteProject(code: CodeReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/projects/${code}`, |
||||||
|
method: 'delete', |
||||||
|
}) |
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
/* |
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||||
|
* contributor license agreements. See the NOTICE file distributed with |
||||||
|
* this work for additional information regarding copyright ownership. |
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||||
|
* (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software |
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
* See the License for the specific language governing permissions and |
||||||
|
* limitations under the License. |
||||||
|
*/ |
||||||
|
|
||||||
|
interface ListReq { |
||||||
|
pageNo: number |
||||||
|
pageSize: number |
||||||
|
searchVal?: string |
||||||
|
} |
||||||
|
|
||||||
|
interface ProjectsReq { |
||||||
|
description?: string |
||||||
|
projectName?: string |
||||||
|
} |
||||||
|
|
||||||
|
interface UserIdReq { |
||||||
|
userId?: number |
||||||
|
} |
||||||
|
|
||||||
|
interface CodeReq { |
||||||
|
code: number |
||||||
|
} |
||||||
|
|
||||||
|
interface UpdateProjectsReq extends ProjectsReq { |
||||||
|
userName?: string |
||||||
|
} |
||||||
|
|
||||||
|
export { |
||||||
|
ListReq, |
||||||
|
ProjectsReq, |
||||||
|
UserIdReq, |
||||||
|
CodeReq, |
||||||
|
UpdateProjectsReq |
||||||
|
} |
@ -0,0 +1,58 @@ |
|||||||
|
/* |
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||||
|
* contributor license agreements. See the NOTICE file distributed with |
||||||
|
* this work for additional information regarding copyright ownership. |
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||||
|
* (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software |
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
* See the License for the specific language governing permissions and |
||||||
|
* limitations under the License. |
||||||
|
*/ |
||||||
|
|
||||||
|
import { axios } from '@/service/service' |
||||||
|
import {ListReq, QueueReq, IdReq} from './types' |
||||||
|
|
||||||
|
export function queryQueueListPaging(params: ListReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/queues`, |
||||||
|
method: 'get', |
||||||
|
params |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function createQueue(data: QueueReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/queues`, |
||||||
|
method: 'post', |
||||||
|
data |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function queryList(): any { |
||||||
|
return axios({ |
||||||
|
url: `/queues/list`, |
||||||
|
method: 'get', |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function verifyQueue(data: QueueReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/queues/verify`, |
||||||
|
method: 'post', |
||||||
|
data |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
export function updateQueue(data: QueueReq, id: IdReq): any { |
||||||
|
return axios({ |
||||||
|
url: `/queues/${id}`, |
||||||
|
method: 'put', |
||||||
|
data |
||||||
|
}) |
||||||
|
} |
@ -0,0 +1,33 @@ |
|||||||
|
/* |
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||||
|
* contributor license agreements. See the NOTICE file distributed with |
||||||
|
* this work for additional information regarding copyright ownership. |
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||||
|
* (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software |
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
* See the License for the specific language governing permissions and |
||||||
|
* limitations under the License. |
||||||
|
*/ |
||||||
|
|
||||||
|
interface ListReq { |
||||||
|
pageNo: number |
||||||
|
pageSize: number |
||||||
|
searchVal?: string |
||||||
|
} |
||||||
|
|
||||||
|
interface QueueReq { |
||||||
|
queue: string |
||||||
|
queueName: string |
||||||
|
} |
||||||
|
|
||||||
|
interface IdReq { |
||||||
|
id: number |
||||||
|
} |
||||||
|
|
||||||
|
export { ListReq, QueueReq, IdReq } |
@ -0,0 +1,16 @@ |
|||||||
|
/* |
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||||
|
* contributor license agreements. See the NOTICE file distributed with |
||||||
|
* this work for additional information regarding copyright ownership. |
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||||
|
* (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software |
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
* See the License for the specific language governing permissions and |
||||||
|
* limitations under the License. |
||||||
|
*/ |
@ -0,0 +1,55 @@ |
|||||||
|
/* |
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||||
|
* contributor license agreements. See the NOTICE file distributed with |
||||||
|
* this work for additional information regarding copyright ownership. |
||||||
|
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||||
|
* (the "License"); you may not use this file except in compliance with |
||||||
|
* the License. You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software |
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
* See the License for the specific language governing permissions and |
||||||
|
* limitations under the License. |
||||||
|
*/ |
||||||
|
|
||||||
|
interface FileReq { |
||||||
|
file: any |
||||||
|
} |
||||||
|
|
||||||
|
interface TypeReq { |
||||||
|
type: 'FILE' | 'UDF' |
||||||
|
} |
||||||
|
|
||||||
|
interface NameReqReq { |
||||||
|
name: string |
||||||
|
} |
||||||
|
|
||||||
|
interface FileNameReq { |
||||||
|
fileName: string |
||||||
|
} |
||||||
|
|
||||||
|
interface ListReq { |
||||||
|
id: number |
||||||
|
pageNo: number |
||||||
|
pageSize: number |
||||||
|
type: 'FILE' | 'UDF' |
||||||
|
searchVal?: string |
||||||
|
} |
||||||
|
|
||||||
|
interface CreateReq extends TypeReq { |
||||||
|
currentDir: string |
||||||
|
pid: number |
||||||
|
description?: string |
||||||
|
} |
||||||
|
|
||||||
|
interface UserIdReq { |
||||||
|
userId: number |
||||||
|
} |
||||||
|
|
||||||
|
interface OnlineCreateReq extends CreateReq { |
||||||
|
content: string |
||||||
|
suffix: string |
||||||
|
} |
Loading…
Reference in new issue