@dsptch-work/api-client 0.21.0 → 0.23.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.
@@ -418,6 +418,9 @@ export const zDirectUploadParameters = z.object({
418
418
  'assets.products',
419
419
  'assets.vendors',
420
420
  'compliance.checks',
421
+ 'internal.company_todos',
422
+ 'internal.job_todos',
423
+ 'internal.project_todos',
421
424
  'pay_periods.imports.aggregate_times',
422
425
  'pay_periods.imports.dsptch_cprs',
423
426
  'pay_periods.imports.time_entries',
@@ -604,9 +607,22 @@ export const zApprenticeshipAllocationResponseObject = z.object({
604
607
  updated_at: z.iso.datetime()
605
608
  });
606
609
  /**
607
- * Correct the effective timestamp of an existing standalone allocation. Time-card-linked allocations cannot be date-corrected. A changed timestamp rebuilds progression and requests historical wage repricing in the background, including locked time cards.
610
+ * Record hours toward an apprentice's wage progression. Creation requires a user-scoped API key, since the row attributes the hours to the person who recorded them. Omit timekeeping_time_card_id for a standalone allocation entered outside the time card system, or supply it to link the allocation to one of the apprentice's own time cards; the effective timestamp then derives from the card's pay period and cannot be overridden. Recording the allocation rebuilds progression and requests wage repricing in the background.
611
+ */
612
+ export const zApprenticeshipAllocationCreateParameters = z.object({
613
+ apprenticeship_work_process_category_id: z.string().optional(),
614
+ timekeeping_time_card_id: z.string().optional(),
615
+ minutes: z.int(),
616
+ description: z.string().optional(),
617
+ allocated_at: z.iso.datetime().optional()
618
+ });
619
+ /**
620
+ * Correct an existing allocation's hours, work process category, description, or (for a standalone allocation) effective timestamp. The time card an allocation is linked to cannot be changed after creation. Any change that shifts progression rebuilds it and requests historical wage repricing in the background, including locked time cards.
608
621
  */
609
622
  export const zApprenticeshipAllocationUpdateParameters = z.object({
623
+ apprenticeship_work_process_category_id: z.string().nullish(),
624
+ minutes: z.int().optional(),
625
+ description: z.string().nullish(),
610
626
  allocated_at: z.iso.datetime().optional()
611
627
  });
612
628
  /**
@@ -894,6 +910,99 @@ export const zPeopleEmploymentResponseObject = z.object({
894
910
  created_at: z.iso.datetime(),
895
911
  updated_at: z.iso.datetime()
896
912
  });
913
+ /**
914
+ * Create a distinct employment stint for an existing user in the credential company. Only user_id and hire_date are required; omitted optional fields use the defaults or null values described below. This does not create a user, invitation, role, group, or login identity.
915
+ */
916
+ export const zPeopleEmploymentCreateParameters = z.object({
917
+ user_id: z.string(),
918
+ hire_date: z.iso.date(),
919
+ type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
920
+ title: z.string().nullish(),
921
+ manager_user_id: z.string().nullish(),
922
+ payroll_id: z.string().nullish(),
923
+ enrolled_in_t_and_a: z.boolean().optional(),
924
+ compensation_type: z.enum(['hourly', 'salary']).optional(),
925
+ hourly_rate_cents: z.string().nullish(),
926
+ overtime_eligible: z.boolean().nullish(),
927
+ overtime_package_id: z.string().nullish(),
928
+ worked_annual_minutes: z.int().nullish(),
929
+ pto_annual_minutes: z.int().nullish(),
930
+ holiday_annual_minutes: z.int().nullish(),
931
+ training_annual_minutes: z.int().nullish(),
932
+ training_annual_amount_cents: z.string().nullish(),
933
+ employer_combined_health_amount_cents: z.string().nullish(),
934
+ employer_combined_savings_cents: z.string().nullish()
935
+ });
936
+ /**
937
+ * Request body for creating one strictly future employment boundary. effective_date is required and is interpreted at midnight in the credential company's time zone. Send at least one value to change; omitted values carry forward from the version immediately before the new boundary.
938
+ */
939
+ export const zPeopleEmploymentScheduledChangeCreateParameters = z.object({
940
+ compensation_type: z.enum(['hourly', 'salary']).optional(),
941
+ hourly_rate_cents: z.string().nullish(),
942
+ overtime_eligible: z.boolean().nullish(),
943
+ overtime_package_id: z.string().nullish(),
944
+ worked_annual_minutes: z.int().nullish(),
945
+ pto_annual_minutes: z.int().nullish(),
946
+ holiday_annual_minutes: z.int().nullish(),
947
+ training_annual_minutes: z.int().nullish(),
948
+ training_annual_amount_cents: z.string().nullish(),
949
+ employer_combined_health_amount_cents: z.string().nullish(),
950
+ employer_combined_savings_cents: z.string().nullish(),
951
+ companies_department_id: z.string().nullish(),
952
+ effective_date: z.iso.date()
953
+ });
954
+ /**
955
+ * Request body for changing values at one exact strictly future employment boundary. Send only the fields to change; omitted values remain as recorded at that boundary. The boundary date cannot move.
956
+ */
957
+ export const zPeopleEmploymentScheduledChangeUpdateParameters = z.object({
958
+ compensation_type: z.enum(['hourly', 'salary']).optional(),
959
+ hourly_rate_cents: z.string().nullish(),
960
+ overtime_eligible: z.boolean().nullish(),
961
+ overtime_package_id: z.string().nullish(),
962
+ worked_annual_minutes: z.int().nullish(),
963
+ pto_annual_minutes: z.int().nullish(),
964
+ holiday_annual_minutes: z.int().nullish(),
965
+ training_annual_minutes: z.int().nullish(),
966
+ training_annual_amount_cents: z.string().nullish(),
967
+ employer_combined_health_amount_cents: z.string().nullish(),
968
+ employer_combined_savings_cents: z.string().nullish(),
969
+ companies_department_id: z.string().nullish()
970
+ });
971
+ /**
972
+ * Parameters for moving where an employment stint's valid-time timeline begins.
973
+ */
974
+ export const zPeopleEmploymentGenesisParameters = z.object({
975
+ effective_date: z.iso.date().optional()
976
+ });
977
+ /**
978
+ * Parameters for scheduling when an employment stint stops being valid.
979
+ */
980
+ export const zPeopleEmploymentScheduledTerminationParameters = z.object({
981
+ effective_date: z.iso.date()
982
+ });
983
+ /**
984
+ * Request body for correcting an employment stint's operational details from its first recorded boundary forward. Send only the fields to change. A submitted value that already applies at the first boundary is a no-op, even when a later version differs.
985
+ */
986
+ export const zPeopleEmploymentUpdateParameters = z.object({
987
+ type: z.enum(['EMPLOYEE', 'CONTRACTOR']).optional(),
988
+ title: z.string().nullish(),
989
+ manager_user_id: z.string().nullish(),
990
+ payroll_id: z.string().nullish(),
991
+ enrolled_in_t_and_a: z.boolean().optional()
992
+ });
993
+ export const zPeopleEmploymentCustomFieldResponseObject = z.object({
994
+ custom_field_config_id: z.string(),
995
+ value: z.string().nullable()
996
+ });
997
+ /**
998
+ * Update stored custom-field values for one employment family in a single batch. The batch must contain at least one row. Omitted configurations keep their values, and an explicit null is stored.
999
+ */
1000
+ export const zPeopleEmploymentCustomFieldsUpdateParameters = z.object({
1001
+ custom_fields: z.array(z.object({
1002
+ custom_field_config_id: z.string(),
1003
+ value: z.string().nullable()
1004
+ })).min(1)
1005
+ });
897
1006
  export const zPeopleEmploymentHistoryCorrectionObject = z.object({
898
1007
  people_employment_id: z.string(),
899
1008
  user_id: z.string(),
@@ -2474,7 +2583,8 @@ export const zAggregateTimeImportResponseObject = z.object({
2474
2583
  'processing',
2475
2584
  'processed',
2476
2585
  'success',
2477
- 'failed'
2586
+ 'failed',
2587
+ 'superseded'
2478
2588
  ]),
2479
2589
  processed_rows_count: z.int(),
2480
2590
  processing_errors: z.array(zImportProcessingError),
@@ -2503,7 +2613,8 @@ export const zDsptchCprImportResponseObject = z.object({
2503
2613
  'processing',
2504
2614
  'processed',
2505
2615
  'success',
2506
- 'failed'
2616
+ 'failed',
2617
+ 'superseded'
2507
2618
  ]),
2508
2619
  processed_rows_count: z.int(),
2509
2620
  processing_errors: z.array(zImportProcessingError),
@@ -2532,7 +2643,8 @@ export const zPaystubImportResponseObject = z.object({
2532
2643
  'processing',
2533
2644
  'processed',
2534
2645
  'success',
2535
- 'failed'
2646
+ 'failed',
2647
+ 'superseded'
2536
2648
  ]),
2537
2649
  processed_rows_count: z.int(),
2538
2650
  processing_errors: z.array(zImportProcessingError),
@@ -2561,7 +2673,8 @@ export const zTimeEntryImportResponseObject = z.object({
2561
2673
  'processing',
2562
2674
  'processed',
2563
2675
  'success',
2564
- 'failed'
2676
+ 'failed',
2677
+ 'superseded'
2565
2678
  ]),
2566
2679
  processed_rows_count: z.int(),
2567
2680
  processing_errors: z.array(zImportProcessingError),
@@ -6521,6 +6634,14 @@ export const zListAllocationsResponse = z.object({
6521
6634
  links: zLinks,
6522
6635
  data: z.array(zApprenticeshipAllocationResponseObject)
6523
6636
  });
6637
+ export const zCreateAllocationBody = zApprenticeshipAllocationCreateParameters;
6638
+ export const zCreateAllocationPath = z.object({
6639
+ apprentice_id: z.string()
6640
+ });
6641
+ /**
6642
+ * Created
6643
+ */
6644
+ export const zCreateAllocationResponse = zApprenticeshipAllocationResponseObject;
6524
6645
  export const zGetAllocationPath = z.object({
6525
6646
  apprentice_id: z.string(),
6526
6647
  id: z.string()
@@ -9185,6 +9306,39 @@ export const zUpdatePaystubPath = z.object({
9185
9306
  * Success
9186
9307
  */
9187
9308
  export const zUpdatePaystubResponse = zPaystubResponseObject;
9309
+ export const zListCustomFieldsPath = z.object({
9310
+ employment_id: z.string()
9311
+ });
9312
+ /**
9313
+ * Success
9314
+ */
9315
+ export const zListCustomFieldsResponse = z.object({
9316
+ data: z.array(zPeopleEmploymentCustomFieldResponseObject)
9317
+ });
9318
+ export const zUpdateCustomFieldBody = zPeopleEmploymentCustomFieldsUpdateParameters;
9319
+ export const zUpdateCustomFieldHeaders = z.object({
9320
+ 'If-Match': z.string()
9321
+ });
9322
+ export const zUpdateCustomFieldPath = z.object({
9323
+ employment_id: z.string()
9324
+ });
9325
+ /**
9326
+ * Success
9327
+ */
9328
+ export const zUpdateCustomFieldResponse = z.object({
9329
+ data: z.array(zPeopleEmploymentCustomFieldResponseObject)
9330
+ });
9331
+ export const zUpdateGenesisBody = zPeopleEmploymentGenesisParameters;
9332
+ export const zUpdateGenesisHeaders = z.object({
9333
+ 'If-Match': z.string()
9334
+ });
9335
+ export const zUpdateGenesisPath = z.object({
9336
+ employment_id: z.string()
9337
+ });
9338
+ /**
9339
+ * Success
9340
+ */
9341
+ export const zUpdateGenesisResponse = zPeopleEmploymentResponseObject;
9188
9342
  export const zListEmploymentHistoryPath = z.object({
9189
9343
  employment_id: z.string()
9190
9344
  });
@@ -9221,6 +9375,61 @@ export const zListEmploymentsHistoryResponse = z.object({
9221
9375
  links: zLinks,
9222
9376
  data: z.array(zPeopleEmploymentHistoryVersionObject)
9223
9377
  });
9378
+ export const zCreateEmploymentScheduledChangeBody = zPeopleEmploymentScheduledChangeCreateParameters;
9379
+ export const zCreateEmploymentScheduledChangeHeaders = z.object({
9380
+ 'If-Match': z.string()
9381
+ });
9382
+ export const zCreateEmploymentScheduledChangePath = z.object({
9383
+ employment_id: z.string()
9384
+ });
9385
+ /**
9386
+ * Created
9387
+ */
9388
+ export const zCreateEmploymentScheduledChangeResponse = zPeopleEmploymentResponseObject;
9389
+ export const zDeleteEmploymentScheduledChangeHeaders = z.object({
9390
+ 'If-Match': z.string()
9391
+ });
9392
+ export const zDeleteEmploymentScheduledChangePath = z.object({
9393
+ employment_id: z.string(),
9394
+ effective_date: z.iso.date()
9395
+ });
9396
+ /**
9397
+ * No Content
9398
+ */
9399
+ export const zDeleteEmploymentScheduledChangeResponse = z.void();
9400
+ export const zUpdateEmploymentScheduledChangeBody = zPeopleEmploymentScheduledChangeUpdateParameters;
9401
+ export const zUpdateEmploymentScheduledChangeHeaders = z.object({
9402
+ 'If-Match': z.string()
9403
+ });
9404
+ export const zUpdateEmploymentScheduledChangePath = z.object({
9405
+ employment_id: z.string(),
9406
+ effective_date: z.iso.date()
9407
+ });
9408
+ /**
9409
+ * Success
9410
+ */
9411
+ export const zUpdateEmploymentScheduledChangeResponse = zPeopleEmploymentResponseObject;
9412
+ export const zDeleteScheduledTerminationHeaders = z.object({
9413
+ 'If-Match': z.string()
9414
+ });
9415
+ export const zDeleteScheduledTerminationPath = z.object({
9416
+ employment_id: z.string()
9417
+ });
9418
+ /**
9419
+ * Success
9420
+ */
9421
+ export const zDeleteScheduledTerminationResponse = zPeopleEmploymentResponseObject;
9422
+ export const zCreateEmploymentScheduledTerminationBody = zPeopleEmploymentScheduledTerminationParameters;
9423
+ export const zCreateEmploymentScheduledTerminationHeaders = z.object({
9424
+ 'If-Match': z.string()
9425
+ });
9426
+ export const zCreateEmploymentScheduledTerminationPath = z.object({
9427
+ employment_id: z.string()
9428
+ });
9429
+ /**
9430
+ * Created
9431
+ */
9432
+ export const zCreateEmploymentScheduledTerminationResponse = zPeopleEmploymentResponseObject;
9224
9433
  export const zListEmploymentsQuery = z.object({
9225
9434
  'filter[user_id]': z.string().optional(),
9226
9435
  filter: z.string().optional(),
@@ -9242,6 +9451,21 @@ export const zListEmploymentsResponse = z.object({
9242
9451
  links: zLinks,
9243
9452
  data: z.array(zPeopleEmploymentResponseObject)
9244
9453
  });
9454
+ export const zCreateEmploymentBody = zPeopleEmploymentCreateParameters;
9455
+ /**
9456
+ * Created
9457
+ */
9458
+ export const zCreateEmploymentResponse = zPeopleEmploymentResponseObject;
9459
+ export const zDeleteEmploymentHeaders = z.object({
9460
+ 'If-Match': z.string()
9461
+ });
9462
+ export const zDeleteEmploymentPath = z.object({
9463
+ id: z.string()
9464
+ });
9465
+ /**
9466
+ * Success
9467
+ */
9468
+ export const zDeleteEmploymentResponse = zPeopleEmploymentResponseObject;
9245
9469
  export const zGetEmploymentPath = z.object({
9246
9470
  id: z.string()
9247
9471
  });
@@ -9252,6 +9476,17 @@ export const zGetEmploymentQuery = z.object({
9252
9476
  * Success
9253
9477
  */
9254
9478
  export const zGetEmploymentResponse = zPeopleEmploymentResponseObject;
9479
+ export const zUpdateEmploymentBody = zPeopleEmploymentUpdateParameters;
9480
+ export const zUpdateEmploymentHeaders = z.object({
9481
+ 'If-Match': z.string()
9482
+ });
9483
+ export const zUpdateEmploymentPath = z.object({
9484
+ id: z.string()
9485
+ });
9486
+ /**
9487
+ * Success
9488
+ */
9489
+ export const zUpdateEmploymentResponse = zPeopleEmploymentResponseObject;
9255
9490
  export const zListPerDiemsQuery = z.object({
9256
9491
  'filter[default]': z.boolean().optional(),
9257
9492
  'filter[taxable]': z.boolean().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsptch-work/api-client",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "description": "Generated TypeScript client for the DSPTCH REST API.",
5
5
  "keywords": [
6
6
  "dsptch",