Skip to content

Commit 55be286

Browse files
Merge pull request #116 from TaskarCenterAtUW/feature-generate-api-client
system:auto generated API client
2 parents 533d470 + 82c7a72 commit 55be286

File tree

6 files changed

+413
-5
lines changed

6 files changed

+413
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## tdei-client@1.1.91
1+
## tdei-client@1.1.92
22

33
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
44

@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
3636
_published:_
3737

3838
```
39-
npm install tdei-client@1.1.91 --save
39+
npm install tdei-client@1.1.92 --save
4040
```
4141

4242
_unPublished (not recommended):_

apis/oswapi.ts

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,103 @@ export const OSWApiAxiosParamCreator = function (configuration?: Configuration)
617617
options: localVarRequestOptions,
618618
};
619619
},
620+
/**
621+
* Streams all feedback for the specified project group in CSV format. Requires poc or osw_data_generator role.
622+
* @summary Downloads dataset viewer feedbacks as a CSV.
623+
* @param {string} [tdei_dataset_id] ID of the dataset.
624+
* @param {Date} [from_date] <strong>from_date:</strong> Date in ISO 8601 format, filters feedback created after this date.
625+
* @param {Date} [to_date] <strong>to_date:</strong> Date in ISO 8601 format, filters feedback created before this date.
626+
* @param {string} [status] <strong>status:</strong> Filters feedbacks by their status.
627+
* @param {string} [sort_by] <strong>sort_by:</strong> String, defaults to 'created_at'. Sorts feedbacks by the specified field.
628+
* @param {string} [due_date] <strong>due_date:</strong> Legacy alias for <code>sort_by</code>. Use 'created_at' or 'due_date'.
629+
* @param {string} [sort_order] <strong>sort_order:</strong> String, defaults to 'desc'. Sorts feedbacks in ascending or descending order.
630+
* @param {number} [page_no] <strong>page_no:</strong> Integer, specifies the page number to retrieve. If omitted with page_size, the response is unpaginated.
631+
* @param {number} [page_size] <strong>Page size:</strong> Integer, between 1 to 50. If omitted with page_no, the response is unpaginated.
632+
* @param {string} [format] <strong>format:</strong> Output format. Only 'csv' is supported.
633+
* @param {*} [options] Override http request option.
634+
* @throws {RequiredError}
635+
*/
636+
oswDatasetViewerFeedbacksDownload: async (tdei_dataset_id?: string, from_date?: Date, to_date?: Date, status?: string, sort_by?: string, due_date?: string, sort_order?: string, page_no?: number, page_size?: number, format?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
637+
const localVarPath = `/api/v1/osw/dataset-viewer/feedbacks/download/{tdei_project_group_id}`;
638+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
639+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
640+
let baseOptions;
641+
if (configuration) {
642+
baseOptions = configuration.baseOptions;
643+
}
644+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
645+
const localVarHeaderParameter = {} as any;
646+
const localVarQueryParameter = {} as any;
647+
648+
// authentication AuthorizationToken required
649+
// http bearer authentication required
650+
if (configuration && configuration.accessToken) {
651+
const accessToken = typeof configuration.accessToken === 'function'
652+
? await configuration.accessToken()
653+
: await configuration.accessToken;
654+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
655+
}
656+
657+
if (tdei_dataset_id !== undefined) {
658+
localVarQueryParameter['tdei_dataset_id'] = tdei_dataset_id;
659+
}
660+
661+
if (from_date !== undefined) {
662+
localVarQueryParameter['from_date'] = (from_date as any instanceof Date) ?
663+
(from_date as any).toISOString() :
664+
from_date;
665+
}
666+
667+
if (to_date !== undefined) {
668+
localVarQueryParameter['to_date'] = (to_date as any instanceof Date) ?
669+
(to_date as any).toISOString() :
670+
to_date;
671+
}
672+
673+
if (status !== undefined) {
674+
localVarQueryParameter['status'] = status;
675+
}
676+
677+
if (sort_by !== undefined) {
678+
localVarQueryParameter['sort_by'] = sort_by;
679+
}
680+
681+
if (due_date !== undefined) {
682+
localVarQueryParameter['due_date'] = due_date;
683+
}
684+
685+
if (sort_order !== undefined) {
686+
localVarQueryParameter['sort_order'] = sort_order;
687+
}
688+
689+
if (page_no !== undefined) {
690+
localVarQueryParameter['page_no'] = page_no;
691+
}
692+
693+
if (page_size !== undefined) {
694+
localVarQueryParameter['page_size'] = page_size;
695+
}
696+
697+
if (format !== undefined) {
698+
localVarQueryParameter['format'] = format;
699+
}
700+
701+
const query = new URLSearchParams(localVarUrlObj.search);
702+
for (const key in localVarQueryParameter) {
703+
query.set(key, localVarQueryParameter[key]);
704+
}
705+
for (const key in options.params) {
706+
query.set(key, options.params[key]);
707+
}
708+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
709+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
710+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
711+
712+
return {
713+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
714+
options: localVarRequestOptions,
715+
};
716+
},
620717
/**
621718
* Retrieves the feedbacks summary. Response includes a summary of feedbacks such as total count, total overdue, and other relevant statistics.
622719
* @summary Retrieves the feedbacks summary.
@@ -1407,6 +1504,29 @@ export const OSWApiFp = function(configuration?: Configuration) {
14071504
return axios.request(axiosRequestArgs);
14081505
};
14091506
},
1507+
/**
1508+
* Streams all feedback for the specified project group in CSV format. Requires poc or osw_data_generator role.
1509+
* @summary Downloads dataset viewer feedbacks as a CSV.
1510+
* @param {string} [tdei_dataset_id] ID of the dataset.
1511+
* @param {Date} [from_date] &lt;strong&gt;from_date:&lt;/strong&gt; Date in ISO 8601 format, filters feedback created after this date.
1512+
* @param {Date} [to_date] &lt;strong&gt;to_date:&lt;/strong&gt; Date in ISO 8601 format, filters feedback created before this date.
1513+
* @param {string} [status] &lt;strong&gt;status:&lt;/strong&gt; Filters feedbacks by their status.
1514+
* @param {string} [sort_by] &lt;strong&gt;sort_by:&lt;/strong&gt; String, defaults to &#x27;created_at&#x27;. Sorts feedbacks by the specified field.
1515+
* @param {string} [due_date] &lt;strong&gt;due_date:&lt;/strong&gt; Legacy alias for &lt;code&gt;sort_by&lt;/code&gt;. Use &#x27;created_at&#x27; or &#x27;due_date&#x27;.
1516+
* @param {string} [sort_order] &lt;strong&gt;sort_order:&lt;/strong&gt; String, defaults to &#x27;desc&#x27;. Sorts feedbacks in ascending or descending order.
1517+
* @param {number} [page_no] &lt;strong&gt;page_no:&lt;/strong&gt; Integer, specifies the page number to retrieve. If omitted with page_size, the response is unpaginated.
1518+
* @param {number} [page_size] &lt;strong&gt;Page size:&lt;/strong&gt; Integer, between 1 to 50. If omitted with page_no, the response is unpaginated.
1519+
* @param {string} [format] &lt;strong&gt;format:&lt;/strong&gt; Output format. Only &#x27;csv&#x27; is supported.
1520+
* @param {*} [options] Override http request option.
1521+
* @throws {RequiredError}
1522+
*/
1523+
async oswDatasetViewerFeedbacksDownload(tdei_dataset_id?: string, from_date?: Date, to_date?: Date, status?: string, sort_by?: string, due_date?: string, sort_order?: string, page_no?: number, page_size?: number, format?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<Blob>>> {
1524+
const localVarAxiosArgs = await OSWApiAxiosParamCreator(configuration).oswDatasetViewerFeedbacksDownload(tdei_dataset_id, from_date, to_date, status, sort_by, due_date, sort_order, page_no, page_size, format, options);
1525+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
1526+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
1527+
return axios.request(axiosRequestArgs);
1528+
};
1529+
},
14101530
/**
14111531
* Retrieves the feedbacks summary. Response includes a summary of feedbacks such as total count, total overdue, and other relevant statistics.
14121532
* @summary Retrieves the feedbacks summary.
@@ -1671,6 +1791,25 @@ export const OSWApiFactory = function (configuration?: Configuration, basePath?:
16711791
async oswDatasetViewerFeedbacks(tdei_project_group_id?: string, tdei_dataset_id?: string, from_date?: Date, to_date?: Date, status?: string, sort_by?: string, sort_order?: string, page_no?: number, page_size?: number, options?: AxiosRequestConfig): Promise<AxiosResponse<Array<Feedback>>> {
16721792
return OSWApiFp(configuration).oswDatasetViewerFeedbacks(tdei_project_group_id, tdei_dataset_id, from_date, to_date, status, sort_by, sort_order, page_no, page_size, options).then((request) => request(axios, basePath));
16731793
},
1794+
/**
1795+
* Streams all feedback for the specified project group in CSV format. Requires poc or osw_data_generator role.
1796+
* @summary Downloads dataset viewer feedbacks as a CSV.
1797+
* @param {string} [tdei_dataset_id] ID of the dataset.
1798+
* @param {Date} [from_date] &lt;strong&gt;from_date:&lt;/strong&gt; Date in ISO 8601 format, filters feedback created after this date.
1799+
* @param {Date} [to_date] &lt;strong&gt;to_date:&lt;/strong&gt; Date in ISO 8601 format, filters feedback created before this date.
1800+
* @param {string} [status] &lt;strong&gt;status:&lt;/strong&gt; Filters feedbacks by their status.
1801+
* @param {string} [sort_by] &lt;strong&gt;sort_by:&lt;/strong&gt; String, defaults to &#x27;created_at&#x27;. Sorts feedbacks by the specified field.
1802+
* @param {string} [due_date] &lt;strong&gt;due_date:&lt;/strong&gt; Legacy alias for &lt;code&gt;sort_by&lt;/code&gt;. Use &#x27;created_at&#x27; or &#x27;due_date&#x27;.
1803+
* @param {string} [sort_order] &lt;strong&gt;sort_order:&lt;/strong&gt; String, defaults to &#x27;desc&#x27;. Sorts feedbacks in ascending or descending order.
1804+
* @param {number} [page_no] &lt;strong&gt;page_no:&lt;/strong&gt; Integer, specifies the page number to retrieve. If omitted with page_size, the response is unpaginated.
1805+
* @param {number} [page_size] &lt;strong&gt;Page size:&lt;/strong&gt; Integer, between 1 to 50. If omitted with page_no, the response is unpaginated.
1806+
* @param {string} [format] &lt;strong&gt;format:&lt;/strong&gt; Output format. Only &#x27;csv&#x27; is supported.
1807+
* @param {*} [options] Override http request option.
1808+
* @throws {RequiredError}
1809+
*/
1810+
async oswDatasetViewerFeedbacksDownload(tdei_dataset_id?: string, from_date?: Date, to_date?: Date, status?: string, sort_by?: string, due_date?: string, sort_order?: string, page_no?: number, page_size?: number, format?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<Blob>> {
1811+
return OSWApiFp(configuration).oswDatasetViewerFeedbacksDownload(tdei_dataset_id, from_date, to_date, status, sort_by, due_date, sort_order, page_no, page_size, format, options).then((request) => request(axios, basePath));
1812+
},
16741813
/**
16751814
* Retrieves the feedbacks summary. Response includes a summary of feedbacks such as total count, total overdue, and other relevant statistics.
16761815
* @summary Retrieves the feedbacks summary.
@@ -1905,6 +2044,26 @@ export class OSWApi extends BaseAPI {
19052044
public async oswDatasetViewerFeedbacks(tdei_project_group_id?: string, tdei_dataset_id?: string, from_date?: Date, to_date?: Date, status?: string, sort_by?: string, sort_order?: string, page_no?: number, page_size?: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<Array<Feedback>>> {
19062045
return OSWApiFp(this.configuration).oswDatasetViewerFeedbacks(tdei_project_group_id, tdei_dataset_id, from_date, to_date, status, sort_by, sort_order, page_no, page_size, options).then((request) => request(this.axios, this.basePath));
19072046
}
2047+
/**
2048+
* Streams all feedback for the specified project group in CSV format. Requires poc or osw_data_generator role.
2049+
* @summary Downloads dataset viewer feedbacks as a CSV.
2050+
* @param {string} [tdei_dataset_id] ID of the dataset.
2051+
* @param {Date} [from_date] &lt;strong&gt;from_date:&lt;/strong&gt; Date in ISO 8601 format, filters feedback created after this date.
2052+
* @param {Date} [to_date] &lt;strong&gt;to_date:&lt;/strong&gt; Date in ISO 8601 format, filters feedback created before this date.
2053+
* @param {string} [status] &lt;strong&gt;status:&lt;/strong&gt; Filters feedbacks by their status.
2054+
* @param {string} [sort_by] &lt;strong&gt;sort_by:&lt;/strong&gt; String, defaults to &#x27;created_at&#x27;. Sorts feedbacks by the specified field.
2055+
* @param {string} [due_date] &lt;strong&gt;due_date:&lt;/strong&gt; Legacy alias for &lt;code&gt;sort_by&lt;/code&gt;. Use &#x27;created_at&#x27; or &#x27;due_date&#x27;.
2056+
* @param {string} [sort_order] &lt;strong&gt;sort_order:&lt;/strong&gt; String, defaults to &#x27;desc&#x27;. Sorts feedbacks in ascending or descending order.
2057+
* @param {number} [page_no] &lt;strong&gt;page_no:&lt;/strong&gt; Integer, specifies the page number to retrieve. If omitted with page_size, the response is unpaginated.
2058+
* @param {number} [page_size] &lt;strong&gt;Page size:&lt;/strong&gt; Integer, between 1 to 50. If omitted with page_no, the response is unpaginated.
2059+
* @param {string} [format] &lt;strong&gt;format:&lt;/strong&gt; Output format. Only &#x27;csv&#x27; is supported.
2060+
* @param {*} [options] Override http request option.
2061+
* @throws {RequiredError}
2062+
* @memberof OSWApi
2063+
*/
2064+
public async oswDatasetViewerFeedbacksDownload(tdei_dataset_id?: string, from_date?: Date, to_date?: Date, status?: string, sort_by?: string, due_date?: string, sort_order?: string, page_no?: number, page_size?: number, format?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<Blob>> {
2065+
return OSWApiFp(this.configuration).oswDatasetViewerFeedbacksDownload(tdei_dataset_id, from_date, to_date, status, sort_by, due_date, sort_order, page_no, page_size, format, options).then((request) => request(this.axios, this.basePath));
2066+
}
19082067
/**
19092068
* Retrieves the feedbacks summary. Response includes a summary of feedbacks such as total count, total overdue, and other relevant statistics.
19102069
* @summary Retrieves the feedbacks summary.

0 commit comments

Comments
 (0)