@dsptch-work/api-client 0.52.1 → 0.54.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.
- package/CHANGELOG.md +39 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +448 -65
- package/dist/gen/sdk.gen.js +715 -136
- package/dist/gen/types.gen.d.ts +1667 -456
- package/dist/gen/zod.gen.d.ts +1159 -376
- package/dist/gen/zod.gen.js +530 -88
- package/package.json +1 -1
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -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
|
/**
|
|
@@ -6735,7 +7102,110 @@ export class OvertimeRules {
|
|
|
6735
7102
|
static scheduleOvertimeRuleTermination(options) {
|
|
6736
7103
|
return (options.client ?? client).post({
|
|
6737
7104
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6738
|
-
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_termination',
|
|
7105
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_termination',
|
|
7106
|
+
...options,
|
|
7107
|
+
headers: {
|
|
7108
|
+
'Content-Type': 'application/json',
|
|
7109
|
+
...options.headers
|
|
7110
|
+
}
|
|
7111
|
+
});
|
|
7112
|
+
}
|
|
7113
|
+
/**
|
|
7114
|
+
* List overtime rules
|
|
7115
|
+
*
|
|
7116
|
+
* **Required scope:**
|
|
7117
|
+
*
|
|
7118
|
+
* `overtime_packages.overtime_rules:read`
|
|
7119
|
+
*
|
|
7120
|
+
*/
|
|
7121
|
+
static listOvertimeRules(options) {
|
|
7122
|
+
return (options.client ?? client).get({
|
|
7123
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
7124
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules',
|
|
7125
|
+
...options
|
|
7126
|
+
});
|
|
7127
|
+
}
|
|
7128
|
+
/**
|
|
7129
|
+
* Create overtime rule
|
|
7130
|
+
*
|
|
7131
|
+
* **Required scope:**
|
|
7132
|
+
*
|
|
7133
|
+
* `overtime_packages.overtime_rules:create`
|
|
7134
|
+
*
|
|
7135
|
+
*/
|
|
7136
|
+
static createOvertimeRule(options) {
|
|
7137
|
+
return (options.client ?? client).post({
|
|
7138
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
7139
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules',
|
|
7140
|
+
...options,
|
|
7141
|
+
headers: {
|
|
7142
|
+
'Content-Type': 'application/json',
|
|
7143
|
+
...options.headers
|
|
7144
|
+
}
|
|
7145
|
+
});
|
|
7146
|
+
}
|
|
7147
|
+
/**
|
|
7148
|
+
* Delete overtime rule
|
|
7149
|
+
*
|
|
7150
|
+
* Remove the rule outright: every version of the family goes, and nothing is
|
|
7151
|
+
* readable through `as_of[valid]` or `/history` afterwards. Closing a rule
|
|
7152
|
+
* going forward while keeping its past is `scheduled_termination` instead.
|
|
7153
|
+
*
|
|
7154
|
+
* Conditional: send the rule's `ETag` as `If-Match`.
|
|
7155
|
+
*
|
|
7156
|
+
*
|
|
7157
|
+
* **Required scope:**
|
|
7158
|
+
*
|
|
7159
|
+
* `overtime_packages.overtime_rules:delete`
|
|
7160
|
+
*
|
|
7161
|
+
*/
|
|
7162
|
+
static deleteOvertimeRule(options) {
|
|
7163
|
+
return (options.client ?? client).delete({
|
|
7164
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
7165
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}',
|
|
7166
|
+
...options
|
|
7167
|
+
});
|
|
7168
|
+
}
|
|
7169
|
+
/**
|
|
7170
|
+
* Show overtime rule
|
|
7171
|
+
*
|
|
7172
|
+
* **Required scope:**
|
|
7173
|
+
*
|
|
7174
|
+
* `overtime_packages.overtime_rules:read`
|
|
7175
|
+
*
|
|
7176
|
+
*/
|
|
7177
|
+
static getOvertimeRule(options) {
|
|
7178
|
+
return (options.client ?? client).get({
|
|
7179
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
7180
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}',
|
|
7181
|
+
...options
|
|
7182
|
+
});
|
|
7183
|
+
}
|
|
7184
|
+
/**
|
|
7185
|
+
* Update overtime rule
|
|
7186
|
+
*
|
|
7187
|
+
* Edit a rule's values from `effective_from` forward: every version starting at
|
|
7188
|
+
* or after that date takes the new values, and earlier versions are untouched.
|
|
7189
|
+
* Where an edit starts inside a version and changes its values, a boundary is
|
|
7190
|
+
* created at `effective_from` so the change applies only from there. Omitted,
|
|
7191
|
+
* the edit starts where the version in effect now starts, correcting it in
|
|
7192
|
+
* place; a future date schedules the change ahead of that version.
|
|
7193
|
+
*
|
|
7194
|
+
* This rewrites what the rule said, not when it existed — moving either end of
|
|
7195
|
+
* the timeline is `genesis` or `scheduled_termination`.
|
|
7196
|
+
*
|
|
7197
|
+
* Conditional: send the rule's `ETag` as `If-Match`.
|
|
7198
|
+
*
|
|
7199
|
+
*
|
|
7200
|
+
* **Required scope:**
|
|
7201
|
+
*
|
|
7202
|
+
* `overtime_packages.overtime_rules:update`
|
|
7203
|
+
*
|
|
7204
|
+
*/
|
|
7205
|
+
static updateOvertimeRule(options) {
|
|
7206
|
+
return (options.client ?? client).patch({
|
|
7207
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
7208
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}',
|
|
6739
7209
|
...options,
|
|
6740
7210
|
headers: {
|
|
6741
7211
|
'Content-Type': 'application/json',
|
|
@@ -6743,33 +7213,43 @@ export class OvertimeRules {
|
|
|
6743
7213
|
}
|
|
6744
7214
|
});
|
|
6745
7215
|
}
|
|
7216
|
+
}
|
|
7217
|
+
export class OvertimePackages {
|
|
6746
7218
|
/**
|
|
6747
|
-
* List overtime
|
|
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
|
+
*
|
|
6748
7224
|
*
|
|
6749
7225
|
* **Required scope:**
|
|
6750
7226
|
*
|
|
6751
|
-
* `overtime_packages
|
|
7227
|
+
* `overtime_packages:read`
|
|
6752
7228
|
*
|
|
6753
7229
|
*/
|
|
6754
|
-
static
|
|
6755
|
-
return (options
|
|
7230
|
+
static listOvertimePackages(options) {
|
|
7231
|
+
return (options?.client ?? client).get({
|
|
6756
7232
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6757
|
-
url: '/api/v1/overtime_packages
|
|
7233
|
+
url: '/api/v1/overtime_packages',
|
|
6758
7234
|
...options
|
|
6759
7235
|
});
|
|
6760
7236
|
}
|
|
6761
7237
|
/**
|
|
6762
|
-
* Create overtime
|
|
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
|
+
*
|
|
6763
7243
|
*
|
|
6764
7244
|
* **Required scope:**
|
|
6765
7245
|
*
|
|
6766
|
-
* `overtime_packages
|
|
7246
|
+
* `overtime_packages:create`
|
|
6767
7247
|
*
|
|
6768
7248
|
*/
|
|
6769
|
-
static
|
|
7249
|
+
static createOvertimePackage(options) {
|
|
6770
7250
|
return (options.client ?? client).post({
|
|
6771
7251
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6772
|
-
url: '/api/v1/overtime_packages
|
|
7252
|
+
url: '/api/v1/overtime_packages',
|
|
6773
7253
|
...options,
|
|
6774
7254
|
headers: {
|
|
6775
7255
|
'Content-Type': 'application/json',
|
|
@@ -6778,67 +7258,57 @@ export class OvertimeRules {
|
|
|
6778
7258
|
});
|
|
6779
7259
|
}
|
|
6780
7260
|
/**
|
|
6781
|
-
* Delete overtime
|
|
6782
|
-
*
|
|
6783
|
-
* Remove the rule outright: every version of the family goes, and nothing is
|
|
6784
|
-
* readable through `as_of[valid]` or `/history` afterwards. Closing a rule
|
|
6785
|
-
* going forward while keeping its past is `scheduled_termination` instead.
|
|
7261
|
+
* Delete an overtime package
|
|
6786
7262
|
*
|
|
6787
|
-
*
|
|
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`.
|
|
6788
7266
|
*
|
|
6789
7267
|
*
|
|
6790
7268
|
* **Required scope:**
|
|
6791
7269
|
*
|
|
6792
|
-
* `overtime_packages
|
|
7270
|
+
* `overtime_packages:delete`
|
|
6793
7271
|
*
|
|
6794
7272
|
*/
|
|
6795
|
-
static
|
|
7273
|
+
static deleteOvertimePackage(options) {
|
|
6796
7274
|
return (options.client ?? client).delete({
|
|
6797
7275
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6798
|
-
url: '/api/v1/overtime_packages/{
|
|
7276
|
+
url: '/api/v1/overtime_packages/{id}',
|
|
6799
7277
|
...options
|
|
6800
7278
|
});
|
|
6801
7279
|
}
|
|
6802
7280
|
/**
|
|
6803
|
-
*
|
|
7281
|
+
* Get an overtime package
|
|
6804
7282
|
*
|
|
6805
7283
|
* **Required scope:**
|
|
6806
7284
|
*
|
|
6807
|
-
* `overtime_packages
|
|
7285
|
+
* `overtime_packages:read`
|
|
6808
7286
|
*
|
|
6809
7287
|
*/
|
|
6810
|
-
static
|
|
7288
|
+
static getOvertimePackage(options) {
|
|
6811
7289
|
return (options.client ?? client).get({
|
|
6812
7290
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6813
|
-
url: '/api/v1/overtime_packages/{
|
|
7291
|
+
url: '/api/v1/overtime_packages/{id}',
|
|
6814
7292
|
...options
|
|
6815
7293
|
});
|
|
6816
7294
|
}
|
|
6817
7295
|
/**
|
|
6818
|
-
* Update overtime
|
|
6819
|
-
*
|
|
6820
|
-
* Edit a rule's values from `effective_from` forward: every version starting at
|
|
6821
|
-
* or after that date takes the new values, and earlier versions are untouched.
|
|
6822
|
-
* Where an edit starts inside a version and changes its values, a boundary is
|
|
6823
|
-
* created at `effective_from` so the change applies only from there. Omitted,
|
|
6824
|
-
* the edit starts where the version in effect now starts, correcting it in
|
|
6825
|
-
* place; a future date schedules the change ahead of that version.
|
|
6826
|
-
*
|
|
6827
|
-
* This rewrites what the rule said, not when it existed — moving either end of
|
|
6828
|
-
* the timeline is `genesis` or `scheduled_termination`.
|
|
7296
|
+
* Update an overtime package
|
|
6829
7297
|
*
|
|
6830
|
-
*
|
|
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.
|
|
6831
7301
|
*
|
|
6832
7302
|
*
|
|
6833
7303
|
* **Required scope:**
|
|
6834
7304
|
*
|
|
6835
|
-
* `overtime_packages
|
|
7305
|
+
* `overtime_packages:update`
|
|
6836
7306
|
*
|
|
6837
7307
|
*/
|
|
6838
|
-
static
|
|
7308
|
+
static updateOvertimePackage(options) {
|
|
6839
7309
|
return (options.client ?? client).patch({
|
|
6840
7310
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6841
|
-
url: '/api/v1/overtime_packages/{
|
|
7311
|
+
url: '/api/v1/overtime_packages/{id}',
|
|
6842
7312
|
...options,
|
|
6843
7313
|
headers: {
|
|
6844
7314
|
'Content-Type': 'application/json',
|
|
@@ -9896,105 +10366,19 @@ export class Users {
|
|
|
9896
10366
|
});
|
|
9897
10367
|
}
|
|
9898
10368
|
/**
|
|
9899
|
-
*
|
|
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/{
|
|
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.
|
|
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
|
-
*
|
|
10047
|
-
*
|
|
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({
|
|
@@ -10292,6 +10693,28 @@ export class PwaTradeApprenticeScope {
|
|
|
10292
10693
|
}
|
|
10293
10694
|
}
|
|
10294
10695
|
export class Tasks {
|
|
10696
|
+
/**
|
|
10697
|
+
* List form assignment tasks
|
|
10698
|
+
*
|
|
10699
|
+
* Returns shared form-completion tasks for the key's company.
|
|
10700
|
+
* `{id}` is the `Tasks::FormAssignmentTask` id, not the web
|
|
10701
|
+
* show `Task#uid`. Nested job, site, feature, and asset-item
|
|
10702
|
+
* assignments are not this collection; those ids read as not
|
|
10703
|
+
* found on the member routes.
|
|
10704
|
+
*
|
|
10705
|
+
*
|
|
10706
|
+
* **Required scope:**
|
|
10707
|
+
*
|
|
10708
|
+
* `tasks.form_assignment_tasks:read`
|
|
10709
|
+
*
|
|
10710
|
+
*/
|
|
10711
|
+
static listTasksFormAssignmentTasks(options) {
|
|
10712
|
+
return (options?.client ?? client).get({
|
|
10713
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
10714
|
+
url: '/api/v1/tasks/form_assignment_tasks',
|
|
10715
|
+
...options
|
|
10716
|
+
});
|
|
10717
|
+
}
|
|
10295
10718
|
/**
|
|
10296
10719
|
* Create form assignment task
|
|
10297
10720
|
*
|
|
@@ -10319,6 +10742,74 @@ export class Tasks {
|
|
|
10319
10742
|
}
|
|
10320
10743
|
});
|
|
10321
10744
|
}
|
|
10745
|
+
/**
|
|
10746
|
+
* Delete form assignment task
|
|
10747
|
+
*
|
|
10748
|
+
* Ends the open incomplete permanent copy of this shared
|
|
10749
|
+
* form-completion task, the same mutation as the web unassign
|
|
10750
|
+
* control. Recurrence stays on PATCH. A copy that is not an
|
|
10751
|
+
* incomplete permanent copy is refused with
|
|
10752
|
+
* `not_incomplete_permanent_copy`. A missing, nested-host, or
|
|
10753
|
+
* out-of-scope id reads as not found. Returns `204`.
|
|
10754
|
+
*
|
|
10755
|
+
*
|
|
10756
|
+
* **Required scope:**
|
|
10757
|
+
*
|
|
10758
|
+
* `tasks.form_assignment_tasks:delete`
|
|
10759
|
+
*
|
|
10760
|
+
*/
|
|
10761
|
+
static deleteTasksFormAssignmentTask(options) {
|
|
10762
|
+
return (options.client ?? client).delete({
|
|
10763
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
10764
|
+
url: '/api/v1/tasks/form_assignment_tasks/{id}',
|
|
10765
|
+
...options
|
|
10766
|
+
});
|
|
10767
|
+
}
|
|
10768
|
+
/**
|
|
10769
|
+
* Show form assignment task
|
|
10770
|
+
*
|
|
10771
|
+
* Returns one shared form-completion task. `{id}` is the
|
|
10772
|
+
* `Tasks::FormAssignmentTask` id. A missing, nested-host, or
|
|
10773
|
+
* out-of-scope id reads as not found.
|
|
10774
|
+
*
|
|
10775
|
+
*
|
|
10776
|
+
* **Required scope:**
|
|
10777
|
+
*
|
|
10778
|
+
* `tasks.form_assignment_tasks:read`
|
|
10779
|
+
*
|
|
10780
|
+
*/
|
|
10781
|
+
static getTasksFormAssignmentTask(options) {
|
|
10782
|
+
return (options.client ?? client).get({
|
|
10783
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
10784
|
+
url: '/api/v1/tasks/form_assignment_tasks/{id}',
|
|
10785
|
+
...options
|
|
10786
|
+
});
|
|
10787
|
+
}
|
|
10788
|
+
/**
|
|
10789
|
+
* Update form assignment task
|
|
10790
|
+
*
|
|
10791
|
+
* Updates a shared form-completion task. `{id}` is the
|
|
10792
|
+
* `Tasks::FormAssignmentTask` id. Recurrence is gated by
|
|
10793
|
+
* `recurring`. The creator cannot be sent. Nested-host ids
|
|
10794
|
+
* read as not found.
|
|
10795
|
+
*
|
|
10796
|
+
*
|
|
10797
|
+
* **Required scope:**
|
|
10798
|
+
*
|
|
10799
|
+
* `tasks.form_assignment_tasks:update`
|
|
10800
|
+
*
|
|
10801
|
+
*/
|
|
10802
|
+
static updateTasksFormAssignmentTask(options) {
|
|
10803
|
+
return (options.client ?? client).patch({
|
|
10804
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
10805
|
+
url: '/api/v1/tasks/form_assignment_tasks/{id}',
|
|
10806
|
+
...options,
|
|
10807
|
+
headers: {
|
|
10808
|
+
'Content-Type': 'application/json',
|
|
10809
|
+
...options.headers
|
|
10810
|
+
}
|
|
10811
|
+
});
|
|
10812
|
+
}
|
|
10322
10813
|
}
|
|
10323
10814
|
export class AdjustableLineItems {
|
|
10324
10815
|
/**
|
|
@@ -11864,6 +12355,7 @@ export class WorkTypes {
|
|
|
11864
12355
|
* authenticated company: the shared global catalog (rows with no owning
|
|
11865
12356
|
* company) plus the company's own company-specific entries. Returned
|
|
11866
12357
|
* newest first and paginated with the `page[...]` cursor parameters.
|
|
12358
|
+
* `filter[value]` fuzzy-matches on the work type name.
|
|
11867
12359
|
*
|
|
11868
12360
|
*
|
|
11869
12361
|
* **Required scope:**
|
|
@@ -11878,4 +12370,91 @@ export class WorkTypes {
|
|
|
11878
12370
|
...options
|
|
11879
12371
|
});
|
|
11880
12372
|
}
|
|
12373
|
+
/**
|
|
12374
|
+
* Create work type
|
|
12375
|
+
*
|
|
12376
|
+
* Creates a work type owned by the key's company. The body accepts only
|
|
12377
|
+
* `value`; undeclared keys (`verified`, `specific_to_site_type`,
|
|
12378
|
+
* `scoped_to_company_id`) or a missing `value` return `400`.
|
|
12379
|
+
*
|
|
12380
|
+
*
|
|
12381
|
+
* **Required scope:**
|
|
12382
|
+
*
|
|
12383
|
+
* `work_types:create`
|
|
12384
|
+
*
|
|
12385
|
+
*/
|
|
12386
|
+
static createWorkType(options) {
|
|
12387
|
+
return (options?.client ?? client).post({
|
|
12388
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
12389
|
+
url: '/api/v1/work_types',
|
|
12390
|
+
...options,
|
|
12391
|
+
headers: {
|
|
12392
|
+
'Content-Type': 'application/json',
|
|
12393
|
+
...options?.headers
|
|
12394
|
+
}
|
|
12395
|
+
});
|
|
12396
|
+
}
|
|
12397
|
+
/**
|
|
12398
|
+
* Delete work type
|
|
12399
|
+
*
|
|
12400
|
+
* Deletes an unused company-owned work type (`204`). A work type still
|
|
12401
|
+
* referenced by a job or per diem is refused with `422` `destroy_restricted`.
|
|
12402
|
+
* Global catalog rows are readable but not deletable (`403`).
|
|
12403
|
+
*
|
|
12404
|
+
*
|
|
12405
|
+
* **Required scope:**
|
|
12406
|
+
*
|
|
12407
|
+
* `work_types:delete`
|
|
12408
|
+
*
|
|
12409
|
+
*/
|
|
12410
|
+
static deleteWorkType(options) {
|
|
12411
|
+
return (options.client ?? client).delete({
|
|
12412
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
12413
|
+
url: '/api/v1/work_types/{id}',
|
|
12414
|
+
...options
|
|
12415
|
+
});
|
|
12416
|
+
}
|
|
12417
|
+
/**
|
|
12418
|
+
* Show work type
|
|
12419
|
+
*
|
|
12420
|
+
* Returns one work type the key can see: a company-owned row or a shared
|
|
12421
|
+
* global catalog row. Another company's id is indistinguishable from an
|
|
12422
|
+
* unknown id and answers `404`.
|
|
12423
|
+
*
|
|
12424
|
+
*
|
|
12425
|
+
* **Required scope:**
|
|
12426
|
+
*
|
|
12427
|
+
* `work_types:read`
|
|
12428
|
+
*
|
|
12429
|
+
*/
|
|
12430
|
+
static getWorkType(options) {
|
|
12431
|
+
return (options.client ?? client).get({
|
|
12432
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
12433
|
+
url: '/api/v1/work_types/{id}',
|
|
12434
|
+
...options
|
|
12435
|
+
});
|
|
12436
|
+
}
|
|
12437
|
+
/**
|
|
12438
|
+
* Update work type
|
|
12439
|
+
*
|
|
12440
|
+
* Renames a company-owned work type. Global catalog rows are readable but
|
|
12441
|
+
* not writable (`403`). Another company's id answers `404`.
|
|
12442
|
+
*
|
|
12443
|
+
*
|
|
12444
|
+
* **Required scope:**
|
|
12445
|
+
*
|
|
12446
|
+
* `work_types:update`
|
|
12447
|
+
*
|
|
12448
|
+
*/
|
|
12449
|
+
static updateWorkType(options) {
|
|
12450
|
+
return (options.client ?? client).patch({
|
|
12451
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
12452
|
+
url: '/api/v1/work_types/{id}',
|
|
12453
|
+
...options,
|
|
12454
|
+
headers: {
|
|
12455
|
+
'Content-Type': 'application/json',
|
|
12456
|
+
...options.headers
|
|
12457
|
+
}
|
|
12458
|
+
});
|
|
12459
|
+
}
|
|
11881
12460
|
}
|