@dsptch-work/api-client 0.40.0 → 0.41.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 +90 -0
- package/dist/gen/index.d.ts +1 -1
- package/dist/gen/sdk.gen.d.ts +223 -14
- package/dist/gen/sdk.gen.js +310 -13
- package/dist/gen/types.gen.d.ts +1002 -33
- package/dist/gen/zod.gen.d.ts +879 -36
- package/dist/gen/zod.gen.js +337 -19
- package/package.json +1 -1
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -3669,6 +3669,23 @@ export class Forms {
|
|
|
3669
3669
|
* SurveyJS required-answer rules, visibility, defaults, or expressions.
|
|
3670
3670
|
* Returns the same representation as show.
|
|
3671
3671
|
*
|
|
3672
|
+
* File and signature answers take signed IDs, never file contents.
|
|
3673
|
+
* Upload each file first: call POST /api/v1/direct_uploads with
|
|
3674
|
+
* resource form_submissions, PUT the bytes to the returned
|
|
3675
|
+
* direct_upload.url with its headers, then send the returned
|
|
3676
|
+
* signed_id here within a week.
|
|
3677
|
+
*
|
|
3678
|
+
* - A file answer is an array holding one signed ID per file. Each
|
|
3679
|
+
* file is attached to the submission, and the response returns a
|
|
3680
|
+
* download URL in its place. An image file may hold at most 10 MiB.
|
|
3681
|
+
* - A signature answer is one signed ID, and its image is stored in
|
|
3682
|
+
* the answer as a data URL. It must be a PNG or JPEG image, declared
|
|
3683
|
+
* as image/png or image/jpeg to match its bytes or as
|
|
3684
|
+
* application/octet-stream, hold at most 256 KiB, and span at most
|
|
3685
|
+
* 2,000 pixels on either side. A submission's signature answers may
|
|
3686
|
+
* hold at most 2 MiB together, and an upload counts once for each
|
|
3687
|
+
* answer naming it.
|
|
3688
|
+
*
|
|
3672
3689
|
*
|
|
3673
3690
|
* **Required scope:**
|
|
3674
3691
|
*
|
|
@@ -3686,6 +3703,27 @@ export class Forms {
|
|
|
3686
3703
|
}
|
|
3687
3704
|
});
|
|
3688
3705
|
}
|
|
3706
|
+
/**
|
|
3707
|
+
* Delete form submission
|
|
3708
|
+
*
|
|
3709
|
+
* Deletes a submission that is not used as competency evidence.
|
|
3710
|
+
* Competency-evidence restriction is refused with `422`
|
|
3711
|
+
* `destroy_restricted`. Form-assignment rows that pointed at the
|
|
3712
|
+
* submission are nullified. Attachments are kept. Returns `204`.
|
|
3713
|
+
*
|
|
3714
|
+
*
|
|
3715
|
+
* **Required scope:**
|
|
3716
|
+
*
|
|
3717
|
+
* `form_submissions:delete`
|
|
3718
|
+
*
|
|
3719
|
+
*/
|
|
3720
|
+
static deleteFormSubmission(options) {
|
|
3721
|
+
return (options.client ?? client).delete({
|
|
3722
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3723
|
+
url: '/api/v1/form_submissions/{id}',
|
|
3724
|
+
...options
|
|
3725
|
+
});
|
|
3726
|
+
}
|
|
3689
3727
|
/**
|
|
3690
3728
|
* Show form submission
|
|
3691
3729
|
*
|
|
@@ -3701,6 +3739,31 @@ export class Forms {
|
|
|
3701
3739
|
...options
|
|
3702
3740
|
});
|
|
3703
3741
|
}
|
|
3742
|
+
/**
|
|
3743
|
+
* Update form submission
|
|
3744
|
+
*
|
|
3745
|
+
* Updates timezone and json on an existing submission. json is the
|
|
3746
|
+
* stored SurveyJS tree, including file-answer objects; file content
|
|
3747
|
+
* is rewritten through the same writer the web uses. form_definition_id
|
|
3748
|
+
* and user_id cannot change. Returns the same representation as show.
|
|
3749
|
+
*
|
|
3750
|
+
*
|
|
3751
|
+
* **Required scope:**
|
|
3752
|
+
*
|
|
3753
|
+
* `form_submissions:update`
|
|
3754
|
+
*
|
|
3755
|
+
*/
|
|
3756
|
+
static updateFormSubmission(options) {
|
|
3757
|
+
return (options.client ?? client).patch({
|
|
3758
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3759
|
+
url: '/api/v1/form_submissions/{id}',
|
|
3760
|
+
...options,
|
|
3761
|
+
headers: {
|
|
3762
|
+
'Content-Type': 'application/json',
|
|
3763
|
+
...options.headers
|
|
3764
|
+
}
|
|
3765
|
+
});
|
|
3766
|
+
}
|
|
3704
3767
|
}
|
|
3705
3768
|
export class Groups {
|
|
3706
3769
|
/**
|
|
@@ -4039,7 +4102,8 @@ export class Jobs {
|
|
|
4039
4102
|
* Returns the good-faith-effort exceptions nested on the named job. A missing
|
|
4040
4103
|
* or out-of-scope job reads as not found. A visible job with no exceptions,
|
|
4041
4104
|
* including one that does not track apprenticeship, returns an empty list.
|
|
4042
|
-
* Ordered by request_start_date descending then id.
|
|
4105
|
+
* Ordered by request_start_date descending then id. Proof document slots are
|
|
4106
|
+
* always present as `null` or a document object.
|
|
4043
4107
|
*
|
|
4044
4108
|
*
|
|
4045
4109
|
* **Required scope:**
|
|
@@ -4054,11 +4118,61 @@ export class Jobs {
|
|
|
4054
4118
|
...options
|
|
4055
4119
|
});
|
|
4056
4120
|
}
|
|
4121
|
+
/**
|
|
4122
|
+
* Create good-faith effort exception
|
|
4123
|
+
*
|
|
4124
|
+
* Creates a good-faith-effort exception on the named job. `job_id` is the path
|
|
4125
|
+
* only. Scalar fields match GET; send minutes, not the web form's
|
|
4126
|
+
* `hours_per_apprentice`. Proof files attach through
|
|
4127
|
+
* `request_letter_signed_id`, `submission_proof_signed_id`,
|
|
4128
|
+
* `response_letter_signed_id`, and `no_availability_proof_signed_id` minted by
|
|
4129
|
+
* `POST /api/v1/direct_uploads` naming
|
|
4130
|
+
* `jobs.pwa.apprenticeship.good_faith_effort_exceptions`; when any of those
|
|
4131
|
+
* keys is present, `performed_by_user_id` is required. Model validations are
|
|
4132
|
+
* the 422 source. A missing or out-of-scope job reads as not found.
|
|
4133
|
+
*
|
|
4134
|
+
*
|
|
4135
|
+
* **Required scope:**
|
|
4136
|
+
*
|
|
4137
|
+
* `jobs.pwa.apprenticeship.good_faith_effort_exceptions:create`
|
|
4138
|
+
*
|
|
4139
|
+
*/
|
|
4140
|
+
static createGoodFaithEffortException(options) {
|
|
4141
|
+
return (options.client ?? client).post({
|
|
4142
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4143
|
+
url: '/api/v1/jobs/{job_id}/pwa/apprenticeship/good_faith_effort_exceptions',
|
|
4144
|
+
...options,
|
|
4145
|
+
headers: {
|
|
4146
|
+
'Content-Type': 'application/json',
|
|
4147
|
+
...options.headers
|
|
4148
|
+
}
|
|
4149
|
+
});
|
|
4150
|
+
}
|
|
4151
|
+
/**
|
|
4152
|
+
* Delete good-faith effort exception
|
|
4153
|
+
*
|
|
4154
|
+
* Removes the good-faith-effort exception nested on the named job. A missing,
|
|
4155
|
+
* misnested, or out-of-scope id reads as not found.
|
|
4156
|
+
*
|
|
4157
|
+
*
|
|
4158
|
+
* **Required scope:**
|
|
4159
|
+
*
|
|
4160
|
+
* `jobs.pwa.apprenticeship.good_faith_effort_exceptions:delete`
|
|
4161
|
+
*
|
|
4162
|
+
*/
|
|
4163
|
+
static deleteGoodFaithEffortException(options) {
|
|
4164
|
+
return (options.client ?? client).delete({
|
|
4165
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4166
|
+
url: '/api/v1/jobs/{job_id}/pwa/apprenticeship/good_faith_effort_exceptions/{id}',
|
|
4167
|
+
...options
|
|
4168
|
+
});
|
|
4169
|
+
}
|
|
4057
4170
|
/**
|
|
4058
4171
|
* Get good-faith effort exception
|
|
4059
4172
|
*
|
|
4060
4173
|
* Returns one good-faith-effort exception nested on the named job. A missing,
|
|
4061
|
-
* misnested, or out-of-scope id reads as not found.
|
|
4174
|
+
* misnested, or out-of-scope id reads as not found. Proof document slots are
|
|
4175
|
+
* always present as `null` or a document object.
|
|
4062
4176
|
*
|
|
4063
4177
|
*
|
|
4064
4178
|
* **Required scope:**
|
|
@@ -4073,6 +4187,31 @@ export class Jobs {
|
|
|
4073
4187
|
...options
|
|
4074
4188
|
});
|
|
4075
4189
|
}
|
|
4190
|
+
/**
|
|
4191
|
+
* Update good-faith effort exception
|
|
4192
|
+
*
|
|
4193
|
+
* Updates a good-faith-effort exception nested on the named job. Omit a field
|
|
4194
|
+
* to preserve it. Omit a proof signed-id key to keep the stored file; replacing
|
|
4195
|
+
* a populated slot keeps the original creator. A missing, misnested, or
|
|
4196
|
+
* out-of-scope id reads as not found.
|
|
4197
|
+
*
|
|
4198
|
+
*
|
|
4199
|
+
* **Required scope:**
|
|
4200
|
+
*
|
|
4201
|
+
* `jobs.pwa.apprenticeship.good_faith_effort_exceptions:update`
|
|
4202
|
+
*
|
|
4203
|
+
*/
|
|
4204
|
+
static updateGoodFaithEffortException(options) {
|
|
4205
|
+
return (options.client ?? client).patch({
|
|
4206
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4207
|
+
url: '/api/v1/jobs/{job_id}/pwa/apprenticeship/good_faith_effort_exceptions/{id}',
|
|
4208
|
+
...options,
|
|
4209
|
+
headers: {
|
|
4210
|
+
'Content-Type': 'application/json',
|
|
4211
|
+
...options.headers
|
|
4212
|
+
}
|
|
4213
|
+
});
|
|
4214
|
+
}
|
|
4076
4215
|
/**
|
|
4077
4216
|
* List cure payments
|
|
4078
4217
|
*
|
|
@@ -4080,7 +4219,7 @@ export class Jobs {
|
|
|
4080
4219
|
* or out-of-scope job reads as not found. A visible job with no
|
|
4081
4220
|
* payments, including one that does not track federal PWA, returns
|
|
4082
4221
|
* an empty list. Ordered by paid_on_date descending, then
|
|
4083
|
-
* created_at descending, then id.
|
|
4222
|
+
* created_at descending, then id.
|
|
4084
4223
|
*
|
|
4085
4224
|
*
|
|
4086
4225
|
* **Required scope:**
|
|
@@ -4095,11 +4234,58 @@ export class Jobs {
|
|
|
4095
4234
|
...options
|
|
4096
4235
|
});
|
|
4097
4236
|
}
|
|
4237
|
+
/**
|
|
4238
|
+
* Create a cure payment
|
|
4239
|
+
*
|
|
4240
|
+
* Creates a PWA cure payment on the named job. `job_id` comes from the
|
|
4241
|
+
* path. `type`, `amount_cents`, the three dates, and `performed_by_user_id`
|
|
4242
|
+
* are required. `type` is the stored STI class name and is create-only.
|
|
4243
|
+
* The attestation file attaches through `attestation_signed_id` minted by
|
|
4244
|
+
* `POST /api/v1/direct_uploads` naming `jobs.pwa.cure_payments`. A missing
|
|
4245
|
+
* or out-of-scope job or filer reads as not found. Model validations
|
|
4246
|
+
* return 422. Undeclared body keys return 400.
|
|
4247
|
+
*
|
|
4248
|
+
*
|
|
4249
|
+
* **Required scope:**
|
|
4250
|
+
*
|
|
4251
|
+
* `jobs.pwa.cure_payments:create`
|
|
4252
|
+
*
|
|
4253
|
+
*/
|
|
4254
|
+
static createCurePayment(options) {
|
|
4255
|
+
return (options.client ?? client).post({
|
|
4256
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4257
|
+
url: '/api/v1/jobs/{job_id}/pwa/cure_payments',
|
|
4258
|
+
...options,
|
|
4259
|
+
headers: {
|
|
4260
|
+
'Content-Type': 'application/json',
|
|
4261
|
+
...options.headers
|
|
4262
|
+
}
|
|
4263
|
+
});
|
|
4264
|
+
}
|
|
4265
|
+
/**
|
|
4266
|
+
* Delete a cure payment
|
|
4267
|
+
*
|
|
4268
|
+
* Removes the PWA cure payment nested on the named job. A missing or
|
|
4269
|
+
* misnested id reads as not found.
|
|
4270
|
+
*
|
|
4271
|
+
*
|
|
4272
|
+
* **Required scope:**
|
|
4273
|
+
*
|
|
4274
|
+
* `jobs.pwa.cure_payments:delete`
|
|
4275
|
+
*
|
|
4276
|
+
*/
|
|
4277
|
+
static deleteCurePayment(options) {
|
|
4278
|
+
return (options.client ?? client).delete({
|
|
4279
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4280
|
+
url: '/api/v1/jobs/{job_id}/pwa/cure_payments/{id}',
|
|
4281
|
+
...options
|
|
4282
|
+
});
|
|
4283
|
+
}
|
|
4098
4284
|
/**
|
|
4099
4285
|
* Get cure payment
|
|
4100
4286
|
*
|
|
4101
4287
|
* Returns one PWA cure payment nested on the named job. A missing,
|
|
4102
|
-
* misnested, or out-of-scope id reads as not found.
|
|
4288
|
+
* misnested, or out-of-scope id reads as not found.
|
|
4103
4289
|
*
|
|
4104
4290
|
*
|
|
4105
4291
|
* **Required scope:**
|
|
@@ -4114,6 +4300,33 @@ export class Jobs {
|
|
|
4114
4300
|
...options
|
|
4115
4301
|
});
|
|
4116
4302
|
}
|
|
4303
|
+
/**
|
|
4304
|
+
* Update a cure payment
|
|
4305
|
+
*
|
|
4306
|
+
* Updates a PWA cure payment nested on the named job. Omit a field to
|
|
4307
|
+
* preserve it. `type` is create-only; sending it returns 400. Omit
|
|
4308
|
+
* `attestation_signed_id` to keep the stored file; send it with
|
|
4309
|
+
* `performed_by_user_id` to create or replace the attestation. Replacing
|
|
4310
|
+
* a populated slot keeps the original document id and creator. A missing
|
|
4311
|
+
* or misnested id reads as not found.
|
|
4312
|
+
*
|
|
4313
|
+
*
|
|
4314
|
+
* **Required scope:**
|
|
4315
|
+
*
|
|
4316
|
+
* `jobs.pwa.cure_payments:update`
|
|
4317
|
+
*
|
|
4318
|
+
*/
|
|
4319
|
+
static updateCurePayment(options) {
|
|
4320
|
+
return (options.client ?? client).patch({
|
|
4321
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4322
|
+
url: '/api/v1/jobs/{job_id}/pwa/cure_payments/{id}',
|
|
4323
|
+
...options,
|
|
4324
|
+
headers: {
|
|
4325
|
+
'Content-Type': 'application/json',
|
|
4326
|
+
...options.headers
|
|
4327
|
+
}
|
|
4328
|
+
});
|
|
4329
|
+
}
|
|
4117
4330
|
/**
|
|
4118
4331
|
* List sites for job
|
|
4119
4332
|
*
|
|
@@ -5220,6 +5433,7 @@ export class JobWageDeterminations {
|
|
|
5220
5433
|
* at once, so it moves every version rather than applying from
|
|
5221
5434
|
* `effective_from`. A determination cascaded from a project mirrors that
|
|
5222
5435
|
* project's determination and cannot be edited here — change it on the project.
|
|
5436
|
+
* Re-pointing a journeyworker-basis determination also moves the apprentice determinations that follow it.
|
|
5223
5437
|
*
|
|
5224
5438
|
* Conditional: send the determination's `ETag` as `If-Match`.
|
|
5225
5439
|
*
|
|
@@ -8416,6 +8630,7 @@ export class ProjectWageDeterminations {
|
|
|
8416
8630
|
* `pwa_trade_id` is the exception: a trade regroups the whole determination
|
|
8417
8631
|
* at once, so it moves every version rather than applying from
|
|
8418
8632
|
* `effective_from`. Changes synchronize to linked job wage determinations.
|
|
8633
|
+
* Re-pointing a journeyworker-basis determination also moves the apprentice determinations that follow it.
|
|
8419
8634
|
*
|
|
8420
8635
|
* Conditional: send the determination's `ETag` as `If-Match`.
|
|
8421
8636
|
*
|
|
@@ -8472,14 +8687,17 @@ export class Projects {
|
|
|
8472
8687
|
* prevailing-wage lock-in / beginning-of-construction / placed-in-service dates)
|
|
8473
8688
|
* and `asset_owner` apply only while `federal_pwa_mode` is not `none`, so sending
|
|
8474
8689
|
* one of them on a project that tracks no federal PWA — even as null — returns
|
|
8475
|
-
* 422.
|
|
8476
|
-
* `
|
|
8477
|
-
*
|
|
8478
|
-
*
|
|
8479
|
-
*
|
|
8480
|
-
*
|
|
8481
|
-
*
|
|
8482
|
-
*
|
|
8690
|
+
* 422. IRA evidence files attach through `lock_in_date_doc_signed_id`,
|
|
8691
|
+
* `beginning_of_construction_doc_signed_id`, and `placed_in_service_doc_signed_id`
|
|
8692
|
+
* minted by `POST /api/v1/direct_uploads` naming `projects`; when any of those
|
|
8693
|
+
* keys is present, `performed_by_user_id` is required. `parent_id` may name a
|
|
8694
|
+
* project visible to the API key's policy, `participating_company_ids` is the
|
|
8695
|
+
* complete set of participating companies, and `manager_user_ids` is the complete
|
|
8696
|
+
* set of project managers (each a manager of the owning company). Remove a
|
|
8697
|
+
* participant's jobs before removing it from this set. Returns 201 with the
|
|
8698
|
+
* project; unknown or inaccessible parent, company, manager, or filer user IDs
|
|
8699
|
+
* return 404, and invalid attributes or relationships return 422. Undeclared
|
|
8700
|
+
* body keys return 400 before any project or relationship is saved.
|
|
8483
8701
|
*
|
|
8484
8702
|
*
|
|
8485
8703
|
* **Required scope:**
|
|
@@ -8528,7 +8746,12 @@ export class Projects {
|
|
|
8528
8746
|
* dates) and `asset_owner` apply only while `federal_pwa_mode` is not `none`:
|
|
8529
8747
|
* switching it to `none` clears the stored values and forces `asset_owner`
|
|
8530
8748
|
* false, and sending one of them while federal tracking is off — even as null —
|
|
8531
|
-
* returns 422.
|
|
8749
|
+
* returns 422. IRA evidence files attach through `lock_in_date_doc_signed_id`,
|
|
8750
|
+
* `beginning_of_construction_doc_signed_id`, and `placed_in_service_doc_signed_id`
|
|
8751
|
+
* minted by `POST /api/v1/direct_uploads` naming `projects`; omit a key to keep
|
|
8752
|
+
* the stored file, and send `performed_by_user_id` when any signed id is present.
|
|
8753
|
+
* Replacing a populated slot keeps the original `created_by_user_id`.
|
|
8754
|
+
* `budget_currency` defaults to USD when blank. `parent_id` moves
|
|
8532
8755
|
* or detaches the project; a project whose parent no longer lists its owner
|
|
8533
8756
|
* still accepts updates that keep that parent. `participating_company_ids`
|
|
8534
8757
|
* replaces the complete set of participating companies. `manager_user_ids`
|
|
@@ -8723,10 +8946,16 @@ export class Users {
|
|
|
8723
8946
|
/**
|
|
8724
8947
|
* List scheduled compensation changes for user's employment
|
|
8725
8948
|
*
|
|
8949
|
+
* Deprecated: use `GET /api/v1/people/employments/{employment_id}/history` instead.
|
|
8950
|
+
* The successor is keyed by the employment's `id` and lists every version, newest first.
|
|
8951
|
+
*
|
|
8952
|
+
*
|
|
8726
8953
|
* **Required scope:**
|
|
8727
8954
|
*
|
|
8728
8955
|
* `users.companies.scheduled_changes:read`
|
|
8729
8956
|
*
|
|
8957
|
+
*
|
|
8958
|
+
* @deprecated
|
|
8730
8959
|
*/
|
|
8731
8960
|
static listUserCompanyScheduledChanges(options) {
|
|
8732
8961
|
return (options.client ?? client).get({
|
|
@@ -8738,10 +8967,16 @@ export class Users {
|
|
|
8738
8967
|
/**
|
|
8739
8968
|
* Create scheduled change to user's employment information
|
|
8740
8969
|
*
|
|
8970
|
+
* Deprecated: use `POST /api/v1/people/employments/{employment_id}/scheduled_changes` instead.
|
|
8971
|
+
* The successor is keyed by the employment's `id` and needs `If-Match`.
|
|
8972
|
+
*
|
|
8973
|
+
*
|
|
8741
8974
|
* **Required scope:**
|
|
8742
8975
|
*
|
|
8743
8976
|
* `users.companies.scheduled_changes:create`
|
|
8744
8977
|
*
|
|
8978
|
+
*
|
|
8979
|
+
* @deprecated
|
|
8745
8980
|
*/
|
|
8746
8981
|
static createUserCompanyScheduledChange(options) {
|
|
8747
8982
|
return (options.client ?? client).post({
|
|
@@ -8757,10 +8992,16 @@ export class Users {
|
|
|
8757
8992
|
/**
|
|
8758
8993
|
* Cancel scheduled compensation change (removes the future version from the timeline)
|
|
8759
8994
|
*
|
|
8995
|
+
* Deprecated: use `DELETE /api/v1/people/employments/{employment_id}/scheduled_changes/{effective_date}` instead.
|
|
8996
|
+
* The successor is keyed by the employment's `id` and the change's effective date, and needs `If-Match`.
|
|
8997
|
+
*
|
|
8998
|
+
*
|
|
8760
8999
|
* **Required scope:**
|
|
8761
9000
|
*
|
|
8762
9001
|
* `users.companies.scheduled_changes:delete`
|
|
8763
9002
|
*
|
|
9003
|
+
*
|
|
9004
|
+
* @deprecated
|
|
8764
9005
|
*/
|
|
8765
9006
|
static cancelUserCompanyScheduledChange(options) {
|
|
8766
9007
|
return (options.client ?? client).delete({
|
|
@@ -8772,10 +9013,16 @@ export class Users {
|
|
|
8772
9013
|
/**
|
|
8773
9014
|
* Update scheduled compensation change
|
|
8774
9015
|
*
|
|
9016
|
+
* Deprecated: use `PATCH /api/v1/people/employments/{employment_id}/scheduled_changes/{effective_date}` instead.
|
|
9017
|
+
* The successor is keyed by the employment's `id` and the change's effective date, and needs `If-Match`.
|
|
9018
|
+
*
|
|
9019
|
+
*
|
|
8775
9020
|
* **Required scope:**
|
|
8776
9021
|
*
|
|
8777
9022
|
* `users.companies.scheduled_changes:update`
|
|
8778
9023
|
*
|
|
9024
|
+
*
|
|
9025
|
+
* @deprecated
|
|
8779
9026
|
*/
|
|
8780
9027
|
static updateScheduledChange(options) {
|
|
8781
9028
|
return (options.client ?? client).patch({
|
|
@@ -10209,6 +10456,32 @@ export class TimeOffRequests {
|
|
|
10209
10456
|
...options
|
|
10210
10457
|
});
|
|
10211
10458
|
}
|
|
10459
|
+
/**
|
|
10460
|
+
* Create time off request
|
|
10461
|
+
*
|
|
10462
|
+
* Create a time-off request for a worker. Name the worker and the filer.
|
|
10463
|
+
* When they are the same person the request is born pending; otherwise it
|
|
10464
|
+
* is born approved with the filer stamped as reviewer and an Absence is
|
|
10465
|
+
* built in the background. Instants are the beginning of the first day and
|
|
10466
|
+
* the end of the last day in the pay-schedule timezone.
|
|
10467
|
+
*
|
|
10468
|
+
*
|
|
10469
|
+
* **Required scope:**
|
|
10470
|
+
*
|
|
10471
|
+
* `timekeeping.time_off_requests:create`
|
|
10472
|
+
*
|
|
10473
|
+
*/
|
|
10474
|
+
static createTimeOffRequest(options) {
|
|
10475
|
+
return (options.client ?? client).post({
|
|
10476
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
10477
|
+
url: '/api/v1/timekeeping/time_off_requests',
|
|
10478
|
+
...options,
|
|
10479
|
+
headers: {
|
|
10480
|
+
'Content-Type': 'application/json',
|
|
10481
|
+
...options.headers
|
|
10482
|
+
}
|
|
10483
|
+
});
|
|
10484
|
+
}
|
|
10212
10485
|
/**
|
|
10213
10486
|
* Show time off request
|
|
10214
10487
|
*
|
|
@@ -10228,6 +10501,30 @@ export class TimeOffRequests {
|
|
|
10228
10501
|
...options
|
|
10229
10502
|
});
|
|
10230
10503
|
}
|
|
10504
|
+
/**
|
|
10505
|
+
* Review time off request
|
|
10506
|
+
*
|
|
10507
|
+
* Approve, deny, or cancel a pending time-off request. The named filer is
|
|
10508
|
+
* the reviewer: only the worker may cancel, and nobody may approve or deny
|
|
10509
|
+
* their own row. Approving enqueues the Absence build.
|
|
10510
|
+
*
|
|
10511
|
+
*
|
|
10512
|
+
* **Required scope:**
|
|
10513
|
+
*
|
|
10514
|
+
* `timekeeping.time_off_requests.reviews:create`
|
|
10515
|
+
*
|
|
10516
|
+
*/
|
|
10517
|
+
static createReview(options) {
|
|
10518
|
+
return (options.client ?? client).post({
|
|
10519
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
10520
|
+
url: '/api/v1/timekeeping/time_off_requests/{time_off_request_id}/reviews',
|
|
10521
|
+
...options,
|
|
10522
|
+
headers: {
|
|
10523
|
+
'Content-Type': 'application/json',
|
|
10524
|
+
...options.headers
|
|
10525
|
+
}
|
|
10526
|
+
});
|
|
10527
|
+
}
|
|
10231
10528
|
}
|
|
10232
10529
|
export class TimeSessions {
|
|
10233
10530
|
/**
|