@dsptch-work/api-client 0.51.0 → 0.51.1
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 +9 -0
- package/dist/gen/sdk.gen.d.ts +2 -0
- package/dist/gen/sdk.gen.js +2 -0
- package/dist/gen/types.gen.d.ts +9 -3
- package/dist/gen/zod.gen.d.ts +9 -2
- package/dist/gen/zod.gen.js +9 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,15 @@ minor bump until `1.0.0`. See [RELEASING.md](./RELEASING.md) for the release and
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.51.1] - 2026-11-06
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- `Jobs.createCaEcprXmlExport()` returns `422` with problem type `certified_payroll_export_blocked` when a compliance check blocks the export. Resolve the failing checks before retrying. `ProblemTypeCatalog` and `zProblemTypeCatalog` add that value; update exhaustive handlers as needed.
|
|
15
|
+
- `CprImports.createDsptchCprImport()` rejects a prevailing-wage row with hours at a multiplier whose rate is zero or negative. It returns `422` naming `non_positive_rate_for_prevailing_wage_hours` and writes nothing. Request types are unchanged.
|
|
16
|
+
|
|
17
|
+
See the [API changelog](https://dsptch.app/support/docs/developers/api-changelog#2026-11-06) for the complete REST contract changes.
|
|
18
|
+
|
|
10
19
|
## [0.51.0] - 2026-11-05
|
|
11
20
|
|
|
12
21
|
### Added
|
package/dist/gen/sdk.gen.d.ts
CHANGED
|
@@ -2700,6 +2700,8 @@ export declare class Jobs {
|
|
|
2700
2700
|
* `start_date`..`end_date`. Returns the pending export (201); poll the member
|
|
2701
2701
|
* GET for generation status and the file URL. Requires a user-scoped key. A
|
|
2702
2702
|
* job that does not offer CA eCPR is 422 `certified_payroll_format_unavailable`.
|
|
2703
|
+
* Failing compliance checks that block the export are 422
|
|
2704
|
+
* `certified_payroll_export_blocked`.
|
|
2703
2705
|
* A window with no reportable pay periods is 422 `nothing_exportable`.
|
|
2704
2706
|
* Does not start DocuSeal signing.
|
|
2705
2707
|
*
|
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -4549,6 +4549,8 @@ export class Jobs {
|
|
|
4549
4549
|
* `start_date`..`end_date`. Returns the pending export (201); poll the member
|
|
4550
4550
|
* GET for generation status and the file URL. Requires a user-scoped key. A
|
|
4551
4551
|
* job that does not offer CA eCPR is 422 `certified_payroll_format_unavailable`.
|
|
4552
|
+
* Failing compliance checks that block the export are 422
|
|
4553
|
+
* `certified_payroll_export_blocked`.
|
|
4552
4554
|
* A window with no reportable pay periods is 422 `nothing_exportable`.
|
|
4553
4555
|
* Does not start DocuSeal signing.
|
|
4554
4556
|
*
|
package/dist/gen/types.gen.d.ts
CHANGED
|
@@ -265,6 +265,12 @@ export type Problem = {
|
|
|
265
265
|
*
|
|
266
266
|
* The upload behind an image attachment's signed id is not an image content type. Upload an image file.
|
|
267
267
|
*
|
|
268
|
+
* ### certified_payroll_export_blocked
|
|
269
|
+
*
|
|
270
|
+
* **Certified Payroll Export Blocked**
|
|
271
|
+
*
|
|
272
|
+
* Failing compliance checks block this certified payroll export: a job-level check on the named job, or a time-card check on a worker the export would include. These are the same checks that disable Export in the web app. Resolve the failing checks, then retry.
|
|
273
|
+
*
|
|
268
274
|
* ### certified_payroll_format_unavailable
|
|
269
275
|
*
|
|
270
276
|
* **Certified Payroll Format Unavailable**
|
|
@@ -418,7 +424,7 @@ export type Problem = {
|
|
|
418
424
|
* Another write to the same resource held it for longer than this request was willing to wait, or collided with it, so nothing was applied. The request itself is fine — resend it unchanged after the `Retry-After` window.
|
|
419
425
|
*
|
|
420
426
|
*/
|
|
421
|
-
export type ProblemTypeCatalog = 'blank_axis' | 'invalid_cursor' | 'invalid_filter_key' | 'invalid_limit' | 'invalid_signature' | 'malformed_body' | 'non_range_filter_value' | 'non_scalar_axis' | 'non_scalar_filter_value' | 'parameter_missing' | 'parameter_not_object' | 'unknown_axis' | 'unknown_key' | 'unsupported_axis' | 'valid_axis_on_timeline' | 'unauthorized' | 'company_scoped_key_required' | 'forbidden' | 'forbidden_key' | 'insufficient_api_key_scope' | 'user_scoped_key_required' | 'not_found' | 'already_subscribed' | 'already_terminated' | 'authorization_revoked' | 'import_in_progress' | 'pay_schedule_already_exists' | 'pay_schedule_deletion_in_progress' | 'pay_schedule_deletion_refused' | 'product_archived' | 'span_beyond_timeline_end' | 'version_overlap' | 'precondition_failed' | 'attachment_not_image' | 'certified_payroll_format_unavailable' | 'company_not_employer' | 'confirm_apprenticeship_conflict' | 'destroy_restricted' | 'interval_too_wide' | 'invalid_date' | 'invalid_filter_value' | 'invalid_iso8601_duration' | 'invalid_placement_move' | 'invalid_signed_id' | 'not_incomplete_permanent_copy' | 'nothing_exportable' | 'nothing_to_cancel' | 'pagination_failed' | 'subtype_foreign_keys' | 'synced_determination' | 'user_not_company_member' | 'validation_failed' | 'wage_schedule_outside_program' | 'precondition_required' | 'too_many_requests' | 'internal_error' | 'database_timeout' | 'write_contended';
|
|
427
|
+
export type ProblemTypeCatalog = 'blank_axis' | 'invalid_cursor' | 'invalid_filter_key' | 'invalid_limit' | 'invalid_signature' | 'malformed_body' | 'non_range_filter_value' | 'non_scalar_axis' | 'non_scalar_filter_value' | 'parameter_missing' | 'parameter_not_object' | 'unknown_axis' | 'unknown_key' | 'unsupported_axis' | 'valid_axis_on_timeline' | 'unauthorized' | 'company_scoped_key_required' | 'forbidden' | 'forbidden_key' | 'insufficient_api_key_scope' | 'user_scoped_key_required' | 'not_found' | 'already_subscribed' | 'already_terminated' | 'authorization_revoked' | 'import_in_progress' | 'pay_schedule_already_exists' | 'pay_schedule_deletion_in_progress' | 'pay_schedule_deletion_refused' | 'product_archived' | 'span_beyond_timeline_end' | 'version_overlap' | 'precondition_failed' | 'attachment_not_image' | 'certified_payroll_export_blocked' | 'certified_payroll_format_unavailable' | 'company_not_employer' | 'confirm_apprenticeship_conflict' | 'destroy_restricted' | 'interval_too_wide' | 'invalid_date' | 'invalid_filter_value' | 'invalid_iso8601_duration' | 'invalid_placement_move' | 'invalid_signed_id' | 'not_incomplete_permanent_copy' | 'nothing_exportable' | 'nothing_to_cancel' | 'pagination_failed' | 'subtype_foreign_keys' | 'synced_determination' | 'user_not_company_member' | 'validation_failed' | 'wage_schedule_outside_program' | 'precondition_required' | 'too_many_requests' | 'internal_error' | 'database_timeout' | 'write_contended';
|
|
422
428
|
export type ApiKeyScopeResponseObject = {
|
|
423
429
|
resource: string;
|
|
424
430
|
action: 'read' | 'create' | 'update' | 'delete';
|
|
@@ -7528,7 +7534,7 @@ export type DsptchCprImportResponseObject = {
|
|
|
7528
7534
|
updated_at: string;
|
|
7529
7535
|
};
|
|
7530
7536
|
/**
|
|
7531
|
-
* 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.
|
|
7537
|
+
* 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. On a job that tracks prevailing wage, each rate must also be more than 0 when the row has hours at its multiplier: a row that prices such hours at 0 or below answers 422 naming `non_positive_rate_for_prevailing_wage_hours`, and nothing is written. 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.
|
|
7532
7538
|
*
|
|
7533
7539
|
* 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.
|
|
7534
7540
|
*
|
|
@@ -11311,7 +11317,7 @@ export type JobCaEcprXmlExportsResponseObject = {
|
|
|
11311
11317
|
data: Array<JobCaEcprXmlExportResponseObject>;
|
|
11312
11318
|
};
|
|
11313
11319
|
/**
|
|
11314
|
-
* Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. A window with no reportable pay periods answers 422 nothing_exportable.
|
|
11320
|
+
* Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. Failing compliance checks that block the export answer 422 certified_payroll_export_blocked. A window with no reportable pay periods answers 422 nothing_exportable.
|
|
11315
11321
|
*/
|
|
11316
11322
|
export type JobCaEcprXmlExportCreateParameters = {
|
|
11317
11323
|
/**
|
package/dist/gen/zod.gen.d.ts
CHANGED
|
@@ -239,6 +239,12 @@ export declare const zProblem: z.ZodObject<{
|
|
|
239
239
|
*
|
|
240
240
|
* The upload behind an image attachment's signed id is not an image content type. Upload an image file.
|
|
241
241
|
*
|
|
242
|
+
* ### certified_payroll_export_blocked
|
|
243
|
+
*
|
|
244
|
+
* **Certified Payroll Export Blocked**
|
|
245
|
+
*
|
|
246
|
+
* Failing compliance checks block this certified payroll export: a job-level check on the named job, or a time-card check on a worker the export would include. These are the same checks that disable Export in the web app. Resolve the failing checks, then retry.
|
|
247
|
+
*
|
|
242
248
|
* ### certified_payroll_format_unavailable
|
|
243
249
|
*
|
|
244
250
|
* **Certified Payroll Format Unavailable**
|
|
@@ -427,6 +433,7 @@ export declare const zProblemTypeCatalog: z.ZodEnum<{
|
|
|
427
433
|
version_overlap: "version_overlap";
|
|
428
434
|
precondition_failed: "precondition_failed";
|
|
429
435
|
attachment_not_image: "attachment_not_image";
|
|
436
|
+
certified_payroll_export_blocked: "certified_payroll_export_blocked";
|
|
430
437
|
certified_payroll_format_unavailable: "certified_payroll_format_unavailable";
|
|
431
438
|
company_not_employer: "company_not_employer";
|
|
432
439
|
confirm_apprenticeship_conflict: "confirm_apprenticeship_conflict";
|
|
@@ -3819,7 +3826,7 @@ export declare const zDsptchCprImportResponseObject: z.ZodObject<{
|
|
|
3819
3826
|
updated_at: z.ZodISODateTime;
|
|
3820
3827
|
}, z.core.$strip>;
|
|
3821
3828
|
/**
|
|
3822
|
-
* 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.
|
|
3829
|
+
* 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. On a job that tracks prevailing wage, each rate must also be more than 0 when the row has hours at its multiplier: a row that prices such hours at 0 or below answers 422 naming `non_positive_rate_for_prevailing_wage_hours`, and nothing is written. 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.
|
|
3823
3830
|
*
|
|
3824
3831
|
* 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.
|
|
3825
3832
|
*
|
|
@@ -5863,7 +5870,7 @@ export declare const zJobCaEcprXmlExportResponseObject: z.ZodObject<{
|
|
|
5863
5870
|
created_at: z.ZodISODateTime;
|
|
5864
5871
|
}, z.core.$strip>;
|
|
5865
5872
|
/**
|
|
5866
|
-
* Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. A window with no reportable pay periods answers 422 nothing_exportable.
|
|
5873
|
+
* Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. Failing compliance checks that block the export answer 422 certified_payroll_export_blocked. A window with no reportable pay periods answers 422 nothing_exportable.
|
|
5867
5874
|
*/
|
|
5868
5875
|
export declare const zJobCaEcprXmlExportCreateParameters: z.ZodObject<{
|
|
5869
5876
|
start_date: z.ZodISODate;
|
package/dist/gen/zod.gen.js
CHANGED
|
@@ -240,6 +240,12 @@ export const zProblem = z.object({
|
|
|
240
240
|
*
|
|
241
241
|
* The upload behind an image attachment's signed id is not an image content type. Upload an image file.
|
|
242
242
|
*
|
|
243
|
+
* ### certified_payroll_export_blocked
|
|
244
|
+
*
|
|
245
|
+
* **Certified Payroll Export Blocked**
|
|
246
|
+
*
|
|
247
|
+
* Failing compliance checks block this certified payroll export: a job-level check on the named job, or a time-card check on a worker the export would include. These are the same checks that disable Export in the web app. Resolve the failing checks, then retry.
|
|
248
|
+
*
|
|
243
249
|
* ### certified_payroll_format_unavailable
|
|
244
250
|
*
|
|
245
251
|
* **Certified Payroll Format Unavailable**
|
|
@@ -428,6 +434,7 @@ export const zProblemTypeCatalog = z.enum([
|
|
|
428
434
|
'version_overlap',
|
|
429
435
|
'precondition_failed',
|
|
430
436
|
'attachment_not_image',
|
|
437
|
+
'certified_payroll_export_blocked',
|
|
431
438
|
'certified_payroll_format_unavailable',
|
|
432
439
|
'company_not_employer',
|
|
433
440
|
'confirm_apprenticeship_conflict',
|
|
@@ -3540,7 +3547,7 @@ export const zDsptchCprImportResponseObject = z.object({
|
|
|
3540
3547
|
updated_at: z.iso.datetime()
|
|
3541
3548
|
});
|
|
3542
3549
|
/**
|
|
3543
|
-
* 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.
|
|
3550
|
+
* 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. On a job that tracks prevailing wage, each rate must also be more than 0 when the row has hours at its multiplier: a row that prices such hours at 0 or below answers 422 naming `non_positive_rate_for_prevailing_wage_hours`, and nothing is written. 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.
|
|
3544
3551
|
*
|
|
3545
3552
|
* 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.
|
|
3546
3553
|
*
|
|
@@ -5392,7 +5399,7 @@ export const zJobCaEcprXmlExportResponseObject = z.object({
|
|
|
5392
5399
|
created_at: z.iso.datetime()
|
|
5393
5400
|
});
|
|
5394
5401
|
/**
|
|
5395
|
-
* Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. A window with no reportable pay periods answers 422 nothing_exportable.
|
|
5402
|
+
* Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. Failing compliance checks that block the export answer 422 certified_payroll_export_blocked. A window with no reportable pay periods answers 422 nothing_exportable.
|
|
5396
5403
|
*/
|
|
5397
5404
|
export const zJobCaEcprXmlExportCreateParameters = z.object({
|
|
5398
5405
|
start_date: z.iso.date(),
|