@dsptch-work/api-client 0.24.0 → 0.26.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 +61 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +573 -94
- package/dist/gen/sdk.gen.js +860 -167
- package/dist/gen/types.gen.d.ts +1477 -294
- package/dist/gen/zod.gen.d.ts +947 -181
- package/dist/gen/zod.gen.js +450 -85
- package/package.json +1 -1
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -53,6 +53,27 @@ export class ApprenticeshipAllocations {
|
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Delete apprenticeship allocation
|
|
58
|
+
*
|
|
59
|
+
* Deletes an allocation nested under the apprentice in the path. Success is
|
|
60
|
+
* `204` and a later GET of the same id is not found. A missing, out-of-scope,
|
|
61
|
+
* or mismatched apprentice/allocation pair is `404`. Company-scoped keys may
|
|
62
|
+
* delete; unlike create, this operation does not require a user-scoped key.
|
|
63
|
+
*
|
|
64
|
+
*
|
|
65
|
+
* **Required scope:**
|
|
66
|
+
*
|
|
67
|
+
* `apprenticeship.apprentices.allocations:delete`
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
static deleteAllocation(options) {
|
|
71
|
+
return (options.client ?? client).delete({
|
|
72
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
73
|
+
url: '/api/v1/apprenticeship/apprentices/{apprentice_id}/allocations/{id}',
|
|
74
|
+
...options
|
|
75
|
+
});
|
|
76
|
+
}
|
|
56
77
|
/**
|
|
57
78
|
* Show apprenticeship allocation
|
|
58
79
|
*
|
|
@@ -159,6 +180,47 @@ export class ApprenticeshipOccupations {
|
|
|
159
180
|
}
|
|
160
181
|
});
|
|
161
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Delete apprenticeship occupation
|
|
185
|
+
*
|
|
186
|
+
* Deletes an unused occupation. An occupation that still has work-process
|
|
187
|
+
* categories, wage schedules, or trade apprenticeship links is refused
|
|
188
|
+
* with a `422` — remove those dependents first. An unused occupation
|
|
189
|
+
* returns `204` and is gone from a later GET.
|
|
190
|
+
*
|
|
191
|
+
*
|
|
192
|
+
* **Required scope:**
|
|
193
|
+
*
|
|
194
|
+
* `apprenticeship.programs.occupations:delete`
|
|
195
|
+
*
|
|
196
|
+
*/
|
|
197
|
+
static deleteOccupation(options) {
|
|
198
|
+
return (options.client ?? client).delete({
|
|
199
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
200
|
+
url: '/api/v1/apprenticeship/programs/{program_id}/occupations/{id}',
|
|
201
|
+
...options
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Show apprenticeship occupation
|
|
206
|
+
*
|
|
207
|
+
* Returns one occupation in a program the key's company sponsors or is
|
|
208
|
+
* enrolled in as an employer. A missing, mismatched, or out-of-scope id
|
|
209
|
+
* reads as not found.
|
|
210
|
+
*
|
|
211
|
+
*
|
|
212
|
+
* **Required scope:**
|
|
213
|
+
*
|
|
214
|
+
* `apprenticeship.programs.occupations:read`
|
|
215
|
+
*
|
|
216
|
+
*/
|
|
217
|
+
static getOccupation(options) {
|
|
218
|
+
return (options.client ?? client).get({
|
|
219
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
220
|
+
url: '/api/v1/apprenticeship/programs/{program_id}/occupations/{id}',
|
|
221
|
+
...options
|
|
222
|
+
});
|
|
223
|
+
}
|
|
162
224
|
/**
|
|
163
225
|
* Update apprenticeship occupation
|
|
164
226
|
*
|
|
@@ -229,6 +291,27 @@ export class ApprenticeshipEmployers {
|
|
|
229
291
|
...options
|
|
230
292
|
});
|
|
231
293
|
}
|
|
294
|
+
/**
|
|
295
|
+
* Show apprenticeship employer
|
|
296
|
+
*
|
|
297
|
+
* Returns one employer roster row in a program the key's company sponsors
|
|
298
|
+
* or is enrolled in as an employer. The object matches the list, create,
|
|
299
|
+
* and update door. A missing, mismatched, or out-of-scope id reads as
|
|
300
|
+
* not found.
|
|
301
|
+
*
|
|
302
|
+
*
|
|
303
|
+
* **Required scope:**
|
|
304
|
+
*
|
|
305
|
+
* `apprenticeship.programs.employers:read`
|
|
306
|
+
*
|
|
307
|
+
*/
|
|
308
|
+
static getEmployer(options) {
|
|
309
|
+
return (options.client ?? client).get({
|
|
310
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
311
|
+
url: '/api/v1/apprenticeship/programs/{program_id}/employers/{id}',
|
|
312
|
+
...options
|
|
313
|
+
});
|
|
314
|
+
}
|
|
232
315
|
/**
|
|
233
316
|
* Update apprenticeship employer
|
|
234
317
|
*
|
|
@@ -284,6 +367,45 @@ export class ApprenticeshipPrograms {
|
|
|
284
367
|
}
|
|
285
368
|
});
|
|
286
369
|
}
|
|
370
|
+
/**
|
|
371
|
+
* Delete apprenticeship program
|
|
372
|
+
*
|
|
373
|
+
* Deletes an unused program. A program that still has occupations is refused
|
|
374
|
+
* with a `422` — remove those occupations first. An unused program returns
|
|
375
|
+
* `204` and is gone from a later GET.
|
|
376
|
+
*
|
|
377
|
+
*
|
|
378
|
+
* **Required scope:**
|
|
379
|
+
*
|
|
380
|
+
* `apprenticeship.programs:delete`
|
|
381
|
+
*
|
|
382
|
+
*/
|
|
383
|
+
static deleteProgram(options) {
|
|
384
|
+
return (options.client ?? client).delete({
|
|
385
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
386
|
+
url: '/api/v1/apprenticeship/programs/{id}',
|
|
387
|
+
...options
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Show apprenticeship program
|
|
392
|
+
*
|
|
393
|
+
* Returns one program the key's company sponsors or is enrolled in as an
|
|
394
|
+
* employer. A missing or out-of-scope id reads as not found.
|
|
395
|
+
*
|
|
396
|
+
*
|
|
397
|
+
* **Required scope:**
|
|
398
|
+
*
|
|
399
|
+
* `apprenticeship.programs:read`
|
|
400
|
+
*
|
|
401
|
+
*/
|
|
402
|
+
static getProgram(options) {
|
|
403
|
+
return (options.client ?? client).get({
|
|
404
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
405
|
+
url: '/api/v1/apprenticeship/programs/{id}',
|
|
406
|
+
...options
|
|
407
|
+
});
|
|
408
|
+
}
|
|
287
409
|
/**
|
|
288
410
|
* Update apprenticeship program
|
|
289
411
|
*
|
|
@@ -339,6 +461,48 @@ export class ApprenticeshipWageSchedulePeriods {
|
|
|
339
461
|
}
|
|
340
462
|
});
|
|
341
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* Delete apprenticeship wage schedule period
|
|
466
|
+
*
|
|
467
|
+
* Deletes an unused non-opening period nested under the wage schedule in
|
|
468
|
+
* the path. Period 0 (the entry step) and a period with active apprentices
|
|
469
|
+
* are refused with a `422`. An unused later period returns `204`. Deletes
|
|
470
|
+
* are sponsor-only; an enrolled employer is `403`. A missing, out-of-scope,
|
|
471
|
+
* or mismatched schedule/period pair is `404`.
|
|
472
|
+
*
|
|
473
|
+
*
|
|
474
|
+
* **Required scope:**
|
|
475
|
+
*
|
|
476
|
+
* `apprenticeship.wage_schedules.periods:delete`
|
|
477
|
+
*
|
|
478
|
+
*/
|
|
479
|
+
static deletePeriod(options) {
|
|
480
|
+
return (options.client ?? client).delete({
|
|
481
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
482
|
+
url: '/api/v1/apprenticeship/wage_schedules/{wage_schedule_id}/periods/{id}',
|
|
483
|
+
...options
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Show apprenticeship wage schedule period
|
|
488
|
+
*
|
|
489
|
+
* Returns one period nested under the wage schedule in the path. The
|
|
490
|
+
* object matches the list, create, and update door. A missing, out-of-scope,
|
|
491
|
+
* or mismatched schedule/period pair is not found.
|
|
492
|
+
*
|
|
493
|
+
*
|
|
494
|
+
* **Required scope:**
|
|
495
|
+
*
|
|
496
|
+
* `apprenticeship.wage_schedules.periods:read`
|
|
497
|
+
*
|
|
498
|
+
*/
|
|
499
|
+
static getPeriod(options) {
|
|
500
|
+
return (options.client ?? client).get({
|
|
501
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
502
|
+
url: '/api/v1/apprenticeship/wage_schedules/{wage_schedule_id}/periods/{id}',
|
|
503
|
+
...options
|
|
504
|
+
});
|
|
505
|
+
}
|
|
342
506
|
/**
|
|
343
507
|
* Update apprenticeship wage schedule period
|
|
344
508
|
*
|
|
@@ -394,6 +558,49 @@ export class ApprenticeshipWageSchedules {
|
|
|
394
558
|
}
|
|
395
559
|
});
|
|
396
560
|
}
|
|
561
|
+
/**
|
|
562
|
+
* Delete apprenticeship wage schedule
|
|
563
|
+
*
|
|
564
|
+
* Deletes an unused wage schedule nested under the occupation in the path.
|
|
565
|
+
* A schedule that still has apprentices is refused with a `422`. An unused
|
|
566
|
+
* schedule returns `204`. Deletes are sponsor-only; an enrolled employer is
|
|
567
|
+
* `403`. A missing, out-of-scope, or mismatched occupation/schedule pair is
|
|
568
|
+
* `404`. Periods on the schedule are removed with it.
|
|
569
|
+
*
|
|
570
|
+
*
|
|
571
|
+
* **Required scope:**
|
|
572
|
+
*
|
|
573
|
+
* `apprenticeship.occupations.wage_schedules:delete`
|
|
574
|
+
*
|
|
575
|
+
*/
|
|
576
|
+
static deleteWageSchedule(options) {
|
|
577
|
+
return (options.client ?? client).delete({
|
|
578
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
579
|
+
url: '/api/v1/apprenticeship/occupations/{occupation_id}/wage_schedules/{id}',
|
|
580
|
+
...options
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Show apprenticeship wage schedule
|
|
585
|
+
*
|
|
586
|
+
* Returns one wage schedule nested under the occupation in the path. The
|
|
587
|
+
* object matches the list, create, and update door. A missing, out-of-scope,
|
|
588
|
+
* or mismatched occupation/schedule pair is not found. Nested periods are a
|
|
589
|
+
* separate resource.
|
|
590
|
+
*
|
|
591
|
+
*
|
|
592
|
+
* **Required scope:**
|
|
593
|
+
*
|
|
594
|
+
* `apprenticeship.occupations.wage_schedules:read`
|
|
595
|
+
*
|
|
596
|
+
*/
|
|
597
|
+
static getWageSchedule(options) {
|
|
598
|
+
return (options.client ?? client).get({
|
|
599
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
600
|
+
url: '/api/v1/apprenticeship/occupations/{occupation_id}/wage_schedules/{id}',
|
|
601
|
+
...options
|
|
602
|
+
});
|
|
603
|
+
}
|
|
397
604
|
/**
|
|
398
605
|
* Update apprenticeship wage schedule
|
|
399
606
|
*
|
|
@@ -1983,6 +2190,44 @@ export class CertificationPackages {
|
|
|
1983
2190
|
}
|
|
1984
2191
|
}
|
|
1985
2192
|
export class UserCertifications {
|
|
2193
|
+
/**
|
|
2194
|
+
* Revoke user certification approval
|
|
2195
|
+
*
|
|
2196
|
+
* Revokes the approval on a certification held by a worker.
|
|
2197
|
+
*
|
|
2198
|
+
* **Required scope:**
|
|
2199
|
+
*
|
|
2200
|
+
* `certifications.user_certifications.approvals:delete`
|
|
2201
|
+
*
|
|
2202
|
+
*/
|
|
2203
|
+
static revokeUserCertificationApproval(options) {
|
|
2204
|
+
return (options.client ?? client).delete({
|
|
2205
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
2206
|
+
url: '/api/v1/certifications/user_certifications/{user_certification_id}/approval',
|
|
2207
|
+
...options
|
|
2208
|
+
});
|
|
2209
|
+
}
|
|
2210
|
+
/**
|
|
2211
|
+
* Approve user certification
|
|
2212
|
+
*
|
|
2213
|
+
* Records who approved a certification held by a worker and stamps when. A user key approves in its own user's name; a company key names the approver. The approver must be an admin, manager, or safety manager at a company that employs the holder, and cannot be the holder.
|
|
2214
|
+
*
|
|
2215
|
+
* **Required scope:**
|
|
2216
|
+
*
|
|
2217
|
+
* `certifications.user_certifications.approvals:create`
|
|
2218
|
+
*
|
|
2219
|
+
*/
|
|
2220
|
+
static approveUserCertification(options) {
|
|
2221
|
+
return (options.client ?? client).post({
|
|
2222
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
2223
|
+
url: '/api/v1/certifications/user_certifications/{user_certification_id}/approval',
|
|
2224
|
+
...options,
|
|
2225
|
+
headers: {
|
|
2226
|
+
'Content-Type': 'application/json',
|
|
2227
|
+
...options.headers
|
|
2228
|
+
}
|
|
2229
|
+
});
|
|
2230
|
+
}
|
|
1986
2231
|
/**
|
|
1987
2232
|
* List user certifications
|
|
1988
2233
|
*
|
|
@@ -2497,6 +2742,21 @@ export class Forms {
|
|
|
2497
2742
|
...options
|
|
2498
2743
|
});
|
|
2499
2744
|
}
|
|
2745
|
+
/**
|
|
2746
|
+
* Show form definition
|
|
2747
|
+
*
|
|
2748
|
+
* **Required scope:**
|
|
2749
|
+
*
|
|
2750
|
+
* `form_definitions:read`
|
|
2751
|
+
*
|
|
2752
|
+
*/
|
|
2753
|
+
static getFormDefinition(options) {
|
|
2754
|
+
return (options.client ?? client).get({
|
|
2755
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
2756
|
+
url: '/api/v1/form_definitions/{id}',
|
|
2757
|
+
...options
|
|
2758
|
+
});
|
|
2759
|
+
}
|
|
2500
2760
|
/**
|
|
2501
2761
|
* List form submission versions
|
|
2502
2762
|
*
|
|
@@ -2721,6 +2981,14 @@ export class ProductionJobScopePrices {
|
|
|
2721
2981
|
/**
|
|
2722
2982
|
* List production job scope prices
|
|
2723
2983
|
*
|
|
2984
|
+
* Scope prices on a production-tracked job. Company keys,
|
|
2985
|
+
* and user keys held by an administrator, manager, safety
|
|
2986
|
+
* manager, or field lead of the company that owns the job,
|
|
2987
|
+
* receive `unit_price` and `contracted_count`. Other user
|
|
2988
|
+
* keys, held by crew on the job, receive the same rows
|
|
2989
|
+
* without those two fields.
|
|
2990
|
+
*
|
|
2991
|
+
*
|
|
2724
2992
|
* **Required scope:**
|
|
2725
2993
|
*
|
|
2726
2994
|
* `jobs.production.job_scope_prices:read`
|
|
@@ -2770,6 +3038,14 @@ export class ProductionJobScopePrices {
|
|
|
2770
3038
|
/**
|
|
2771
3039
|
* Show production job scope price
|
|
2772
3040
|
*
|
|
3041
|
+
* One scope price on a production-tracked job. Company keys,
|
|
3042
|
+
* and user keys held by an administrator, manager, safety
|
|
3043
|
+
* manager, or field lead of the company that owns the job,
|
|
3044
|
+
* receive `unit_price` and `contracted_count`. Other user
|
|
3045
|
+
* keys, held by crew on the job, receive the price without
|
|
3046
|
+
* those two fields.
|
|
3047
|
+
*
|
|
3048
|
+
*
|
|
2773
3049
|
* **Required scope:**
|
|
2774
3050
|
*
|
|
2775
3051
|
* `jobs.production.job_scope_prices:read`
|
|
@@ -3035,113 +3311,106 @@ export class JobWageDeterminationRateRules {
|
|
|
3035
3311
|
});
|
|
3036
3312
|
}
|
|
3037
3313
|
}
|
|
3038
|
-
export class
|
|
3314
|
+
export class Jobs {
|
|
3039
3315
|
/**
|
|
3040
|
-
*
|
|
3316
|
+
* List sites for job
|
|
3041
3317
|
*
|
|
3042
|
-
*
|
|
3043
|
-
*
|
|
3044
|
-
*
|
|
3045
|
-
* `/history`.
|
|
3046
|
-
*
|
|
3047
|
-
* This changes *when* the determination existed rather than what it said —
|
|
3048
|
-
* no version's attributes are rewritten. Moving the other end of the timeline
|
|
3049
|
-
* is `scheduled_termination`, and changing a version's values is the
|
|
3050
|
-
* determination update.
|
|
3051
|
-
*
|
|
3052
|
-
* A shift to or past a scheduled termination is refused with `422`, since it
|
|
3053
|
-
* would leave no coverage at all.
|
|
3054
|
-
*
|
|
3055
|
-
* Conditional: send the determination's `ETag` as `If-Match`.
|
|
3318
|
+
* Returns the job-site join rows on the named job. `{id}` is the
|
|
3319
|
+
* join row, not the Site. A missing or out-of-scope job reads as
|
|
3320
|
+
* not found.
|
|
3056
3321
|
*
|
|
3057
3322
|
*
|
|
3058
3323
|
* **Required scope:**
|
|
3059
3324
|
*
|
|
3060
|
-
* `jobs.
|
|
3325
|
+
* `jobs.sites:read`
|
|
3061
3326
|
*
|
|
3062
3327
|
*/
|
|
3063
|
-
static
|
|
3064
|
-
return (options.client ?? client).
|
|
3328
|
+
static listJobSites(options) {
|
|
3329
|
+
return (options.client ?? client).get({
|
|
3065
3330
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3066
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3067
|
-
...options
|
|
3068
|
-
headers: {
|
|
3069
|
-
'Content-Type': 'application/json',
|
|
3070
|
-
...options.headers
|
|
3071
|
-
}
|
|
3331
|
+
url: '/api/v1/jobs/{job_id}/sites',
|
|
3332
|
+
...options
|
|
3072
3333
|
});
|
|
3073
3334
|
}
|
|
3074
3335
|
/**
|
|
3075
|
-
*
|
|
3336
|
+
* Create site for job
|
|
3076
3337
|
*
|
|
3077
|
-
*
|
|
3078
|
-
*
|
|
3079
|
-
*
|
|
3080
|
-
* `current` or `historical`, and the `corrections` that version replaced —
|
|
3081
|
-
* each itself a full determination as previously recorded, so a client
|
|
3082
|
-
* that wants a field-level diff compares two of them. An entry carries
|
|
3083
|
-
* the family key as `job_wage_determination_id` and no `id` or `uid` of
|
|
3084
|
-
* its own — every version shares the family key, so versions are told
|
|
3085
|
-
* apart by their window coordinates. `as_of[valid]` is
|
|
3086
|
-
* rejected, since pinning a point on the valid axis would collapse the
|
|
3087
|
-
* sequence this endpoint returns, and a determination records no
|
|
3088
|
-
* transaction axis to read `as_of[transaction]` against.
|
|
3338
|
+
* Attaches a Site to the named job. `job_id` is the path only.
|
|
3339
|
+
* `site_id` is required; `feature_ids` is optional and replaced
|
|
3340
|
+
* as a set. Duplicate (job, site) pairs are rejected.
|
|
3089
3341
|
*
|
|
3090
3342
|
*
|
|
3091
3343
|
* **Required scope:**
|
|
3092
3344
|
*
|
|
3093
|
-
* `jobs.
|
|
3345
|
+
* `jobs.sites:create`
|
|
3094
3346
|
*
|
|
3095
3347
|
*/
|
|
3096
|
-
static
|
|
3097
|
-
return (options.client ?? client).
|
|
3348
|
+
static createJobSite(options) {
|
|
3349
|
+
return (options.client ?? client).post({
|
|
3098
3350
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3099
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3100
|
-
...options
|
|
3351
|
+
url: '/api/v1/jobs/{job_id}/sites',
|
|
3352
|
+
...options,
|
|
3353
|
+
headers: {
|
|
3354
|
+
'Content-Type': 'application/json',
|
|
3355
|
+
...options.headers
|
|
3356
|
+
}
|
|
3101
3357
|
});
|
|
3102
3358
|
}
|
|
3103
3359
|
/**
|
|
3104
|
-
*
|
|
3360
|
+
* Delete site on job
|
|
3361
|
+
*
|
|
3362
|
+
* Removes the job-site join. The Site itself is not deleted.
|
|
3363
|
+
* Job-site features cascade with the join. A job may have zero
|
|
3364
|
+
* sites afterward.
|
|
3365
|
+
*
|
|
3105
3366
|
*
|
|
3106
3367
|
* **Required scope:**
|
|
3107
3368
|
*
|
|
3108
|
-
* `jobs.
|
|
3369
|
+
* `jobs.sites:delete`
|
|
3109
3370
|
*
|
|
3110
3371
|
*/
|
|
3111
|
-
static
|
|
3372
|
+
static deleteJobSite(options) {
|
|
3112
3373
|
return (options.client ?? client).delete({
|
|
3113
3374
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3114
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3375
|
+
url: '/api/v1/jobs/{job_id}/sites/{id}',
|
|
3115
3376
|
...options
|
|
3116
3377
|
});
|
|
3117
3378
|
}
|
|
3118
3379
|
/**
|
|
3119
|
-
*
|
|
3380
|
+
* Show site on job
|
|
3381
|
+
*
|
|
3382
|
+
* Returns one job-site join on the named job. `{id}` is the join
|
|
3383
|
+
* row. A missing, misnested, or out-of-scope id reads as not found.
|
|
3384
|
+
*
|
|
3120
3385
|
*
|
|
3121
3386
|
* **Required scope:**
|
|
3122
3387
|
*
|
|
3123
|
-
* `jobs.
|
|
3388
|
+
* `jobs.sites:read`
|
|
3124
3389
|
*
|
|
3125
3390
|
*/
|
|
3126
|
-
static
|
|
3391
|
+
static getJobSite(options) {
|
|
3127
3392
|
return (options.client ?? client).get({
|
|
3128
3393
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3129
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3394
|
+
url: '/api/v1/jobs/{job_id}/sites/{id}',
|
|
3130
3395
|
...options
|
|
3131
3396
|
});
|
|
3132
3397
|
}
|
|
3133
3398
|
/**
|
|
3134
|
-
*
|
|
3399
|
+
* Update site on job
|
|
3135
3400
|
*
|
|
3136
|
-
*
|
|
3401
|
+
* Replaces `feature_ids` on an existing job-site join. `site_id`
|
|
3402
|
+
* cannot be changed. An empty array clears every feature.
|
|
3137
3403
|
*
|
|
3138
|
-
*
|
|
3404
|
+
*
|
|
3405
|
+
* **Required scope:**
|
|
3406
|
+
*
|
|
3407
|
+
* `jobs.sites:update`
|
|
3139
3408
|
*
|
|
3140
3409
|
*/
|
|
3141
|
-
static
|
|
3142
|
-
return (options.client ?? client).
|
|
3410
|
+
static updateJobSite(options) {
|
|
3411
|
+
return (options.client ?? client).patch({
|
|
3143
3412
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3144
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3413
|
+
url: '/api/v1/jobs/{job_id}/sites/{id}',
|
|
3145
3414
|
...options,
|
|
3146
3415
|
headers: {
|
|
3147
3416
|
'Content-Type': 'application/json',
|
|
@@ -3150,43 +3419,66 @@ export class JobWageDeterminations {
|
|
|
3150
3419
|
});
|
|
3151
3420
|
}
|
|
3152
3421
|
/**
|
|
3153
|
-
*
|
|
3422
|
+
* List jobs
|
|
3154
3423
|
*
|
|
3155
3424
|
* **Required scope:**
|
|
3156
3425
|
*
|
|
3157
|
-
* `jobs
|
|
3426
|
+
* `jobs:read`
|
|
3158
3427
|
*
|
|
3159
3428
|
*/
|
|
3160
|
-
static
|
|
3161
|
-
return (options
|
|
3429
|
+
static listJobs(options) {
|
|
3430
|
+
return (options?.client ?? client).get({
|
|
3162
3431
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3163
|
-
url: '/api/v1/jobs
|
|
3432
|
+
url: '/api/v1/jobs',
|
|
3164
3433
|
...options
|
|
3165
3434
|
});
|
|
3166
3435
|
}
|
|
3167
3436
|
/**
|
|
3168
|
-
*
|
|
3437
|
+
* Create job
|
|
3169
3438
|
*
|
|
3170
|
-
*
|
|
3171
|
-
* it are dropped and one spanning it is truncated, so the determination stops
|
|
3172
|
-
* being valid from that point on. Earlier versions are untouched and stay
|
|
3173
|
-
* readable through `as_of[valid]` and `/history`.
|
|
3439
|
+
* **Required scope:**
|
|
3174
3440
|
*
|
|
3175
|
-
*
|
|
3176
|
-
* then schedule the one you want.
|
|
3441
|
+
* `jobs:create`
|
|
3177
3442
|
*
|
|
3178
|
-
|
|
3443
|
+
*/
|
|
3444
|
+
static createJob(options) {
|
|
3445
|
+
return (options.client ?? client).post({
|
|
3446
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3447
|
+
url: '/api/v1/jobs',
|
|
3448
|
+
...options,
|
|
3449
|
+
headers: {
|
|
3450
|
+
'Content-Type': 'application/json',
|
|
3451
|
+
...options.headers
|
|
3452
|
+
}
|
|
3453
|
+
});
|
|
3454
|
+
}
|
|
3455
|
+
/**
|
|
3456
|
+
* Show job
|
|
3457
|
+
*
|
|
3458
|
+
* **Required scope:**
|
|
3179
3459
|
*
|
|
3460
|
+
* `jobs:read`
|
|
3461
|
+
*
|
|
3462
|
+
*/
|
|
3463
|
+
static getJob(options) {
|
|
3464
|
+
return (options.client ?? client).get({
|
|
3465
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3466
|
+
url: '/api/v1/jobs/{id}',
|
|
3467
|
+
...options
|
|
3468
|
+
});
|
|
3469
|
+
}
|
|
3470
|
+
/**
|
|
3471
|
+
* Update job
|
|
3180
3472
|
*
|
|
3181
3473
|
* **Required scope:**
|
|
3182
3474
|
*
|
|
3183
|
-
* `jobs
|
|
3475
|
+
* `jobs:update`
|
|
3184
3476
|
*
|
|
3185
3477
|
*/
|
|
3186
|
-
static
|
|
3187
|
-
return (options.client ?? client).
|
|
3478
|
+
static updateJob(options) {
|
|
3479
|
+
return (options.client ?? client).patch({
|
|
3188
3480
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3189
|
-
url: '/api/v1/jobs/{
|
|
3481
|
+
url: '/api/v1/jobs/{id}',
|
|
3190
3482
|
...options,
|
|
3191
3483
|
headers: {
|
|
3192
3484
|
'Content-Type': 'application/json',
|
|
@@ -3195,32 +3487,36 @@ export class JobWageDeterminations {
|
|
|
3195
3487
|
});
|
|
3196
3488
|
}
|
|
3197
3489
|
/**
|
|
3198
|
-
* List
|
|
3490
|
+
* List positions for job
|
|
3199
3491
|
*
|
|
3200
3492
|
* **Required scope:**
|
|
3201
3493
|
*
|
|
3202
|
-
* `jobs.
|
|
3494
|
+
* `jobs.positions:read`
|
|
3203
3495
|
*
|
|
3204
3496
|
*/
|
|
3205
|
-
static
|
|
3497
|
+
static listPositions(options) {
|
|
3206
3498
|
return (options.client ?? client).get({
|
|
3207
3499
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3208
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3500
|
+
url: '/api/v1/jobs/{job_id}/positions',
|
|
3209
3501
|
...options
|
|
3210
3502
|
});
|
|
3211
3503
|
}
|
|
3212
3504
|
/**
|
|
3213
|
-
* Create
|
|
3505
|
+
* Create position for job
|
|
3506
|
+
*
|
|
3507
|
+
* cash_fringe_rate_cents, hourly_rate_cents, pwa_wage_pay_rate_cents and
|
|
3508
|
+
* wage_adder_rate_cents are admin only on user-scoped keys.
|
|
3509
|
+
*
|
|
3214
3510
|
*
|
|
3215
3511
|
* **Required scope:**
|
|
3216
3512
|
*
|
|
3217
|
-
* `jobs.
|
|
3513
|
+
* `jobs.positions:create`
|
|
3218
3514
|
*
|
|
3219
3515
|
*/
|
|
3220
|
-
static
|
|
3516
|
+
static createPosition(options) {
|
|
3221
3517
|
return (options.client ?? client).post({
|
|
3222
3518
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3223
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3519
|
+
url: '/api/v1/jobs/{job_id}/positions',
|
|
3224
3520
|
...options,
|
|
3225
3521
|
headers: {
|
|
3226
3522
|
'Content-Type': 'application/json',
|
|
@@ -3229,64 +3525,62 @@ export class JobWageDeterminations {
|
|
|
3229
3525
|
});
|
|
3230
3526
|
}
|
|
3231
3527
|
/**
|
|
3232
|
-
* Delete
|
|
3528
|
+
* Delete position on job
|
|
3529
|
+
*
|
|
3530
|
+
* Deletes a position that has no logged work and no restricting
|
|
3531
|
+
* associations. A position still referenced by time entries,
|
|
3532
|
+
* time-card per diems, completion positions, or aggregate logged
|
|
3533
|
+
* work is refused with a `422`. An unused position returns `204`
|
|
3534
|
+
* and is gone from a later GET.
|
|
3535
|
+
*
|
|
3233
3536
|
*
|
|
3234
3537
|
* **Required scope:**
|
|
3235
3538
|
*
|
|
3236
|
-
* `jobs.
|
|
3539
|
+
* `jobs.positions:delete`
|
|
3237
3540
|
*
|
|
3238
3541
|
*/
|
|
3239
|
-
static
|
|
3542
|
+
static deletePosition(options) {
|
|
3240
3543
|
return (options.client ?? client).delete({
|
|
3241
3544
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3242
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3545
|
+
url: '/api/v1/jobs/{job_id}/positions/{id}',
|
|
3243
3546
|
...options
|
|
3244
3547
|
});
|
|
3245
3548
|
}
|
|
3246
3549
|
/**
|
|
3247
|
-
* Show
|
|
3550
|
+
* Show position on job
|
|
3551
|
+
*
|
|
3552
|
+
* Returns one position on the named job. A missing, misnested, or
|
|
3553
|
+
* out-of-scope id reads as not found.
|
|
3554
|
+
*
|
|
3248
3555
|
*
|
|
3249
3556
|
* **Required scope:**
|
|
3250
3557
|
*
|
|
3251
|
-
* `jobs.
|
|
3558
|
+
* `jobs.positions:read`
|
|
3252
3559
|
*
|
|
3253
3560
|
*/
|
|
3254
|
-
static
|
|
3561
|
+
static getPosition(options) {
|
|
3255
3562
|
return (options.client ?? client).get({
|
|
3256
3563
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3257
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3564
|
+
url: '/api/v1/jobs/{job_id}/positions/{id}',
|
|
3258
3565
|
...options
|
|
3259
3566
|
});
|
|
3260
3567
|
}
|
|
3261
3568
|
/**
|
|
3262
|
-
* Update
|
|
3263
|
-
*
|
|
3264
|
-
* Edit a determination's values from `effective_from` forward: every version
|
|
3265
|
-
* starting at or after that instant takes the new values, and earlier
|
|
3266
|
-
* versions are untouched. Where an edit starts inside a version and changes
|
|
3267
|
-
* its values, a boundary is created at `effective_from` so the change applies
|
|
3268
|
-
* only from there.
|
|
3269
|
-
*
|
|
3270
|
-
* This rewrites what the determination said, not when it existed — moving
|
|
3271
|
-
* either end of the timeline is `genesis` or `scheduled_termination`.
|
|
3272
|
-
*
|
|
3273
|
-
* `pwa_trade_id` is the exception: a trade regroups the whole determination
|
|
3274
|
-
* at once, so it moves every version rather than applying from
|
|
3275
|
-
* `effective_from`. A determination cascaded from a project mirrors that
|
|
3276
|
-
* project's determination and cannot be edited here — change it on the project.
|
|
3569
|
+
* Update position on job
|
|
3277
3570
|
*
|
|
3278
|
-
*
|
|
3571
|
+
* cash_fringe_rate_cents, hourly_rate_cents, pwa_wage_pay_rate_cents and
|
|
3572
|
+
* wage_adder_rate_cents are admin only on user-scoped keys.
|
|
3279
3573
|
*
|
|
3280
3574
|
*
|
|
3281
3575
|
* **Required scope:**
|
|
3282
3576
|
*
|
|
3283
|
-
* `jobs.
|
|
3577
|
+
* `jobs.positions:update`
|
|
3284
3578
|
*
|
|
3285
3579
|
*/
|
|
3286
|
-
static
|
|
3580
|
+
static updatePosition(options) {
|
|
3287
3581
|
return (options.client ?? client).patch({
|
|
3288
3582
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3289
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3583
|
+
url: '/api/v1/jobs/{job_id}/positions/{id}',
|
|
3290
3584
|
...options,
|
|
3291
3585
|
headers: {
|
|
3292
3586
|
'Content-Type': 'application/json',
|
|
@@ -3294,35 +3588,51 @@ export class JobWageDeterminations {
|
|
|
3294
3588
|
}
|
|
3295
3589
|
});
|
|
3296
3590
|
}
|
|
3297
|
-
}
|
|
3298
|
-
export class Jobs {
|
|
3299
3591
|
/**
|
|
3300
|
-
* List
|
|
3592
|
+
* List job templates
|
|
3301
3593
|
*
|
|
3302
3594
|
* **Required scope:**
|
|
3303
3595
|
*
|
|
3304
|
-
* `jobs:read`
|
|
3596
|
+
* `jobs.templates:read`
|
|
3305
3597
|
*
|
|
3306
3598
|
*/
|
|
3307
|
-
static
|
|
3599
|
+
static listTemplates(options) {
|
|
3308
3600
|
return (options?.client ?? client).get({
|
|
3309
3601
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3310
|
-
url: '/api/v1/jobs',
|
|
3602
|
+
url: '/api/v1/jobs/templates',
|
|
3311
3603
|
...options
|
|
3312
3604
|
});
|
|
3313
3605
|
}
|
|
3606
|
+
}
|
|
3607
|
+
export class JobWageDeterminations {
|
|
3314
3608
|
/**
|
|
3315
|
-
*
|
|
3609
|
+
* Shift job wage determination genesis
|
|
3610
|
+
*
|
|
3611
|
+
* Move when a determination's timeline begins. Shifting it earlier extends
|
|
3612
|
+
* the first version back; shifting it later drops the coverage before it,
|
|
3613
|
+
* and what that removes stops being readable through `as_of[valid]` and
|
|
3614
|
+
* `/history`.
|
|
3615
|
+
*
|
|
3616
|
+
* This changes *when* the determination existed rather than what it said —
|
|
3617
|
+
* no version's attributes are rewritten. Moving the other end of the timeline
|
|
3618
|
+
* is `scheduled_termination`, and changing a version's values is the
|
|
3619
|
+
* determination update.
|
|
3620
|
+
*
|
|
3621
|
+
* A shift to or past a scheduled termination is refused with `422`, since it
|
|
3622
|
+
* would leave no coverage at all.
|
|
3623
|
+
*
|
|
3624
|
+
* Conditional: send the determination's `ETag` as `If-Match`.
|
|
3625
|
+
*
|
|
3316
3626
|
*
|
|
3317
3627
|
* **Required scope:**
|
|
3318
3628
|
*
|
|
3319
|
-
* `jobs:
|
|
3629
|
+
* `jobs.wage_determinations.genesis:update`
|
|
3320
3630
|
*
|
|
3321
3631
|
*/
|
|
3322
|
-
static
|
|
3323
|
-
return (options.client ?? client).
|
|
3632
|
+
static shiftJobWageDeterminationGenesis(options) {
|
|
3633
|
+
return (options.client ?? client).patch({
|
|
3324
3634
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3325
|
-
url: '/api/v1/jobs',
|
|
3635
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/genesis',
|
|
3326
3636
|
...options,
|
|
3327
3637
|
headers: {
|
|
3328
3638
|
'Content-Type': 'application/json',
|
|
@@ -3331,32 +3641,76 @@ export class Jobs {
|
|
|
3331
3641
|
});
|
|
3332
3642
|
}
|
|
3333
3643
|
/**
|
|
3334
|
-
*
|
|
3644
|
+
* List job wage determination version history
|
|
3645
|
+
*
|
|
3646
|
+
* A determination's whole valid-time sequence, newest window first and
|
|
3647
|
+
* cursor-paginated. Each entry is a full determination carrying its own
|
|
3648
|
+
* `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
|
|
3649
|
+
* `current` or `historical`, and the `corrections` that version replaced —
|
|
3650
|
+
* each itself a full determination as previously recorded, so a client
|
|
3651
|
+
* that wants a field-level diff compares two of them. An entry carries
|
|
3652
|
+
* the family key as `job_wage_determination_id` and no `id` or `uid` of
|
|
3653
|
+
* its own — every version shares the family key, so versions are told
|
|
3654
|
+
* apart by their window coordinates. `as_of[valid]` is
|
|
3655
|
+
* rejected, since pinning a point on the valid axis would collapse the
|
|
3656
|
+
* sequence this endpoint returns, and a determination records no
|
|
3657
|
+
* transaction axis to read `as_of[transaction]` against.
|
|
3658
|
+
*
|
|
3335
3659
|
*
|
|
3336
3660
|
* **Required scope:**
|
|
3337
3661
|
*
|
|
3338
|
-
* `jobs:read`
|
|
3662
|
+
* `jobs.wage_determinations.history:read`
|
|
3339
3663
|
*
|
|
3340
3664
|
*/
|
|
3341
|
-
static
|
|
3665
|
+
static listJobWageDeterminationHistory(options) {
|
|
3342
3666
|
return (options.client ?? client).get({
|
|
3343
3667
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3344
|
-
url: '/api/v1/jobs/{
|
|
3668
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/history',
|
|
3345
3669
|
...options
|
|
3346
3670
|
});
|
|
3347
3671
|
}
|
|
3348
3672
|
/**
|
|
3349
|
-
*
|
|
3673
|
+
* Cancel scheduled changes on job wage determination
|
|
3350
3674
|
*
|
|
3351
3675
|
* **Required scope:**
|
|
3352
3676
|
*
|
|
3353
|
-
* `jobs:
|
|
3677
|
+
* `jobs.wage_determinations.scheduled_changes:delete`
|
|
3354
3678
|
*
|
|
3355
3679
|
*/
|
|
3356
|
-
static
|
|
3357
|
-
return (options.client ?? client).
|
|
3680
|
+
static cancelJobWageDeterminationScheduledChanges(options) {
|
|
3681
|
+
return (options.client ?? client).delete({
|
|
3358
3682
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3359
|
-
url: '/api/v1/jobs/{
|
|
3683
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/scheduled_changes',
|
|
3684
|
+
...options
|
|
3685
|
+
});
|
|
3686
|
+
}
|
|
3687
|
+
/**
|
|
3688
|
+
* List scheduled changes for job wage determination
|
|
3689
|
+
*
|
|
3690
|
+
* **Required scope:**
|
|
3691
|
+
*
|
|
3692
|
+
* `jobs.wage_determinations.scheduled_changes:read`
|
|
3693
|
+
*
|
|
3694
|
+
*/
|
|
3695
|
+
static listJobWageDeterminationScheduledChanges(options) {
|
|
3696
|
+
return (options.client ?? client).get({
|
|
3697
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3698
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/scheduled_changes',
|
|
3699
|
+
...options
|
|
3700
|
+
});
|
|
3701
|
+
}
|
|
3702
|
+
/**
|
|
3703
|
+
* Schedule effective-dated change on job wage determination
|
|
3704
|
+
*
|
|
3705
|
+
* **Required scope:**
|
|
3706
|
+
*
|
|
3707
|
+
* `jobs.wage_determinations.scheduled_changes:create`
|
|
3708
|
+
*
|
|
3709
|
+
*/
|
|
3710
|
+
static scheduleJobWageDeterminationChange(options) {
|
|
3711
|
+
return (options.client ?? client).post({
|
|
3712
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3713
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/scheduled_changes',
|
|
3360
3714
|
...options,
|
|
3361
3715
|
headers: {
|
|
3362
3716
|
'Content-Type': 'application/json',
|
|
@@ -3365,32 +3719,43 @@ export class Jobs {
|
|
|
3365
3719
|
});
|
|
3366
3720
|
}
|
|
3367
3721
|
/**
|
|
3368
|
-
*
|
|
3722
|
+
* Cancel scheduled termination on job wage determination
|
|
3369
3723
|
*
|
|
3370
3724
|
* **Required scope:**
|
|
3371
3725
|
*
|
|
3372
|
-
* `jobs.
|
|
3726
|
+
* `jobs.wage_determinations.scheduled_terminations:delete`
|
|
3373
3727
|
*
|
|
3374
3728
|
*/
|
|
3375
|
-
static
|
|
3376
|
-
return (options.client ?? client).
|
|
3729
|
+
static cancelJobWageDeterminationScheduledTermination(options) {
|
|
3730
|
+
return (options.client ?? client).delete({
|
|
3377
3731
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3378
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3732
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/scheduled_termination',
|
|
3379
3733
|
...options
|
|
3380
3734
|
});
|
|
3381
3735
|
}
|
|
3382
3736
|
/**
|
|
3383
|
-
*
|
|
3737
|
+
* Schedule termination on job wage determination
|
|
3738
|
+
*
|
|
3739
|
+
* End a determination's valid coverage at `effective_date`: segments beyond
|
|
3740
|
+
* it are dropped and one spanning it is truncated, so the determination stops
|
|
3741
|
+
* being valid from that point on. Earlier versions are untouched and stay
|
|
3742
|
+
* readable through `as_of[valid]` and `/history`.
|
|
3743
|
+
*
|
|
3744
|
+
* Moving an end is cancel-then-schedule: cancel the standing termination,
|
|
3745
|
+
* then schedule the one you want.
|
|
3746
|
+
*
|
|
3747
|
+
* Conditional: send the determination's `ETag` as `If-Match`.
|
|
3748
|
+
*
|
|
3384
3749
|
*
|
|
3385
3750
|
* **Required scope:**
|
|
3386
3751
|
*
|
|
3387
|
-
* `jobs.
|
|
3752
|
+
* `jobs.wage_determinations.scheduled_terminations:create`
|
|
3388
3753
|
*
|
|
3389
3754
|
*/
|
|
3390
|
-
static
|
|
3755
|
+
static scheduleJobWageDeterminationTermination(options) {
|
|
3391
3756
|
return (options.client ?? client).post({
|
|
3392
3757
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3393
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3758
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/scheduled_termination',
|
|
3394
3759
|
...options,
|
|
3395
3760
|
headers: {
|
|
3396
3761
|
'Content-Type': 'application/json',
|
|
@@ -3399,17 +3764,32 @@ export class Jobs {
|
|
|
3399
3764
|
});
|
|
3400
3765
|
}
|
|
3401
3766
|
/**
|
|
3402
|
-
*
|
|
3767
|
+
* List job wage determinations
|
|
3403
3768
|
*
|
|
3404
3769
|
* **Required scope:**
|
|
3405
3770
|
*
|
|
3406
|
-
* `jobs.
|
|
3771
|
+
* `jobs.wage_determinations:read`
|
|
3407
3772
|
*
|
|
3408
3773
|
*/
|
|
3409
|
-
static
|
|
3410
|
-
return (options.client ?? client).
|
|
3774
|
+
static listJobWageDeterminations(options) {
|
|
3775
|
+
return (options.client ?? client).get({
|
|
3411
3776
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3412
|
-
url: '/api/v1/jobs/{job_id}/
|
|
3777
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations',
|
|
3778
|
+
...options
|
|
3779
|
+
});
|
|
3780
|
+
}
|
|
3781
|
+
/**
|
|
3782
|
+
* Create job wage determination
|
|
3783
|
+
*
|
|
3784
|
+
* **Required scope:**
|
|
3785
|
+
*
|
|
3786
|
+
* `jobs.wage_determinations:create`
|
|
3787
|
+
*
|
|
3788
|
+
*/
|
|
3789
|
+
static createWageDetermination(options) {
|
|
3790
|
+
return (options.client ?? client).post({
|
|
3791
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3792
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations',
|
|
3413
3793
|
...options,
|
|
3414
3794
|
headers: {
|
|
3415
3795
|
'Content-Type': 'application/json',
|
|
@@ -3418,20 +3798,71 @@ export class Jobs {
|
|
|
3418
3798
|
});
|
|
3419
3799
|
}
|
|
3420
3800
|
/**
|
|
3421
|
-
*
|
|
3801
|
+
* Delete job wage determination
|
|
3422
3802
|
*
|
|
3423
3803
|
* **Required scope:**
|
|
3424
3804
|
*
|
|
3425
|
-
* `jobs.
|
|
3805
|
+
* `jobs.wage_determinations:delete`
|
|
3426
3806
|
*
|
|
3427
3807
|
*/
|
|
3428
|
-
static
|
|
3429
|
-
return (options
|
|
3808
|
+
static deleteWageDetermination(options) {
|
|
3809
|
+
return (options.client ?? client).delete({
|
|
3430
3810
|
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3431
|
-
url: '/api/v1/jobs/
|
|
3811
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations/{id}',
|
|
3812
|
+
...options
|
|
3813
|
+
});
|
|
3814
|
+
}
|
|
3815
|
+
/**
|
|
3816
|
+
* Show job wage determination
|
|
3817
|
+
*
|
|
3818
|
+
* **Required scope:**
|
|
3819
|
+
*
|
|
3820
|
+
* `jobs.wage_determinations:read`
|
|
3821
|
+
*
|
|
3822
|
+
*/
|
|
3823
|
+
static getJobWageDetermination(options) {
|
|
3824
|
+
return (options.client ?? client).get({
|
|
3825
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3826
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations/{id}',
|
|
3432
3827
|
...options
|
|
3433
3828
|
});
|
|
3434
3829
|
}
|
|
3830
|
+
/**
|
|
3831
|
+
* Update job wage determination
|
|
3832
|
+
*
|
|
3833
|
+
* Edit a determination's values from `effective_from` forward: every version
|
|
3834
|
+
* starting at or after that instant takes the new values, and earlier
|
|
3835
|
+
* versions are untouched. Where an edit starts inside a version and changes
|
|
3836
|
+
* its values, a boundary is created at `effective_from` so the change applies
|
|
3837
|
+
* only from there.
|
|
3838
|
+
*
|
|
3839
|
+
* This rewrites what the determination said, not when it existed — moving
|
|
3840
|
+
* either end of the timeline is `genesis` or `scheduled_termination`.
|
|
3841
|
+
*
|
|
3842
|
+
* `pwa_trade_id` is the exception: a trade regroups the whole determination
|
|
3843
|
+
* at once, so it moves every version rather than applying from
|
|
3844
|
+
* `effective_from`. A determination cascaded from a project mirrors that
|
|
3845
|
+
* project's determination and cannot be edited here — change it on the project.
|
|
3846
|
+
*
|
|
3847
|
+
* Conditional: send the determination's `ETag` as `If-Match`.
|
|
3848
|
+
*
|
|
3849
|
+
*
|
|
3850
|
+
* **Required scope:**
|
|
3851
|
+
*
|
|
3852
|
+
* `jobs.wage_determinations:update`
|
|
3853
|
+
*
|
|
3854
|
+
*/
|
|
3855
|
+
static updateJobWageDetermination(options) {
|
|
3856
|
+
return (options.client ?? client).patch({
|
|
3857
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3858
|
+
url: '/api/v1/jobs/{job_id}/wage_determinations/{id}',
|
|
3859
|
+
...options,
|
|
3860
|
+
headers: {
|
|
3861
|
+
'Content-Type': 'application/json',
|
|
3862
|
+
...options.headers
|
|
3863
|
+
}
|
|
3864
|
+
});
|
|
3865
|
+
}
|
|
3435
3866
|
}
|
|
3436
3867
|
export class OpenApi {
|
|
3437
3868
|
/**
|
|
@@ -4085,6 +4516,27 @@ export class PayRateRulePackages {
|
|
|
4085
4516
|
}
|
|
4086
4517
|
});
|
|
4087
4518
|
}
|
|
4519
|
+
/**
|
|
4520
|
+
* Delete a pay rate rule package
|
|
4521
|
+
*
|
|
4522
|
+
* Permanently remove a pay rate rule package. An unused package (no rules,
|
|
4523
|
+
* positions, job or project wage determinations, or employments) returns
|
|
4524
|
+
* `204` and is gone from a later GET. A package still referenced is refused
|
|
4525
|
+
* with `422` `destroy_restricted`.
|
|
4526
|
+
*
|
|
4527
|
+
*
|
|
4528
|
+
* **Required scope:**
|
|
4529
|
+
*
|
|
4530
|
+
* `pay.rates.rule_packages:delete`
|
|
4531
|
+
*
|
|
4532
|
+
*/
|
|
4533
|
+
static deletePayRateRulePackage(options) {
|
|
4534
|
+
return (options.client ?? client).delete({
|
|
4535
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4536
|
+
url: '/api/v1/pay/rates/rule_packages/{id}',
|
|
4537
|
+
...options
|
|
4538
|
+
});
|
|
4539
|
+
}
|
|
4088
4540
|
/**
|
|
4089
4541
|
* Get a pay rate rule package
|
|
4090
4542
|
*
|
|
@@ -4100,6 +4552,30 @@ export class PayRateRulePackages {
|
|
|
4100
4552
|
...options
|
|
4101
4553
|
});
|
|
4102
4554
|
}
|
|
4555
|
+
/**
|
|
4556
|
+
* Update a pay rate rule package
|
|
4557
|
+
*
|
|
4558
|
+
* Rename or re-describe a pay rate rule package. Only supplied fields change.
|
|
4559
|
+
* `default`, `selectable`, and `scoped_to_job_id` are not writable — those
|
|
4560
|
+
* remain the values set at create (or by the web door).
|
|
4561
|
+
*
|
|
4562
|
+
*
|
|
4563
|
+
* **Required scope:**
|
|
4564
|
+
*
|
|
4565
|
+
* `pay.rates.rule_packages:update`
|
|
4566
|
+
*
|
|
4567
|
+
*/
|
|
4568
|
+
static updatePayRateRulePackage(options) {
|
|
4569
|
+
return (options.client ?? client).patch({
|
|
4570
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4571
|
+
url: '/api/v1/pay/rates/rule_packages/{id}',
|
|
4572
|
+
...options,
|
|
4573
|
+
headers: {
|
|
4574
|
+
'Content-Type': 'application/json',
|
|
4575
|
+
...options.headers
|
|
4576
|
+
}
|
|
4577
|
+
});
|
|
4578
|
+
}
|
|
4103
4579
|
}
|
|
4104
4580
|
export class AggregateTimeImports {
|
|
4105
4581
|
/**
|
|
@@ -4847,9 +5323,10 @@ export class People {
|
|
|
4847
5323
|
*
|
|
4848
5324
|
* Every valid-time version of one employment stint, newest first. Each
|
|
4849
5325
|
* entry uses `people_employment_id` rather than an entry-level id and
|
|
4850
|
-
* includes prior recorded
|
|
4851
|
-
* coworker history, but direct monetary
|
|
4852
|
-
* own employment in versions and
|
|
5326
|
+
* includes prior corrections recorded at the credential company.
|
|
5327
|
+
* Company managers may read coworker history, but direct monetary
|
|
5328
|
+
* fields are limited to their own employment in versions and
|
|
5329
|
+
* corrections.
|
|
4853
5330
|
*
|
|
4854
5331
|
*
|
|
4855
5332
|
* **Required scope:**
|
|
@@ -5403,6 +5880,119 @@ export class ProductionCompletions {
|
|
|
5403
5880
|
});
|
|
5404
5881
|
}
|
|
5405
5882
|
}
|
|
5883
|
+
export class ProjectSites {
|
|
5884
|
+
/**
|
|
5885
|
+
* List project sites
|
|
5886
|
+
*
|
|
5887
|
+
* Returns the project's site assignments (`ProjectSite` joins). Path `{id}`
|
|
5888
|
+
* on the member routes is the join id, not the Site id. A participating-company
|
|
5889
|
+
* key may list joins on a project it can see; a user-scoped key of a
|
|
5890
|
+
* participating company cannot, because web project visibility does not include
|
|
5891
|
+
* participating projects.
|
|
5892
|
+
*
|
|
5893
|
+
*
|
|
5894
|
+
* **Required scope:**
|
|
5895
|
+
*
|
|
5896
|
+
* `projects.sites:read`
|
|
5897
|
+
*
|
|
5898
|
+
*/
|
|
5899
|
+
static listProjectSites(options) {
|
|
5900
|
+
return (options.client ?? client).get({
|
|
5901
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
5902
|
+
url: '/api/v1/projects/{project_id}/sites',
|
|
5903
|
+
...options
|
|
5904
|
+
});
|
|
5905
|
+
}
|
|
5906
|
+
/**
|
|
5907
|
+
* Create a project site
|
|
5908
|
+
*
|
|
5909
|
+
* Attaches a site to the project. `site_id` is required; `feature_ids` is
|
|
5910
|
+
* optional and scopes which of that site's features apply. The project is
|
|
5911
|
+
* taken from the path. Writes are owner-only: a participating-company key
|
|
5912
|
+
* that can GET the project receives 403. Duplicate `(project, site)` pairs
|
|
5913
|
+
* are 422. A site that is not public and not owned by the project's owner
|
|
5914
|
+
* is 422 when visible, or 404 when the key cannot see the site.
|
|
5915
|
+
*
|
|
5916
|
+
*
|
|
5917
|
+
* **Required scope:**
|
|
5918
|
+
*
|
|
5919
|
+
* `projects.sites:create`
|
|
5920
|
+
*
|
|
5921
|
+
*/
|
|
5922
|
+
static createProjectSite(options) {
|
|
5923
|
+
return (options.client ?? client).post({
|
|
5924
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
5925
|
+
url: '/api/v1/projects/{project_id}/sites',
|
|
5926
|
+
...options,
|
|
5927
|
+
headers: {
|
|
5928
|
+
'Content-Type': 'application/json',
|
|
5929
|
+
...options.headers
|
|
5930
|
+
}
|
|
5931
|
+
});
|
|
5932
|
+
}
|
|
5933
|
+
/**
|
|
5934
|
+
* Delete a project site
|
|
5935
|
+
*
|
|
5936
|
+
* Removes the project–site join. The Site itself is not destroyed. Writes
|
|
5937
|
+
* are owner-only.
|
|
5938
|
+
*
|
|
5939
|
+
*
|
|
5940
|
+
* **Required scope:**
|
|
5941
|
+
*
|
|
5942
|
+
* `projects.sites:delete`
|
|
5943
|
+
*
|
|
5944
|
+
*/
|
|
5945
|
+
static deleteProjectSite(options) {
|
|
5946
|
+
return (options.client ?? client).delete({
|
|
5947
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
5948
|
+
url: '/api/v1/projects/{project_id}/sites/{id}',
|
|
5949
|
+
...options
|
|
5950
|
+
});
|
|
5951
|
+
}
|
|
5952
|
+
/**
|
|
5953
|
+
* Show a project site
|
|
5954
|
+
*
|
|
5955
|
+
* Returns one project–site join. A missing, mismatched, or out-of-scope id
|
|
5956
|
+
* reads as not found.
|
|
5957
|
+
*
|
|
5958
|
+
*
|
|
5959
|
+
* **Required scope:**
|
|
5960
|
+
*
|
|
5961
|
+
* `projects.sites:read`
|
|
5962
|
+
*
|
|
5963
|
+
*/
|
|
5964
|
+
static getProjectSite(options) {
|
|
5965
|
+
return (options.client ?? client).get({
|
|
5966
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
5967
|
+
url: '/api/v1/projects/{project_id}/sites/{id}',
|
|
5968
|
+
...options
|
|
5969
|
+
});
|
|
5970
|
+
}
|
|
5971
|
+
/**
|
|
5972
|
+
* Update a project site
|
|
5973
|
+
*
|
|
5974
|
+
* Replaces `feature_ids` on the join. Send an empty array to clear features.
|
|
5975
|
+
* `site_id` is create-only; naming it on PATCH is a 400. Writes are
|
|
5976
|
+
* owner-only.
|
|
5977
|
+
*
|
|
5978
|
+
*
|
|
5979
|
+
* **Required scope:**
|
|
5980
|
+
*
|
|
5981
|
+
* `projects.sites:update`
|
|
5982
|
+
*
|
|
5983
|
+
*/
|
|
5984
|
+
static updateProjectSite(options) {
|
|
5985
|
+
return (options.client ?? client).patch({
|
|
5986
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
5987
|
+
url: '/api/v1/projects/{project_id}/sites/{id}',
|
|
5988
|
+
...options,
|
|
5989
|
+
headers: {
|
|
5990
|
+
'Content-Type': 'application/json',
|
|
5991
|
+
...options.headers
|
|
5992
|
+
}
|
|
5993
|
+
});
|
|
5994
|
+
}
|
|
5995
|
+
}
|
|
5406
5996
|
export class Projects {
|
|
5407
5997
|
/**
|
|
5408
5998
|
* List projects
|
|
@@ -5492,9 +6082,11 @@ export class Projects {
|
|
|
5492
6082
|
* switching it to `none` clears the stored values and forces `asset_owner`
|
|
5493
6083
|
* false, and sending one of them while federal tracking is off — even as null —
|
|
5494
6084
|
* returns 422. `budget_currency` defaults to USD when blank. `parent_id` moves
|
|
5495
|
-
* or detaches the project
|
|
5496
|
-
*
|
|
5497
|
-
*
|
|
6085
|
+
* or detaches the project; a project whose parent no longer lists its owner
|
|
6086
|
+
* still accepts updates that keep that parent. `participating_company_ids`
|
|
6087
|
+
* replaces the complete set of participating companies. Remove a participant's
|
|
6088
|
+
* jobs before removing it from this set. Only the owning company may update the
|
|
6089
|
+
* project.
|
|
5498
6090
|
*
|
|
5499
6091
|
*
|
|
5500
6092
|
* **Required scope:**
|
|
@@ -5534,6 +6126,25 @@ export class Users {
|
|
|
5534
6126
|
}
|
|
5535
6127
|
});
|
|
5536
6128
|
}
|
|
6129
|
+
/**
|
|
6130
|
+
* Delete PWA company user details
|
|
6131
|
+
*
|
|
6132
|
+
* Deletes the PWA company-user details row. A missing or out-of-scope
|
|
6133
|
+
* id reads as not found. Delete removes the row; it does not archive.
|
|
6134
|
+
*
|
|
6135
|
+
*
|
|
6136
|
+
* **Required scope:**
|
|
6137
|
+
*
|
|
6138
|
+
* `pwa.company_user_details:delete`
|
|
6139
|
+
*
|
|
6140
|
+
*/
|
|
6141
|
+
static deleteCompanyUserDetail(options) {
|
|
6142
|
+
return (options.client ?? client).delete({
|
|
6143
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6144
|
+
url: '/api/v1/pwa/company_user_details/{id}',
|
|
6145
|
+
...options
|
|
6146
|
+
});
|
|
6147
|
+
}
|
|
5537
6148
|
/**
|
|
5538
6149
|
* Update PWA company user details
|
|
5539
6150
|
*
|
|
@@ -5711,6 +6322,14 @@ export class Users {
|
|
|
5711
6322
|
/**
|
|
5712
6323
|
* List users
|
|
5713
6324
|
*
|
|
6325
|
+
* Workers the credential company sees: people it employs, has
|
|
6326
|
+
* granted a role, or has invited. Direct monetary employment
|
|
6327
|
+
* fields (`hourly_rate`, `training_annual_amount`,
|
|
6328
|
+
* `employer_combined_health_amount`, `employer_combined_savings`)
|
|
6329
|
+
* are present for company keys, company administrators, and the
|
|
6330
|
+
* employed person, and omitted for other user keys.
|
|
6331
|
+
*
|
|
6332
|
+
*
|
|
5714
6333
|
* **Required scope:**
|
|
5715
6334
|
*
|
|
5716
6335
|
* `users:read`
|
|
@@ -5745,6 +6364,13 @@ export class Users {
|
|
|
5745
6364
|
/**
|
|
5746
6365
|
* Show user
|
|
5747
6366
|
*
|
|
6367
|
+
* Direct monetary employment fields (`hourly_rate`,
|
|
6368
|
+
* `training_annual_amount`, `employer_combined_health_amount`,
|
|
6369
|
+
* `employer_combined_savings`) are present for company keys,
|
|
6370
|
+
* company administrators, and the employed person, and omitted
|
|
6371
|
+
* for other user keys.
|
|
6372
|
+
*
|
|
6373
|
+
*
|
|
5748
6374
|
* **Required scope:**
|
|
5749
6375
|
*
|
|
5750
6376
|
* `users:read`
|
|
@@ -5845,6 +6471,27 @@ export class PwaTradeApprenticeScope {
|
|
|
5845
6471
|
...options
|
|
5846
6472
|
});
|
|
5847
6473
|
}
|
|
6474
|
+
/**
|
|
6475
|
+
* Show apprentice scope decision
|
|
6476
|
+
*
|
|
6477
|
+
* Returns one reviewed (occupation, craft) pair on this trade. The payload is
|
|
6478
|
+
* the same object create, update, and destroy already serialize. A missing,
|
|
6479
|
+
* mismatched, or out-of-scope id is not found. Reading follows the trade;
|
|
6480
|
+
* employer enrollment is not required.
|
|
6481
|
+
*
|
|
6482
|
+
*
|
|
6483
|
+
* **Required scope:**
|
|
6484
|
+
*
|
|
6485
|
+
* `pwa.trades.apprenticeship_occupations:read`
|
|
6486
|
+
*
|
|
6487
|
+
*/
|
|
6488
|
+
static getApprenticeshipOccupation(options) {
|
|
6489
|
+
return (options.client ?? client).get({
|
|
6490
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6491
|
+
url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations/{id}',
|
|
6492
|
+
...options
|
|
6493
|
+
});
|
|
6494
|
+
}
|
|
5848
6495
|
/**
|
|
5849
6496
|
* Flip an apprentice scope decision
|
|
5850
6497
|
*
|
|
@@ -6106,7 +6753,8 @@ export class PriorPeriodAdjustments {
|
|
|
6106
6753
|
* Permanently remove an adjustment, for undoing one recorded in error. The removed
|
|
6107
6754
|
* adjustment is returned. Its allocation is freed back to the funding line item and
|
|
6108
6755
|
* the time card's actuals rebuild, so the job's balance due rises by this amount.
|
|
6109
|
-
*
|
|
6756
|
+
* To change amount, job, rationale, notes, or PWA eligibility, PATCH the same
|
|
6757
|
+
* resource instead.
|
|
6110
6758
|
*
|
|
6111
6759
|
*
|
|
6112
6760
|
* **Required scope:**
|
|
@@ -6136,6 +6784,31 @@ export class PriorPeriodAdjustments {
|
|
|
6136
6784
|
...options
|
|
6137
6785
|
});
|
|
6138
6786
|
}
|
|
6787
|
+
/**
|
|
6788
|
+
* Update Prior Period Adjustment
|
|
6789
|
+
*
|
|
6790
|
+
* Change amount, job, rationale, notes, or PWA eligibility on an existing
|
|
6791
|
+
* adjustment. The updated adjustment is returned and the time card's actuals
|
|
6792
|
+
* rebuild. The funding line item, recording user, time card, and adjustment
|
|
6793
|
+
* type cannot be changed on this path.
|
|
6794
|
+
*
|
|
6795
|
+
*
|
|
6796
|
+
* **Required scope:**
|
|
6797
|
+
*
|
|
6798
|
+
* `time_cards.prior_period_adjustments:update`
|
|
6799
|
+
*
|
|
6800
|
+
*/
|
|
6801
|
+
static updatePriorPeriodAdjustment(options) {
|
|
6802
|
+
return (options.client ?? client).patch({
|
|
6803
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6804
|
+
url: '/api/v1/time_cards/{time_card_id}/prior_period_adjustments/{id}',
|
|
6805
|
+
...options,
|
|
6806
|
+
headers: {
|
|
6807
|
+
'Content-Type': 'application/json',
|
|
6808
|
+
...options.headers
|
|
6809
|
+
}
|
|
6810
|
+
});
|
|
6811
|
+
}
|
|
6139
6812
|
}
|
|
6140
6813
|
export class TimeCardPwaCompliance {
|
|
6141
6814
|
/**
|
|
@@ -6236,7 +6909,8 @@ export class TimeEntries {
|
|
|
6236
6909
|
* Create time entry
|
|
6237
6910
|
*
|
|
6238
6911
|
* Create a time entry. Required: timekeeping_time_card_id, start_time, and end_time;
|
|
6239
|
-
* user_id is derived server-side from the time card
|
|
6912
|
+
* user_id is derived server-side from the time card, and a time card outside
|
|
6913
|
+
* the key's scope is not found (404). Both start_time and
|
|
6240
6914
|
* end_time must fall on a whole-minute boundary (nonzero seconds are
|
|
6241
6915
|
* rejected); start_time must fall within the time card's pay period, and
|
|
6242
6916
|
* end_time must be after start_time. Optional job_id (the worker must have a
|
|
@@ -6244,10 +6918,8 @@ export class TimeEntries {
|
|
|
6244
6918
|
* company's default timecodes), state, description, hourly_rate_cents (derived
|
|
6245
6919
|
* from the position/user default when omitted), and feature_ids. Supplying
|
|
6246
6920
|
* feature_ids — or setting feature_allocation_acknowledged true — satisfies a
|
|
6247
|
-
* job that requires a feature allocation.
|
|
6248
|
-
*
|
|
6249
|
-
* any other user-scoped key that sends it, null included, is forbidden (403)
|
|
6250
|
-
* and nothing is created.
|
|
6921
|
+
* job that requires a feature allocation. hourly_rate_cents is admin only on
|
|
6922
|
+
* user-scoped keys.
|
|
6251
6923
|
*
|
|
6252
6924
|
*
|
|
6253
6925
|
* **Required scope:**
|
|
@@ -6289,21 +6961,42 @@ export class TimeEntries {
|
|
|
6289
6961
|
...options
|
|
6290
6962
|
});
|
|
6291
6963
|
}
|
|
6964
|
+
/**
|
|
6965
|
+
* Show time entry
|
|
6966
|
+
*
|
|
6967
|
+
* Fetch one time entry by id. The response is the same object the list,
|
|
6968
|
+
* create, and update doors serialize. An entry outside the key's read
|
|
6969
|
+
* scope is not found (404), including a colleague's entry for a
|
|
6970
|
+
* technician or field-lead key — even when that entry is writable via
|
|
6971
|
+
* PATCH.
|
|
6972
|
+
*
|
|
6973
|
+
*
|
|
6974
|
+
* **Required scope:**
|
|
6975
|
+
*
|
|
6976
|
+
* `time_entries:read`
|
|
6977
|
+
*
|
|
6978
|
+
*/
|
|
6979
|
+
static getTimeEntry(options) {
|
|
6980
|
+
return (options.client ?? client).get({
|
|
6981
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6982
|
+
url: '/api/v1/time_entries/{id}',
|
|
6983
|
+
...options
|
|
6984
|
+
});
|
|
6985
|
+
}
|
|
6292
6986
|
/**
|
|
6293
6987
|
* Update time entry
|
|
6294
6988
|
*
|
|
6295
6989
|
* Update an existing time entry by id; every field in the parameters is
|
|
6296
6990
|
* optional and only supplied fields change. An entry outside the key's scope
|
|
6297
|
-
* is not found (404).
|
|
6298
|
-
*
|
|
6299
|
-
* forbidden (403).
|
|
6300
|
-
*
|
|
6991
|
+
* is not found (404). An edit the key may not make to the entry as assigned,
|
|
6992
|
+
* such as a technician putting it on a job that requires clock-in, is
|
|
6993
|
+
* forbidden (403).
|
|
6994
|
+
* If the change would push categorized allocation minutes past the time card's
|
|
6995
|
+
* overtime eligible minutes, the request returns
|
|
6301
6996
|
* 422 unless confirm_allocation_conflict is sent true. The feature-allocation cap is
|
|
6302
6997
|
* enforced, and because a persisted feature_ids= writes its join rows
|
|
6303
6998
|
* immediately, a rejected save rolls them back within the enclosing
|
|
6304
|
-
* transaction.
|
|
6305
|
-
* is an admin in the entry's company; any other user-scoped key that sends
|
|
6306
|
-
* it, null included, is forbidden (403) and the entry is left unchanged.
|
|
6999
|
+
* transaction. hourly_rate_cents is admin only on user-scoped keys.
|
|
6307
7000
|
*
|
|
6308
7001
|
*
|
|
6309
7002
|
* **Required scope:**
|