@dsptch-work/api-client 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +66 -5
- package/dist/gen/sdk.gen.js +93 -4
- package/dist/gen/types.gen.d.ts +448 -27
- package/dist/gen/zod.gen.d.ts +727 -119
- package/dist/gen/zod.gen.js +279 -15
- package/package.json +1 -1
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -370,7 +370,7 @@ export type DirectUploadParameters = {
|
|
|
370
370
|
/**
|
|
371
371
|
* What the file is for, named as the endpoint that will attach it (for example `assets.vendors`). Required. It decides where the file is stored, and the signed ID this call returns is issued for that resource alone — it will not resolve at any other endpoint, so a vendor logo cannot be attached as an avatar, or an avatar as a logo.
|
|
372
372
|
*/
|
|
373
|
-
resource: 'assets.items' | 'assets.items.documents' | 'assets.items.service_events' | 'assets.products' | 'assets.vendors' | 'pay_periods.imports.aggregate_times' | 'pay_periods.imports.dsptch_cprs' | 'pay_periods.imports.time_entries' | 'users';
|
|
373
|
+
resource: 'assets.items' | 'assets.items.documents' | 'assets.items.service_events' | 'assets.products' | 'assets.vendors' | 'compliance.checks' | 'pay_periods.imports.aggregate_times' | 'pay_periods.imports.dsptch_cprs' | 'pay_periods.imports.time_entries' | 'payrolls.payroll_runs.imports.paystubs' | 'users';
|
|
374
374
|
/**
|
|
375
375
|
* Metadata describing the file being registered, before its bytes are uploaded.
|
|
376
376
|
*/
|
|
@@ -875,7 +875,7 @@ export type ApprenticeshipOccupationParameters = {
|
|
|
875
875
|
*/
|
|
876
876
|
export type ApprenticeshipProgramEmployerParameters = {
|
|
877
877
|
/**
|
|
878
|
-
* ID of the company to authorize as an employer in this program;
|
|
878
|
+
* ID of the company to authorize as an employer in this program; it need not be related to the sponsor, since a group program names unaffiliated contractors. Naming a company here grants its admins and managers read access to this program, the right to enroll their own workers in it, the right to curate its trade-to-occupation scope decisions, and a passing apprenticeship-program compliance check; it grants no access to that company's own data. Cannot be changed once the employer has apprentices. Required.
|
|
879
879
|
*/
|
|
880
880
|
company_id: string;
|
|
881
881
|
/**
|
|
@@ -2821,7 +2821,7 @@ export type JobParameters = {
|
|
|
2821
2821
|
*/
|
|
2822
2822
|
requested_by_company_id: string;
|
|
2823
2823
|
/**
|
|
2824
|
-
* ID of the user creating the job. Required.
|
|
2824
|
+
* ID of the user creating the job. Required on create and immutable thereafter — an update that sets, changes, or clears it is rejected.
|
|
2825
2825
|
*/
|
|
2826
2826
|
created_by_user_id: string;
|
|
2827
2827
|
/**
|
|
@@ -3096,7 +3096,7 @@ export type GroupParameters = {
|
|
|
3096
3096
|
name: string;
|
|
3097
3097
|
};
|
|
3098
3098
|
/**
|
|
3099
|
-
* A worker as your company sees them: the cross-company person merged with their employment record at your company (title, pay, benefits, and accruals), their roles at your company, and optional prevailing-wage compliance details. There is no delete — removing a worker terminates their employment at the company (see the user-company endpoints), which sets termination_date and drops them from the default list.
|
|
3099
|
+
* A worker as your company sees them: the cross-company person merged with their employment record at your company (title, pay, benefits, and accruals), their roles at your company, and optional prevailing-wage compliance details. Your company sees everyone it employs, everyone it has granted a role, and everyone it has invited, which is the same set the web app shows. A role holder or an invitee your company does not employ has no employment record to merge, so the employment fields (employment_id through employment_window, plus manager_user_id) are null for them, no employment custom fields are published for them, and employment_state reads none. There is no delete — removing a worker terminates their employment at the company (see the user-company endpoints), which sets termination_date and drops them from the default list.
|
|
3100
3100
|
*/
|
|
3101
3101
|
export type UserResponseObject = {
|
|
3102
3102
|
/**
|
|
@@ -3171,10 +3171,14 @@ export type UserResponseObject = {
|
|
|
3171
3171
|
* URL of the worker's LinkedIn profile. Null when unset.
|
|
3172
3172
|
*/
|
|
3173
3173
|
linkedin_url: string | null;
|
|
3174
|
+
/**
|
|
3175
|
+
* Where the worker stands with your company right now, read against the employment published here: active (an employment in effect now), scheduled (an employment that has not begun), terminated (an employment that has ended, with nothing current and nothing upcoming), or none (someone your company sees without employing — a role holder or an invitee, told apart by the roles array). It is computed at read time rather than stored, so a scheduled hire turns active on its start date with no write. The same four words are filter[state] values on the list endpoint, which also accepts all.
|
|
3176
|
+
*/
|
|
3177
|
+
employment_state: 'active' | 'scheduled' | 'terminated' | 'none';
|
|
3174
3178
|
/**
|
|
3175
3179
|
* Identity of the worker's employment at your company, stable across employment versions — a title change or a raise versions the employment without changing this id. It names the employment that this object's employment fields (type through employment_window, plus manager_user_id and any employment custom fields) describe: a worker rehired after an earlier stint holds a second employment with its own id, and exactly one of them is published here.
|
|
3176
3180
|
*/
|
|
3177
|
-
employment_id: string;
|
|
3181
|
+
employment_id: string | null;
|
|
3178
3182
|
type: UserCompanyType;
|
|
3179
3183
|
/**
|
|
3180
3184
|
* Job title at your company. Null when unset.
|
|
@@ -3183,11 +3187,11 @@ export type UserResponseObject = {
|
|
|
3183
3187
|
/**
|
|
3184
3188
|
* Whether the worker is eligible for overtime pay (a prerequisite for assigning an overtime package).
|
|
3185
3189
|
*/
|
|
3186
|
-
overtime_eligible: boolean;
|
|
3190
|
+
overtime_eligible: boolean | null;
|
|
3187
3191
|
/**
|
|
3188
3192
|
* Whether the worker is enrolled in Time and Attendance and participates in time tracking.
|
|
3189
3193
|
*/
|
|
3190
|
-
enrolled_in_t_and_a: boolean;
|
|
3194
|
+
enrolled_in_t_and_a: boolean | null;
|
|
3191
3195
|
/**
|
|
3192
3196
|
* The worker's identifier in your payroll system of record. Null when unset.
|
|
3193
3197
|
*/
|
|
@@ -3195,7 +3199,7 @@ export type UserResponseObject = {
|
|
|
3195
3199
|
/**
|
|
3196
3200
|
* How the worker is paid: hourly or salary.
|
|
3197
3201
|
*/
|
|
3198
|
-
compensation_type: string;
|
|
3202
|
+
compensation_type: string | null;
|
|
3199
3203
|
/**
|
|
3200
3204
|
* Base pay rate, formatted as a currency string in the company's currency. Null when unset.
|
|
3201
3205
|
*/
|
|
@@ -3248,7 +3252,7 @@ export type UserResponseObject = {
|
|
|
3248
3252
|
* When this version of the employment stopped applying (ISO 8601); null while it is still in effect. A value in the past means an ended version is being served because the worker has nothing current or scheduled.
|
|
3249
3253
|
*/
|
|
3250
3254
|
valid_to: string | null;
|
|
3251
|
-
};
|
|
3255
|
+
} | null;
|
|
3252
3256
|
/**
|
|
3253
3257
|
* Id of the worker's manager at your company (another user). Null when none.
|
|
3254
3258
|
*/
|
|
@@ -4706,7 +4710,9 @@ export type DsptchCprImportResponseObject = {
|
|
|
4706
4710
|
/**
|
|
4707
4711
|
* Submit a certified payroll report for a pay period. The pay period's pay schedule must be in aggregate time mode; a schedule that keeps time as entries is refused. The file carries every column of the DSPTCH CPR template: the payroll, job and employee identifiers, the employer and employee pay, contribution and deduction amounts, the three wage pay rates, and one hours column per multiplier per day of the period — seven days each for a weekly schedule, fourteen for a biweekly one. All of them must be present as column headers, or the file is refused naming the ones missing. Of those, job_id, week_ending_date, employee_payroll_id, one_x_wage_pay_rate and one_five_x_wage_pay_rate must also carry a value on every row, and two_x_wage_pay_rate must whenever any 2x hours column does. federal_labor_classification and regional_labor_classification are read when present, and are needed only where a position has more than one wage determination in a jurisdiction. Header matching ignores case and treats spaces as underscores, and column order does not matter. Any other column is refused: a name this import does not read would be dropped without trace, so the file is rejected naming it rather than applied in part.
|
|
4708
4712
|
*
|
|
4709
|
-
* Submitting the same work twice is refused rather than doubled: an import will not write onto a time card that already holds data, so a retry after a submission that already succeeded answers 422 naming `time_card_has_data`, and nothing is written. The guard is per time card, not per file, so a corrected file for the same worker and period is refused the same way — clear that period's data first.
|
|
4713
|
+
* Submitting the same work twice is refused rather than doubled: an import will not write onto a time card that already holds data, so a retry after a submission that already succeeded answers 422 naming `time_card_has_data`, and nothing is written. The guard is per time card, not per file, so a corrected file for the same worker and period is refused the same way — clear that period's data first.
|
|
4714
|
+
*
|
|
4715
|
+
* Because acceptance is synchronous but the write happens in the background, only one import at a time is accepted for a pay period: while an earlier one is still `pending` or `processing`, a second answers 409 naming `import_in_progress`, and nothing is written. Poll the earlier import until it reports, then submit again.
|
|
4710
4716
|
*/
|
|
4711
4717
|
export type DsptchCprImportParameters = {
|
|
4712
4718
|
/**
|
|
@@ -4714,6 +4720,56 @@ export type DsptchCprImportParameters = {
|
|
|
4714
4720
|
*/
|
|
4715
4721
|
file_signed_id: string;
|
|
4716
4722
|
};
|
|
4723
|
+
/**
|
|
4724
|
+
* One bulk upload of paystub amounts against a payroll run, and how it turned out.
|
|
4725
|
+
*/
|
|
4726
|
+
export type PaystubImportResponseObject = {
|
|
4727
|
+
/**
|
|
4728
|
+
* Unique identifier.
|
|
4729
|
+
*/
|
|
4730
|
+
id: string;
|
|
4731
|
+
/**
|
|
4732
|
+
* The payroll run the amounts were imported against.
|
|
4733
|
+
*/
|
|
4734
|
+
payrolls_payroll_run_id: string;
|
|
4735
|
+
/**
|
|
4736
|
+
* Where the import has got to. `pending` until the background job starts, then `success` or `failed`.
|
|
4737
|
+
*/
|
|
4738
|
+
status: 'pending' | 'processing' | 'processed' | 'success' | 'failed';
|
|
4739
|
+
/**
|
|
4740
|
+
* How many rows passed validation and were prepared for writing. On a `success` import that is also how many rows were written. On a `failed` one it is not — the import writes all of its rows in a single transaction, so a failure part-way through undoes every write already made while this count still reports every row that had been prepared.
|
|
4741
|
+
*/
|
|
4742
|
+
processed_rows_count: number;
|
|
4743
|
+
/**
|
|
4744
|
+
* Every problem found after the import was accepted, oldest row first; empty when there were none, and always empty while the import is `pending`.
|
|
4745
|
+
*/
|
|
4746
|
+
processing_errors: Array<ImportProcessingError>;
|
|
4747
|
+
/**
|
|
4748
|
+
* When processing finished; null while the import is still pending.
|
|
4749
|
+
*/
|
|
4750
|
+
completed_at: string | null;
|
|
4751
|
+
/**
|
|
4752
|
+
* When the import was submitted.
|
|
4753
|
+
*/
|
|
4754
|
+
created_at: string;
|
|
4755
|
+
/**
|
|
4756
|
+
* When the import was last modified.
|
|
4757
|
+
*/
|
|
4758
|
+
updated_at: string;
|
|
4759
|
+
};
|
|
4760
|
+
/**
|
|
4761
|
+
* Submit a spreadsheet of paystub amounts for a payroll run. The run's pay schedule must not be connected to a payroll provider; where one is configured the paystubs come from that connection and a file is refused. Each row is one amount: payroll_id names the employee, field_name names the pay, deduction or contribution the amount belongs to, and amount carries the value. A field_name the company has not mapped before is created on first use. Schedules that do not already record the contributor on that mapping also require a contributor column of EMPLOYEE or EMPLOYER; where the mapping carries it, the column is not read and its presence is refused. All of the columns the schedule expects must be present as headers and carry a value on every row, or the file is refused naming what is missing. Header matching ignores case and treats spaces as underscores, and column order does not matter. Any other column is refused: a name this import does not read would be dropped without trace, so the file is rejected naming it rather than applied in part.
|
|
4762
|
+
*
|
|
4763
|
+
* Submitting the same pay twice is refused rather than doubled: an import will not write onto a time card that already carries paystub data, so a retry after a submission that already succeeded answers 422 naming `time_card_has_paystub_data`, and no line item is written. A unique index on the line items backs that guard at the database.
|
|
4764
|
+
*
|
|
4765
|
+
* Because acceptance is synchronous but the write happens in the background, only one import at a time is accepted for a payroll run: while an earlier one is still `pending`, a second answers 409 naming `import_in_progress`, and nothing is written. Poll the earlier import until it reports, then submit again.
|
|
4766
|
+
*/
|
|
4767
|
+
export type PaystubImportParameters = {
|
|
4768
|
+
/**
|
|
4769
|
+
* A signed_id from POST /api/v1/direct_uploads identifying the uploaded spreadsheet. Register the upload naming `payrolls.payroll_runs.imports.paystubs` — a signed_id issued for any other resource will not resolve here.
|
|
4770
|
+
*/
|
|
4771
|
+
file_signed_id: string;
|
|
4772
|
+
};
|
|
4717
4773
|
/**
|
|
4718
4774
|
* One bulk upload of time entries against a pay period, and how it turned out.
|
|
4719
4775
|
*/
|
|
@@ -4753,6 +4809,8 @@ export type TimeEntryImportResponseObject = {
|
|
|
4753
4809
|
};
|
|
4754
4810
|
/**
|
|
4755
4811
|
* Submit a spreadsheet of time entries for a pay period. All seven of payroll_id, start_time, end_time, timecode, job_id, state and description must be present as column headers, or the file is refused naming the ones missing. Of those, payroll_id, start_time, end_time, timecode and state must also carry a value on every row. features, federal_labor_classification and regional_labor_classification are read when present. Header matching ignores case and treats spaces as underscores, and column order does not matter. Any other column is refused: a name this import does not read would be dropped without trace, so the file is rejected naming it rather than applied in part.
|
|
4812
|
+
*
|
|
4813
|
+
* Because acceptance is synchronous but the write happens in the background, only one import at a time is accepted for a pay period: while an earlier one is still `pending` or `processing`, a second answers 409 naming `import_in_progress`, and nothing is written. Poll the earlier import until it reports, then submit again.
|
|
4756
4814
|
*/
|
|
4757
4815
|
export type TimeEntryImportParameters = {
|
|
4758
4816
|
/**
|
|
@@ -6118,6 +6176,103 @@ export type ComplianceCheckResponseObject = {
|
|
|
6118
6176
|
* ID of the employment (user-company) this check applies to, stable across all of its versions; set only when type is "Compliances::UserCompanyCheck", else null.
|
|
6119
6177
|
*/
|
|
6120
6178
|
employment_id: string | null;
|
|
6179
|
+
/**
|
|
6180
|
+
* IDs of the people assigned to the check; empty when nobody is assigned.
|
|
6181
|
+
*/
|
|
6182
|
+
assignee_user_ids: Array<string>;
|
|
6183
|
+
/**
|
|
6184
|
+
* From the check's requirement.
|
|
6185
|
+
*/
|
|
6186
|
+
title: string;
|
|
6187
|
+
/**
|
|
6188
|
+
* From the check's requirement.
|
|
6189
|
+
*/
|
|
6190
|
+
description: string;
|
|
6191
|
+
/**
|
|
6192
|
+
* Category of the requirement: one of apprenticeship, certified_payroll, company, job, payroll, project, regional, tax_credit, timekeeping, or worker.
|
|
6193
|
+
*/
|
|
6194
|
+
category: 'apprenticeship' | 'certified_payroll' | 'company' | 'job' | 'payroll' | 'project' | 'regional' | 'tax_credit' | 'timekeeping' | 'worker';
|
|
6195
|
+
/**
|
|
6196
|
+
* Point in the compliance lifecycle when the requirement applies: one of onboarding, setup, maintenance, before_approval_deadline, after_pay_date, or close_out.
|
|
6197
|
+
*/
|
|
6198
|
+
phase: 'after_pay_date' | 'before_approval_deadline' | 'close_out' | 'maintenance' | 'onboarding' | 'setup';
|
|
6199
|
+
/**
|
|
6200
|
+
* Urgency of the requirement: one of critical, high, medium, or low; null when the requirement sets no priority.
|
|
6201
|
+
*/
|
|
6202
|
+
priority: 'critical' | 'high' | 'medium' | 'low' | null;
|
|
6203
|
+
/**
|
|
6204
|
+
* When the check was last evaluated (ISO 8601); null when never evaluated.
|
|
6205
|
+
*/
|
|
6206
|
+
checked_at: string | null;
|
|
6207
|
+
/**
|
|
6208
|
+
* When the check most recently passed (ISO 8601); null while not passed.
|
|
6209
|
+
*/
|
|
6210
|
+
passed_at: string | null;
|
|
6211
|
+
/**
|
|
6212
|
+
* When the check is due (ISO 8601); null when no due date is set.
|
|
6213
|
+
*/
|
|
6214
|
+
time_due: string | null;
|
|
6215
|
+
/**
|
|
6216
|
+
* When the record was created (ISO 8601).
|
|
6217
|
+
*/
|
|
6218
|
+
created_at: string;
|
|
6219
|
+
/**
|
|
6220
|
+
* When the record was last updated (ISO 8601).
|
|
6221
|
+
*/
|
|
6222
|
+
updated_at: string;
|
|
6223
|
+
};
|
|
6224
|
+
/**
|
|
6225
|
+
* A single compliance check, with the documents attached to it. Same fields as compliance_check_response_object plus `documents`.
|
|
6226
|
+
*/
|
|
6227
|
+
export type ComplianceCheckDetailResponseObject = {
|
|
6228
|
+
/**
|
|
6229
|
+
* Unique identifier.
|
|
6230
|
+
*/
|
|
6231
|
+
id: string;
|
|
6232
|
+
/**
|
|
6233
|
+
* The kind of entity this check is evaluated against; exactly one of the corresponding `*_id` fields is set.
|
|
6234
|
+
*/
|
|
6235
|
+
type: 'Compliances::CompanyCheck' | 'Compliances::JobCheck' | 'Compliances::ProjectCheck' | 'Compliances::TimeCardCheck' | 'Compliances::PayPeriodCheck' | 'Compliances::UserCheck' | 'Compliances::UserCompanyCheck';
|
|
6236
|
+
/**
|
|
6237
|
+
* Lifecycle status of the check: one of passed, failed, not_applicable, dismissed, or pending; only dismissed and pending are client-settable (see compliance_check_parameters).
|
|
6238
|
+
*/
|
|
6239
|
+
status: 'passed' | 'failed' | 'not_applicable' | 'dismissed' | 'pending';
|
|
6240
|
+
/**
|
|
6241
|
+
* ID of the requirement this check evaluates.
|
|
6242
|
+
*/
|
|
6243
|
+
compliances_requirement_id: string;
|
|
6244
|
+
/**
|
|
6245
|
+
* ID of the company this check applies to; set only when type is "Compliances::CompanyCheck", else null.
|
|
6246
|
+
*/
|
|
6247
|
+
company_id: string | null;
|
|
6248
|
+
/**
|
|
6249
|
+
* ID of the job this check applies to; set only when type is "Compliances::JobCheck", else null.
|
|
6250
|
+
*/
|
|
6251
|
+
job_id: string | null;
|
|
6252
|
+
/**
|
|
6253
|
+
* ID of the project this check applies to; set only when type is "Compliances::ProjectCheck", else null.
|
|
6254
|
+
*/
|
|
6255
|
+
project_id: string | null;
|
|
6256
|
+
/**
|
|
6257
|
+
* ID of the time card this check applies to; set only when type is "Compliances::TimeCardCheck", else null.
|
|
6258
|
+
*/
|
|
6259
|
+
timekeeping_time_card_id: string | null;
|
|
6260
|
+
/**
|
|
6261
|
+
* ID of the pay period this check applies to; set only when type is "Compliances::PayPeriodCheck", else null.
|
|
6262
|
+
*/
|
|
6263
|
+
timekeeping_pay_period_id: string | null;
|
|
6264
|
+
/**
|
|
6265
|
+
* ID of the worker this check applies to; set only when type is "Compliances::UserCheck", else null.
|
|
6266
|
+
*/
|
|
6267
|
+
user_id: string | null;
|
|
6268
|
+
/**
|
|
6269
|
+
* ID of the employment (user-company) this check applies to, stable across all of its versions; set only when type is "Compliances::UserCompanyCheck", else null.
|
|
6270
|
+
*/
|
|
6271
|
+
employment_id: string | null;
|
|
6272
|
+
/**
|
|
6273
|
+
* IDs of the people assigned to the check; empty when nobody is assigned.
|
|
6274
|
+
*/
|
|
6275
|
+
assignee_user_ids: Array<string>;
|
|
6121
6276
|
/**
|
|
6122
6277
|
* From the check's requirement.
|
|
6123
6278
|
*/
|
|
@@ -6158,9 +6313,46 @@ export type ComplianceCheckResponseObject = {
|
|
|
6158
6313
|
* When the record was last updated (ISO 8601).
|
|
6159
6314
|
*/
|
|
6160
6315
|
updated_at: string;
|
|
6316
|
+
/**
|
|
6317
|
+
* Documents attached to the check; always empty when its requirement does not ask for one.
|
|
6318
|
+
*/
|
|
6319
|
+
documents: Array<ComplianceCheckDocumentObject>;
|
|
6320
|
+
};
|
|
6321
|
+
/**
|
|
6322
|
+
* A document attached to a compliance check.
|
|
6323
|
+
*/
|
|
6324
|
+
export type ComplianceCheckDocumentObject = {
|
|
6325
|
+
/**
|
|
6326
|
+
* ID of the document.
|
|
6327
|
+
*/
|
|
6328
|
+
id: string;
|
|
6329
|
+
/**
|
|
6330
|
+
* Name of the uploaded file.
|
|
6331
|
+
*/
|
|
6332
|
+
filename: string;
|
|
6333
|
+
/**
|
|
6334
|
+
* MIME type of the uploaded file; null when the upload did not declare one.
|
|
6335
|
+
*/
|
|
6336
|
+
content_type: string | null;
|
|
6337
|
+
/**
|
|
6338
|
+
* Size of the uploaded file in bytes.
|
|
6339
|
+
*/
|
|
6340
|
+
byte_size: number;
|
|
6341
|
+
/**
|
|
6342
|
+
* Time-limited download URL for the file.
|
|
6343
|
+
*/
|
|
6344
|
+
url: string;
|
|
6345
|
+
/**
|
|
6346
|
+
* ID of the person who uploaded the document.
|
|
6347
|
+
*/
|
|
6348
|
+
created_by_user_id: string;
|
|
6349
|
+
/**
|
|
6350
|
+
* When the document was uploaded (ISO 8601).
|
|
6351
|
+
*/
|
|
6352
|
+
created_at: string;
|
|
6161
6353
|
};
|
|
6162
6354
|
/**
|
|
6163
|
-
* Update a compliance check.
|
|
6355
|
+
* Update a compliance check. Every field is optional.
|
|
6164
6356
|
*/
|
|
6165
6357
|
export type ComplianceCheckParameters = {
|
|
6166
6358
|
/**
|
|
@@ -6171,6 +6363,70 @@ export type ComplianceCheckParameters = {
|
|
|
6171
6363
|
* When the check is due (ISO 8601); send null to clear it, or omit to leave it unchanged.
|
|
6172
6364
|
*/
|
|
6173
6365
|
time_due?: string | null;
|
|
6366
|
+
/**
|
|
6367
|
+
* Replaces the check's assignees: send every user id that should be assigned, or an empty array to clear them. Every id must belong to a person in your company. Omit to leave the assignees unchanged.
|
|
6368
|
+
*/
|
|
6369
|
+
assignee_user_ids?: Array<string>;
|
|
6370
|
+
/**
|
|
6371
|
+
* Adds a document to the check. Upload the file to /api/v1/direct_uploads naming the `compliance.checks` resource, then send the signed id it returns. Requires a user-scoped API key, because the document records who uploaded it; a company-scoped key is refused. The check re-evaluates unless this same request also sets `status`. Refused when the check's requirement does not ask for a document.
|
|
6372
|
+
*/
|
|
6373
|
+
file_signed_id?: string;
|
|
6374
|
+
};
|
|
6375
|
+
export type RichTextObject = {
|
|
6376
|
+
text: string;
|
|
6377
|
+
attachments: Array<{
|
|
6378
|
+
filename: string;
|
|
6379
|
+
content_type?: string | null;
|
|
6380
|
+
byte_size: number;
|
|
6381
|
+
url: string;
|
|
6382
|
+
}>;
|
|
6383
|
+
};
|
|
6384
|
+
export type TodoInboxEntryResponseObject = ({
|
|
6385
|
+
kind: 'todo';
|
|
6386
|
+
} & TodoInboxTodoResponseObject) | ({
|
|
6387
|
+
kind: 'compliance_check';
|
|
6388
|
+
} & TodoInboxComplianceCheckResponseObject);
|
|
6389
|
+
export type TodoInboxTodoResponseObject = {
|
|
6390
|
+
kind: 'todo';
|
|
6391
|
+
id: string;
|
|
6392
|
+
type: 'company' | 'job' | 'project';
|
|
6393
|
+
company_id: string | null;
|
|
6394
|
+
job_id: string | null;
|
|
6395
|
+
project_id: string | null;
|
|
6396
|
+
name: string;
|
|
6397
|
+
created_by_user_id: string;
|
|
6398
|
+
updated_by_user_id: string;
|
|
6399
|
+
completed: boolean;
|
|
6400
|
+
task_assignee_user_ids: Array<string>;
|
|
6401
|
+
description: RichTextObject;
|
|
6402
|
+
time_due: string | null;
|
|
6403
|
+
created_at: string;
|
|
6404
|
+
updated_at: string;
|
|
6405
|
+
};
|
|
6406
|
+
export type TodoInboxComplianceCheckResponseObject = {
|
|
6407
|
+
kind: 'compliance_check';
|
|
6408
|
+
id: string;
|
|
6409
|
+
type: 'Compliances::CompanyCheck' | 'Compliances::JobCheck' | 'Compliances::ProjectCheck' | 'Compliances::TimeCardCheck' | 'Compliances::PayPeriodCheck' | 'Compliances::UserCheck' | 'Compliances::UserCompanyCheck';
|
|
6410
|
+
status: 'passed' | 'failed' | 'not_applicable' | 'dismissed' | 'pending';
|
|
6411
|
+
compliances_requirement_id: string;
|
|
6412
|
+
company_id: string | null;
|
|
6413
|
+
job_id: string | null;
|
|
6414
|
+
project_id: string | null;
|
|
6415
|
+
timekeeping_time_card_id: string | null;
|
|
6416
|
+
timekeeping_pay_period_id: string | null;
|
|
6417
|
+
user_id: string | null;
|
|
6418
|
+
employment_id: string | null;
|
|
6419
|
+
assignee_user_ids: Array<string>;
|
|
6420
|
+
title: string;
|
|
6421
|
+
description: string;
|
|
6422
|
+
category: 'apprenticeship' | 'certified_payroll' | 'company' | 'job' | 'payroll' | 'project' | 'regional' | 'tax_credit' | 'timekeeping' | 'worker';
|
|
6423
|
+
phase: 'after_pay_date' | 'before_approval_deadline' | 'close_out' | 'maintenance' | 'onboarding' | 'setup';
|
|
6424
|
+
priority: 'critical' | 'high' | 'medium' | 'low' | null;
|
|
6425
|
+
checked_at: string | null;
|
|
6426
|
+
passed_at: string | null;
|
|
6427
|
+
time_due: string | null;
|
|
6428
|
+
created_at: string;
|
|
6429
|
+
updated_at: string;
|
|
6174
6430
|
};
|
|
6175
6431
|
/**
|
|
6176
6432
|
* One compliance requirement from the catalog. Requirements ship with the application, so the catalog reads the same for every company.
|
|
@@ -6953,18 +7209,9 @@ export type PositionParameters = {
|
|
|
6953
7209
|
*/
|
|
6954
7210
|
wage_adder_rate_cents?: number | null;
|
|
6955
7211
|
/**
|
|
6956
|
-
*
|
|
7212
|
+
* The complete desired set of job wage determination IDs. On PATCH, this replaces the current set; omit the field to leave assignments unchanged. Required federal and regional assignments cannot be removed from a PWA position.
|
|
6957
7213
|
*/
|
|
6958
|
-
|
|
6959
|
-
/**
|
|
6960
|
-
* Unique identifier.
|
|
6961
|
-
*/
|
|
6962
|
-
id?: number | null;
|
|
6963
|
-
/**
|
|
6964
|
-
* ID of the job wage determination to attach.
|
|
6965
|
-
*/
|
|
6966
|
-
job_wage_determination_id?: string | null;
|
|
6967
|
-
}>;
|
|
7214
|
+
job_wage_determination_ids?: Array<string>;
|
|
6968
7215
|
/**
|
|
6969
7216
|
* PWA classification detail to set; skill_level sets the apprenticeship or skill classification.
|
|
6970
7217
|
*/
|
|
@@ -7555,7 +7802,7 @@ export type PositionFunction = {
|
|
|
7555
7802
|
*/
|
|
7556
7803
|
export type UserRoleRequest = {
|
|
7557
7804
|
/**
|
|
7558
|
-
* ID of the user to grant the role to.
|
|
7805
|
+
* ID of the user to grant the role to. Must be someone your company can already see — a worker it employs, a holder of one of its roles, or someone it has invited.
|
|
7559
7806
|
*/
|
|
7560
7807
|
user_id?: string;
|
|
7561
7808
|
/**
|
|
@@ -14099,6 +14346,10 @@ export type ListChecksData = {
|
|
|
14099
14346
|
'filter[job_id][null]'?: boolean;
|
|
14100
14347
|
'filter[project_id]'?: string;
|
|
14101
14348
|
'filter[compliances_requirement_id]'?: string;
|
|
14349
|
+
/**
|
|
14350
|
+
* Only checks the given person is assigned to.
|
|
14351
|
+
*/
|
|
14352
|
+
'filter[assignee_user_id]'?: string;
|
|
14102
14353
|
'filter[time_due][gte]'?: string;
|
|
14103
14354
|
'filter[time_due][lte]'?: string;
|
|
14104
14355
|
filter?: string;
|
|
@@ -14165,7 +14416,7 @@ export type GetCheckResponses = {
|
|
|
14165
14416
|
/**
|
|
14166
14417
|
* Success
|
|
14167
14418
|
*/
|
|
14168
|
-
200:
|
|
14419
|
+
200: ComplianceCheckDetailResponseObject;
|
|
14169
14420
|
};
|
|
14170
14421
|
export type GetCheckResponse = GetCheckResponses[keyof GetCheckResponses];
|
|
14171
14422
|
export type UpdateCheckData = {
|
|
@@ -14195,7 +14446,7 @@ export type UpdateCheckResponses = {
|
|
|
14195
14446
|
/**
|
|
14196
14447
|
* Success
|
|
14197
14448
|
*/
|
|
14198
|
-
200:
|
|
14449
|
+
200: ComplianceCheckDetailResponseObject;
|
|
14199
14450
|
};
|
|
14200
14451
|
export type UpdateCheckResponse = UpdateCheckResponses[keyof UpdateCheckResponses];
|
|
14201
14452
|
export type ListRequirementsData = {
|
|
@@ -16755,6 +17006,10 @@ export type CreateDsptchCprImportErrors = {
|
|
|
16755
17006
|
* Not Found
|
|
16756
17007
|
*/
|
|
16757
17008
|
404: Problem;
|
|
17009
|
+
/**
|
|
17010
|
+
* Conflict
|
|
17011
|
+
*/
|
|
17012
|
+
409: Problem;
|
|
16758
17013
|
/**
|
|
16759
17014
|
* Unprocessable Content
|
|
16760
17015
|
*/
|
|
@@ -16879,6 +17134,10 @@ export type CreateTimeEntryImportErrors = {
|
|
|
16879
17134
|
* Not Found
|
|
16880
17135
|
*/
|
|
16881
17136
|
404: Problem;
|
|
17137
|
+
/**
|
|
17138
|
+
* Conflict
|
|
17139
|
+
*/
|
|
17140
|
+
409: Problem;
|
|
16882
17141
|
/**
|
|
16883
17142
|
* Unprocessable Content
|
|
16884
17143
|
*/
|
|
@@ -17309,6 +17568,134 @@ export type UpdateFringeBenefitPlanResponses = {
|
|
|
17309
17568
|
200: PayrollFringeBenefitPlanResponseObject;
|
|
17310
17569
|
};
|
|
17311
17570
|
export type UpdateFringeBenefitPlanResponse = UpdateFringeBenefitPlanResponses[keyof UpdateFringeBenefitPlanResponses];
|
|
17571
|
+
export type ListPaystubImportsData = {
|
|
17572
|
+
body?: never;
|
|
17573
|
+
path: {
|
|
17574
|
+
payroll_run_id: string;
|
|
17575
|
+
};
|
|
17576
|
+
query?: {
|
|
17577
|
+
/**
|
|
17578
|
+
* Filter by import status:
|
|
17579
|
+
* * `pending`
|
|
17580
|
+
* * `processing`
|
|
17581
|
+
* * `processed`
|
|
17582
|
+
* * `success`
|
|
17583
|
+
* * `failed`
|
|
17584
|
+
*
|
|
17585
|
+
*/
|
|
17586
|
+
'filter[status]'?: string;
|
|
17587
|
+
filter?: string;
|
|
17588
|
+
'filter[unexpected]'?: string;
|
|
17589
|
+
'filter[completed_at][gte]'?: string;
|
|
17590
|
+
'filter[completed_at][lte]'?: string;
|
|
17591
|
+
'filter[created_at][gte]'?: string;
|
|
17592
|
+
'filter[created_at][lte]'?: string;
|
|
17593
|
+
'filter[updated_at][gte]'?: string;
|
|
17594
|
+
'filter[updated_at][lte]'?: string;
|
|
17595
|
+
/**
|
|
17596
|
+
* This pagination cursor corresponds to the cursor value found in the response in
|
|
17597
|
+
* `meta.page.next_cursor`.
|
|
17598
|
+
*/
|
|
17599
|
+
'page[cursor]'?: string;
|
|
17600
|
+
/**
|
|
17601
|
+
* Maximum number of records to return per page. Defaults to 20. A value above 100 is capped to 100 rather than rejected; a value that is zero, negative, or not an integer is rejected with a `400`.
|
|
17602
|
+
*/
|
|
17603
|
+
'page[limit]'?: number;
|
|
17604
|
+
page?: string;
|
|
17605
|
+
};
|
|
17606
|
+
url: '/api/v1/payrolls/payroll_runs/{payroll_run_id}/imports/paystubs';
|
|
17607
|
+
};
|
|
17608
|
+
export type ListPaystubImportsErrors = {
|
|
17609
|
+
/**
|
|
17610
|
+
* Bad Request
|
|
17611
|
+
*/
|
|
17612
|
+
400: Problem;
|
|
17613
|
+
/**
|
|
17614
|
+
* Forbidden
|
|
17615
|
+
*/
|
|
17616
|
+
403: Problem;
|
|
17617
|
+
/**
|
|
17618
|
+
* Unprocessable Content
|
|
17619
|
+
*/
|
|
17620
|
+
422: Problem;
|
|
17621
|
+
};
|
|
17622
|
+
export type ListPaystubImportsError = ListPaystubImportsErrors[keyof ListPaystubImportsErrors];
|
|
17623
|
+
export type ListPaystubImportsResponses = {
|
|
17624
|
+
/**
|
|
17625
|
+
* Success
|
|
17626
|
+
*/
|
|
17627
|
+
200: {
|
|
17628
|
+
meta: Meta;
|
|
17629
|
+
links: Links;
|
|
17630
|
+
data: Array<PaystubImportResponseObject>;
|
|
17631
|
+
};
|
|
17632
|
+
};
|
|
17633
|
+
export type ListPaystubImportsResponse = ListPaystubImportsResponses[keyof ListPaystubImportsResponses];
|
|
17634
|
+
export type CreatePaystubImportData = {
|
|
17635
|
+
body: PaystubImportParameters;
|
|
17636
|
+
path: {
|
|
17637
|
+
payroll_run_id: string;
|
|
17638
|
+
};
|
|
17639
|
+
query?: never;
|
|
17640
|
+
url: '/api/v1/payrolls/payroll_runs/{payroll_run_id}/imports/paystubs';
|
|
17641
|
+
};
|
|
17642
|
+
export type CreatePaystubImportErrors = {
|
|
17643
|
+
/**
|
|
17644
|
+
* Bad Request
|
|
17645
|
+
*/
|
|
17646
|
+
400: Problem;
|
|
17647
|
+
/**
|
|
17648
|
+
* Forbidden
|
|
17649
|
+
*/
|
|
17650
|
+
403: Problem;
|
|
17651
|
+
/**
|
|
17652
|
+
* Not Found
|
|
17653
|
+
*/
|
|
17654
|
+
404: Problem;
|
|
17655
|
+
/**
|
|
17656
|
+
* Conflict
|
|
17657
|
+
*/
|
|
17658
|
+
409: Problem;
|
|
17659
|
+
/**
|
|
17660
|
+
* Unprocessable Content
|
|
17661
|
+
*/
|
|
17662
|
+
422: Problem;
|
|
17663
|
+
};
|
|
17664
|
+
export type CreatePaystubImportError = CreatePaystubImportErrors[keyof CreatePaystubImportErrors];
|
|
17665
|
+
export type CreatePaystubImportResponses = {
|
|
17666
|
+
/**
|
|
17667
|
+
* Created
|
|
17668
|
+
*/
|
|
17669
|
+
201: PaystubImportResponseObject;
|
|
17670
|
+
};
|
|
17671
|
+
export type CreatePaystubImportResponse = CreatePaystubImportResponses[keyof CreatePaystubImportResponses];
|
|
17672
|
+
export type GetPaystubImportData = {
|
|
17673
|
+
body?: never;
|
|
17674
|
+
path: {
|
|
17675
|
+
payroll_run_id: string;
|
|
17676
|
+
id: string;
|
|
17677
|
+
};
|
|
17678
|
+
query?: never;
|
|
17679
|
+
url: '/api/v1/payrolls/payroll_runs/{payroll_run_id}/imports/paystubs/{id}';
|
|
17680
|
+
};
|
|
17681
|
+
export type GetPaystubImportErrors = {
|
|
17682
|
+
/**
|
|
17683
|
+
* Forbidden
|
|
17684
|
+
*/
|
|
17685
|
+
403: Problem;
|
|
17686
|
+
/**
|
|
17687
|
+
* Not Found
|
|
17688
|
+
*/
|
|
17689
|
+
404: Problem;
|
|
17690
|
+
};
|
|
17691
|
+
export type GetPaystubImportError = GetPaystubImportErrors[keyof GetPaystubImportErrors];
|
|
17692
|
+
export type GetPaystubImportResponses = {
|
|
17693
|
+
/**
|
|
17694
|
+
* Success
|
|
17695
|
+
*/
|
|
17696
|
+
200: PaystubImportResponseObject;
|
|
17697
|
+
};
|
|
17698
|
+
export type GetPaystubImportResponse = GetPaystubImportResponses[keyof GetPaystubImportResponses];
|
|
17312
17699
|
export type ListPayrollRunsData = {
|
|
17313
17700
|
body?: never;
|
|
17314
17701
|
path?: never;
|
|
@@ -19021,6 +19408,10 @@ export type UpdatePositionErrors = {
|
|
|
19021
19408
|
* Not Found
|
|
19022
19409
|
*/
|
|
19023
19410
|
404: Problem;
|
|
19411
|
+
/**
|
|
19412
|
+
* Unprocessable Content
|
|
19413
|
+
*/
|
|
19414
|
+
422: Problem;
|
|
19024
19415
|
};
|
|
19025
19416
|
export type UpdatePositionError = UpdatePositionErrors[keyof UpdatePositionErrors];
|
|
19026
19417
|
export type UpdatePositionResponses = {
|
|
@@ -19766,6 +20157,10 @@ export type DeleteTimeEntryErrors = {
|
|
|
19766
20157
|
* Forbidden
|
|
19767
20158
|
*/
|
|
19768
20159
|
403: Problem;
|
|
20160
|
+
/**
|
|
20161
|
+
* Not Found
|
|
20162
|
+
*/
|
|
20163
|
+
404: Problem;
|
|
19769
20164
|
/**
|
|
19770
20165
|
* Unprocessable Content
|
|
19771
20166
|
*/
|
|
@@ -19799,6 +20194,10 @@ export type UpdateTimeEntryErrors = {
|
|
|
19799
20194
|
* Forbidden
|
|
19800
20195
|
*/
|
|
19801
20196
|
403: Problem;
|
|
20197
|
+
/**
|
|
20198
|
+
* Not Found
|
|
20199
|
+
*/
|
|
20200
|
+
404: Problem;
|
|
19802
20201
|
/**
|
|
19803
20202
|
* Unprocessable Content
|
|
19804
20203
|
*/
|
|
@@ -20877,6 +21276,28 @@ export type GetTimeCardActualResponses = {
|
|
|
20877
21276
|
200: TimeCardActualsResponseObject;
|
|
20878
21277
|
};
|
|
20879
21278
|
export type GetTimeCardActualResponse = GetTimeCardActualResponses[keyof GetTimeCardActualResponses];
|
|
21279
|
+
export type ListTodoInboxData = {
|
|
21280
|
+
body?: never;
|
|
21281
|
+
path?: never;
|
|
21282
|
+
query?: never;
|
|
21283
|
+
url: '/api/v1/todos';
|
|
21284
|
+
};
|
|
21285
|
+
export type ListTodoInboxErrors = {
|
|
21286
|
+
/**
|
|
21287
|
+
* Forbidden
|
|
21288
|
+
*/
|
|
21289
|
+
403: Problem;
|
|
21290
|
+
};
|
|
21291
|
+
export type ListTodoInboxError = ListTodoInboxErrors[keyof ListTodoInboxErrors];
|
|
21292
|
+
export type ListTodoInboxResponses = {
|
|
21293
|
+
/**
|
|
21294
|
+
* Success
|
|
21295
|
+
*/
|
|
21296
|
+
200: {
|
|
21297
|
+
data: Array<TodoInboxEntryResponseObject>;
|
|
21298
|
+
};
|
|
21299
|
+
};
|
|
21300
|
+
export type ListTodoInboxResponse = ListTodoInboxResponses[keyof ListTodoInboxResponses];
|
|
20880
21301
|
export type ListUserRolesData = {
|
|
20881
21302
|
body?: never;
|
|
20882
21303
|
path?: never;
|
|
@@ -21268,9 +21689,9 @@ export type ListUsersData = {
|
|
|
21268
21689
|
path?: never;
|
|
21269
21690
|
query?: {
|
|
21270
21691
|
/**
|
|
21271
|
-
* Filter users by their
|
|
21692
|
+
* Filter users by their employment lifecycle in the company, the same vocabulary `employment_state` publishes on each user. Defaults to `active` (an employment in effect now); `scheduled` returns employments that have not begun; `terminated` returns employments that have ended, with nothing current and nothing upcoming; `none` returns people your company sees without employing, which is its role holders and its invitees; `all` returns everyone your company sees.
|
|
21272
21693
|
*/
|
|
21273
|
-
'filter[state]'?: 'active' | 'terminated' | 'all';
|
|
21694
|
+
'filter[state]'?: 'active' | 'scheduled' | 'terminated' | 'none' | 'all';
|
|
21274
21695
|
/**
|
|
21275
21696
|
* This pagination cursor corresponds to the cursor value found in the response in
|
|
21276
21697
|
* `meta.page.next_cursor`.
|