UNPKG

tuix-timesheets-api

Version:

This package facilitates the client request to tuix timesheets api

64 lines 2.26 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Tuix Services * Tuix Services API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.PaginatedTimesheetsToJSON = exports.PaginatedTimesheetsFromJSONTyped = exports.PaginatedTimesheetsFromJSON = exports.instanceOfPaginatedTimesheets = void 0; const TimesheetDTO_1 = require("./TimesheetDTO"); /** * Check if a given object implements the PaginatedTimesheets interface. */ function instanceOfPaginatedTimesheets(value) { let isInstance = true; isInstance = isInstance && "items" in value; isInstance = isInstance && "page" in value; isInstance = isInstance && "pageSize" in value; isInstance = isInstance && "totalItems" in value; isInstance = isInstance && "totalPages" in value; return isInstance; } exports.instanceOfPaginatedTimesheets = instanceOfPaginatedTimesheets; function PaginatedTimesheetsFromJSON(json) { return PaginatedTimesheetsFromJSONTyped(json, false); } exports.PaginatedTimesheetsFromJSON = PaginatedTimesheetsFromJSON; function PaginatedTimesheetsFromJSONTyped(json, ignoreDiscriminator) { if ((json === undefined) || (json === null)) { return json; } return { 'items': (json['items'].map(TimesheetDTO_1.TimesheetDTOFromJSON)), 'page': json['page'], 'pageSize': json['pageSize'], 'totalItems': json['totalItems'], 'totalPages': json['totalPages'], }; } exports.PaginatedTimesheetsFromJSONTyped = PaginatedTimesheetsFromJSONTyped; function PaginatedTimesheetsToJSON(value) { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'items': (value.items.map(TimesheetDTO_1.TimesheetDTOToJSON)), 'page': value.page, 'pageSize': value.pageSize, 'totalItems': value.totalItems, 'totalPages': value.totalPages, }; } exports.PaginatedTimesheetsToJSON = PaginatedTimesheetsToJSON; //# sourceMappingURL=PaginatedTimesheets.js.map