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

@@ -306,6 +306,7 @@ export default defineStore('allMapDataStore', {
},
/**
* Add a New Filter
* @param {string} value file's name
*/
async addFilterId(value) {
let logId = this.logId;
@@ -325,6 +326,7 @@ export default defineStore('allMapDataStore', {
},
/**
* Get Filter Detail
* @param {namber} createfilterId filter type ID
*/
async fetchFunnel(createfilterId) {
const api = `/api/filters/${createfilterId}`;

View File

@@ -29,6 +29,8 @@ export default defineStore('compareStore', {
},
/**
* fetch discover api, get stats.
* @param {string} type 'log' | 'filter',可傳入 'log' 或 'filter'
* @param {number} id log or filter ID
*/
async getStateData(type, id) {
let api = '';
@@ -51,6 +53,7 @@ export default defineStore('compareStore', {
},
/**
* Get file's name
* @param {number} id log or filter ID
*/
async getFileName(id) {
id = Number(id)

View File

@@ -210,6 +210,7 @@ export default defineStore('conformanceStore', {
},
/**
* Creates a new temporary check for a log.
* @param {object} data 送給後端的 data
*/
async addConformanceCheckId(data) {
let logId = this.conformanceLogId;
@@ -254,6 +255,7 @@ export default defineStore('conformanceStore', {
},
/**
* Get the detail of a temporary log conformance issue.
* @param {number} issueNo Issues 編號
*/
async getConformanceIssue(issueNo) {
let logTempCheckId = this.conformanceLogTempCheckId;
@@ -277,6 +279,9 @@ export default defineStore('conformanceStore', {
},
/**
* Get the Trace Details of a Temporary Log Conformance lssue.
* @param {number} issueNo Issues 編號
* @param {number} traceId, Trace 編號
* @param {number} start Trace 要從哪個編號開始載入
*/
async getConformanceTraceDetail(issueNo, traceId, start) {
let logTempCheckId = this.conformanceLogTempCheckId;
@@ -303,6 +308,7 @@ export default defineStore('conformanceStore', {
},
/**
* Get the Details of a Temporary Log Conformance Loop.
* @param {number} loopNo loop 編號
*/
async getConformanceLoop(loopNo) {
let logTempCheckId = this.conformanceLogTempCheckId;
@@ -326,6 +332,9 @@ export default defineStore('conformanceStore', {
},
/**
* Get the Trace Details of a Temporary Log Conformance Loops.
* @param {number} loopNo loop 編號
* @param {number} traceId, Trace 編號
* @param {number} start Trace 要從哪個編號開始載入
*/
async getConformanceLoopsTraceDetail(loopNo, traceId, start) {
let logTempCheckId = this.conformanceLogTempCheckId;
@@ -352,6 +361,7 @@ export default defineStore('conformanceStore', {
},
/**
* Add a New Log Conformance Check, Save the log file.
* @param {string} value file's name
*/
async addConformanceCreateCheckId(value) {
let logId = this.conformanceLogId;

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;

View File

@@ -44,7 +44,7 @@ export default defineStore('loginStore', {
};
},
/**
* Refresh Token
* Refresh Token (暫時沒做)
*/
async refreshTokenLogin() {
const api = '/api/oauth/token';

View File

@@ -13,6 +13,8 @@ export default defineStore('performanceStore', {
actions: {
/**
* Get Performance
* @param {string} type 'log' | 'filter',可傳入以上任一。
* @param {*} id 檔案 ID
*/
async getPerformance(type, id) {
let api = '';