@dsptch-work/api-client 0.51.0 → 0.52.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 +30 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +68 -3
- package/dist/gen/sdk.gen.js +119 -2
- package/dist/gen/types.gen.d.ts +435 -13
- package/dist/gen/zod.gen.d.ts +403 -2
- package/dist/gen/zod.gen.js +160 -2
- package/package.json +1 -1
package/dist/gen/zod.gen.js
CHANGED
|
@@ -234,12 +234,24 @@ export const zProblem = z.object({
|
|
|
234
234
|
*
|
|
235
235
|
* ## 422
|
|
236
236
|
*
|
|
237
|
+
* ### aggregate_time_mode_required
|
|
238
|
+
*
|
|
239
|
+
* **Aggregate Time Mode Required**
|
|
240
|
+
*
|
|
241
|
+
* Writing a job time card day is only supported when that day's pay schedule keeps time in aggregate mode. A day on a base-mode schedule cannot be written this way; record that time through time entries instead.
|
|
242
|
+
*
|
|
237
243
|
* ### attachment_not_image
|
|
238
244
|
*
|
|
239
245
|
* **Attachment Not An Image**
|
|
240
246
|
*
|
|
241
247
|
* The upload behind an image attachment's signed id is not an image content type. Upload an image file.
|
|
242
248
|
*
|
|
249
|
+
* ### certified_payroll_export_blocked
|
|
250
|
+
*
|
|
251
|
+
* **Certified Payroll Export Blocked**
|
|
252
|
+
*
|
|
253
|
+
* 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.
|
|
254
|
+
*
|
|
243
255
|
* ### certified_payroll_format_unavailable
|
|
244
256
|
*
|
|
245
257
|
* **Certified Payroll Format Unavailable**
|
|
@@ -427,7 +439,9 @@ export const zProblemTypeCatalog = z.enum([
|
|
|
427
439
|
'span_beyond_timeline_end',
|
|
428
440
|
'version_overlap',
|
|
429
441
|
'precondition_failed',
|
|
442
|
+
'aggregate_time_mode_required',
|
|
430
443
|
'attachment_not_image',
|
|
444
|
+
'certified_payroll_export_blocked',
|
|
431
445
|
'certified_payroll_format_unavailable',
|
|
432
446
|
'company_not_employer',
|
|
433
447
|
'confirm_apprenticeship_conflict',
|
|
@@ -633,6 +647,7 @@ export const zCompetencyCriterionResponseObject = z.object({
|
|
|
633
647
|
number: z.string().nullable(),
|
|
634
648
|
body: z.string().nullable(),
|
|
635
649
|
evidence_note: z.string().nullable(),
|
|
650
|
+
allow_not_applicable: z.boolean(),
|
|
636
651
|
assessment_methods: z.array(z.enum([
|
|
637
652
|
'direct_observation',
|
|
638
653
|
'simulation',
|
|
@@ -653,6 +668,7 @@ export const zCompetencyCriterionParameters = z.object({
|
|
|
653
668
|
number: z.string().nullish(),
|
|
654
669
|
body: z.string().nullish(),
|
|
655
670
|
evidence_note: z.string().nullish(),
|
|
671
|
+
allow_not_applicable: z.boolean().optional(),
|
|
656
672
|
assessment_methods: z.array(z.enum([
|
|
657
673
|
'direct_observation',
|
|
658
674
|
'simulation',
|
|
@@ -3540,7 +3556,7 @@ export const zDsptchCprImportResponseObject = z.object({
|
|
|
3540
3556
|
updated_at: z.iso.datetime()
|
|
3541
3557
|
});
|
|
3542
3558
|
/**
|
|
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.
|
|
3559
|
+
* 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
3560
|
*
|
|
3545
3561
|
* 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
3562
|
*
|
|
@@ -3773,6 +3789,19 @@ export const zJobTimeCardDayResponseObject = z.object({
|
|
|
3773
3789
|
created_at: z.iso.datetime(),
|
|
3774
3790
|
updated_at: z.iso.datetime()
|
|
3775
3791
|
});
|
|
3792
|
+
/**
|
|
3793
|
+
* Partial update of an aggregate-mode job time card day. Send only the fields to change; omitted fields keep their current values. Minutes are integer minutes, not GUI hours. Derived totals such as minutes_worked and cumulatives are not writable.
|
|
3794
|
+
*/
|
|
3795
|
+
export const zJobTimeCardDayUpdateParameters = z.object({
|
|
3796
|
+
overtime_minutes_worked: z.object({
|
|
3797
|
+
1: z.int().gte(0),
|
|
3798
|
+
1.5: z.int().gte(0),
|
|
3799
|
+
2: z.int().gte(0)
|
|
3800
|
+
}).optional(),
|
|
3801
|
+
pay_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
3802
|
+
one_five_x_adder_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
|
|
3803
|
+
two_x_adder_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional()
|
|
3804
|
+
});
|
|
3776
3805
|
/**
|
|
3777
3806
|
* A single approval event on a time card. Manager and worker approvals are both recorded here; which role filed it is conveyed by the endpoint, not the payload.
|
|
3778
3807
|
*/
|
|
@@ -5392,7 +5421,7 @@ export const zJobCaEcprXmlExportResponseObject = z.object({
|
|
|
5392
5421
|
created_at: z.iso.datetime()
|
|
5393
5422
|
});
|
|
5394
5423
|
/**
|
|
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.
|
|
5424
|
+
* 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
5425
|
*/
|
|
5397
5426
|
export const zJobCaEcprXmlExportCreateParameters = z.object({
|
|
5398
5427
|
start_date: z.iso.date(),
|
|
@@ -6034,6 +6063,7 @@ export const zProductionJobScopePriceResponseObject = z.object({
|
|
|
6034
6063
|
export const zProductionPlannedFeatureTaskParameters = z.object({
|
|
6035
6064
|
name: z.string().optional(),
|
|
6036
6065
|
description: z.string().nullish(),
|
|
6066
|
+
planned_start_date: z.iso.date().nullish(),
|
|
6037
6067
|
time_due: z.iso.datetime().nullish(),
|
|
6038
6068
|
tz_name: z.string().optional(),
|
|
6039
6069
|
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
@@ -6046,6 +6076,7 @@ export const zProductionPlannedFeatureTaskParameters = z.object({
|
|
|
6046
6076
|
export const zProductionPlannedFeatureTaskUpdateParameters = z.object({
|
|
6047
6077
|
name: z.string().optional(),
|
|
6048
6078
|
description: z.string().nullish(),
|
|
6079
|
+
planned_start_date: z.iso.date().nullish(),
|
|
6049
6080
|
time_due: z.iso.datetime().nullish(),
|
|
6050
6081
|
tz_name: z.string().optional(),
|
|
6051
6082
|
task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20
- ‧- ]|[‧]/)).optional(),
|
|
@@ -6070,12 +6101,68 @@ export const zProductionPlannedFeatureTaskResponseObject = z.object({
|
|
|
6070
6101
|
archived_at: z.iso.datetime().nullable(),
|
|
6071
6102
|
name: z.string(),
|
|
6072
6103
|
description: z.string(),
|
|
6104
|
+
planned_start_date: z.iso.date().nullable(),
|
|
6073
6105
|
time_due: z.iso.datetime().nullable(),
|
|
6074
6106
|
tz_name: z.string(),
|
|
6075
6107
|
task_assignee_user_ids: z.array(z.string()),
|
|
6076
6108
|
created_at: z.iso.datetime(),
|
|
6077
6109
|
updated_at: z.iso.datetime()
|
|
6078
6110
|
});
|
|
6111
|
+
/**
|
|
6112
|
+
* Optional phase planning and explicit retained work facts, independently of whole-service completion.
|
|
6113
|
+
*/
|
|
6114
|
+
export const zProductionPhaseParameters = z.object({
|
|
6115
|
+
name: z.string(),
|
|
6116
|
+
description: z.string().nullish(),
|
|
6117
|
+
planned_start_date: z.iso.date().nullish(),
|
|
6118
|
+
time_due: z.iso.datetime().nullish(),
|
|
6119
|
+
tz_name: z.string().optional(),
|
|
6120
|
+
performed_by_user_id: z.string().max(36).regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/).optional()
|
|
6121
|
+
});
|
|
6122
|
+
/**
|
|
6123
|
+
* Optional phase planning and explicit retained work facts, independently of whole-service completion.
|
|
6124
|
+
*/
|
|
6125
|
+
export const zProductionPhaseUpdateParameters = z.object({
|
|
6126
|
+
name: z.string().optional(),
|
|
6127
|
+
description: z.string().nullish(),
|
|
6128
|
+
planned_start_date: z.iso.date().nullish(),
|
|
6129
|
+
time_due: z.iso.datetime().nullish(),
|
|
6130
|
+
tz_name: z.string().optional(),
|
|
6131
|
+
performed_by_user_id: z.string().max(36).regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/).optional()
|
|
6132
|
+
});
|
|
6133
|
+
/**
|
|
6134
|
+
* Optional phase planning and explicit retained work facts, independently of whole-service completion.
|
|
6135
|
+
*/
|
|
6136
|
+
export const zProductionPhaseArchiveParameters = z.object({
|
|
6137
|
+
archived: z.boolean(),
|
|
6138
|
+
performed_by_user_id: z.string().max(36).regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/).optional()
|
|
6139
|
+
});
|
|
6140
|
+
/**
|
|
6141
|
+
* Optional phase planning and explicit retained work facts, independently of whole-service completion.
|
|
6142
|
+
*/
|
|
6143
|
+
export const zProductionPhaseResponseObject = z.object({
|
|
6144
|
+
id: z.string(),
|
|
6145
|
+
production_planned_feature_task_id: z.string(),
|
|
6146
|
+
production_job_scope_price_id: z.string(),
|
|
6147
|
+
task_id: z.string(),
|
|
6148
|
+
name: z.string(),
|
|
6149
|
+
description: z.string(),
|
|
6150
|
+
planned_start_date: z.iso.date().nullable(),
|
|
6151
|
+
time_due: z.iso.datetime().nullable(),
|
|
6152
|
+
tz_name: z.string(),
|
|
6153
|
+
actual_start_date: z.iso.date().nullable(),
|
|
6154
|
+
archived_at: z.iso.datetime().nullable(),
|
|
6155
|
+
created_at: z.iso.datetime(),
|
|
6156
|
+
updated_at: z.iso.datetime(),
|
|
6157
|
+
completion: z.object({
|
|
6158
|
+
id: z.string(),
|
|
6159
|
+
work_date: z.iso.date(),
|
|
6160
|
+
notes: z.string().nullable(),
|
|
6161
|
+
created_by_user_id: z.string(),
|
|
6162
|
+
position_ids: z.array(z.string()),
|
|
6163
|
+
withdrawn_at: z.iso.datetime().nullable()
|
|
6164
|
+
}).nullable()
|
|
6165
|
+
});
|
|
6079
6166
|
/**
|
|
6080
6167
|
* Create a dated commitment on a Feature-tracked Job scope. The date and condition object are required; condition.requirement_kind is required. Omission answers 400. The server chooses and owns the condition type and identity. A Quantity-tracked scope answers 422. No performed_by_user_id is required or accepted; audit records the authenticated user, or null for a company key.
|
|
6081
6168
|
*/
|
|
@@ -11727,6 +11814,69 @@ export const zUpdateArchivePath = z.object({
|
|
|
11727
11814
|
* Success
|
|
11728
11815
|
*/
|
|
11729
11816
|
export const zUpdateArchiveResponse = zProductionPlannedFeatureTaskResponseObject;
|
|
11817
|
+
export const zListPhasesPath = z.object({
|
|
11818
|
+
job_id: z.string(),
|
|
11819
|
+
job_scope_price_id: z.string(),
|
|
11820
|
+
planned_feature_task_id: z.string()
|
|
11821
|
+
});
|
|
11822
|
+
export const zListPhasesQuery = z.object({
|
|
11823
|
+
'filter[archived]': z.boolean().optional(),
|
|
11824
|
+
filter: z.string().optional(),
|
|
11825
|
+
'filter[unexpected]': z.string().optional(),
|
|
11826
|
+
'page[cursor]': z.string().optional(),
|
|
11827
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
11828
|
+
page: z.string().optional()
|
|
11829
|
+
});
|
|
11830
|
+
/**
|
|
11831
|
+
* Success
|
|
11832
|
+
*/
|
|
11833
|
+
export const zListPhasesResponse = z.object({
|
|
11834
|
+
meta: zMeta,
|
|
11835
|
+
links: zLinks,
|
|
11836
|
+
data: z.array(zProductionPhaseResponseObject)
|
|
11837
|
+
});
|
|
11838
|
+
export const zCreatePhaseBody = zProductionPhaseParameters;
|
|
11839
|
+
export const zCreatePhasePath = z.object({
|
|
11840
|
+
job_id: z.string(),
|
|
11841
|
+
job_scope_price_id: z.string(),
|
|
11842
|
+
planned_feature_task_id: z.string()
|
|
11843
|
+
});
|
|
11844
|
+
/**
|
|
11845
|
+
* Created
|
|
11846
|
+
*/
|
|
11847
|
+
export const zCreatePhaseResponse = zProductionPhaseResponseObject;
|
|
11848
|
+
export const zGetPhasePath = z.object({
|
|
11849
|
+
job_id: z.string(),
|
|
11850
|
+
job_scope_price_id: z.string(),
|
|
11851
|
+
planned_feature_task_id: z.string(),
|
|
11852
|
+
id: z.string()
|
|
11853
|
+
});
|
|
11854
|
+
/**
|
|
11855
|
+
* Success
|
|
11856
|
+
*/
|
|
11857
|
+
export const zGetPhaseResponse = zProductionPhaseResponseObject;
|
|
11858
|
+
export const zUpdatePhaseBody = zProductionPhaseUpdateParameters;
|
|
11859
|
+
export const zUpdatePhasePath = z.object({
|
|
11860
|
+
job_id: z.string(),
|
|
11861
|
+
job_scope_price_id: z.string(),
|
|
11862
|
+
planned_feature_task_id: z.string(),
|
|
11863
|
+
id: z.string()
|
|
11864
|
+
});
|
|
11865
|
+
/**
|
|
11866
|
+
* Success
|
|
11867
|
+
*/
|
|
11868
|
+
export const zUpdatePhaseResponse = zProductionPhaseResponseObject;
|
|
11869
|
+
export const zSetPhaseArchiveBody = zProductionPhaseArchiveParameters;
|
|
11870
|
+
export const zSetPhaseArchivePath = z.object({
|
|
11871
|
+
job_id: z.string(),
|
|
11872
|
+
job_scope_price_id: z.string(),
|
|
11873
|
+
planned_feature_task_id: z.string(),
|
|
11874
|
+
phase_id: z.string()
|
|
11875
|
+
});
|
|
11876
|
+
/**
|
|
11877
|
+
* Success
|
|
11878
|
+
*/
|
|
11879
|
+
export const zSetPhaseArchiveResponse = zProductionPhaseResponseObject;
|
|
11730
11880
|
export const zListPlannedFeatureTasksPath = z.object({
|
|
11731
11881
|
job_id: z.string(),
|
|
11732
11882
|
job_scope_price_id: z.string()
|
|
@@ -15001,6 +15151,14 @@ export const zGetJobTimeCardDayPath = z.object({
|
|
|
15001
15151
|
* Success
|
|
15002
15152
|
*/
|
|
15003
15153
|
export const zGetJobTimeCardDayResponse = zJobTimeCardDayResponseObject;
|
|
15154
|
+
export const zUpdateJobTimeCardDayBody = zJobTimeCardDayUpdateParameters;
|
|
15155
|
+
export const zUpdateJobTimeCardDayPath = z.object({
|
|
15156
|
+
id: z.string()
|
|
15157
|
+
});
|
|
15158
|
+
/**
|
|
15159
|
+
* Success
|
|
15160
|
+
*/
|
|
15161
|
+
export const zUpdateJobTimeCardDayResponse = zJobTimeCardDayResponseObject;
|
|
15004
15162
|
export const zCreateManagerTimeEntryApprovalBody = zManagerTimeEntryApprovalParameters;
|
|
15005
15163
|
export const zCreateManagerTimeEntryApprovalPath = z.object({
|
|
15006
15164
|
time_entry_id: z.string()
|