/** * incident.io * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * 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. */ import type { ActorV2 } from './ActorV2.js'; /** * A pay report values the time a set of users spent on-call over a date window, using the rates from a pay config. * * This is a summary: the headline totals, and the parameters the report was generated * with. The shifts behind those totals, and the per-user and per-schedule breakdowns, come * from downloading the report as CSV. * * Reports are immutable snapshots: once generated, changing the pay config or the * schedules behind it will not change the report. Generate a new one instead. * * A report starts as a draft and becomes visible to everyone in your organisation when * you publish it. * * Reports are generated in the background, so a report you have just asked for has no * totals yet. Its status says whether they are still coming, and a report that failed * carries the reason it will never have them. * @export * @interface PayReportV2 */ export interface PayReportV2 { /** * When this report was created */ created_at: Date; /** * */ creator?: ActorV2; /** * Last date (YYYY-MM-DD) this report includes shifts from, inclusive */ end_date: string; /** * Why a report could not be generated */ error_code?: PayReportV2ErrorCodeEnum; /** * What went wrong, written for whoever asked for the report. Only set on a failed report. */ error_message?: string; /** * Unique identifier for this pay report */ id: string; /** * Human readable name for this report */ name: string; /** * How time spent on more than one schedule at once was paid */ overlapping_shifts: PayReportV2OverlappingShiftsEnum; /** * When this report was published. Unset while the report is still a draft. */ published_at?: Date; /** * The schedules this report covers */ schedule_ids: Array; /** * First date (YYYY-MM-DD) this report includes shifts from, inclusive */ start_date: string; /** * How far a report has got through being generated */ status: PayReportV2StatusEnum; /** * Total time spent on-call across every shift in this report, in seconds. Unset until the report is complete, and for a legacy report, which we do not summarise. */ total_duration_seconds?: number; /** * Total owed for this report, keyed by ISO 4217 currency code, in the lowest denomination of that currency. Reports spanning pay configs with different currencies have an entry per currency, and those totals must not be summed. Unset until the report is complete, and for a legacy report, which we do not summarise. */ total_pay_by_currency?: { [key: string]: number; }; /** * Whether shifts that priced to zero are part of the report */ unpaid_shifts: PayReportV2UnpaidShiftsEnum; /** * When this report was last updated */ updated_at: Date; } /** * @export */ export declare const PayReportV2ErrorCodeEnum: { readonly InvalidRequest: "invalid_request"; readonly TimedOut: "timed_out"; }; export type PayReportV2ErrorCodeEnum = typeof PayReportV2ErrorCodeEnum[keyof typeof PayReportV2ErrorCodeEnum]; /** * @export */ export declare const PayReportV2OverlappingShiftsEnum: { readonly PaidOnce: "paid_once"; readonly PaidPerSchedule: "paid_per_schedule"; }; export type PayReportV2OverlappingShiftsEnum = typeof PayReportV2OverlappingShiftsEnum[keyof typeof PayReportV2OverlappingShiftsEnum]; /** * @export */ export declare const PayReportV2StatusEnum: { readonly Pending: "pending"; readonly Generating: "generating"; readonly Complete: "complete"; readonly Failed: "failed"; }; export type PayReportV2StatusEnum = typeof PayReportV2StatusEnum[keyof typeof PayReportV2StatusEnum]; /** * @export */ export declare const PayReportV2UnpaidShiftsEnum: { readonly Included: "included"; readonly Excluded: "excluded"; }; export type PayReportV2UnpaidShiftsEnum = typeof PayReportV2UnpaidShiftsEnum[keyof typeof PayReportV2UnpaidShiftsEnum]; /** * Check if a given object implements the PayReportV2 interface. */ export declare function instanceOfPayReportV2(value: object): value is PayReportV2; export declare function PayReportV2FromJSON(json: any): PayReportV2; export declare function PayReportV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): PayReportV2; export declare function PayReportV2ToJSON(json: any): PayReportV2; export declare function PayReportV2ToJSONTyped(value?: PayReportV2 | null, ignoreDiscriminator?: boolean): any;