@dsptch-work/api-client 0.47.0 → 0.49.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.
@@ -237,12 +237,6 @@ export type Problem = {
237
237
  *
238
238
  * The item cannot be unarchived while its product is still archived — an item never lives active inside an archived product. Unarchive the product instead, which restores the item along with the rest of the product's holdings.
239
239
  *
240
- * ### recorded_since_termination
241
- *
242
- * **Timecode Changed Since Termination**
243
- *
244
- * Cancelling this timecode's scheduled termination would silently discard changes recorded since it was terminated. Re-read the timecode and reconcile before retrying.
245
- *
246
240
  * ### span_beyond_timeline_end
247
241
  *
248
242
  * **Span Beyond Timeline End**
@@ -424,7 +418,7 @@ export type Problem = {
424
418
  * 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.
425
419
  *
426
420
  */
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' | 'recorded_since_termination' | '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';
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';
428
422
  export type ApiKeyScopeResponseObject = {
429
423
  resource: string;
430
424
  action: 'read' | 'create' | 'update' | 'delete';
@@ -3796,6 +3790,71 @@ export type PayPeriodConfigParameters = {
3796
3790
  */
3797
3791
  time_card_auto_lock_days?: number | null;
3798
3792
  };
3793
+ /**
3794
+ * Schedule a change to an existing pay schedule. effective_date is required; other fields are optional. tz_name, time_mode, and payroll_mode are refused.
3795
+ */
3796
+ export type PayPeriodConfigUpdateParameters = {
3797
+ /**
3798
+ * Date the submitted attributes take effect (YYYY-MM-DD), at midnight in the schedule's time zone. Its weekday must match start_day_of_week; the API never snaps to another day.
3799
+ */
3800
+ effective_date: string;
3801
+ /**
3802
+ * Pay frequency: weekly (7 days) or biweekly (14 days).
3803
+ */
3804
+ frequency?: 'weekly' | 'biweekly';
3805
+ /**
3806
+ * Day the pay period begins, 0 (Sunday) through 6 (Saturday). Must match the effective date's weekday.
3807
+ */
3808
+ start_day_of_week?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
3809
+ /**
3810
+ * Refused. A pay schedule's time zone cannot be changed after creation.
3811
+ */
3812
+ tz_name?: string;
3813
+ /**
3814
+ * Time rounding in minutes, 1 or 15.
3815
+ */
3816
+ rounding_interval?: 1 | 15;
3817
+ /**
3818
+ * Payroll provider; send null to clear.
3819
+ */
3820
+ payroll_system?: 'rippling' | 'quickbooks_online' | 'paychex' | 'gusto' | null;
3821
+ /**
3822
+ * Move pay dates after banking holidays rather than before.
3823
+ */
3824
+ paid_after_holiday?: boolean;
3825
+ /**
3826
+ * Whole days from the pay period's end to payday; must cover both deadline intervals.
3827
+ */
3828
+ arrear_days?: number;
3829
+ /**
3830
+ * Calendar-day lead for the pay-run deadline. Send together with pay_run_deadline_clock_time.
3831
+ */
3832
+ pay_run_deadline_days?: number;
3833
+ /**
3834
+ * Pay-run deadline's local clock time (HH:MM). Send together with pay_run_deadline_days.
3835
+ */
3836
+ pay_run_deadline_clock_time?: string;
3837
+ /**
3838
+ * Whole calendar days before the pay-run deadline's date when approvals are due. Send together with approvals_deadline_clock_time.
3839
+ */
3840
+ approvals_deadline_days?: number;
3841
+ /**
3842
+ * Approvals deadline's local clock time (HH:MM). Send together with approvals_deadline_days.
3843
+ */
3844
+ approvals_deadline_clock_time?: string;
3845
+ /**
3846
+ * Signed days from the pay-run deadline until time cards lock; negative values lock earlier, 0 locks at the deadline, null disables locking.
3847
+ */
3848
+ time_card_auto_lock_days?: number | null;
3849
+ /**
3850
+ * Refused. Delete the pay schedule and create it again to change time_mode.
3851
+ */
3852
+ time_mode?: 'none' | 'base' | 'aggregate';
3853
+ /**
3854
+ * Refused. Delete the pay schedule and create it again to change payroll_mode.
3855
+ */
3856
+ payroll_mode?: 'none' | 'base' | 'aggregate' | null;
3857
+ };
3799
3858
  /**
3800
3859
  * A pay schedule (PayPeriodConfig) — the top-level timekeeping unit that sets a company's payroll cadence and tracking modes and generates its stream of pay periods. Reads return the version valid at the requested time; create returns the new schedule, keyed by its stable id.
3801
3860
  */
@@ -4058,7 +4117,7 @@ export type PwaCompanyDetailsResponseObject = {
4058
4117
  */
4059
4118
  company_id: string;
4060
4119
  /**
4061
- * California PWCR number (exactly 10 digits, or NA); null when unset.
4120
+ * California PWCR number (exactly 10 digits); null when unset.
4062
4121
  */
4063
4122
  pwcr_number: string | null;
4064
4123
  /**
@@ -4155,7 +4214,7 @@ export type PwaCompanyDetailsResponseObject = {
4155
4214
  */
4156
4215
  export type PwaCompanyDetailsParameters = {
4157
4216
  /**
4158
- * California PWCR number (exactly 10 digits, or NA).
4217
+ * California PWCR number (exactly 10 digits).
4159
4218
  */
4160
4219
  pwcr_number?: string | null;
4161
4220
  /**
@@ -4252,7 +4311,7 @@ export type PwaCompanyDetailsParameters = {
4252
4311
  */
4253
4312
  export type PwaCompanyDetailsUpdateParameters = {
4254
4313
  /**
4255
- * California PWCR number (exactly 10 digits, or NA).
4314
+ * California PWCR number (exactly 10 digits).
4256
4315
  */
4257
4316
  pwcr_number?: string | null;
4258
4317
  /**
@@ -12190,7 +12249,7 @@ export type ProductionJobScopePriceResponseObject = {
12190
12249
  */
12191
12250
  unit_of_measure: string;
12192
12251
  /**
12193
- * Billing rate per unit in cents, as a decimal string (e.g. "120000.0" is $1,200.00 and "3.5" is $0.035); a fraction of a cent is kept exactly. Null means the current price is unknown; "0.0" is a known zero price. Present for company keys and for administrators, managers, safety managers, and field leads of the company that owns the job; omitted for other user keys.
12252
+ * Billing rate per unit in cents, as a decimal string (e.g. "120000.0" is $1,200.00 and "3.5" is $0.035); a fraction of a cent is kept exactly. Null means the current price is unknown; "0.0" is a known zero price. Present for company keys and for administrators, managers, and safety managers of the company that owns the job; omitted for other user keys, including field leads.
12194
12253
  */
12195
12254
  unit_price_cents?: string | null;
12196
12255
  /**
@@ -13255,21 +13314,88 @@ export type LaborRateResponseObject = {
13255
13314
  */
13256
13315
  wage_pay_base_rate_cents: string;
13257
13316
  /**
13258
- * Hourly fringe rate, in cents as a decimal string (e.g. "1200.0" is $12.00); null when fringe is expressed as a percentage or a weekly or monthly amount instead.
13317
+ * Hourly amount printed in the rate cell, in cents as a decimal string (e.g. "1200.0" is $12.00); null when absent. This source component may coexist with other benefits. Use fringe_calculation to determine whether a complete hourly projection is available.
13259
13318
  */
13260
13319
  fringe_rate_cents: string | null;
13261
13320
  /**
13262
- * Fringe rate as a percentage of the base wage, as a decimal string (e.g. "15.00" is 15%); null when fringe is a flat hourly amount instead.
13321
+ * Percentage printed in the fringe cell as a decimal string (e.g. "15.00" is 15%); null when absent. It may coexist with an hourly component and requires evaluation before automatic calculation.
13263
13322
  */
13264
13323
  fringe_percentage_rate: string | null;
13265
13324
  /**
13266
- * Fringe benefit expressed as a weekly amount, in cents as a decimal string; null when fringe is expressed hourly or as a percentage instead.
13325
+ * Weekly amount printed in the rate cell, in cents as a decimal string; null when absent. Additional prose benefits appear in fringe_benefit_components.
13267
13326
  */
13268
13327
  fringe_benefit_weekly_rate_cents: string | null;
13269
13328
  /**
13270
- * Fringe benefit expressed as a monthly amount, in cents as a decimal string; null when fringe is expressed hourly or as a percentage instead.
13329
+ * Monthly amount printed in the rate cell, in cents as a decimal string; null when absent. Additional prose benefits appear in fringe_benefit_components.
13271
13330
  */
13272
13331
  fringe_benefit_monthly_rate_cents: string | null;
13332
+ fringe_calculation: {
13333
+ /**
13334
+ * Whether all stated fringe benefits have a supported complete hourly projection.
13335
+ */
13336
+ available: boolean;
13337
+ /**
13338
+ * Complete hourly fringe in decimal cents, or null when calculation is unavailable. Never substitute a partial hourly amount or zero for null.
13339
+ */
13340
+ hourly_cents: string | null;
13341
+ /**
13342
+ * Machine-readable reasons preventing automatic calculation.
13343
+ */
13344
+ reasons: Array<string>;
13345
+ /**
13346
+ * Source evidence considered when determining calculation readiness for this classification.
13347
+ */
13348
+ component_ids: Array<string>;
13349
+ };
13350
+ /**
13351
+ * Monetary source occurrences attached to this rate, plus unresolved occurrences from its schedule, preserved individually without adding repeated or conflicting amounts. Each occurrence states its attachment status.
13352
+ */
13353
+ fringe_benefit_components: Array<{
13354
+ /**
13355
+ * Identifier of this captured source occurrence.
13356
+ */
13357
+ id: string;
13358
+ /**
13359
+ * Zero-based printed order within the schedule.
13360
+ */
13361
+ position: number;
13362
+ /**
13363
+ * Exact stated monetary amount as decimal cents; not an hourly conversion.
13364
+ */
13365
+ amount_cents: string;
13366
+ /**
13367
+ * Period printed with the monetary amount.
13368
+ */
13369
+ period: 'hour' | 'day' | 'week' | 'month' | 'year' | 'shift';
13370
+ /**
13371
+ * Whether the clause describes a fringe contribution, a wage premium, or an unresolved monetary term.
13372
+ */
13373
+ kind: 'fringe' | 'wage_premium' | 'unresolved';
13374
+ /**
13375
+ * Verbatim surrounding source paragraph, including stated qualifications.
13376
+ */
13377
+ text: string;
13378
+ /**
13379
+ * Rate means the source establishes the attached classification; unresolved means applicability has not been established and must not be assumed schedule-wide.
13380
+ */
13381
+ attachment_status: 'rate' | 'unresolved';
13382
+ /**
13383
+ * Attached labor rate identifier, or null when applicability is unresolved.
13384
+ */
13385
+ labor_rate_id: string | null;
13386
+ /**
13387
+ * SHA256 of the normalized source document addressed by the character offsets.
13388
+ */
13389
+ source_sha256: string;
13390
+ /**
13391
+ * Inclusive character offset of the monetary occurrence within the normalized source document.
13392
+ */
13393
+ start_offset: number;
13394
+ /**
13395
+ * Exclusive character offset of the monetary occurrence within the normalized source document.
13396
+ */
13397
+ end_offset: number;
13398
+ }>;
13273
13399
  /**
13274
13400
  * IDs of the reference items this rate cites, in the order their letter tokens appear in the source fringe expression.
13275
13401
  */
@@ -16284,7 +16410,7 @@ export type AssetsTransactionEventResponseObject = {
16284
16410
  /**
16285
16411
  * What produced the movement: receive (a stock, unstock, or custody change), adjust (a reconciliation), or transfer (part of a stock transfer).
16286
16412
  */
16287
- kind: 'receive' | 'adjust' | 'transfer';
16413
+ kind: 'receive' | 'adjust' | 'transfer' | 'transfer_contents';
16288
16414
  /**
16289
16415
  * Number of units moved; always positive.
16290
16416
  */
@@ -16831,10 +16957,6 @@ export type AssetsTransferResponseObject = {
16831
16957
  * ID of the destination container item; null when the destination is a site or user.
16832
16958
  */
16833
16959
  to_container_item_id: string | null;
16834
- /**
16835
- * ID of the storage location within the source site or container the stock drew from; null for an unbinned source or a user source.
16836
- */
16837
- from_assets_sub_location_id: string | null;
16838
16960
  /**
16839
16961
  * ID of the storage location within the destination site or container the stock landed in; null for an unbinned destination or a user destination.
16840
16962
  */
@@ -16863,6 +16985,10 @@ export type AssetsTransferResponseObject = {
16863
16985
  * Number of units of the item to move; greater than 0.
16864
16986
  */
16865
16987
  quantity: number;
16988
+ /**
16989
+ * ID of the storage location within the source site or container this line's stock drew from; null for an unbinned source or a user source.
16990
+ */
16991
+ from_assets_sub_location_id: string | null;
16866
16992
  }>;
16867
16993
  /**
16868
16994
  * When the record was created (ISO 8601).
@@ -16890,7 +17016,7 @@ export type AssetsTransferParameters = {
16890
17016
  */
16891
17017
  from_container_item_id?: string;
16892
17018
  /**
16893
- * Optional. The storage location within the source site or container the stock draws from. Omit or send null for the source's unbinned stock. A blank ID or a wrong type answers 422, a storage location outside the company that owns the API key answers 404, and one named without a source site or container, or not belonging to it, answers 422.
17019
+ * Optional. The storage location within the source site or container every line's stock draws from, recorded on each line. Omit or send null for the source's unbinned stock. A blank ID or a wrong type answers 422, a storage location outside the company that owns the API key answers 404, and one named without a source site or container, or not belonging to it, answers 422.
16894
17020
  */
16895
17021
  from_assets_sub_location_id?: string | null;
16896
17022
  /**
@@ -21430,6 +21556,7 @@ export type ListTransfersData = {
21430
21556
  * * `pending`
21431
21557
  * * `in_transit`
21432
21558
  * * `completed`
21559
+ * * `declined`
21433
21560
  * * `cancelled`
21434
21561
  *
21435
21562
  */
@@ -25089,6 +25216,10 @@ export type DeleteGroupErrors = {
25089
25216
  * Not Found
25090
25217
  */
25091
25218
  404: Problem;
25219
+ /**
25220
+ * Unprocessable Content (group is followed)
25221
+ */
25222
+ 422: Problem;
25092
25223
  };
25093
25224
  export type DeleteGroupError = DeleteGroupErrors[keyof DeleteGroupErrors];
25094
25225
  export type DeleteGroupResponses = {
@@ -34959,6 +35090,10 @@ export type UpdateApprenticeshipOccupationErrors = {
34959
35090
  * Forbidden
34960
35091
  */
34961
35092
  403: Problem;
35093
+ /**
35094
+ * Not Found
35095
+ */
35096
+ 404: Problem;
34962
35097
  /**
34963
35098
  * Unprocessable Content
34964
35099
  */
@@ -36530,10 +36665,6 @@ export type CancelTimecodeScheduledTerminationErrors = {
36530
36665
  * Not Found
36531
36666
  */
36532
36667
  404: Problem;
36533
- /**
36534
- * Conflict
36535
- */
36536
- 409: Problem;
36537
36668
  /**
36538
36669
  * Precondition Failed
36539
36670
  */
@@ -37375,6 +37506,54 @@ export type GetPayPeriodConfigResponses = {
37375
37506
  200: PayPeriodConfigResponseObject;
37376
37507
  };
37377
37508
  export type GetPayPeriodConfigResponse = GetPayPeriodConfigResponses[keyof GetPayPeriodConfigResponses];
37509
+ export type UpdatePayPeriodConfigData = {
37510
+ body: PayPeriodConfigUpdateParameters;
37511
+ headers: {
37512
+ /**
37513
+ * Version validator this write is composed against — the `ETag` from a read of this schedule, or `*` to write against whatever exists. See "Version validators" in the API overview.
37514
+ */
37515
+ 'If-Match': string;
37516
+ };
37517
+ path: {
37518
+ id: string;
37519
+ };
37520
+ query?: never;
37521
+ url: '/api/v1/timekeeping/pay_period_configs/{id}';
37522
+ };
37523
+ export type UpdatePayPeriodConfigErrors = {
37524
+ /**
37525
+ * Bad Request
37526
+ */
37527
+ 400: Problem;
37528
+ /**
37529
+ * Forbidden
37530
+ */
37531
+ 403: Problem;
37532
+ /**
37533
+ * Not Found
37534
+ */
37535
+ 404: Problem;
37536
+ /**
37537
+ * Precondition Failed
37538
+ */
37539
+ 412: Problem;
37540
+ /**
37541
+ * Invalid configuration
37542
+ */
37543
+ 422: Problem;
37544
+ /**
37545
+ * Precondition Required
37546
+ */
37547
+ 428: Problem;
37548
+ };
37549
+ export type UpdatePayPeriodConfigError = UpdatePayPeriodConfigErrors[keyof UpdatePayPeriodConfigErrors];
37550
+ export type UpdatePayPeriodConfigResponses = {
37551
+ /**
37552
+ * Accepted
37553
+ */
37554
+ 202: PayPeriodConfigResponseObject;
37555
+ };
37556
+ export type UpdatePayPeriodConfigResponse = UpdatePayPeriodConfigResponses[keyof UpdatePayPeriodConfigResponses];
37378
37557
  export type ListTimeCardActualsData = {
37379
37558
  body?: never;
37380
37559
  path?: never;