2023-02-21 13:23:07 -06:00
|
|
|
import { CreatedWithIdResponse } from './CreatedWithIdResponse.js';
|
2023-02-13 20:21:28 -06:00
|
|
|
|
2023-02-20 21:08:22 -06:00
|
|
|
/**
|
|
|
|
|
* @class SaveRecordResponse - Response from saving a record
|
|
|
|
|
*/
|
2023-02-17 14:27:33 -06:00
|
|
|
export class SaveRecordResponse extends CreatedWithIdResponse<number> {
|
2023-02-20 21:08:22 -06:00
|
|
|
/**
|
|
|
|
|
* @property {string[]} warnings - The warnings from saving the record.
|
|
|
|
|
*/
|
2023-02-13 20:21:28 -06:00
|
|
|
public warnings: string[];
|
|
|
|
|
|
2023-02-20 21:08:22 -06:00
|
|
|
/**
|
|
|
|
|
* @constructor - Creates a new instance of SaveRecordResponse.
|
|
|
|
|
* @param {number} id - The id of the record.
|
|
|
|
|
* @param {string[]} warnings - The warnings from saving the record.
|
|
|
|
|
* @returns {SaveRecordResponse} - A new instance of SaveRecordResponse.s
|
|
|
|
|
*/
|
2023-02-13 20:21:28 -06:00
|
|
|
constructor(id: number, warnings: string[] = []) {
|
|
|
|
|
super(id);
|
|
|
|
|
this.warnings = warnings;
|
|
|
|
|
}
|
|
|
|
|
}
|