docs: Update all files JSDoc.

This commit is contained in:
chiayin
2024-03-29 15:49:05 +08:00
parent 4ba71d1193
commit e391c9a237
55 changed files with 260 additions and 219 deletions

View File

@@ -109,7 +109,7 @@ export default defineStore('filesStore', {
},
/**
* Uploads a CSV log file. 第一階段上傳
* @param {Object} fromData
* @param {Object} fromData 傳給後端的 Data
*/
async upload(fromData) {
const api = '/api/logs/csv-uploads';
@@ -156,7 +156,7 @@ export default defineStore('filesStore', {
},
/**
* Add a Log from an Uploaded CSV Log File. 第二階段上傳
* @param {Object} data
* @param {Object} data 傳給後端的 Data
*/
async uploadLog(data) {
const uploadId = this.uploadId;
@@ -184,9 +184,9 @@ export default defineStore('filesStore', {
},
/**
* Rename a Log
* @param { string } type log | filter | log-check | filter-check
* @param { number } id
* @param { string } name
* @param { string } type log | filter | log-check | filter-check,傳入以上任一個。
* @param { number } id 檔案 ID
* @param { string } name file's name
*/
async rename(type, id, fileName) {
// 先判斷有沒有 uploadLogId有就設定 id 和 type再判斷檔案型別。
@@ -224,7 +224,7 @@ export default defineStore('filesStore', {
/**
* Get the Dependents of the files
* @param { string } type log | filter | log-check | filter-check
* @param { number } id
* @param { number } id 檔案 ID
*/
async getDependents(type, id) {
let api;
@@ -253,7 +253,7 @@ export default defineStore('filesStore', {
/**
* Delete file
* @param { string } type log | filter | log-check | filter-check
* @param { number } id
* @param { number } id 檔案 ID
*/
async deleteFile(type, id) {
let api;
@@ -288,6 +288,7 @@ export default defineStore('filesStore', {
},
/**
* Remove a Deletion Record真刪除被 Admin 或被其他帳號刪除的檔案
* @param {number} id 檔案 ID
*/
async deletionRecord(id) {
let api = '';
@@ -305,8 +306,8 @@ export default defineStore('filesStore', {
/**
* Download file as CSV
* @param { string } type log | filter | log-check | filter-check
* @param { number } id
* @param { string } fileName
* @param { number } id 檔案 ID
* @param { string } fileName file's name
*/
async downloadFileCSV(type, id, fileName) {
let api;