@dsptch-work/api-client 0.41.0 → 0.42.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.
@@ -234,6 +234,12 @@ export const zProblem = z.object({
234
234
  *
235
235
  * The upload behind an image attachment's signed id is not an image content type. Upload an image file.
236
236
  *
237
+ * ### certified_payroll_format_unavailable
238
+ *
239
+ * **Certified Payroll Format Unavailable**
240
+ *
241
+ * The named job does not offer this certified payroll format. WH-347 is available only on a job that tracks federal prevailing wage. Use a job that offers the format.
242
+ *
237
243
  * ### company_not_employer
238
244
  *
239
245
  * **Company Not Program Employer**
@@ -288,6 +294,18 @@ export const zProblem = z.object({
288
294
  *
289
295
  * An attachment signed id names no upload this endpoint can read. A signed id is issued for one `resource` and verifies only there, so an id for a different resource is indistinguishable from one that is malformed, expired, or tampered with, and all of them answer alike. The message names the resource the upload needed; upload the file again to the direct-uploads endpoint naming it, and pass the signed id that call returns.
290
296
  *
297
+ * ### not_incomplete_permanent_copy
298
+ *
299
+ * **Not An Incomplete Permanent Copy**
300
+ *
301
+ * Ending a form assignment task is allowed only for the open incomplete permanent copy. Completed copies, non-permanent rows, and other uid-family members are refused. Re-read the assignment and end only that open copy.
302
+ *
303
+ * ### nothing_exportable
304
+ *
305
+ * **Nothing Exportable**
306
+ *
307
+ * The requested date range has no reportable pay periods to file for this job. Certified payroll starts at the first week with PWA work and includes only periods whose pay date has elapsed (or, in aggregate mode, periods that have ended). Widen or shift the range, or wait until a period is reportable.
308
+ *
291
309
  * ### nothing_to_cancel
292
310
  *
293
311
  * **Nothing To Cancel**
@@ -403,6 +421,7 @@ export const zProblemTypeCatalog = z.enum([
403
421
  'version_overlap',
404
422
  'precondition_failed',
405
423
  'attachment_not_image',
424
+ 'certified_payroll_format_unavailable',
406
425
  'company_not_employer',
407
426
  'confirm_apprenticeship_conflict',
408
427
  'destroy_restricted',
@@ -412,6 +431,8 @@ export const zProblemTypeCatalog = z.enum([
412
431
  'invalid_iso8601_duration',
413
432
  'invalid_placement_move',
414
433
  'invalid_signed_id',
434
+ 'not_incomplete_permanent_copy',
435
+ 'nothing_exportable',
415
436
  'nothing_to_cancel',
416
437
  'pagination_failed',
417
438
  'subtype_foreign_keys',
@@ -2923,6 +2944,18 @@ export const zTimeEntryResponseObject = z.object({
2923
2944
  hourly_rate_cents: z.string().nullish(),
2924
2945
  currency: z.string().optional(),
2925
2946
  hourly_rate_src_type: z.string().nullish(),
2947
+ one_five_x_adder_rate_cents: z.string().nullish(),
2948
+ one_five_x_adder_rate_src_type: z.enum([
2949
+ 'position',
2950
+ 'prevailing_wage',
2951
+ 'custom'
2952
+ ]).nullish(),
2953
+ two_x_adder_rate_cents: z.string().nullish(),
2954
+ two_x_adder_rate_src_type: z.enum([
2955
+ 'position',
2956
+ 'prevailing_wage',
2957
+ 'custom'
2958
+ ]).nullish(),
2926
2959
  timekeeping_pay_period_id: z.string(),
2927
2960
  start_time: z.iso.datetime(),
2928
2961
  end_time: z.iso.datetime(),
@@ -2971,6 +3004,8 @@ export const zTimeEntryCreateParameters = z.object({
2971
3004
  state: z.string().nullish(),
2972
3005
  description: z.string().nullish(),
2973
3006
  hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
3007
+ one_five_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
3008
+ two_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
2974
3009
  feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
2975
3010
  feature_allocation_acknowledged: z.boolean().optional()
2976
3011
  });
@@ -2985,6 +3020,8 @@ export const zTimeEntryUpdateParameters = z.object({
2985
3020
  state: z.string().nullish(),
2986
3021
  description: z.string().nullish(),
2987
3022
  hourly_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
3023
+ one_five_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
3024
+ two_x_adder_rate_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
2988
3025
  feature_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
2989
3026
  confirm_allocation_conflict: z.boolean().optional()
2990
3027
  });
@@ -5203,6 +5240,45 @@ export const zJobGoodFaithEffortExceptionUpdateParameters = z.object({
5203
5240
  no_availability_proof_signed_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
5204
5241
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional()
5205
5242
  });
5243
+ /**
5244
+ * A job-scoped WH-347 certified-payroll export. The generation handle is polled through this same document; `file` is null until a ZIP is attached. Signing fields are not published.
5245
+ */
5246
+ export const zJobWh347ExportResponseObject = z.object({
5247
+ id: z.string(),
5248
+ job_id: z.string(),
5249
+ start_date: z.iso.date(),
5250
+ end_date: z.iso.date(),
5251
+ status: z.enum([
5252
+ 'pending',
5253
+ 'processing',
5254
+ 'signing',
5255
+ 'signed',
5256
+ 'certifying',
5257
+ 'success',
5258
+ 'failed'
5259
+ ]),
5260
+ file: z.object({
5261
+ filename: z.string(),
5262
+ content_type: z.string().nullable(),
5263
+ byte_size: z.int(),
5264
+ url: z.string()
5265
+ }).nullable(),
5266
+ invalidated_at: z.iso.datetime().nullable(),
5267
+ invalidation_reason: z.enum([
5268
+ 'source_data_changed',
5269
+ 'source_records_deleted',
5270
+ 'ratio_status_changed'
5271
+ ]).nullable(),
5272
+ version: z.enum(['v1', 'v2']),
5273
+ created_at: z.iso.datetime()
5274
+ });
5275
+ /**
5276
+ * Start a job-scoped WH-347 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. Version, filename, and signing are server-owned. A job that does not offer WH-347 answers 422 certified_payroll_format_unavailable. A window with no reportable pay periods answers 422 nothing_exportable.
5277
+ */
5278
+ export const zJobWh347ExportCreateParameters = z.object({
5279
+ start_date: z.iso.date(),
5280
+ end_date: z.iso.date()
5281
+ });
5206
5282
  /**
5207
5283
  * A form-completion task attached to a job — a SurveyJS form assigned to users with a due time, optional recurrence, and reminders. Path `{id}` is the `Tasks::JobFormAssignmentTask` id, not the web show `Task#uid`.
5208
5284
  */
@@ -5767,20 +5843,20 @@ export const zPositionParameters = z.object({
5767
5843
  }).optional()
5768
5844
  });
5769
5845
  /**
5770
- * Parameters for creating a per-unit scope price on a job. `scope_kind` and `unit_price_cents` are required; omitting either answers 400, and a null or wrong-typed value answers 422.
5846
+ * Parameters for creating a per-unit scope price on a job. `scope_kind` is required; omission answers 400. Omit `unit_price_cents` or send null to create with an unknown price. Supplied nonnull prices must be nonnegative decimal strings.
5771
5847
  */
5772
5848
  export const zProductionJobScopePriceParameters = z.object({
5773
5849
  scope_kind: z.string(),
5774
- unit_price_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/),
5850
+ unit_price_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
5775
5851
  contracted_count: z.int().nullish(),
5776
5852
  unit_of_measure: z.string().optional()
5777
5853
  });
5778
5854
  /**
5779
- * Parameters for updating a per-unit scope price on a job. Every field is optional; omit a field to preserve its current value, or send null for `contracted_count` to clear it. A null or wrong-typed value for any other field answers 422. The resulting price must retain a scope kind and non-negative unit price.
5855
+ * Parameters for updating a per-unit scope price on a job. Every field is optional; omit a field to preserve its current value. Send null for `unit_price_cents` to clear the known price, or for `contracted_count` to clear the target. A null value for any other field, or a wrong-typed value, answers 422. The resulting price must retain a scope kind; supplied nonnull prices must be nonnegative decimal strings.
5780
5856
  */
5781
5857
  export const zProductionJobScopePriceUpdateParameters = z.object({
5782
5858
  scope_kind: z.string().optional(),
5783
- unit_price_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).optional(),
5859
+ unit_price_cents: z.string().regex(/^[0-9]+(\.[0-9]+)?$/).nullish(),
5784
5860
  contracted_count: z.int().nullish(),
5785
5861
  unit_of_measure: z.string().optional()
5786
5862
  });
@@ -5792,7 +5868,7 @@ export const zProductionJobScopePriceResponseObject = z.object({
5792
5868
  job_id: z.string(),
5793
5869
  scope_kind: z.string(),
5794
5870
  unit_of_measure: z.string(),
5795
- unit_price_cents: z.string().optional(),
5871
+ unit_price_cents: z.string().nullish(),
5796
5872
  contracted_count: z.int().nullish(),
5797
5873
  created_at: z.iso.datetime(),
5798
5874
  updated_at: z.iso.datetime()
@@ -6460,6 +6536,14 @@ export const zJobGoodFaithEffortExceptionsResponseObject = z.object({
6460
6536
  links: zLinks,
6461
6537
  data: z.array(zJobGoodFaithEffortExceptionResponseObject)
6462
6538
  });
6539
+ /**
6540
+ * A page of a job's WH-347 certified-payroll exports, with pagination metadata and navigation links.
6541
+ */
6542
+ export const zJobWh347ExportsResponseObject = z.object({
6543
+ meta: zMeta,
6544
+ links: zLinks,
6545
+ data: z.array(zJobWh347ExportResponseObject)
6546
+ });
6463
6547
  /**
6464
6548
  * A page of a job's PWA cure payments, with pagination metadata and navigation links.
6465
6549
  */
@@ -6710,21 +6794,14 @@ export const zFederalJobWageDeterminationHistoryCorrectionObject = z.object({
6710
6794
  updated_at: z.iso.datetime()
6711
6795
  });
6712
6796
  /**
6713
- * State-specific rate fields recorded on a Regional determination, as decimal-string money in
6714
- * cents (e.g. "538.0"). Which keys appear is set by the job's region, so this object is always
6715
- * a region-determined subset of these keys — never a fixed shape:
6716
- *
6717
- * - Categorized-fringe regions (currently IL) carry `combined_health_fringe_rate_cents`,
6718
- * `combined_savings_fringe_rate_cents`, `combined_holiday_pto_fringe_rate_cents`,
6719
- * `training_fringe_rate_cents`, and `other_fringe_rate_cents`.
6720
- * - Overtime-adder regions (currently IL and NY) carry `one_five_x_adder_rate_cents`,
6721
- * `two_x_adder_rate_cents`, `one_five_x_fringe_adder_rate_cents`, and
6722
- * `two_x_fringe_adder_rate_cents`.
6723
- * - A region with neither returns an empty object.
6797
+ * State-specific categorized fringe rates recorded on a Regional determination, as decimal-string
6798
+ * money in cents (e.g. "538.0"). Categorized-fringe regions (currently IL) carry
6799
+ * `combined_health_fringe_rate_cents`, `combined_savings_fringe_rate_cents`,
6800
+ * `combined_holiday_pto_fringe_rate_cents`, `training_fringe_rate_cents`, and
6801
+ * `other_fringe_rate_cents`. These values are non-null when present. Other regions return an empty object.
6724
6802
  *
6725
- * Categorized-fringe values are non-null when present; legacy overtime-adder values may be null.
6726
- * The overtime-adder fields are read-only. Configure new overtime premiums through the
6727
- * determination's rate rules.
6803
+ * Overtime wage and fringe premiums belong to the determination's rate-rule package. They are not
6804
+ * returned as scalar regional rate fields.
6728
6805
  *
6729
6806
  */
6730
6807
  export const zRegionalWageDeterminationFieldsResponse = z.record(z.string(), z.string().nullable());
@@ -9344,6 +9421,14 @@ export const zCreateItemFormAssignmentTaskPath = z.object({
9344
9421
  * Created (recurring, with assignees and reminders)
9345
9422
  */
9346
9423
  export const zCreateItemFormAssignmentTaskResponse = zAssetsItemFormAssignmentResponseObject;
9424
+ export const zDeleteFormAssignmentTaskPath = z.object({
9425
+ item_id: z.string(),
9426
+ id: z.string()
9427
+ });
9428
+ /**
9429
+ * No Content
9430
+ */
9431
+ export const zDeleteFormAssignmentTaskResponse = z.void();
9347
9432
  export const zGetFormAssignmentTaskPath = z.object({
9348
9433
  item_id: z.string(),
9349
9434
  id: z.string()
@@ -9416,6 +9501,10 @@ export const zListVersionsPath = z.object({
9416
9501
  item_id: z.string(),
9417
9502
  document_id: z.string()
9418
9503
  });
9504
+ export const zListVersionsQuery = z.object({
9505
+ filter: z.string().optional(),
9506
+ 'filter[unexpected]': z.string().optional()
9507
+ });
9419
9508
  /**
9420
9509
  * Success
9421
9510
  */
@@ -9815,16 +9904,23 @@ export const zGetAtlasSitePath = z.object({
9815
9904
  */
9816
9905
  export const zGetAtlasSiteResponse = zSiteResponseObject;
9817
9906
  export const zListPwaUserCountsByProjectByMonthsQuery = z.object({
9818
- 'filter[year_month]': z.string().optional(),
9907
+ 'filter[year_month]': z.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/).optional(),
9819
9908
  'filter[project_id]': z.string().optional(),
9820
9909
  'filter[job_id]': z.string().optional(),
9910
+ 'page[cursor]': z.string().optional(),
9911
+ 'page[limit]': z.int().gte(1).optional().default(20),
9912
+ page: z.string().optional(),
9821
9913
  filter: z.string().optional(),
9822
9914
  'filter[unexpected]': z.string().optional()
9823
9915
  });
9824
9916
  /**
9825
9917
  * Success
9826
9918
  */
9827
- export const zListPwaUserCountsByProjectByMonthsResponse = z.array(zBillingPwaUserCountByProjectByMonthResponseObject);
9919
+ export const zListPwaUserCountsByProjectByMonthsResponse = z.object({
9920
+ meta: zMeta,
9921
+ links: zLinks,
9922
+ data: z.array(zBillingPwaUserCountByProjectByMonthResponseObject)
9923
+ });
9828
9924
  export const zListPackagesQuery = z.object({
9829
9925
  'filter[name]': z.string().optional(),
9830
9926
  'filter[created_at][gte]': z.iso.datetime().optional(),
@@ -9944,7 +10040,7 @@ export const zListCertificationsQuery = z.object({
9944
10040
  export const zListCertificationsResponse = zCertificationsResponseObject;
9945
10041
  export const zCreateCertificationBody = zCertificationParameters;
9946
10042
  /**
9947
- * Success
10043
+ * Created
9948
10044
  */
9949
10045
  export const zCreateCertificationResponse = zCertificationResponseObject;
9950
10046
  export const zDeleteCertificationPath = z.object({
@@ -10937,6 +11033,14 @@ export const zCreateJobFormAssignmentTaskPath = z.object({
10937
11033
  * Created (recurring, with assignees and reminders)
10938
11034
  */
10939
11035
  export const zCreateJobFormAssignmentTaskResponse = zJobFormAssignmentResponseObject;
11036
+ export const zDeleteJobFormAssignmentTaskPath = z.object({
11037
+ job_id: z.string(),
11038
+ id: z.string()
11039
+ });
11040
+ /**
11041
+ * No Content
11042
+ */
11043
+ export const zDeleteJobFormAssignmentTaskResponse = z.void();
10940
11044
  export const zGetJobFormAssignmentTaskPath = z.object({
10941
11045
  job_id: z.string(),
10942
11046
  id: z.string()
@@ -11057,6 +11161,37 @@ export const zUpdateGoodFaithEffortExceptionPath = z.object({
11057
11161
  * Success
11058
11162
  */
11059
11163
  export const zUpdateGoodFaithEffortExceptionResponse = zJobGoodFaithEffortExceptionResponseObject;
11164
+ export const zListWh347ExportsPath = z.object({
11165
+ job_id: z.string()
11166
+ });
11167
+ export const zListWh347ExportsQuery = z.object({
11168
+ 'filter[status]': z.string().optional(),
11169
+ filter: z.string().optional(),
11170
+ 'filter[unexpected]': z.string().optional(),
11171
+ 'page[cursor]': z.string().optional(),
11172
+ 'page[limit]': z.int().gte(1).optional().default(20),
11173
+ page: z.string().optional()
11174
+ });
11175
+ /**
11176
+ * Success
11177
+ */
11178
+ export const zListWh347ExportsResponse = zJobWh347ExportsResponseObject;
11179
+ export const zCreateWh347ExportBody = zJobWh347ExportCreateParameters;
11180
+ export const zCreateWh347ExportPath = z.object({
11181
+ job_id: z.string()
11182
+ });
11183
+ /**
11184
+ * Created
11185
+ */
11186
+ export const zCreateWh347ExportResponse = zJobWh347ExportResponseObject;
11187
+ export const zGetWh347ExportPath = z.object({
11188
+ job_id: z.string(),
11189
+ id: z.string()
11190
+ });
11191
+ /**
11192
+ * Success
11193
+ */
11194
+ export const zGetWh347ExportResponse = zJobWh347ExportResponseObject;
11060
11195
  export const zListCurePaymentsPath = z.object({
11061
11196
  job_id: z.string()
11062
11197
  });
@@ -11597,6 +11732,15 @@ export const zCreateFeatureFormAssignmentTaskPath = z.object({
11597
11732
  * Created
11598
11733
  */
11599
11734
  export const zCreateFeatureFormAssignmentTaskResponse = zFeatureFormAssignmentResponseObject;
11735
+ export const zDeleteFeatureFormAssignmentTaskPath = z.object({
11736
+ site_id: z.string(),
11737
+ feature_id: z.string(),
11738
+ id: z.string()
11739
+ });
11740
+ /**
11741
+ * No Content
11742
+ */
11743
+ export const zDeleteFeatureFormAssignmentTaskResponse = z.void();
11600
11744
  export const zGetFeatureFormAssignmentTaskPath = z.object({
11601
11745
  site_id: z.string(),
11602
11746
  feature_id: z.string(),
@@ -11640,6 +11784,14 @@ export const zCreateSiteFormAssignmentTaskPath = z.object({
11640
11784
  * Created
11641
11785
  */
11642
11786
  export const zCreateSiteFormAssignmentTaskResponse = zSiteFormAssignmentResponseObject;
11787
+ export const zDeleteSiteFormAssignmentTaskPath = z.object({
11788
+ site_id: z.string(),
11789
+ id: z.string()
11790
+ });
11791
+ /**
11792
+ * No Content
11793
+ */
11794
+ export const zDeleteSiteFormAssignmentTaskResponse = z.void();
11643
11795
  export const zGetSiteFormAssignmentTaskPath = z.object({
11644
11796
  site_id: z.string(),
11645
11797
  id: z.string()
@@ -12815,7 +12967,9 @@ export const zListProjectDocumentVersionsPath = z.object({
12815
12967
  export const zListProjectDocumentVersionsQuery = z.object({
12816
12968
  'page[cursor]': z.string().optional(),
12817
12969
  'page[limit]': z.int().gte(1).optional().default(20),
12818
- page: z.string().optional()
12970
+ page: z.string().optional(),
12971
+ filter: z.string().optional(),
12972
+ 'filter[unexpected]': z.string().optional()
12819
12973
  });
12820
12974
  /**
12821
12975
  * Success
@@ -12993,7 +13147,9 @@ export const zListProjectWageDeterminationRateRulesQuery = z.object({
12993
13147
  as_of: z.string().optional(),
12994
13148
  'as_of[bogus_axis]': z.string().optional(),
12995
13149
  'as_of[valid][gte]': z.string().optional(),
12996
- 'as_of[transaction]': z.string().optional()
13150
+ 'as_of[transaction]': z.string().optional(),
13151
+ filter: z.string().optional(),
13152
+ 'filter[unexpected]': z.string().optional()
12997
13153
  });
12998
13154
  /**
12999
13155
  * Success
@@ -13055,7 +13211,9 @@ export const zListProjectSitesPath = z.object({
13055
13211
  export const zListProjectSitesQuery = z.object({
13056
13212
  'page[cursor]': z.string().optional(),
13057
13213
  'page[limit]': z.int().gte(1).optional().default(20),
13058
- page: z.string().optional()
13214
+ page: z.string().optional(),
13215
+ filter: z.string().optional(),
13216
+ 'filter[unexpected]': z.string().optional()
13059
13217
  });
13060
13218
  /**
13061
13219
  * Success
@@ -13229,7 +13387,9 @@ export const zListProjectWageDeterminationsQuery = z.object({
13229
13387
  as_of: z.string().optional(),
13230
13388
  'as_of[bogus_axis]': z.string().optional(),
13231
13389
  'as_of[valid][gte]': z.string().optional(),
13232
- 'as_of[transaction]': z.string().optional()
13390
+ 'as_of[transaction]': z.string().optional(),
13391
+ filter: z.string().optional(),
13392
+ 'filter[unexpected]': z.string().optional()
13233
13393
  });
13234
13394
  /**
13235
13395
  * Success
@@ -14307,7 +14467,7 @@ export const zListUserRolesResponse = z.object({
14307
14467
  });
14308
14468
  export const zAddUserRolesBody = zUserRoleRequest;
14309
14469
  /**
14310
- * Success
14470
+ * Created
14311
14471
  */
14312
14472
  export const zAddUserRolesResponse = zUserRoleResponse;
14313
14473
  export const zDeleteUserRolePath = z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsptch-work/api-client",
3
- "version": "0.41.0",
3
+ "version": "0.42.0",
4
4
  "description": "Generated TypeScript client for the DSPTCH REST API.",
5
5
  "keywords": [
6
6
  "dsptch",