@dsptch-work/api-client 0.52.1 → 0.53.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.
@@ -621,6 +621,103 @@ export class ApprenticeshipWageSchedules {
621
621
  });
622
622
  }
623
623
  }
624
+ export class ApprenticeshipWorkProcessCategories {
625
+ /**
626
+ * List apprenticeship work process categories
627
+ *
628
+ * **Required scope:**
629
+ *
630
+ * `apprenticeship.occupations.work_process_categories:read`
631
+ *
632
+ */
633
+ static listWorkProcessCategories(options) {
634
+ return (options.client ?? client).get({
635
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
636
+ url: '/api/v1/apprenticeship/occupations/{occupation_id}/work_process_categories',
637
+ ...options
638
+ });
639
+ }
640
+ /**
641
+ * Create apprenticeship work process category
642
+ *
643
+ * **Required scope:**
644
+ *
645
+ * `apprenticeship.occupations.work_process_categories:create`
646
+ *
647
+ */
648
+ static createWorkProcessCategory(options) {
649
+ return (options.client ?? client).post({
650
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
651
+ url: '/api/v1/apprenticeship/occupations/{occupation_id}/work_process_categories',
652
+ ...options,
653
+ headers: {
654
+ 'Content-Type': 'application/json',
655
+ ...options.headers
656
+ }
657
+ });
658
+ }
659
+ /**
660
+ * Delete apprenticeship work process category
661
+ *
662
+ * Deletes an unused work process category nested under the occupation in the
663
+ * path. A category that still has allocations is refused with a `422`
664
+ * `destroy_restricted`. An unused category returns `204`. Deletes are
665
+ * sponsor-only; an enrolled employer is `403`. A missing, out-of-scope, or
666
+ * mismatched occupation/category pair is `404`.
667
+ *
668
+ *
669
+ * **Required scope:**
670
+ *
671
+ * `apprenticeship.occupations.work_process_categories:delete`
672
+ *
673
+ */
674
+ static deleteWorkProcessCategory(options) {
675
+ return (options.client ?? client).delete({
676
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
677
+ url: '/api/v1/apprenticeship/occupations/{occupation_id}/work_process_categories/{id}',
678
+ ...options
679
+ });
680
+ }
681
+ /**
682
+ * Show apprenticeship work process category
683
+ *
684
+ * Returns one work process category nested under the occupation in the path.
685
+ * The object matches the list, create, and update door. A missing, out-of-scope,
686
+ * or mismatched occupation/category pair is not found.
687
+ *
688
+ *
689
+ * **Required scope:**
690
+ *
691
+ * `apprenticeship.occupations.work_process_categories:read`
692
+ *
693
+ */
694
+ static getWorkProcessCategory(options) {
695
+ return (options.client ?? client).get({
696
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
697
+ url: '/api/v1/apprenticeship/occupations/{occupation_id}/work_process_categories/{id}',
698
+ ...options
699
+ });
700
+ }
701
+ /**
702
+ * Update apprenticeship work process category
703
+ *
704
+ * **Required scope:**
705
+ *
706
+ * `apprenticeship.occupations.work_process_categories:update`
707
+ *
708
+ */
709
+ static updateWorkProcessCategory(options) {
710
+ return (options.client ?? client).patch({
711
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
712
+ url: '/api/v1/apprenticeship/occupations/{occupation_id}/work_process_categories/{id}',
713
+ ...options,
714
+ headers: {
715
+ 'Content-Type': 'application/json',
716
+ ...options.headers
717
+ }
718
+ });
719
+ }
720
+ }
624
721
  export class AssetsAttributes {
625
722
  /**
626
723
  * List Attributes
@@ -2901,6 +2998,117 @@ export class Companies {
2901
2998
  });
2902
2999
  }
2903
3000
  }
3001
+ export class CompanyDocuments {
3002
+ /**
3003
+ * List company documents
3004
+ *
3005
+ * Returns the key's company documents, oldest first by `created_at` then `id`.
3006
+ * Each item is either a file or a URL, never both — `file` is null for a
3007
+ * URL-only document.
3008
+ *
3009
+ *
3010
+ * **Required scope:**
3011
+ *
3012
+ * `company_documents:read`
3013
+ *
3014
+ */
3015
+ static listCompanyDocuments(options) {
3016
+ return (options?.client ?? client).get({
3017
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3018
+ url: '/api/v1/company_documents',
3019
+ ...options
3020
+ });
3021
+ }
3022
+ /**
3023
+ * Create company document
3024
+ *
3025
+ * Creates a company document for the key's company. Supply exactly one of
3026
+ * `url` or `file`. `file` is a signed id from `POST /api/v1/direct_uploads`
3027
+ * naming `company_documents`. The company is taken from the credential.
3028
+ * Company keys must send `performed_by_user_id`; user keys act as themselves.
3029
+ *
3030
+ *
3031
+ * **Required scope:**
3032
+ *
3033
+ * `company_documents:create`
3034
+ *
3035
+ */
3036
+ static createCompanyDocument(options) {
3037
+ return (options.client ?? client).post({
3038
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3039
+ url: '/api/v1/company_documents',
3040
+ ...options,
3041
+ headers: {
3042
+ 'Content-Type': 'application/json',
3043
+ ...options.headers
3044
+ }
3045
+ });
3046
+ }
3047
+ /**
3048
+ * Delete company document
3049
+ *
3050
+ * Permanently deletes the document. Succeeds with 204 and no body. A missing
3051
+ * or out-of-scope id is 404.
3052
+ *
3053
+ *
3054
+ * **Required scope:**
3055
+ *
3056
+ * `company_documents:delete`
3057
+ *
3058
+ */
3059
+ static deleteCompanyDocument(options) {
3060
+ return (options.client ?? client).delete({
3061
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3062
+ url: '/api/v1/company_documents/{id}',
3063
+ ...options
3064
+ });
3065
+ }
3066
+ /**
3067
+ * Show company document
3068
+ *
3069
+ * Returns one company document owned by the key's company. A missing or
3070
+ * out-of-scope id reads as not found.
3071
+ *
3072
+ *
3073
+ * **Required scope:**
3074
+ *
3075
+ * `company_documents:read`
3076
+ *
3077
+ */
3078
+ static getCompanyDocument(options) {
3079
+ return (options.client ?? client).get({
3080
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3081
+ url: '/api/v1/company_documents/{id}',
3082
+ ...options
3083
+ });
3084
+ }
3085
+ /**
3086
+ * Update company document
3087
+ *
3088
+ * Updates the named document. Omitting `file` keeps the stored blob.
3089
+ * `file: null` with a `url` switches to a URL-only document. Undeclared
3090
+ * keys return `400`. A missing or out-of-scope id returns `404`. Company
3091
+ * keys that send `performed_by_user_id` must name a company member (`422`
3092
+ * otherwise) and must send it when attaching a file.
3093
+ *
3094
+ *
3095
+ * **Required scope:**
3096
+ *
3097
+ * `company_documents:update`
3098
+ *
3099
+ */
3100
+ static updateCompanyDocument(options) {
3101
+ return (options.client ?? client).patch({
3102
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3103
+ url: '/api/v1/company_documents/{id}',
3104
+ ...options,
3105
+ headers: {
3106
+ 'Content-Type': 'application/json',
3107
+ ...options.headers
3108
+ }
3109
+ });
3110
+ }
3111
+ }
2904
3112
  export class CompetenciesAssessments {
2905
3113
  /**
2906
3114
  * List competence assessments
@@ -4623,6 +4831,77 @@ export class Jobs {
4623
4831
  ...options
4624
4832
  });
4625
4833
  }
4834
+ /**
4835
+ * List NY DOL XML exports
4836
+ *
4837
+ * Returns the job-scoped NY DOL XML certified-payroll exports nested on
4838
+ * the named job. A missing or out-of-scope job reads as not found. A visible
4839
+ * job with no exports returns an empty list. Ordered by created_at descending
4840
+ * then id. Read-only. Poll a member GET for generation status and the file URL.
4841
+ *
4842
+ *
4843
+ * **Required scope:**
4844
+ *
4845
+ * `jobs.pwa.certified_payrolls.ny_dol_xml_exports:read`
4846
+ *
4847
+ */
4848
+ static listNyDolXmlExports(options) {
4849
+ return (options.client ?? client).get({
4850
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4851
+ url: '/api/v1/jobs/{job_id}/pwa/certified_payrolls/ny_dol_xml_exports',
4852
+ ...options
4853
+ });
4854
+ }
4855
+ /**
4856
+ * Create NY DOL XML export
4857
+ *
4858
+ * Enqueues a job-scoped NY DOL XML certified-payroll export over
4859
+ * `start_date`..`end_date`. Returns the pending export (201); poll the member
4860
+ * GET for generation status and the file URL. Requires a user-scoped key. A
4861
+ * job that does not offer NY DOL XML is 422 `certified_payroll_format_unavailable`.
4862
+ * Failing compliance checks that block the export are 422
4863
+ * `certified_payroll_export_blocked`.
4864
+ * A window with no reportable pay periods is 422 `nothing_exportable`.
4865
+ * Does not start DocuSeal signing.
4866
+ *
4867
+ *
4868
+ * **Required scope:**
4869
+ *
4870
+ * `jobs.pwa.certified_payrolls.ny_dol_xml_exports:create`
4871
+ *
4872
+ */
4873
+ static createNyDolXmlExport(options) {
4874
+ return (options.client ?? client).post({
4875
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4876
+ url: '/api/v1/jobs/{job_id}/pwa/certified_payrolls/ny_dol_xml_exports',
4877
+ ...options,
4878
+ headers: {
4879
+ 'Content-Type': 'application/json',
4880
+ ...options.headers
4881
+ }
4882
+ });
4883
+ }
4884
+ /**
4885
+ * Get NY DOL XML export
4886
+ *
4887
+ * Returns one job-scoped NY DOL XML export nested on the named job. Poll
4888
+ * this document for generation status; `file` may be null until the file is
4889
+ * attached, including when status is `success`.
4890
+ * A missing, misnested, or out-of-scope id reads as not found. Read-only.
4891
+ *
4892
+ *
4893
+ * **Required scope:**
4894
+ *
4895
+ * `jobs.pwa.certified_payrolls.ny_dol_xml_exports:read`
4896
+ *
4897
+ */
4898
+ static getNyDolXmlExport(options) {
4899
+ return (options.client ?? client).get({
4900
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4901
+ url: '/api/v1/jobs/{job_id}/pwa/certified_payrolls/ny_dol_xml_exports/{id}',
4902
+ ...options
4903
+ });
4904
+ }
4626
4905
  /**
4627
4906
  * List WH-347 exports
4628
4907
  *
@@ -5121,6 +5400,94 @@ export class Jobs {
5121
5400
  ...options
5122
5401
  });
5123
5402
  }
5403
+ /**
5404
+ * Create job template
5405
+ *
5406
+ * Creates a job template owned by the key's company. Omit `job_id` for an
5407
+ * empty template job, or send a visible job's id to copy it through the same
5408
+ * `Jobs::Copies::Create` path as the web. `position_option` is create-only.
5409
+ * Company keys must send `performed_by_user_id`; user keys act as themselves.
5410
+ *
5411
+ *
5412
+ * **Required scope:**
5413
+ *
5414
+ * `jobs.templates:create`
5415
+ *
5416
+ */
5417
+ static createTemplate(options) {
5418
+ return (options?.client ?? client).post({
5419
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5420
+ url: '/api/v1/jobs/templates',
5421
+ ...options,
5422
+ headers: {
5423
+ 'Content-Type': 'application/json',
5424
+ ...options?.headers
5425
+ }
5426
+ });
5427
+ }
5428
+ /**
5429
+ * Delete job template
5430
+ *
5431
+ * Deletes a job template and its job when the job has no restricting
5432
+ * activity (`204`). A job still referenced by time entries or other
5433
+ * restricted dependents is refused with `422` `destroy_restricted`.
5434
+ *
5435
+ *
5436
+ * **Required scope:**
5437
+ *
5438
+ * `jobs.templates:delete`
5439
+ *
5440
+ */
5441
+ static deleteTemplate(options) {
5442
+ return (options.client ?? client).delete({
5443
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5444
+ url: '/api/v1/jobs/templates/{id}',
5445
+ ...options
5446
+ });
5447
+ }
5448
+ /**
5449
+ * Show job template
5450
+ *
5451
+ * Returns one job template of a job the key's company provides. Another
5452
+ * company's id is indistinguishable from an unknown id and answers `404`.
5453
+ *
5454
+ *
5455
+ * **Required scope:**
5456
+ *
5457
+ * `jobs.templates:read`
5458
+ *
5459
+ */
5460
+ static getTemplate(options) {
5461
+ return (options.client ?? client).get({
5462
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5463
+ url: '/api/v1/jobs/templates/{id}',
5464
+ ...options
5465
+ });
5466
+ }
5467
+ /**
5468
+ * Update job template
5469
+ *
5470
+ * Renames a job template or updates its description. `job_id`,
5471
+ * `position_option`, and `performed_by_user_id` are create-only
5472
+ * and answer `400`.
5473
+ *
5474
+ *
5475
+ * **Required scope:**
5476
+ *
5477
+ * `jobs.templates:update`
5478
+ *
5479
+ */
5480
+ static updateTemplate(options) {
5481
+ return (options.client ?? client).patch({
5482
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5483
+ url: '/api/v1/jobs/templates/{id}',
5484
+ ...options,
5485
+ headers: {
5486
+ 'Content-Type': 'application/json',
5487
+ ...options.headers
5488
+ }
5489
+ });
5490
+ }
5124
5491
  }
5125
5492
  export class ProductionDeliveryTargets {
5126
5493
  /**
@@ -6847,6 +7214,109 @@ export class OvertimeRules {
6847
7214
  });
6848
7215
  }
6849
7216
  }
7217
+ export class OvertimePackages {
7218
+ /**
7219
+ * List overtime packages
7220
+ *
7221
+ * List overtime packages owned by the company, ordered by id. DSPTCH-global
7222
+ * default packages are not returned.
7223
+ *
7224
+ *
7225
+ * **Required scope:**
7226
+ *
7227
+ * `overtime_packages:read`
7228
+ *
7229
+ */
7230
+ static listOvertimePackages(options) {
7231
+ return (options?.client ?? client).get({
7232
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
7233
+ url: '/api/v1/overtime_packages',
7234
+ ...options
7235
+ });
7236
+ }
7237
+ /**
7238
+ * Create an overtime package
7239
+ *
7240
+ * Create a company overtime package. The company and `selectable: true` are
7241
+ * stamped by the server. `name` and `description` are required by the model.
7242
+ *
7243
+ *
7244
+ * **Required scope:**
7245
+ *
7246
+ * `overtime_packages:create`
7247
+ *
7248
+ */
7249
+ static createOvertimePackage(options) {
7250
+ return (options.client ?? client).post({
7251
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
7252
+ url: '/api/v1/overtime_packages',
7253
+ ...options,
7254
+ headers: {
7255
+ 'Content-Type': 'application/json',
7256
+ ...options.headers
7257
+ }
7258
+ });
7259
+ }
7260
+ /**
7261
+ * Delete an overtime package
7262
+ *
7263
+ * Permanently remove a company overtime package. An unused package returns
7264
+ * `204`. A package still referenced by a job or project wage determination is
7265
+ * refused with `422` `destroy_restricted`.
7266
+ *
7267
+ *
7268
+ * **Required scope:**
7269
+ *
7270
+ * `overtime_packages:delete`
7271
+ *
7272
+ */
7273
+ static deleteOvertimePackage(options) {
7274
+ return (options.client ?? client).delete({
7275
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
7276
+ url: '/api/v1/overtime_packages/{id}',
7277
+ ...options
7278
+ });
7279
+ }
7280
+ /**
7281
+ * Get an overtime package
7282
+ *
7283
+ * **Required scope:**
7284
+ *
7285
+ * `overtime_packages:read`
7286
+ *
7287
+ */
7288
+ static getOvertimePackage(options) {
7289
+ return (options.client ?? client).get({
7290
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
7291
+ url: '/api/v1/overtime_packages/{id}',
7292
+ ...options
7293
+ });
7294
+ }
7295
+ /**
7296
+ * Update an overtime package
7297
+ *
7298
+ * Rename, re-describe, or retoggle a company overtime package as the default.
7299
+ * Setting `default` to true demotes the previous default and migrates eligible
7300
+ * employments onto this package.
7301
+ *
7302
+ *
7303
+ * **Required scope:**
7304
+ *
7305
+ * `overtime_packages:update`
7306
+ *
7307
+ */
7308
+ static updateOvertimePackage(options) {
7309
+ return (options.client ?? client).patch({
7310
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
7311
+ url: '/api/v1/overtime_packages/{id}',
7312
+ ...options,
7313
+ headers: {
7314
+ 'Content-Type': 'application/json',
7315
+ ...options.headers
7316
+ }
7317
+ });
7318
+ }
7319
+ }
6850
7320
  export class PayRateRules {
6851
7321
  /**
6852
7322
  * Shift pay rate rule genesis
@@ -9896,105 +10366,19 @@ export class Users {
9896
10366
  });
9897
10367
  }
9898
10368
  /**
9899
- * List scheduled compensation changes for user's employment
9900
- *
9901
- * Deprecated: use `GET /api/v1/people/employments/{employment_id}/history` instead.
9902
- * The successor is keyed by the employment's `id` and lists every version, newest first.
9903
- *
9904
- *
9905
- * **Required scope:**
9906
- *
9907
- * `users.companies.scheduled_changes:read`
9908
- *
9909
- *
9910
- * @deprecated
9911
- */
9912
- static listUserCompanyScheduledChanges(options) {
9913
- return (options.client ?? client).get({
9914
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
9915
- url: '/api/v1/users/{user_id}/companies/{company_id}/scheduled_changes',
9916
- ...options
9917
- });
9918
- }
9919
- /**
9920
- * Create scheduled change to user's employment information
10369
+ * Create scheduled termination to user's employment
9921
10370
  *
9922
- * Deprecated: use `POST /api/v1/people/employments/{employment_id}/scheduled_changes` instead.
10371
+ * Deprecated: use `POST /api/v1/people/employments/{id}/scheduled_termination` instead.
9923
10372
  * The successor is keyed by the employment's `id` and needs `If-Match`.
9924
10373
  *
9925
10374
  *
9926
10375
  * **Required scope:**
9927
10376
  *
9928
- * `users.companies.scheduled_changes:create`
9929
- *
9930
- *
9931
- * @deprecated
9932
- */
9933
- static createUserCompanyScheduledChange(options) {
9934
- return (options.client ?? client).post({
9935
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
9936
- url: '/api/v1/users/{user_id}/companies/{company_id}/scheduled_changes',
9937
- ...options,
9938
- headers: {
9939
- 'Content-Type': 'application/json',
9940
- ...options.headers
9941
- }
9942
- });
9943
- }
9944
- /**
9945
- * Cancel scheduled compensation change (removes the future version from the timeline)
9946
- *
9947
- * Deprecated: use `DELETE /api/v1/people/employments/{employment_id}/scheduled_changes/{effective_date}` instead.
9948
- * The successor is keyed by the employment's `id` and the change's effective date, and needs `If-Match`.
9949
- *
9950
- *
9951
- * **Required scope:**
9952
- *
9953
- * `users.companies.scheduled_changes:delete`
9954
- *
9955
- *
9956
- * @deprecated
9957
- */
9958
- static cancelUserCompanyScheduledChange(options) {
9959
- return (options.client ?? client).delete({
9960
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
9961
- url: '/api/v1/users/{user_id}/companies/{company_id}/scheduled_changes/{id}',
9962
- ...options
9963
- });
9964
- }
9965
- /**
9966
- * Update scheduled compensation change
9967
- *
9968
- * Deprecated: use `PATCH /api/v1/people/employments/{employment_id}/scheduled_changes/{effective_date}` instead.
9969
- * The successor is keyed by the employment's `id` and the change's effective date, and needs `If-Match`.
9970
- *
9971
- *
9972
- * **Required scope:**
9973
- *
9974
- * `users.companies.scheduled_changes:update`
10377
+ * `users.companies.scheduled_termination:create`
9975
10378
  *
9976
10379
  *
9977
10380
  * @deprecated
9978
10381
  */
9979
- static updateScheduledChange(options) {
9980
- return (options.client ?? client).patch({
9981
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
9982
- url: '/api/v1/users/{user_id}/companies/{company_id}/scheduled_changes/{id}',
9983
- ...options,
9984
- headers: {
9985
- 'Content-Type': 'application/json',
9986
- ...options.headers
9987
- }
9988
- });
9989
- }
9990
- /**
9991
- * Create scheduled termination to user's employment
9992
- *
9993
- * **Required scope:**
9994
- *
9995
- * `users.companies.scheduled_termination:create`
9996
- *
9997
- */
9998
10382
  static createScheduledTermination(options) {
9999
10383
  return (options.client ?? client).post({
10000
10384
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
@@ -10009,10 +10393,16 @@ export class Users {
10009
10393
  /**
10010
10394
  * Cancel scheduled termination (restores open-ended employment)
10011
10395
  *
10396
+ * Deprecated: use `DELETE /api/v1/people/employments/{id}/scheduled_termination` instead.
10397
+ * The successor is keyed by the employment's `id` and needs `If-Match`.
10398
+ *
10399
+ *
10012
10400
  * **Required scope:**
10013
10401
  *
10014
10402
  * `users.companies.scheduled_termination:delete`
10015
10403
  *
10404
+ *
10405
+ * @deprecated
10016
10406
  */
10017
10407
  static cancelUserCompanyScheduledTermination(options) {
10018
10408
  return (options.client ?? client).delete({
@@ -10024,10 +10414,17 @@ export class Users {
10024
10414
  /**
10025
10415
  * Create employment for existing user
10026
10416
  *
10417
+ * Deprecated: use `POST /api/v1/people/employments` instead.
10418
+ * Set custom fields with a follow-up
10419
+ * `PATCH /api/v1/people/employments/{id}/custom_fields`.
10420
+ *
10421
+ *
10027
10422
  * **Required scope:**
10028
10423
  *
10029
10424
  * `users.companies:create`
10030
10425
  *
10426
+ *
10427
+ * @deprecated
10031
10428
  */
10032
10429
  static createCompany(options) {
10033
10430
  return (options.client ?? client).post({
@@ -10043,21 +10440,17 @@ export class Users {
10043
10440
  /**
10044
10441
  * Remove employment entirely (retroactive, irreversible)
10045
10442
  *
10046
- * Permanently remove every valid-time version of this person's
10047
- * employment at the company.
10048
- *
10049
- * Conditional: send the employment's `ETag` as `If-Match`. The
10050
- * person's user record names the employment as `employment_id`; read
10051
- * its `ETag` from `GET /api/v1/people/employments/{employment_id}/history`,
10052
- * or from `GET /api/v1/people/employments/{id}` while a version covers now.
10053
- * A key without the history scope may send `If-Match: *` instead,
10054
- * which removes whatever state exists.
10443
+ * Deprecated: use `DELETE /api/v1/people/employments/{id}` instead.
10444
+ * The successor is keyed by the employment's `id` and needs
10445
+ * `If-Match`.
10055
10446
  *
10056
10447
  *
10057
10448
  * **Required scope:**
10058
10449
  *
10059
10450
  * `users.companies:delete`
10060
10451
  *
10452
+ *
10453
+ * @deprecated
10061
10454
  */
10062
10455
  static removeUserFromCompany(options) {
10063
10456
  return (options.client ?? client).delete({
@@ -10069,10 +10462,18 @@ export class Users {
10069
10462
  /**
10070
10463
  * Update user's employment information
10071
10464
  *
10465
+ * Deprecated: use `PATCH /api/v1/people/employments/{id}` instead.
10466
+ * Move the hire date with
10467
+ * `PATCH /api/v1/people/employments/{id}/genesis`. Set custom
10468
+ * fields with `PATCH /api/v1/people/employments/{id}/custom_fields`.
10469
+ *
10470
+ *
10072
10471
  * **Required scope:**
10073
10472
  *
10074
10473
  * `users.companies:update`
10075
10474
  *
10475
+ *
10476
+ * @deprecated
10076
10477
  */
10077
10478
  static updateCompany(options) {
10078
10479
  return (options.client ?? client).patch({
@@ -11864,6 +12265,7 @@ export class WorkTypes {
11864
12265
  * authenticated company: the shared global catalog (rows with no owning
11865
12266
  * company) plus the company's own company-specific entries. Returned
11866
12267
  * newest first and paginated with the `page[...]` cursor parameters.
12268
+ * `filter[value]` fuzzy-matches on the work type name.
11867
12269
  *
11868
12270
  *
11869
12271
  * **Required scope:**
@@ -11878,4 +12280,91 @@ export class WorkTypes {
11878
12280
  ...options
11879
12281
  });
11880
12282
  }
12283
+ /**
12284
+ * Create work type
12285
+ *
12286
+ * Creates a work type owned by the key's company. The body accepts only
12287
+ * `value`; undeclared keys (`verified`, `specific_to_site_type`,
12288
+ * `scoped_to_company_id`) or a missing `value` return `400`.
12289
+ *
12290
+ *
12291
+ * **Required scope:**
12292
+ *
12293
+ * `work_types:create`
12294
+ *
12295
+ */
12296
+ static createWorkType(options) {
12297
+ return (options?.client ?? client).post({
12298
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
12299
+ url: '/api/v1/work_types',
12300
+ ...options,
12301
+ headers: {
12302
+ 'Content-Type': 'application/json',
12303
+ ...options?.headers
12304
+ }
12305
+ });
12306
+ }
12307
+ /**
12308
+ * Delete work type
12309
+ *
12310
+ * Deletes an unused company-owned work type (`204`). A work type still
12311
+ * referenced by a job or per diem is refused with `422` `destroy_restricted`.
12312
+ * Global catalog rows are readable but not deletable (`403`).
12313
+ *
12314
+ *
12315
+ * **Required scope:**
12316
+ *
12317
+ * `work_types:delete`
12318
+ *
12319
+ */
12320
+ static deleteWorkType(options) {
12321
+ return (options.client ?? client).delete({
12322
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
12323
+ url: '/api/v1/work_types/{id}',
12324
+ ...options
12325
+ });
12326
+ }
12327
+ /**
12328
+ * Show work type
12329
+ *
12330
+ * Returns one work type the key can see: a company-owned row or a shared
12331
+ * global catalog row. Another company's id is indistinguishable from an
12332
+ * unknown id and answers `404`.
12333
+ *
12334
+ *
12335
+ * **Required scope:**
12336
+ *
12337
+ * `work_types:read`
12338
+ *
12339
+ */
12340
+ static getWorkType(options) {
12341
+ return (options.client ?? client).get({
12342
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
12343
+ url: '/api/v1/work_types/{id}',
12344
+ ...options
12345
+ });
12346
+ }
12347
+ /**
12348
+ * Update work type
12349
+ *
12350
+ * Renames a company-owned work type. Global catalog rows are readable but
12351
+ * not writable (`403`). Another company's id answers `404`.
12352
+ *
12353
+ *
12354
+ * **Required scope:**
12355
+ *
12356
+ * `work_types:update`
12357
+ *
12358
+ */
12359
+ static updateWorkType(options) {
12360
+ return (options.client ?? client).patch({
12361
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
12362
+ url: '/api/v1/work_types/{id}',
12363
+ ...options,
12364
+ headers: {
12365
+ 'Content-Type': 'application/json',
12366
+ ...options.headers
12367
+ }
12368
+ });
12369
+ }
11881
12370
  }