@dsptch-work/api-client 0.5.0 → 0.7.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.
@@ -141,18 +141,38 @@ export declare const zProblem: z.ZodObject<{
141
141
  *
142
142
  * ## 409
143
143
  *
144
+ * ### already_terminated
145
+ *
146
+ * **Termination Already Scheduled**
147
+ *
148
+ * The resource's timeline already ends at a scheduled termination, and scheduling a second one would silently move it. Moving an end is two steps on purpose: cancel the standing termination, then schedule the one you want.
149
+ *
144
150
  * ### recorded_since_termination
145
151
  *
146
152
  * **Timecode Changed Since Termination**
147
153
  *
148
154
  * Cancelling this timecode's scheduled termination would silently discard changes recorded since it was terminated. Re-read the timecode and reconcile before retrying.
149
155
  *
156
+ * ### span_beyond_timeline_end
157
+ *
158
+ * **Span Beyond Timeline End**
159
+ *
160
+ * The write names a valid-time span reaching past the point where the resource's timeline ends, so applying it would extend a life the resource is not recorded as having. Cancel the scheduled termination first, or bound the write at or before the recorded end.
161
+ *
150
162
  * ### version_overlap
151
163
  *
152
164
  * **Version Overlap**
153
165
  *
154
166
  * The write conflicts with what is already recorded for the resource — another version occupies the same span, or the write contradicts the resource's recorded identity. Re-read the current state and retry on top of it.
155
167
  *
168
+ * ## 412
169
+ *
170
+ * ### precondition_failed
171
+ *
172
+ * **Precondition Failed**
173
+ *
174
+ * The `If-Match` validator names a version of this resource that is no longer current — the version family changed after you read it. Re-read the resource, take its fresh `ETag`, and reapply your change on top of the current state. A malformed or unrecognizable validator refuses the same way, since neither matches.
175
+ *
156
176
  * ## 422
157
177
  *
158
178
  * ### attachment_not_image
@@ -257,6 +277,20 @@ export declare const zProblem: z.ZodObject<{
257
277
  *
258
278
  * The apprentice's wage schedule does not belong to the program in the URL. Use a schedule from that program.
259
279
  *
280
+ * ### watermark_outside_retention
281
+ *
282
+ * **Watermark Outside Retention Window**
283
+ *
284
+ * A change feed was polled from a watermark older than the window it covers, so no page it could return would be complete. Resync instead: re-crawl the live index, diff it against your replica, and resume polling from the `meta.complete_through` of the first page you then read.
285
+ *
286
+ * ## 428
287
+ *
288
+ * ### precondition_required
289
+ *
290
+ * **Precondition Required**
291
+ *
292
+ * The write must state which version of the resource it was composed against, and no `If-Match` was sent. Read the resource, send its `ETag` back as `If-Match`, or send `If-Match: *` to write unconditionally against whatever exists.
293
+ *
260
294
  * ## 429
261
295
  *
262
296
  * ### too_many_requests
@@ -273,6 +307,14 @@ export declare const zProblem: z.ZodObject<{
273
307
  *
274
308
  * Something failed on the server; nothing in the request needs fixing. Retry later, or report the problem if it persists.
275
309
  *
310
+ * ## 503
311
+ *
312
+ * ### write_contended
313
+ *
314
+ * **Write Contended**
315
+ *
316
+ * Another write to the same resource held it for longer than this request was willing to wait, so nothing was applied. The request itself is fine — resend it unchanged after the `Retry-After` window.
317
+ *
276
318
  */
277
319
  export declare const zProblemTypeCatalog: z.ZodEnum<{
278
320
  blank_axis: "blank_axis";
@@ -294,8 +336,11 @@ export declare const zProblemTypeCatalog: z.ZodEnum<{
294
336
  forbidden: "forbidden";
295
337
  insufficient_api_key_scope: "insufficient_api_key_scope";
296
338
  not_found: "not_found";
339
+ already_terminated: "already_terminated";
297
340
  recorded_since_termination: "recorded_since_termination";
341
+ span_beyond_timeline_end: "span_beyond_timeline_end";
298
342
  version_overlap: "version_overlap";
343
+ precondition_failed: "precondition_failed";
299
344
  attachment_not_image: "attachment_not_image";
300
345
  company_not_employer: "company_not_employer";
301
346
  confirm_apprenticeship_conflict: "confirm_apprenticeship_conflict";
@@ -313,8 +358,11 @@ export declare const zProblemTypeCatalog: z.ZodEnum<{
313
358
  user_not_company_member: "user_not_company_member";
314
359
  validation_failed: "validation_failed";
315
360
  wage_schedule_outside_program: "wage_schedule_outside_program";
361
+ watermark_outside_retention: "watermark_outside_retention";
362
+ precondition_required: "precondition_required";
316
363
  too_many_requests: "too_many_requests";
317
364
  internal_error: "internal_error";
365
+ write_contended: "write_contended";
318
366
  }>;
319
367
  export declare const zApiKeyScopeResponseObject: z.ZodObject<{
320
368
  resource: z.ZodString;
@@ -738,6 +786,36 @@ export declare const zTimecodeParameters: z.ZodObject<{
738
786
  }>>;
739
787
  effective_date: z.ZodOptional<z.ZodISODateTime>;
740
788
  }, z.core.$strip>;
789
+ export declare const zTimecodeCorrectionParameters: z.ZodObject<{
790
+ effective_from: z.ZodOptional<z.ZodISODateTime>;
791
+ effective_to: z.ZodOptional<z.ZodISODateTime>;
792
+ name: z.ZodString;
793
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
794
+ description_is_required: z.ZodOptional<z.ZodBoolean>;
795
+ billable: z.ZodOptional<z.ZodBoolean>;
796
+ overtime_eligible: z.ZodOptional<z.ZodBoolean>;
797
+ unpaid: z.ZodOptional<z.ZodBoolean>;
798
+ holiday: z.ZodOptional<z.ZodBoolean>;
799
+ pto: z.ZodOptional<z.ZodBoolean>;
800
+ safety: z.ZodOptional<z.ZodBoolean>;
801
+ lunch_shortcut: z.ZodOptional<z.ZodBoolean>;
802
+ break_shortcut: z.ZodOptional<z.ZodBoolean>;
803
+ pwa: z.ZodOptional<z.ZodBoolean>;
804
+ rest_and_recovery: z.ZodOptional<z.ZodBoolean>;
805
+ incentive_pay_eligible: z.ZodOptional<z.ZodBoolean>;
806
+ restricted_to: z.ZodOptional<z.ZodEnum<{
807
+ none: "none";
808
+ job: "job";
809
+ non_job: "non_job";
810
+ job_with_timecode: "job_with_timecode";
811
+ }>>;
812
+ }, z.core.$strip>;
813
+ export declare const zTimecodeGenesisParameters: z.ZodObject<{
814
+ effective_date: z.ZodISODateTime;
815
+ }, z.core.$strip>;
816
+ export declare const zTimecodeScheduledTerminationParameters: z.ZodObject<{
817
+ effective_date: z.ZodISODateTime;
818
+ }, z.core.$strip>;
741
819
  /**
742
820
  * Request body for scheduling a future change to a timecode: an effective_date paired with the attribute values to apply from that date. `effective_date` and `name` are required; omitted attributes inherit the current version's values.
743
821
  */
@@ -1768,6 +1846,11 @@ export declare const zJobParameters: z.ZodObject<{
1768
1846
  tz_name: z.ZodOptional<z.ZodString>;
1769
1847
  time_card_start_day: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>>;
1770
1848
  require_clock_in: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1849
+ clock_in_requirement: z.ZodOptional<z.ZodEnum<{
1850
+ none: "none";
1851
+ warning: "warning";
1852
+ required: "required";
1853
+ }>>;
1771
1854
  send_geofence_reminders: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1772
1855
  allow_customer_access: z.ZodOptional<z.ZodBoolean>;
1773
1856
  timekeeping_timecode_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -1841,6 +1924,11 @@ export declare const zJobUpdateParameters: z.ZodIntersection<z.ZodObject<{
1841
1924
  tz_name: z.ZodOptional<z.ZodString>;
1842
1925
  time_card_start_day: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>>;
1843
1926
  require_clock_in: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1927
+ clock_in_requirement: z.ZodOptional<z.ZodEnum<{
1928
+ none: "none";
1929
+ warning: "warning";
1930
+ required: "required";
1931
+ }>>;
1844
1932
  send_geofence_reminders: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1845
1933
  allow_customer_access: z.ZodOptional<z.ZodBoolean>;
1846
1934
  timekeeping_timecode_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -3175,7 +3263,12 @@ export declare const zJobResponseObject: z.ZodObject<{
3175
3263
  purchase_order_number: z.ZodNullable<z.ZodString>;
3176
3264
  time_card_start_day: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>;
3177
3265
  tz_name: z.ZodString;
3178
- require_clock_in: z.ZodNullable<z.ZodBoolean>;
3266
+ require_clock_in: z.ZodBoolean;
3267
+ clock_in_requirement: z.ZodEnum<{
3268
+ none: "none";
3269
+ warning: "warning";
3270
+ required: "required";
3271
+ }>;
3179
3272
  name: z.ZodNullable<z.ZodString>;
3180
3273
  federal_pwa_mode: z.ZodEnum<{
3181
3274
  none: "none";
@@ -12116,6 +12209,9 @@ export declare const zCreateWageDeterminationResponse: z.ZodDiscriminatedUnion<[
12116
12209
  updated_at: z.ZodISODateTime;
12117
12210
  type: z.ZodLiteral<"Pwa::JobWageDeterminations::Regional">;
12118
12211
  }, z.core.$strip>], "type">;
12212
+ export declare const zDeleteWageDeterminationHeaders: z.ZodObject<{
12213
+ 'If-Match': z.ZodString;
12214
+ }, z.core.$strip>;
12119
12215
  export declare const zDeleteWageDeterminationPath: z.ZodObject<{
12120
12216
  job_id: z.ZodString;
12121
12217
  uid: z.ZodString;
@@ -12246,7 +12342,12 @@ export declare const zListJobsResponse: z.ZodObject<{
12246
12342
  purchase_order_number: z.ZodNullable<z.ZodString>;
12247
12343
  time_card_start_day: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>;
12248
12344
  tz_name: z.ZodString;
12249
- require_clock_in: z.ZodNullable<z.ZodBoolean>;
12345
+ require_clock_in: z.ZodBoolean;
12346
+ clock_in_requirement: z.ZodEnum<{
12347
+ none: "none";
12348
+ warning: "warning";
12349
+ required: "required";
12350
+ }>;
12250
12351
  name: z.ZodNullable<z.ZodString>;
12251
12352
  federal_pwa_mode: z.ZodEnum<{
12252
12353
  none: "none";
@@ -12363,6 +12464,11 @@ export declare const zCreateJobBody: z.ZodObject<{
12363
12464
  tz_name: z.ZodOptional<z.ZodString>;
12364
12465
  time_card_start_day: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>>;
12365
12466
  require_clock_in: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
12467
+ clock_in_requirement: z.ZodOptional<z.ZodEnum<{
12468
+ none: "none";
12469
+ warning: "warning";
12470
+ required: "required";
12471
+ }>>;
12366
12472
  send_geofence_reminders: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
12367
12473
  allow_customer_access: z.ZodOptional<z.ZodBoolean>;
12368
12474
  timekeeping_timecode_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -12422,7 +12528,12 @@ export declare const zCreateJobResponse: z.ZodObject<{
12422
12528
  purchase_order_number: z.ZodNullable<z.ZodString>;
12423
12529
  time_card_start_day: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>;
12424
12530
  tz_name: z.ZodString;
12425
- require_clock_in: z.ZodNullable<z.ZodBoolean>;
12531
+ require_clock_in: z.ZodBoolean;
12532
+ clock_in_requirement: z.ZodEnum<{
12533
+ none: "none";
12534
+ warning: "warning";
12535
+ required: "required";
12536
+ }>;
12426
12537
  name: z.ZodNullable<z.ZodString>;
12427
12538
  federal_pwa_mode: z.ZodEnum<{
12428
12539
  none: "none";
@@ -12527,7 +12638,12 @@ export declare const zGetJobResponse: z.ZodObject<{
12527
12638
  purchase_order_number: z.ZodNullable<z.ZodString>;
12528
12639
  time_card_start_day: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>;
12529
12640
  tz_name: z.ZodString;
12530
- require_clock_in: z.ZodNullable<z.ZodBoolean>;
12641
+ require_clock_in: z.ZodBoolean;
12642
+ clock_in_requirement: z.ZodEnum<{
12643
+ none: "none";
12644
+ warning: "warning";
12645
+ required: "required";
12646
+ }>;
12531
12647
  name: z.ZodNullable<z.ZodString>;
12532
12648
  federal_pwa_mode: z.ZodEnum<{
12533
12649
  none: "none";
@@ -12640,6 +12756,11 @@ export declare const zUpdateJobBody: z.ZodIntersection<z.ZodObject<{
12640
12756
  tz_name: z.ZodOptional<z.ZodString>;
12641
12757
  time_card_start_day: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>>;
12642
12758
  require_clock_in: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
12759
+ clock_in_requirement: z.ZodOptional<z.ZodEnum<{
12760
+ none: "none";
12761
+ warning: "warning";
12762
+ required: "required";
12763
+ }>>;
12643
12764
  send_geofence_reminders: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
12644
12765
  allow_customer_access: z.ZodOptional<z.ZodBoolean>;
12645
12766
  timekeeping_timecode_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
@@ -12708,7 +12829,12 @@ export declare const zUpdateJobResponse: z.ZodObject<{
12708
12829
  purchase_order_number: z.ZodNullable<z.ZodString>;
12709
12830
  time_card_start_day: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>;
12710
12831
  tz_name: z.ZodString;
12711
- require_clock_in: z.ZodNullable<z.ZodBoolean>;
12832
+ require_clock_in: z.ZodBoolean;
12833
+ clock_in_requirement: z.ZodEnum<{
12834
+ none: "none";
12835
+ warning: "warning";
12836
+ required: "required";
12837
+ }>;
12712
12838
  name: z.ZodNullable<z.ZodString>;
12713
12839
  federal_pwa_mode: z.ZodEnum<{
12714
12840
  none: "none";
@@ -16140,6 +16266,48 @@ export declare const zUpdateTimeEntryResponse: z.ZodObject<{
16140
16266
  }, z.core.$strip>>;
16141
16267
  total_hours: z.ZodNumber;
16142
16268
  }, z.core.$strip>;
16269
+ export declare const zShiftTimecodeGenesisBody: z.ZodObject<{
16270
+ effective_date: z.ZodISODateTime;
16271
+ }, z.core.$strip>;
16272
+ export declare const zShiftTimecodeGenesisHeaders: z.ZodObject<{
16273
+ 'If-Match': z.ZodString;
16274
+ }, z.core.$strip>;
16275
+ export declare const zShiftTimecodeGenesisPath: z.ZodObject<{
16276
+ timecode_id: z.ZodString;
16277
+ }, z.core.$strip>;
16278
+ /**
16279
+ * Success
16280
+ */
16281
+ export declare const zShiftTimecodeGenesisResponse: z.ZodObject<{
16282
+ id: z.ZodString;
16283
+ name: z.ZodString;
16284
+ description: z.ZodNullable<z.ZodString>;
16285
+ description_is_required: z.ZodBoolean;
16286
+ billable: z.ZodBoolean;
16287
+ overtime_eligible: z.ZodBoolean;
16288
+ unpaid: z.ZodBoolean;
16289
+ holiday: z.ZodBoolean;
16290
+ pto: z.ZodBoolean;
16291
+ safety: z.ZodBoolean;
16292
+ lunch_shortcut: z.ZodBoolean;
16293
+ break_shortcut: z.ZodBoolean;
16294
+ pwa: z.ZodBoolean;
16295
+ rest_and_recovery: z.ZodBoolean;
16296
+ incentive_pay_eligible: z.ZodBoolean;
16297
+ restricted_to: z.ZodEnum<{
16298
+ none: "none";
16299
+ job: "job";
16300
+ non_job: "non_job";
16301
+ job_with_timecode: "job_with_timecode";
16302
+ }>;
16303
+ default_for_company_id: z.ZodNullable<z.ZodString>;
16304
+ valid_from: z.ZodISODateTime;
16305
+ valid_to: z.ZodNullable<z.ZodISODateTime>;
16306
+ transaction_from: z.ZodISODateTime;
16307
+ transaction_to: z.ZodNullable<z.ZodISODateTime>;
16308
+ created_at: z.ZodISODateTime;
16309
+ updated_at: z.ZodISODateTime;
16310
+ }, z.core.$strip>;
16143
16311
  export declare const zListTimecodeHistoryPath: z.ZodObject<{
16144
16312
  timecode_id: z.ZodString;
16145
16313
  }, z.core.$strip>;
@@ -16228,6 +16396,9 @@ export declare const zListTimecodeHistoryResponse: z.ZodObject<{
16228
16396
  }, z.core.$strip>>;
16229
16397
  }, z.core.$strip>>>;
16230
16398
  }, z.core.$strip>;
16399
+ export declare const zCancelTimecodeScheduledChangesHeaders: z.ZodObject<{
16400
+ 'If-Match': z.ZodString;
16401
+ }, z.core.$strip>;
16231
16402
  export declare const zCancelTimecodeScheduledChangesPath: z.ZodObject<{
16232
16403
  timecode_id: z.ZodString;
16233
16404
  }, z.core.$strip>;
@@ -16323,6 +16494,9 @@ export declare const zScheduleTimecodeChangeBody: z.ZodObject<{
16323
16494
  job_with_timecode: "job_with_timecode";
16324
16495
  }>>;
16325
16496
  }, z.core.$strip>;
16497
+ export declare const zScheduleTimecodeChangeHeaders: z.ZodObject<{
16498
+ 'If-Match': z.ZodString;
16499
+ }, z.core.$strip>;
16326
16500
  export declare const zScheduleTimecodeChangePath: z.ZodObject<{
16327
16501
  timecode_id: z.ZodString;
16328
16502
  }, z.core.$strip>;
@@ -16359,6 +16533,9 @@ export declare const zScheduleTimecodeChangeResponse: z.ZodObject<{
16359
16533
  created_at: z.ZodISODateTime;
16360
16534
  updated_at: z.ZodISODateTime;
16361
16535
  }, z.core.$strip>;
16536
+ export declare const zCancelTimecodeScheduledTerminationHeaders: z.ZodObject<{
16537
+ 'If-Match': z.ZodString;
16538
+ }, z.core.$strip>;
16362
16539
  export declare const zCancelTimecodeScheduledTerminationPath: z.ZodObject<{
16363
16540
  timecode_id: z.ZodString;
16364
16541
  }, z.core.$strip>;
@@ -16395,6 +16572,48 @@ export declare const zCancelTimecodeScheduledTerminationResponse: z.ZodObject<{
16395
16572
  created_at: z.ZodISODateTime;
16396
16573
  updated_at: z.ZodISODateTime;
16397
16574
  }, z.core.$strip>;
16575
+ export declare const zScheduleTimecodeTerminationBody: z.ZodObject<{
16576
+ effective_date: z.ZodISODateTime;
16577
+ }, z.core.$strip>;
16578
+ export declare const zScheduleTimecodeTerminationHeaders: z.ZodObject<{
16579
+ 'If-Match': z.ZodString;
16580
+ }, z.core.$strip>;
16581
+ export declare const zScheduleTimecodeTerminationPath: z.ZodObject<{
16582
+ timecode_id: z.ZodString;
16583
+ }, z.core.$strip>;
16584
+ /**
16585
+ * Created ahead of a scheduled change
16586
+ */
16587
+ export declare const zScheduleTimecodeTerminationResponse: z.ZodObject<{
16588
+ id: z.ZodString;
16589
+ name: z.ZodString;
16590
+ description: z.ZodNullable<z.ZodString>;
16591
+ description_is_required: z.ZodBoolean;
16592
+ billable: z.ZodBoolean;
16593
+ overtime_eligible: z.ZodBoolean;
16594
+ unpaid: z.ZodBoolean;
16595
+ holiday: z.ZodBoolean;
16596
+ pto: z.ZodBoolean;
16597
+ safety: z.ZodBoolean;
16598
+ lunch_shortcut: z.ZodBoolean;
16599
+ break_shortcut: z.ZodBoolean;
16600
+ pwa: z.ZodBoolean;
16601
+ rest_and_recovery: z.ZodBoolean;
16602
+ incentive_pay_eligible: z.ZodBoolean;
16603
+ restricted_to: z.ZodEnum<{
16604
+ none: "none";
16605
+ job: "job";
16606
+ non_job: "non_job";
16607
+ job_with_timecode: "job_with_timecode";
16608
+ }>;
16609
+ default_for_company_id: z.ZodNullable<z.ZodString>;
16610
+ valid_from: z.ZodISODateTime;
16611
+ valid_to: z.ZodNullable<z.ZodISODateTime>;
16612
+ transaction_from: z.ZodISODateTime;
16613
+ transaction_to: z.ZodNullable<z.ZodISODateTime>;
16614
+ created_at: z.ZodISODateTime;
16615
+ updated_at: z.ZodISODateTime;
16616
+ }, z.core.$strip>;
16398
16617
  export declare const zListTimecodesQuery: z.ZodObject<{
16399
16618
  'filter[created_at][gte]': z.ZodOptional<z.ZodISODateTime>;
16400
16619
  'filter[created_at][lte]': z.ZodOptional<z.ZodISODateTime>;
@@ -16554,6 +16773,8 @@ export declare const zGetTimecodeResponse: z.ZodObject<{
16554
16773
  updated_at: z.ZodISODateTime;
16555
16774
  }, z.core.$strip>;
16556
16775
  export declare const zUpdateTimecodeBody: z.ZodObject<{
16776
+ effective_from: z.ZodOptional<z.ZodISODateTime>;
16777
+ effective_to: z.ZodOptional<z.ZodISODateTime>;
16557
16778
  name: z.ZodString;
16558
16779
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16559
16780
  description_is_required: z.ZodOptional<z.ZodBoolean>;
@@ -16574,7 +16795,9 @@ export declare const zUpdateTimecodeBody: z.ZodObject<{
16574
16795
  non_job: "non_job";
16575
16796
  job_with_timecode: "job_with_timecode";
16576
16797
  }>>;
16577
- effective_date: z.ZodOptional<z.ZodISODateTime>;
16798
+ }, z.core.$strip>;
16799
+ export declare const zUpdateTimecodeHeaders: z.ZodObject<{
16800
+ 'If-Match': z.ZodString;
16578
16801
  }, z.core.$strip>;
16579
16802
  export declare const zUpdateTimecodePath: z.ZodObject<{
16580
16803
  id: z.ZodString;
@@ -142,18 +142,38 @@ export const zProblem = z.object({
142
142
  *
143
143
  * ## 409
144
144
  *
145
+ * ### already_terminated
146
+ *
147
+ * **Termination Already Scheduled**
148
+ *
149
+ * The resource's timeline already ends at a scheduled termination, and scheduling a second one would silently move it. Moving an end is two steps on purpose: cancel the standing termination, then schedule the one you want.
150
+ *
145
151
  * ### recorded_since_termination
146
152
  *
147
153
  * **Timecode Changed Since Termination**
148
154
  *
149
155
  * Cancelling this timecode's scheduled termination would silently discard changes recorded since it was terminated. Re-read the timecode and reconcile before retrying.
150
156
  *
157
+ * ### span_beyond_timeline_end
158
+ *
159
+ * **Span Beyond Timeline End**
160
+ *
161
+ * The write names a valid-time span reaching past the point where the resource's timeline ends, so applying it would extend a life the resource is not recorded as having. Cancel the scheduled termination first, or bound the write at or before the recorded end.
162
+ *
151
163
  * ### version_overlap
152
164
  *
153
165
  * **Version Overlap**
154
166
  *
155
167
  * The write conflicts with what is already recorded for the resource — another version occupies the same span, or the write contradicts the resource's recorded identity. Re-read the current state and retry on top of it.
156
168
  *
169
+ * ## 412
170
+ *
171
+ * ### precondition_failed
172
+ *
173
+ * **Precondition Failed**
174
+ *
175
+ * The `If-Match` validator names a version of this resource that is no longer current — the version family changed after you read it. Re-read the resource, take its fresh `ETag`, and reapply your change on top of the current state. A malformed or unrecognizable validator refuses the same way, since neither matches.
176
+ *
157
177
  * ## 422
158
178
  *
159
179
  * ### attachment_not_image
@@ -258,6 +278,20 @@ export const zProblem = z.object({
258
278
  *
259
279
  * The apprentice's wage schedule does not belong to the program in the URL. Use a schedule from that program.
260
280
  *
281
+ * ### watermark_outside_retention
282
+ *
283
+ * **Watermark Outside Retention Window**
284
+ *
285
+ * A change feed was polled from a watermark older than the window it covers, so no page it could return would be complete. Resync instead: re-crawl the live index, diff it against your replica, and resume polling from the `meta.complete_through` of the first page you then read.
286
+ *
287
+ * ## 428
288
+ *
289
+ * ### precondition_required
290
+ *
291
+ * **Precondition Required**
292
+ *
293
+ * The write must state which version of the resource it was composed against, and no `If-Match` was sent. Read the resource, send its `ETag` back as `If-Match`, or send `If-Match: *` to write unconditionally against whatever exists.
294
+ *
261
295
  * ## 429
262
296
  *
263
297
  * ### too_many_requests
@@ -274,6 +308,14 @@ export const zProblem = z.object({
274
308
  *
275
309
  * Something failed on the server; nothing in the request needs fixing. Retry later, or report the problem if it persists.
276
310
  *
311
+ * ## 503
312
+ *
313
+ * ### write_contended
314
+ *
315
+ * **Write Contended**
316
+ *
317
+ * Another write to the same resource held it for longer than this request was willing to wait, so nothing was applied. The request itself is fine — resend it unchanged after the `Retry-After` window.
318
+ *
277
319
  */
278
320
  export const zProblemTypeCatalog = z.enum([
279
321
  'blank_axis',
@@ -295,8 +337,11 @@ export const zProblemTypeCatalog = z.enum([
295
337
  'forbidden',
296
338
  'insufficient_api_key_scope',
297
339
  'not_found',
340
+ 'already_terminated',
298
341
  'recorded_since_termination',
342
+ 'span_beyond_timeline_end',
299
343
  'version_overlap',
344
+ 'precondition_failed',
300
345
  'attachment_not_image',
301
346
  'company_not_employer',
302
347
  'confirm_apprenticeship_conflict',
@@ -314,8 +359,11 @@ export const zProblemTypeCatalog = z.enum([
314
359
  'user_not_company_member',
315
360
  'validation_failed',
316
361
  'wage_schedule_outside_program',
362
+ 'watermark_outside_retention',
363
+ 'precondition_required',
317
364
  'too_many_requests',
318
- 'internal_error'
365
+ 'internal_error',
366
+ 'write_contended'
319
367
  ]);
320
368
  export const zApiKeyScopeResponseObject = z.object({
321
369
  resource: z.string(),
@@ -704,6 +752,36 @@ export const zTimecodeParameters = z.object({
704
752
  ]).optional(),
705
753
  effective_date: z.iso.datetime().optional()
706
754
  });
755
+ export const zTimecodeCorrectionParameters = z.object({
756
+ effective_from: z.iso.datetime().optional(),
757
+ effective_to: z.iso.datetime().optional(),
758
+ name: z.string(),
759
+ description: z.string().nullish(),
760
+ description_is_required: z.boolean().optional(),
761
+ billable: z.boolean().optional(),
762
+ overtime_eligible: z.boolean().optional(),
763
+ unpaid: z.boolean().optional(),
764
+ holiday: z.boolean().optional(),
765
+ pto: z.boolean().optional(),
766
+ safety: z.boolean().optional(),
767
+ lunch_shortcut: z.boolean().optional(),
768
+ break_shortcut: z.boolean().optional(),
769
+ pwa: z.boolean().optional(),
770
+ rest_and_recovery: z.boolean().optional(),
771
+ incentive_pay_eligible: z.boolean().optional(),
772
+ restricted_to: z.enum([
773
+ 'none',
774
+ 'job',
775
+ 'non_job',
776
+ 'job_with_timecode'
777
+ ]).optional()
778
+ });
779
+ export const zTimecodeGenesisParameters = z.object({
780
+ effective_date: z.iso.datetime()
781
+ });
782
+ export const zTimecodeScheduledTerminationParameters = z.object({
783
+ effective_date: z.iso.datetime()
784
+ });
707
785
  /**
708
786
  * Request body for scheduling a future change to a timecode: an effective_date paired with the attribute values to apply from that date. `effective_date` and `name` are required; omitted attributes inherit the current version's values.
709
787
  */
@@ -1695,6 +1773,11 @@ export const zJobParameters = z.object({
1695
1773
  tz_name: z.string().optional(),
1696
1774
  time_card_start_day: zTimeCardStartDay.optional(),
1697
1775
  require_clock_in: z.boolean().nullish(),
1776
+ clock_in_requirement: z.enum([
1777
+ 'none',
1778
+ 'warning',
1779
+ 'required'
1780
+ ]).optional(),
1698
1781
  send_geofence_reminders: z.boolean().nullish(),
1699
1782
  allow_customer_access: z.boolean().optional(),
1700
1783
  timekeeping_timecode_ids: z.array(z.string()).nullish(),
@@ -2896,7 +2979,12 @@ export const zJobResponseObject = z.object({
2896
2979
  purchase_order_number: z.string().nullable(),
2897
2980
  time_card_start_day: zTimeCardStartDay,
2898
2981
  tz_name: z.string(),
2899
- require_clock_in: z.boolean().nullable(),
2982
+ require_clock_in: z.boolean(),
2983
+ clock_in_requirement: z.enum([
2984
+ 'none',
2985
+ 'warning',
2986
+ 'required'
2987
+ ]),
2900
2988
  name: z.string().nullable(),
2901
2989
  federal_pwa_mode: z.enum([
2902
2990
  'all',
@@ -6028,6 +6116,9 @@ export const zCreateWageDeterminationPath = z.object({
6028
6116
  * Created
6029
6117
  */
6030
6118
  export const zCreateWageDeterminationResponse = zJobWageDeterminationResponseObject;
6119
+ export const zDeleteWageDeterminationHeaders = z.object({
6120
+ 'If-Match': z.string()
6121
+ });
6031
6122
  export const zDeleteWageDeterminationPath = z.object({
6032
6123
  job_id: z.string(),
6033
6124
  uid: z.string()
@@ -6903,6 +6994,17 @@ export const zUpdateTimeEntryPath = z.object({
6903
6994
  * Success
6904
6995
  */
6905
6996
  export const zUpdateTimeEntryResponse = zTimeEntryResponseObject;
6997
+ export const zShiftTimecodeGenesisBody = zTimecodeGenesisParameters;
6998
+ export const zShiftTimecodeGenesisHeaders = z.object({
6999
+ 'If-Match': z.string()
7000
+ });
7001
+ export const zShiftTimecodeGenesisPath = z.object({
7002
+ timecode_id: z.string()
7003
+ });
7004
+ /**
7005
+ * Success
7006
+ */
7007
+ export const zShiftTimecodeGenesisResponse = zTimecodeResponseObject;
6906
7008
  export const zListTimecodeHistoryPath = z.object({
6907
7009
  timecode_id: z.string()
6908
7010
  });
@@ -6918,6 +7020,9 @@ export const zListTimecodeHistoryResponse = z.object({
6918
7020
  links: zLinks.optional(),
6919
7021
  data: z.array(zTimecodeHistoryVersionObject).optional()
6920
7022
  });
7023
+ export const zCancelTimecodeScheduledChangesHeaders = z.object({
7024
+ 'If-Match': z.string()
7025
+ });
6921
7026
  export const zCancelTimecodeScheduledChangesPath = z.object({
6922
7027
  timecode_id: z.string()
6923
7028
  });
@@ -6933,6 +7038,9 @@ export const zListTimecodeScheduledChangesPath = z.object({
6933
7038
  */
6934
7039
  export const zListTimecodeScheduledChangesResponse = z.array(zTimecodeResponseObject);
6935
7040
  export const zScheduleTimecodeChangeBody = zTimecodeScheduledChangeParameters;
7041
+ export const zScheduleTimecodeChangeHeaders = z.object({
7042
+ 'If-Match': z.string()
7043
+ });
6936
7044
  export const zScheduleTimecodeChangePath = z.object({
6937
7045
  timecode_id: z.string()
6938
7046
  });
@@ -6940,6 +7048,9 @@ export const zScheduleTimecodeChangePath = z.object({
6940
7048
  * Created
6941
7049
  */
6942
7050
  export const zScheduleTimecodeChangeResponse = zTimecodeResponseObject;
7051
+ export const zCancelTimecodeScheduledTerminationHeaders = z.object({
7052
+ 'If-Match': z.string()
7053
+ });
6943
7054
  export const zCancelTimecodeScheduledTerminationPath = z.object({
6944
7055
  timecode_id: z.string()
6945
7056
  });
@@ -6947,6 +7058,17 @@ export const zCancelTimecodeScheduledTerminationPath = z.object({
6947
7058
  * Success
6948
7059
  */
6949
7060
  export const zCancelTimecodeScheduledTerminationResponse = zTimecodeResponseObject;
7061
+ export const zScheduleTimecodeTerminationBody = zTimecodeScheduledTerminationParameters;
7062
+ export const zScheduleTimecodeTerminationHeaders = z.object({
7063
+ 'If-Match': z.string()
7064
+ });
7065
+ export const zScheduleTimecodeTerminationPath = z.object({
7066
+ timecode_id: z.string()
7067
+ });
7068
+ /**
7069
+ * Created ahead of a scheduled change
7070
+ */
7071
+ export const zScheduleTimecodeTerminationResponse = zTimecodeResponseObject;
6950
7072
  export const zListTimecodesQuery = z.object({
6951
7073
  'filter[created_at][gte]': z.iso.datetime().optional(),
6952
7074
  'filter[created_at][lte]': z.iso.datetime().optional(),
@@ -6987,7 +7109,10 @@ export const zGetTimecodeQuery = z.object({
6987
7109
  * Success
6988
7110
  */
6989
7111
  export const zGetTimecodeResponse = zTimecodeResponseObject;
6990
- export const zUpdateTimecodeBody = zTimecodeParameters;
7112
+ export const zUpdateTimecodeBody = zTimecodeCorrectionParameters;
7113
+ export const zUpdateTimecodeHeaders = z.object({
7114
+ 'If-Match': z.string()
7115
+ });
6991
7116
  export const zUpdateTimecodePath = z.object({
6992
7117
  id: z.string()
6993
7118
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsptch-work/api-client",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Generated TypeScript client for the DSPTCH REST API.",
5
5
  "keywords": [
6
6
  "dsptch",