@dsptch-work/api-client 0.13.0 → 0.14.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 +71 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +317 -2
- package/dist/gen/sdk.gen.js +484 -1
- package/dist/gen/types.gen.d.ts +1294 -21
- package/dist/gen/zod.gen.d.ts +1185 -2
- package/dist/gen/zod.gen.js +508 -1
- package/package.json +1 -1
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -2746,6 +2746,27 @@ export class PwaTrades {
|
|
|
2746
2746
|
...options
|
|
2747
2747
|
});
|
|
2748
2748
|
}
|
|
2749
|
+
/**
|
|
2750
|
+
* Delete Trade
|
|
2751
|
+
*
|
|
2752
|
+
* Deletes an empty craft. A trade still grouping wage determinations, or still
|
|
2753
|
+
* carrying apprentice-scope decisions, is refused with a `422` — deleting it would
|
|
2754
|
+
* orphan what points at it. Merge it into another craft instead, which moves the
|
|
2755
|
+
* determinations first.
|
|
2756
|
+
*
|
|
2757
|
+
*
|
|
2758
|
+
* **Required scope:**
|
|
2759
|
+
*
|
|
2760
|
+
* `pwa.trades:delete`
|
|
2761
|
+
*
|
|
2762
|
+
*/
|
|
2763
|
+
static deleteTrade(options) {
|
|
2764
|
+
return (options.client ?? client).delete({
|
|
2765
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
2766
|
+
url: '/api/v1/pwa/trades/{id}',
|
|
2767
|
+
...options
|
|
2768
|
+
});
|
|
2769
|
+
}
|
|
2749
2770
|
/**
|
|
2750
2771
|
* Show trade
|
|
2751
2772
|
*
|
|
@@ -2761,6 +2782,33 @@ export class PwaTrades {
|
|
|
2761
2782
|
...options
|
|
2762
2783
|
});
|
|
2763
2784
|
}
|
|
2785
|
+
/**
|
|
2786
|
+
* Rename Trade
|
|
2787
|
+
*
|
|
2788
|
+
* Renames the craft. The name is a display label the compliance engines ignore —
|
|
2789
|
+
* they group by trade — so a rename regroups nothing and re-prices nothing. The
|
|
2790
|
+
* craft's match key is fixed at creation and is not renamed with it.
|
|
2791
|
+
*
|
|
2792
|
+
* To move determinations between crafts, re-point each one's `pwa_trade_id`
|
|
2793
|
+
* rather than renaming the craft they share.
|
|
2794
|
+
*
|
|
2795
|
+
*
|
|
2796
|
+
* **Required scope:**
|
|
2797
|
+
*
|
|
2798
|
+
* `pwa.trades:update`
|
|
2799
|
+
*
|
|
2800
|
+
*/
|
|
2801
|
+
static updateTrade(options) {
|
|
2802
|
+
return (options.client ?? client).patch({
|
|
2803
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
2804
|
+
url: '/api/v1/pwa/trades/{id}',
|
|
2805
|
+
...options,
|
|
2806
|
+
headers: {
|
|
2807
|
+
'Content-Type': 'application/json',
|
|
2808
|
+
...options.headers
|
|
2809
|
+
}
|
|
2810
|
+
});
|
|
2811
|
+
}
|
|
2764
2812
|
}
|
|
2765
2813
|
export class JobWageDeterminationRateRules {
|
|
2766
2814
|
/**
|
|
@@ -3078,6 +3126,11 @@ export class JobWageDeterminations {
|
|
|
3078
3126
|
* This rewrites what the determination said, not when it existed — moving
|
|
3079
3127
|
* either end of the timeline is `genesis` or `scheduled_termination`.
|
|
3080
3128
|
*
|
|
3129
|
+
* `pwa_trade_id` is the exception: a trade regroups the whole determination
|
|
3130
|
+
* at once, so it moves every version rather than applying from
|
|
3131
|
+
* `effective_from`. A determination synced from a project follows its
|
|
3132
|
+
* project wage determination's trade and cannot be re-pointed here.
|
|
3133
|
+
*
|
|
3081
3134
|
* Conditional: send the determination's `ETag` as `If-Match`.
|
|
3082
3135
|
*
|
|
3083
3136
|
*
|
|
@@ -3236,6 +3289,30 @@ export class Jobs {
|
|
|
3236
3289
|
});
|
|
3237
3290
|
}
|
|
3238
3291
|
}
|
|
3292
|
+
export class OpenApi {
|
|
3293
|
+
/**
|
|
3294
|
+
* Show OpenAPI spec
|
|
3295
|
+
*
|
|
3296
|
+
* **No scope required:**
|
|
3297
|
+
*
|
|
3298
|
+
* Every authenticated API key may call this endpoint. It returns the machine-readable OpenAPI
|
|
3299
|
+
* document that describes this API.
|
|
3300
|
+
*
|
|
3301
|
+
* **Stability:**
|
|
3302
|
+
*
|
|
3303
|
+
* The document is static between contract changes: it changes only when the API surface
|
|
3304
|
+
* does — an endpoint, field, or schema added or altered — on no fixed schedule. Fetch it
|
|
3305
|
+
* when your integration starts, or when you regenerate a client, rather than on a poll.
|
|
3306
|
+
*
|
|
3307
|
+
*/
|
|
3308
|
+
static getOpenapiDocument(options) {
|
|
3309
|
+
return (options?.client ?? client).get({
|
|
3310
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3311
|
+
url: '/api/v1/openapi',
|
|
3312
|
+
...options
|
|
3313
|
+
});
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3239
3316
|
export class OversiteSiteCheckIns {
|
|
3240
3317
|
/**
|
|
3241
3318
|
* List Site Check-ins
|
|
@@ -3280,6 +3357,319 @@ export class OversiteSiteCheckIns {
|
|
|
3280
3357
|
});
|
|
3281
3358
|
}
|
|
3282
3359
|
}
|
|
3360
|
+
export class OvertimeRules {
|
|
3361
|
+
/**
|
|
3362
|
+
* Shift overtime rule genesis
|
|
3363
|
+
*
|
|
3364
|
+
* Move when a rule's timeline begins. Shifting it earlier extends the first
|
|
3365
|
+
* version back; shifting it later drops the coverage before it, and what that
|
|
3366
|
+
* removes stops being readable through `as_of[valid]` and `/history`.
|
|
3367
|
+
*
|
|
3368
|
+
* This changes *when* the rule existed rather than what it said — no version's
|
|
3369
|
+
* values are rewritten. Moving the other end of the timeline is
|
|
3370
|
+
* `scheduled_termination`, and changing a version's values is the rule update.
|
|
3371
|
+
*
|
|
3372
|
+
* A shift to or past a scheduled termination is refused with `422`, since it
|
|
3373
|
+
* would leave no coverage at all.
|
|
3374
|
+
*
|
|
3375
|
+
* Conditional: send the rule's `ETag` as `If-Match`.
|
|
3376
|
+
*
|
|
3377
|
+
*
|
|
3378
|
+
* **Required scope:**
|
|
3379
|
+
*
|
|
3380
|
+
* `overtime_packages.overtime_rules.genesis:update`
|
|
3381
|
+
*
|
|
3382
|
+
*/
|
|
3383
|
+
static shiftOvertimeRuleGenesis(options) {
|
|
3384
|
+
return (options.client ?? client).patch({
|
|
3385
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3386
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/genesis',
|
|
3387
|
+
...options,
|
|
3388
|
+
headers: {
|
|
3389
|
+
'Content-Type': 'application/json',
|
|
3390
|
+
...options.headers
|
|
3391
|
+
}
|
|
3392
|
+
});
|
|
3393
|
+
}
|
|
3394
|
+
/**
|
|
3395
|
+
* List overtime rule version history
|
|
3396
|
+
*
|
|
3397
|
+
* A rule's whole valid-time sequence, newest window first and cursor-paginated.
|
|
3398
|
+
* Each entry is a full overtime rule carrying its own `valid_from` / `valid_to`
|
|
3399
|
+
* window and a `version_status` of `scheduled`, `current` or `historical`. An
|
|
3400
|
+
* entry carries the family key as `overtime_rule_id` and no `id` of its own —
|
|
3401
|
+
* every version shares the family key, so versions are told apart by their window
|
|
3402
|
+
* coordinates.
|
|
3403
|
+
*
|
|
3404
|
+
* Each version's `corrections` — prior transaction-time recordings of that same
|
|
3405
|
+
* window — is always empty here: this resource has no transaction axis, so a
|
|
3406
|
+
* retroactive edit rewrites a version in place instead of layering a superseded
|
|
3407
|
+
* recording under it. The field is still returned so the timeline answers one
|
|
3408
|
+
* shape across every temporal resource. `as_of[valid]` is rejected, since pinning
|
|
3409
|
+
* a point on the valid axis would collapse the sequence this endpoint returns, and
|
|
3410
|
+
* with no transaction axis there is no `as_of[transaction]` to read against.
|
|
3411
|
+
*
|
|
3412
|
+
*
|
|
3413
|
+
* **Required scope:**
|
|
3414
|
+
*
|
|
3415
|
+
* `overtime_packages.overtime_rules.history:read`
|
|
3416
|
+
*
|
|
3417
|
+
*/
|
|
3418
|
+
static listOvertimeRuleHistory(options) {
|
|
3419
|
+
return (options.client ?? client).get({
|
|
3420
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3421
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/history',
|
|
3422
|
+
...options
|
|
3423
|
+
});
|
|
3424
|
+
}
|
|
3425
|
+
/**
|
|
3426
|
+
* Cancel scheduled changes to an overtime rule
|
|
3427
|
+
*
|
|
3428
|
+
* **Required scope:**
|
|
3429
|
+
*
|
|
3430
|
+
* `overtime_packages.overtime_rules.scheduled_changes:delete`
|
|
3431
|
+
*
|
|
3432
|
+
*/
|
|
3433
|
+
static cancelOvertimeRuleScheduledChanges(options) {
|
|
3434
|
+
return (options.client ?? client).delete({
|
|
3435
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3436
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_changes',
|
|
3437
|
+
...options
|
|
3438
|
+
});
|
|
3439
|
+
}
|
|
3440
|
+
/**
|
|
3441
|
+
* List scheduled changes for an overtime rule
|
|
3442
|
+
*
|
|
3443
|
+
* **Required scope:**
|
|
3444
|
+
*
|
|
3445
|
+
* `overtime_packages.overtime_rules.scheduled_changes:read`
|
|
3446
|
+
*
|
|
3447
|
+
*/
|
|
3448
|
+
static listOvertimeRuleScheduledChanges(options) {
|
|
3449
|
+
return (options.client ?? client).get({
|
|
3450
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3451
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_changes',
|
|
3452
|
+
...options
|
|
3453
|
+
});
|
|
3454
|
+
}
|
|
3455
|
+
/**
|
|
3456
|
+
* Schedule a change to an overtime rule
|
|
3457
|
+
*
|
|
3458
|
+
* **Required scope:**
|
|
3459
|
+
*
|
|
3460
|
+
* `overtime_packages.overtime_rules.scheduled_changes:create`
|
|
3461
|
+
*
|
|
3462
|
+
*/
|
|
3463
|
+
static scheduleOvertimeRuleChange(options) {
|
|
3464
|
+
return (options.client ?? client).post({
|
|
3465
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3466
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_changes',
|
|
3467
|
+
...options,
|
|
3468
|
+
headers: {
|
|
3469
|
+
'Content-Type': 'application/json',
|
|
3470
|
+
...options.headers
|
|
3471
|
+
}
|
|
3472
|
+
});
|
|
3473
|
+
}
|
|
3474
|
+
/**
|
|
3475
|
+
* Cancel a scheduled termination for an overtime rule
|
|
3476
|
+
*
|
|
3477
|
+
* **Required scope:**
|
|
3478
|
+
*
|
|
3479
|
+
* `overtime_packages.overtime_rules.scheduled_terminations:delete`
|
|
3480
|
+
*
|
|
3481
|
+
*/
|
|
3482
|
+
static cancelOvertimeRuleScheduledTermination(options) {
|
|
3483
|
+
return (options.client ?? client).delete({
|
|
3484
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3485
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_termination',
|
|
3486
|
+
...options
|
|
3487
|
+
});
|
|
3488
|
+
}
|
|
3489
|
+
/**
|
|
3490
|
+
* Schedule a termination for an overtime rule
|
|
3491
|
+
*
|
|
3492
|
+
* Close the rule's timeline at `effective_date`: it stays readable up to that date
|
|
3493
|
+
* and stops applying from it. Removing the rule from every window it ever covered
|
|
3494
|
+
* is the rule delete instead.
|
|
3495
|
+
*
|
|
3496
|
+
* A termination at or before the rule's genesis is refused with `422`, since it
|
|
3497
|
+
* would leave no coverage at all.
|
|
3498
|
+
*
|
|
3499
|
+
* Conditional: send the rule's `ETag` as `If-Match`.
|
|
3500
|
+
*
|
|
3501
|
+
*
|
|
3502
|
+
* **Required scope:**
|
|
3503
|
+
*
|
|
3504
|
+
* `overtime_packages.overtime_rules.scheduled_terminations:create`
|
|
3505
|
+
*
|
|
3506
|
+
*/
|
|
3507
|
+
static scheduleOvertimeRuleTermination(options) {
|
|
3508
|
+
return (options.client ?? client).post({
|
|
3509
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3510
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_termination',
|
|
3511
|
+
...options,
|
|
3512
|
+
headers: {
|
|
3513
|
+
'Content-Type': 'application/json',
|
|
3514
|
+
...options.headers
|
|
3515
|
+
}
|
|
3516
|
+
});
|
|
3517
|
+
}
|
|
3518
|
+
/**
|
|
3519
|
+
* List overtime rules
|
|
3520
|
+
*
|
|
3521
|
+
* **Required scope:**
|
|
3522
|
+
*
|
|
3523
|
+
* `overtime_packages.overtime_rules:read`
|
|
3524
|
+
*
|
|
3525
|
+
*/
|
|
3526
|
+
static listOvertimeRules(options) {
|
|
3527
|
+
return (options.client ?? client).get({
|
|
3528
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3529
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules',
|
|
3530
|
+
...options
|
|
3531
|
+
});
|
|
3532
|
+
}
|
|
3533
|
+
/**
|
|
3534
|
+
* Create overtime rule
|
|
3535
|
+
*
|
|
3536
|
+
* **Required scope:**
|
|
3537
|
+
*
|
|
3538
|
+
* `overtime_packages.overtime_rules:create`
|
|
3539
|
+
*
|
|
3540
|
+
*/
|
|
3541
|
+
static createOvertimeRule(options) {
|
|
3542
|
+
return (options.client ?? client).post({
|
|
3543
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3544
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules',
|
|
3545
|
+
...options,
|
|
3546
|
+
headers: {
|
|
3547
|
+
'Content-Type': 'application/json',
|
|
3548
|
+
...options.headers
|
|
3549
|
+
}
|
|
3550
|
+
});
|
|
3551
|
+
}
|
|
3552
|
+
/**
|
|
3553
|
+
* Delete overtime rule
|
|
3554
|
+
*
|
|
3555
|
+
* Remove the rule outright: every version of the family goes, and nothing is
|
|
3556
|
+
* readable through `as_of[valid]` or `/history` afterwards. Closing a rule
|
|
3557
|
+
* going forward while keeping its past is `scheduled_termination` instead.
|
|
3558
|
+
*
|
|
3559
|
+
* Conditional: send the rule's `ETag` as `If-Match`.
|
|
3560
|
+
*
|
|
3561
|
+
*
|
|
3562
|
+
* **Required scope:**
|
|
3563
|
+
*
|
|
3564
|
+
* `overtime_packages.overtime_rules:delete`
|
|
3565
|
+
*
|
|
3566
|
+
*/
|
|
3567
|
+
static deleteOvertimeRule(options) {
|
|
3568
|
+
return (options.client ?? client).delete({
|
|
3569
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3570
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}',
|
|
3571
|
+
...options
|
|
3572
|
+
});
|
|
3573
|
+
}
|
|
3574
|
+
/**
|
|
3575
|
+
* Show overtime rule
|
|
3576
|
+
*
|
|
3577
|
+
* **Required scope:**
|
|
3578
|
+
*
|
|
3579
|
+
* `overtime_packages.overtime_rules:read`
|
|
3580
|
+
*
|
|
3581
|
+
*/
|
|
3582
|
+
static getOvertimeRule(options) {
|
|
3583
|
+
return (options.client ?? client).get({
|
|
3584
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3585
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}',
|
|
3586
|
+
...options
|
|
3587
|
+
});
|
|
3588
|
+
}
|
|
3589
|
+
/**
|
|
3590
|
+
* Update overtime rule
|
|
3591
|
+
*
|
|
3592
|
+
* Edit a rule's values from `effective_from` forward: every version starting at
|
|
3593
|
+
* or after that date takes the new values, and earlier versions are untouched.
|
|
3594
|
+
* Where an edit starts inside a version and changes its values, a boundary is
|
|
3595
|
+
* created at `effective_from` so the change applies only from there. Omitted,
|
|
3596
|
+
* the edit starts where the version in effect now starts, correcting it in
|
|
3597
|
+
* place; a future date schedules the change ahead of that version.
|
|
3598
|
+
*
|
|
3599
|
+
* This rewrites what the rule said, not when it existed — moving either end of
|
|
3600
|
+
* the timeline is `genesis` or `scheduled_termination`.
|
|
3601
|
+
*
|
|
3602
|
+
* Conditional: send the rule's `ETag` as `If-Match`.
|
|
3603
|
+
*
|
|
3604
|
+
*
|
|
3605
|
+
* **Required scope:**
|
|
3606
|
+
*
|
|
3607
|
+
* `overtime_packages.overtime_rules:update`
|
|
3608
|
+
*
|
|
3609
|
+
*/
|
|
3610
|
+
static updateOvertimeRule(options) {
|
|
3611
|
+
return (options.client ?? client).patch({
|
|
3612
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3613
|
+
url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}',
|
|
3614
|
+
...options,
|
|
3615
|
+
headers: {
|
|
3616
|
+
'Content-Type': 'application/json',
|
|
3617
|
+
...options.headers
|
|
3618
|
+
}
|
|
3619
|
+
});
|
|
3620
|
+
}
|
|
3621
|
+
}
|
|
3622
|
+
export class TimeEntryImports {
|
|
3623
|
+
/**
|
|
3624
|
+
* List Time Entry Imports
|
|
3625
|
+
*
|
|
3626
|
+
* **Required scope:**
|
|
3627
|
+
*
|
|
3628
|
+
* `pay_periods.imports.time_entries:read`
|
|
3629
|
+
*
|
|
3630
|
+
*/
|
|
3631
|
+
static listTimeEntryImports(options) {
|
|
3632
|
+
return (options.client ?? client).get({
|
|
3633
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3634
|
+
url: '/api/v1/pay_periods/{pay_period_id}/imports/time_entries',
|
|
3635
|
+
...options
|
|
3636
|
+
});
|
|
3637
|
+
}
|
|
3638
|
+
/**
|
|
3639
|
+
* Create Time Entry Import
|
|
3640
|
+
*
|
|
3641
|
+
* **Required scope:**
|
|
3642
|
+
*
|
|
3643
|
+
* `pay_periods.imports.time_entries:create`
|
|
3644
|
+
*
|
|
3645
|
+
*/
|
|
3646
|
+
static createTimeEntryImport(options) {
|
|
3647
|
+
return (options.client ?? client).post({
|
|
3648
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3649
|
+
url: '/api/v1/pay_periods/{pay_period_id}/imports/time_entries',
|
|
3650
|
+
...options,
|
|
3651
|
+
headers: {
|
|
3652
|
+
'Content-Type': 'application/json',
|
|
3653
|
+
...options.headers
|
|
3654
|
+
}
|
|
3655
|
+
});
|
|
3656
|
+
}
|
|
3657
|
+
/**
|
|
3658
|
+
* Get Time Entry Import
|
|
3659
|
+
*
|
|
3660
|
+
* **Required scope:**
|
|
3661
|
+
*
|
|
3662
|
+
* `pay_periods.imports.time_entries:read`
|
|
3663
|
+
*
|
|
3664
|
+
*/
|
|
3665
|
+
static getTimeEntryImport(options) {
|
|
3666
|
+
return (options.client ?? client).get({
|
|
3667
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3668
|
+
url: '/api/v1/pay_periods/{pay_period_id}/imports/time_entries/{id}',
|
|
3669
|
+
...options
|
|
3670
|
+
});
|
|
3671
|
+
}
|
|
3672
|
+
}
|
|
3283
3673
|
export class PayPeriods {
|
|
3284
3674
|
/**
|
|
3285
3675
|
* List pay periods
|
|
@@ -4090,7 +4480,7 @@ export class Projects {
|
|
|
4090
4480
|
* returns 422. Switching `federal_pwa_mode` to `none` forces `asset_owner` false
|
|
4091
4481
|
* and drops the federal-PWA-only params (previously persisted values are left
|
|
4092
4482
|
* untouched); `budget_currency` defaults to USD when blank. A project owned by
|
|
4093
|
-
* another company
|
|
4483
|
+
* another company, or an unknown id, returns 404.
|
|
4094
4484
|
*
|
|
4095
4485
|
*
|
|
4096
4486
|
* **Required scope:**
|
|
@@ -4373,6 +4763,99 @@ export class Users {
|
|
|
4373
4763
|
});
|
|
4374
4764
|
}
|
|
4375
4765
|
}
|
|
4766
|
+
export class PwaTradeApprenticeScope {
|
|
4767
|
+
/**
|
|
4768
|
+
* List apprentice scope decisions
|
|
4769
|
+
*
|
|
4770
|
+
* The reviewed (occupation, craft) pairs on this trade. A pair with no row here is
|
|
4771
|
+
* undecided, which denies apprentice treatment just as `out_of_scope` does — the two
|
|
4772
|
+
* differ only in whether the pair still prompts a curator for review.
|
|
4773
|
+
*
|
|
4774
|
+
*
|
|
4775
|
+
* **Required scope:**
|
|
4776
|
+
*
|
|
4777
|
+
* `pwa.trades.apprenticeship_occupations:read`
|
|
4778
|
+
*
|
|
4779
|
+
*/
|
|
4780
|
+
static listApprenticeshipOccupations(options) {
|
|
4781
|
+
return (options.client ?? client).get({
|
|
4782
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4783
|
+
url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations',
|
|
4784
|
+
...options
|
|
4785
|
+
});
|
|
4786
|
+
}
|
|
4787
|
+
/**
|
|
4788
|
+
* Record an apprentice scope decision
|
|
4789
|
+
*
|
|
4790
|
+
* Records a reviewed verdict for an (occupation, craft) pair. Writes are the
|
|
4791
|
+
* occupation's employer companies' to make — a credential may read the decisions on any
|
|
4792
|
+
* trade it can see, but may only write those whose occupation belongs to a program it
|
|
4793
|
+
* is enrolled in as an employer.
|
|
4794
|
+
*
|
|
4795
|
+
* The decision re-prices every hour the occupation's apprentices charged to this craft,
|
|
4796
|
+
* so it takes effect on recorded work, not only on work going forward.
|
|
4797
|
+
*
|
|
4798
|
+
*
|
|
4799
|
+
* **Required scope:**
|
|
4800
|
+
*
|
|
4801
|
+
* `pwa.trades.apprenticeship_occupations:create`
|
|
4802
|
+
*
|
|
4803
|
+
*/
|
|
4804
|
+
static createApprenticeshipOccupation(options) {
|
|
4805
|
+
return (options.client ?? client).post({
|
|
4806
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4807
|
+
url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations',
|
|
4808
|
+
...options,
|
|
4809
|
+
headers: {
|
|
4810
|
+
'Content-Type': 'application/json',
|
|
4811
|
+
...options.headers
|
|
4812
|
+
}
|
|
4813
|
+
});
|
|
4814
|
+
}
|
|
4815
|
+
/**
|
|
4816
|
+
* Remove an apprentice scope decision
|
|
4817
|
+
*
|
|
4818
|
+
* Returns the pair to undecided, which re-opens it for review. Apprentice treatment is
|
|
4819
|
+
* denied either way, so this is a request to decide again rather than a way to grant it.
|
|
4820
|
+
*
|
|
4821
|
+
*
|
|
4822
|
+
* **Required scope:**
|
|
4823
|
+
*
|
|
4824
|
+
* `pwa.trades.apprenticeship_occupations:delete`
|
|
4825
|
+
*
|
|
4826
|
+
*/
|
|
4827
|
+
static deleteApprenticeshipOccupation(options) {
|
|
4828
|
+
return (options.client ?? client).delete({
|
|
4829
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4830
|
+
url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations/{id}',
|
|
4831
|
+
...options
|
|
4832
|
+
});
|
|
4833
|
+
}
|
|
4834
|
+
/**
|
|
4835
|
+
* Flip an apprentice scope decision
|
|
4836
|
+
*
|
|
4837
|
+
* Changes the verdict on a reviewed pair. The occupation is create-only — a decision is
|
|
4838
|
+
* replaced rather than re-pointed, so re-pointing one would move the verdict to a
|
|
4839
|
+
* different pair with no recompute for either.
|
|
4840
|
+
*
|
|
4841
|
+
*
|
|
4842
|
+
* **Required scope:**
|
|
4843
|
+
*
|
|
4844
|
+
* `pwa.trades.apprenticeship_occupations:update`
|
|
4845
|
+
*
|
|
4846
|
+
*/
|
|
4847
|
+
static updateApprenticeshipOccupation(options) {
|
|
4848
|
+
return (options.client ?? client).patch({
|
|
4849
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4850
|
+
url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations/{id}',
|
|
4851
|
+
...options,
|
|
4852
|
+
headers: {
|
|
4853
|
+
'Content-Type': 'application/json',
|
|
4854
|
+
...options.headers
|
|
4855
|
+
}
|
|
4856
|
+
});
|
|
4857
|
+
}
|
|
4858
|
+
}
|
|
4376
4859
|
export class Tasks {
|
|
4377
4860
|
/**
|
|
4378
4861
|
* Create form assignment task
|