@dsptch-work/api-client 0.52.0 → 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
@@ -1946,6 +2043,37 @@ export class AssetsSites {
1946
2043
  }
1947
2044
  });
1948
2045
  }
2046
+ /**
2047
+ * Unarchive a Site
2048
+ *
2049
+ * **Required scope:**
2050
+ *
2051
+ * `assets.sites.archives:delete`
2052
+ *
2053
+ */
2054
+ static unarchiveAssetsSite(options) {
2055
+ return (options.client ?? client).delete({
2056
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2057
+ url: '/api/v1/assets/sites/{site_id}/archive',
2058
+ ...options
2059
+ });
2060
+ }
2061
+ /**
2062
+ * Archive a Site
2063
+ *
2064
+ * Hides the site from lists and closes it to new stock, keeping its history. Only a site holding no inventory and named by no transfer awaiting an answer can be archived.
2065
+ */
2066
+ static archiveAssetsSite(options) {
2067
+ return (options.client ?? client).post({
2068
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2069
+ url: '/api/v1/assets/sites/{site_id}/archive',
2070
+ ...options,
2071
+ headers: {
2072
+ 'Content-Type': 'application/json',
2073
+ ...options.headers
2074
+ }
2075
+ });
2076
+ }
1949
2077
  }
1950
2078
  export class AssetsSubLocations {
1951
2079
  /**
@@ -2870,6 +2998,117 @@ export class Companies {
2870
2998
  });
2871
2999
  }
2872
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
+ }
2873
3112
  export class CompetenciesAssessments {
2874
3113
  /**
2875
3114
  * List competence assessments
@@ -4592,6 +4831,77 @@ export class Jobs {
4592
4831
  ...options
4593
4832
  });
4594
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
+ }
4595
4905
  /**
4596
4906
  * List WH-347 exports
4597
4907
  *
@@ -5090,6 +5400,94 @@ export class Jobs {
5090
5400
  ...options
5091
5401
  });
5092
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
+ }
5093
5491
  }
5094
5492
  export class ProductionDeliveryTargets {
5095
5493
  /**
@@ -6816,6 +7214,109 @@ export class OvertimeRules {
6816
7214
  });
6817
7215
  }
6818
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
+ }
6819
7320
  export class PayRateRules {
6820
7321
  /**
6821
7322
  * Shift pay rate rule genesis
@@ -9865,105 +10366,19 @@ export class Users {
9865
10366
  });
9866
10367
  }
9867
10368
  /**
9868
- * List scheduled compensation changes for user's employment
9869
- *
9870
- * Deprecated: use `GET /api/v1/people/employments/{employment_id}/history` instead.
9871
- * The successor is keyed by the employment's `id` and lists every version, newest first.
9872
- *
9873
- *
9874
- * **Required scope:**
9875
- *
9876
- * `users.companies.scheduled_changes:read`
9877
- *
9878
- *
9879
- * @deprecated
9880
- */
9881
- static listUserCompanyScheduledChanges(options) {
9882
- return (options.client ?? client).get({
9883
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
9884
- url: '/api/v1/users/{user_id}/companies/{company_id}/scheduled_changes',
9885
- ...options
9886
- });
9887
- }
9888
- /**
9889
- * Create scheduled change to user's employment information
10369
+ * Create scheduled termination to user's employment
9890
10370
  *
9891
- * Deprecated: use `POST /api/v1/people/employments/{employment_id}/scheduled_changes` instead.
10371
+ * Deprecated: use `POST /api/v1/people/employments/{id}/scheduled_termination` instead.
9892
10372
  * The successor is keyed by the employment's `id` and needs `If-Match`.
9893
10373
  *
9894
10374
  *
9895
10375
  * **Required scope:**
9896
10376
  *
9897
- * `users.companies.scheduled_changes:create`
9898
- *
9899
- *
9900
- * @deprecated
9901
- */
9902
- static createUserCompanyScheduledChange(options) {
9903
- return (options.client ?? client).post({
9904
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
9905
- url: '/api/v1/users/{user_id}/companies/{company_id}/scheduled_changes',
9906
- ...options,
9907
- headers: {
9908
- 'Content-Type': 'application/json',
9909
- ...options.headers
9910
- }
9911
- });
9912
- }
9913
- /**
9914
- * Cancel scheduled compensation change (removes the future version from the timeline)
9915
- *
9916
- * Deprecated: use `DELETE /api/v1/people/employments/{employment_id}/scheduled_changes/{effective_date}` instead.
9917
- * The successor is keyed by the employment's `id` and the change's effective date, and needs `If-Match`.
9918
- *
9919
- *
9920
- * **Required scope:**
9921
- *
9922
- * `users.companies.scheduled_changes:delete`
9923
- *
9924
- *
9925
- * @deprecated
9926
- */
9927
- static cancelUserCompanyScheduledChange(options) {
9928
- return (options.client ?? client).delete({
9929
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
9930
- url: '/api/v1/users/{user_id}/companies/{company_id}/scheduled_changes/{id}',
9931
- ...options
9932
- });
9933
- }
9934
- /**
9935
- * Update scheduled compensation change
9936
- *
9937
- * Deprecated: use `PATCH /api/v1/people/employments/{employment_id}/scheduled_changes/{effective_date}` instead.
9938
- * The successor is keyed by the employment's `id` and the change's effective date, and needs `If-Match`.
9939
- *
9940
- *
9941
- * **Required scope:**
9942
- *
9943
- * `users.companies.scheduled_changes:update`
10377
+ * `users.companies.scheduled_termination:create`
9944
10378
  *
9945
10379
  *
9946
10380
  * @deprecated
9947
10381
  */
9948
- static updateScheduledChange(options) {
9949
- return (options.client ?? client).patch({
9950
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
9951
- url: '/api/v1/users/{user_id}/companies/{company_id}/scheduled_changes/{id}',
9952
- ...options,
9953
- headers: {
9954
- 'Content-Type': 'application/json',
9955
- ...options.headers
9956
- }
9957
- });
9958
- }
9959
- /**
9960
- * Create scheduled termination to user's employment
9961
- *
9962
- * **Required scope:**
9963
- *
9964
- * `users.companies.scheduled_termination:create`
9965
- *
9966
- */
9967
10382
  static createScheduledTermination(options) {
9968
10383
  return (options.client ?? client).post({
9969
10384
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
@@ -9978,10 +10393,16 @@ export class Users {
9978
10393
  /**
9979
10394
  * Cancel scheduled termination (restores open-ended employment)
9980
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
+ *
9981
10400
  * **Required scope:**
9982
10401
  *
9983
10402
  * `users.companies.scheduled_termination:delete`
9984
10403
  *
10404
+ *
10405
+ * @deprecated
9985
10406
  */
9986
10407
  static cancelUserCompanyScheduledTermination(options) {
9987
10408
  return (options.client ?? client).delete({
@@ -9993,10 +10414,17 @@ export class Users {
9993
10414
  /**
9994
10415
  * Create employment for existing user
9995
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
+ *
9996
10422
  * **Required scope:**
9997
10423
  *
9998
10424
  * `users.companies:create`
9999
10425
  *
10426
+ *
10427
+ * @deprecated
10000
10428
  */
10001
10429
  static createCompany(options) {
10002
10430
  return (options.client ?? client).post({
@@ -10012,21 +10440,17 @@ export class Users {
10012
10440
  /**
10013
10441
  * Remove employment entirely (retroactive, irreversible)
10014
10442
  *
10015
- * Permanently remove every valid-time version of this person's
10016
- * employment at the company.
10017
- *
10018
- * Conditional: send the employment's `ETag` as `If-Match`. The
10019
- * person's user record names the employment as `employment_id`; read
10020
- * its `ETag` from `GET /api/v1/people/employments/{employment_id}/history`,
10021
- * or from `GET /api/v1/people/employments/{id}` while a version covers now.
10022
- * A key without the history scope may send `If-Match: *` instead,
10023
- * 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`.
10024
10446
  *
10025
10447
  *
10026
10448
  * **Required scope:**
10027
10449
  *
10028
10450
  * `users.companies:delete`
10029
10451
  *
10452
+ *
10453
+ * @deprecated
10030
10454
  */
10031
10455
  static removeUserFromCompany(options) {
10032
10456
  return (options.client ?? client).delete({
@@ -10038,10 +10462,18 @@ export class Users {
10038
10462
  /**
10039
10463
  * Update user's employment information
10040
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
+ *
10041
10471
  * **Required scope:**
10042
10472
  *
10043
10473
  * `users.companies:update`
10044
10474
  *
10475
+ *
10476
+ * @deprecated
10045
10477
  */
10046
10478
  static updateCompany(options) {
10047
10479
  return (options.client ?? client).patch({
@@ -11833,6 +12265,7 @@ export class WorkTypes {
11833
12265
  * authenticated company: the shared global catalog (rows with no owning
11834
12266
  * company) plus the company's own company-specific entries. Returned
11835
12267
  * newest first and paginated with the `page[...]` cursor parameters.
12268
+ * `filter[value]` fuzzy-matches on the work type name.
11836
12269
  *
11837
12270
  *
11838
12271
  * **Required scope:**
@@ -11847,4 +12280,91 @@ export class WorkTypes {
11847
12280
  ...options
11848
12281
  });
11849
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
+ }
11850
12370
  }