@dsptch-work/api-client 0.13.0 → 0.15.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.
@@ -2731,6 +2731,40 @@ export class PwaTrades {
2731
2731
  }
2732
2732
  });
2733
2733
  }
2734
+ /**
2735
+ * Merge Trade
2736
+ *
2737
+ * Folds the craft named in the path into another in the same pool. Every wage
2738
+ * determination grouped under it re-points onto the target, its apprentice-scope
2739
+ * decisions carry over where the target holds none of its own, and the emptied
2740
+ * craft is deleted — all in one transaction.
2741
+ *
2742
+ * Use this rather than `DELETE` when the craft still groups determinations:
2743
+ * deleting one is refused precisely because it would orphan them, and merging
2744
+ * moves them first.
2745
+ *
2746
+ * Nothing about the determinations' rates changes; only which craft they pool
2747
+ * into. The response is the surviving craft. Regrouping re-prices the charged
2748
+ * hours and recomputes federal apprenticeship ratio statuses in the background,
2749
+ * so compliance figures may move after this returns.
2750
+ *
2751
+ *
2752
+ * **Required scope:**
2753
+ *
2754
+ * `pwa.trades.merges:create`
2755
+ *
2756
+ */
2757
+ static createMerge(options) {
2758
+ return (options.client ?? client).post({
2759
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2760
+ url: '/api/v1/pwa/trades/{trade_id}/merges',
2761
+ ...options,
2762
+ headers: {
2763
+ 'Content-Type': 'application/json',
2764
+ ...options.headers
2765
+ }
2766
+ });
2767
+ }
2734
2768
  /**
2735
2769
  * List trades
2736
2770
  *
@@ -2746,6 +2780,27 @@ export class PwaTrades {
2746
2780
  ...options
2747
2781
  });
2748
2782
  }
2783
+ /**
2784
+ * Delete Trade
2785
+ *
2786
+ * Deletes an empty craft. A trade still grouping wage determinations, or still
2787
+ * carrying apprentice-scope decisions, is refused with a `422` — deleting it would
2788
+ * orphan what points at it. Merge it into another craft instead, which moves the
2789
+ * determinations first.
2790
+ *
2791
+ *
2792
+ * **Required scope:**
2793
+ *
2794
+ * `pwa.trades:delete`
2795
+ *
2796
+ */
2797
+ static deleteTrade(options) {
2798
+ return (options.client ?? client).delete({
2799
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2800
+ url: '/api/v1/pwa/trades/{id}',
2801
+ ...options
2802
+ });
2803
+ }
2749
2804
  /**
2750
2805
  * Show trade
2751
2806
  *
@@ -2761,6 +2816,33 @@ export class PwaTrades {
2761
2816
  ...options
2762
2817
  });
2763
2818
  }
2819
+ /**
2820
+ * Rename Trade
2821
+ *
2822
+ * Renames the craft. The name is a display label the compliance engines ignore —
2823
+ * they group by trade — so a rename regroups nothing and re-prices nothing. The
2824
+ * craft's match key is fixed at creation and is not renamed with it.
2825
+ *
2826
+ * To move determinations between crafts, re-point each one's `pwa_trade_id`
2827
+ * rather than renaming the craft they share.
2828
+ *
2829
+ *
2830
+ * **Required scope:**
2831
+ *
2832
+ * `pwa.trades:update`
2833
+ *
2834
+ */
2835
+ static updateTrade(options) {
2836
+ return (options.client ?? client).patch({
2837
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2838
+ url: '/api/v1/pwa/trades/{id}',
2839
+ ...options,
2840
+ headers: {
2841
+ 'Content-Type': 'application/json',
2842
+ ...options.headers
2843
+ }
2844
+ });
2845
+ }
2764
2846
  }
2765
2847
  export class JobWageDeterminationRateRules {
2766
2848
  /**
@@ -3078,6 +3160,11 @@ export class JobWageDeterminations {
3078
3160
  * This rewrites what the determination said, not when it existed — moving
3079
3161
  * either end of the timeline is `genesis` or `scheduled_termination`.
3080
3162
  *
3163
+ * `pwa_trade_id` is the exception: a trade regroups the whole determination
3164
+ * at once, so it moves every version rather than applying from
3165
+ * `effective_from`. A determination cascaded from a project mirrors that
3166
+ * project's determination and cannot be edited here — change it on the project.
3167
+ *
3081
3168
  * Conditional: send the determination's `ETag` as `If-Match`.
3082
3169
  *
3083
3170
  *
@@ -3236,6 +3323,30 @@ export class Jobs {
3236
3323
  });
3237
3324
  }
3238
3325
  }
3326
+ export class OpenApi {
3327
+ /**
3328
+ * Show OpenAPI spec
3329
+ *
3330
+ * **No scope required:**
3331
+ *
3332
+ * Every authenticated API key may call this endpoint. It returns the machine-readable OpenAPI
3333
+ * document that describes this API.
3334
+ *
3335
+ * **Stability:**
3336
+ *
3337
+ * The document is static between contract changes: it changes only when the API surface
3338
+ * does — an endpoint, field, or schema added or altered — on no fixed schedule. Fetch it
3339
+ * when your integration starts, or when you regenerate a client, rather than on a poll.
3340
+ *
3341
+ */
3342
+ static getOpenapiDocument(options) {
3343
+ return (options?.client ?? client).get({
3344
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3345
+ url: '/api/v1/openapi',
3346
+ ...options
3347
+ });
3348
+ }
3349
+ }
3239
3350
  export class OversiteSiteCheckIns {
3240
3351
  /**
3241
3352
  * List Site Check-ins
@@ -3280,6 +3391,421 @@ export class OversiteSiteCheckIns {
3280
3391
  });
3281
3392
  }
3282
3393
  }
3394
+ export class OvertimeRules {
3395
+ /**
3396
+ * Shift overtime rule genesis
3397
+ *
3398
+ * Move when a rule's timeline begins. Shifting it earlier extends the first
3399
+ * version back; shifting it later drops the coverage before it, and what that
3400
+ * removes stops being readable through `as_of[valid]` and `/history`.
3401
+ *
3402
+ * This changes *when* the rule existed rather than what it said — no version's
3403
+ * values are rewritten. Moving the other end of the timeline is
3404
+ * `scheduled_termination`, and changing a version's values is the rule update.
3405
+ *
3406
+ * A shift to or past a scheduled termination is refused with `422`, since it
3407
+ * would leave no coverage at all.
3408
+ *
3409
+ * Conditional: send the rule's `ETag` as `If-Match`.
3410
+ *
3411
+ *
3412
+ * **Required scope:**
3413
+ *
3414
+ * `overtime_packages.overtime_rules.genesis:update`
3415
+ *
3416
+ */
3417
+ static shiftOvertimeRuleGenesis(options) {
3418
+ return (options.client ?? client).patch({
3419
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3420
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/genesis',
3421
+ ...options,
3422
+ headers: {
3423
+ 'Content-Type': 'application/json',
3424
+ ...options.headers
3425
+ }
3426
+ });
3427
+ }
3428
+ /**
3429
+ * List overtime rule version history
3430
+ *
3431
+ * A rule's whole valid-time sequence, newest window first and cursor-paginated.
3432
+ * Each entry is a full overtime rule carrying its own `valid_from` / `valid_to`
3433
+ * window and a `version_status` of `scheduled`, `current` or `historical`. An
3434
+ * entry carries the family key as `overtime_rule_id` and no `id` of its own —
3435
+ * every version shares the family key, so versions are told apart by their window
3436
+ * coordinates.
3437
+ *
3438
+ * Each version's `corrections` — prior transaction-time recordings of that same
3439
+ * window — is always empty here: this resource has no transaction axis, so a
3440
+ * retroactive edit rewrites a version in place instead of layering a superseded
3441
+ * recording under it. The field is still returned so the timeline answers one
3442
+ * shape across every temporal resource. `as_of[valid]` is rejected, since pinning
3443
+ * a point on the valid axis would collapse the sequence this endpoint returns, and
3444
+ * with no transaction axis there is no `as_of[transaction]` to read against.
3445
+ *
3446
+ *
3447
+ * **Required scope:**
3448
+ *
3449
+ * `overtime_packages.overtime_rules.history:read`
3450
+ *
3451
+ */
3452
+ static listOvertimeRuleHistory(options) {
3453
+ return (options.client ?? client).get({
3454
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3455
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/history',
3456
+ ...options
3457
+ });
3458
+ }
3459
+ /**
3460
+ * Cancel scheduled changes to an overtime rule
3461
+ *
3462
+ * **Required scope:**
3463
+ *
3464
+ * `overtime_packages.overtime_rules.scheduled_changes:delete`
3465
+ *
3466
+ */
3467
+ static cancelOvertimeRuleScheduledChanges(options) {
3468
+ return (options.client ?? client).delete({
3469
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3470
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_changes',
3471
+ ...options
3472
+ });
3473
+ }
3474
+ /**
3475
+ * List scheduled changes for an overtime rule
3476
+ *
3477
+ * **Required scope:**
3478
+ *
3479
+ * `overtime_packages.overtime_rules.scheduled_changes:read`
3480
+ *
3481
+ */
3482
+ static listOvertimeRuleScheduledChanges(options) {
3483
+ return (options.client ?? client).get({
3484
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3485
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_changes',
3486
+ ...options
3487
+ });
3488
+ }
3489
+ /**
3490
+ * Schedule a change to an overtime rule
3491
+ *
3492
+ * **Required scope:**
3493
+ *
3494
+ * `overtime_packages.overtime_rules.scheduled_changes:create`
3495
+ *
3496
+ */
3497
+ static scheduleOvertimeRuleChange(options) {
3498
+ return (options.client ?? client).post({
3499
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3500
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_changes',
3501
+ ...options,
3502
+ headers: {
3503
+ 'Content-Type': 'application/json',
3504
+ ...options.headers
3505
+ }
3506
+ });
3507
+ }
3508
+ /**
3509
+ * Cancel a scheduled termination for an overtime rule
3510
+ *
3511
+ * **Required scope:**
3512
+ *
3513
+ * `overtime_packages.overtime_rules.scheduled_terminations:delete`
3514
+ *
3515
+ */
3516
+ static cancelOvertimeRuleScheduledTermination(options) {
3517
+ return (options.client ?? client).delete({
3518
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3519
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{overtime_rule_id}/scheduled_termination',
3520
+ ...options
3521
+ });
3522
+ }
3523
+ /**
3524
+ * Schedule a termination for an overtime rule
3525
+ *
3526
+ * Close the rule's timeline at `effective_date`: it stays readable up to that date
3527
+ * and stops applying from it. Removing the rule from every window it ever covered
3528
+ * is the rule delete instead.
3529
+ *
3530
+ * A termination at or before the rule's genesis is refused with `422`, since it
3531
+ * would leave no coverage at all.
3532
+ *
3533
+ * Conditional: send the rule's `ETag` as `If-Match`.
3534
+ *
3535
+ *
3536
+ * **Required scope:**
3537
+ *
3538
+ * `overtime_packages.overtime_rules.scheduled_terminations:create`
3539
+ *
3540
+ */
3541
+ static scheduleOvertimeRuleTermination(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/{overtime_rule_id}/scheduled_termination',
3545
+ ...options,
3546
+ headers: {
3547
+ 'Content-Type': 'application/json',
3548
+ ...options.headers
3549
+ }
3550
+ });
3551
+ }
3552
+ /**
3553
+ * List overtime rules
3554
+ *
3555
+ * **Required scope:**
3556
+ *
3557
+ * `overtime_packages.overtime_rules:read`
3558
+ *
3559
+ */
3560
+ static listOvertimeRules(options) {
3561
+ return (options.client ?? client).get({
3562
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3563
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules',
3564
+ ...options
3565
+ });
3566
+ }
3567
+ /**
3568
+ * Create overtime rule
3569
+ *
3570
+ * **Required scope:**
3571
+ *
3572
+ * `overtime_packages.overtime_rules:create`
3573
+ *
3574
+ */
3575
+ static createOvertimeRule(options) {
3576
+ return (options.client ?? client).post({
3577
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3578
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules',
3579
+ ...options,
3580
+ headers: {
3581
+ 'Content-Type': 'application/json',
3582
+ ...options.headers
3583
+ }
3584
+ });
3585
+ }
3586
+ /**
3587
+ * Delete overtime rule
3588
+ *
3589
+ * Remove the rule outright: every version of the family goes, and nothing is
3590
+ * readable through `as_of[valid]` or `/history` afterwards. Closing a rule
3591
+ * going forward while keeping its past is `scheduled_termination` instead.
3592
+ *
3593
+ * Conditional: send the rule's `ETag` as `If-Match`.
3594
+ *
3595
+ *
3596
+ * **Required scope:**
3597
+ *
3598
+ * `overtime_packages.overtime_rules:delete`
3599
+ *
3600
+ */
3601
+ static deleteOvertimeRule(options) {
3602
+ return (options.client ?? client).delete({
3603
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3604
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}',
3605
+ ...options
3606
+ });
3607
+ }
3608
+ /**
3609
+ * Show overtime rule
3610
+ *
3611
+ * **Required scope:**
3612
+ *
3613
+ * `overtime_packages.overtime_rules:read`
3614
+ *
3615
+ */
3616
+ static getOvertimeRule(options) {
3617
+ return (options.client ?? client).get({
3618
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3619
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}',
3620
+ ...options
3621
+ });
3622
+ }
3623
+ /**
3624
+ * Update overtime rule
3625
+ *
3626
+ * Edit a rule's values from `effective_from` forward: every version starting at
3627
+ * or after that date takes the new values, and earlier versions are untouched.
3628
+ * Where an edit starts inside a version and changes its values, a boundary is
3629
+ * created at `effective_from` so the change applies only from there. Omitted,
3630
+ * the edit starts where the version in effect now starts, correcting it in
3631
+ * place; a future date schedules the change ahead of that version.
3632
+ *
3633
+ * This rewrites what the rule said, not when it existed — moving either end of
3634
+ * the timeline is `genesis` or `scheduled_termination`.
3635
+ *
3636
+ * Conditional: send the rule's `ETag` as `If-Match`.
3637
+ *
3638
+ *
3639
+ * **Required scope:**
3640
+ *
3641
+ * `overtime_packages.overtime_rules:update`
3642
+ *
3643
+ */
3644
+ static updateOvertimeRule(options) {
3645
+ return (options.client ?? client).patch({
3646
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3647
+ url: '/api/v1/overtime_packages/{overtime_package_id}/overtime_rules/{id}',
3648
+ ...options,
3649
+ headers: {
3650
+ 'Content-Type': 'application/json',
3651
+ ...options.headers
3652
+ }
3653
+ });
3654
+ }
3655
+ }
3656
+ export class AggregateTimeImports {
3657
+ /**
3658
+ * List Aggregate Time Imports
3659
+ *
3660
+ * **Required scope:**
3661
+ *
3662
+ * `pay_periods.imports.aggregate_times:read`
3663
+ *
3664
+ */
3665
+ static listAggregateTimeImports(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/aggregate_times',
3669
+ ...options
3670
+ });
3671
+ }
3672
+ /**
3673
+ * Create Aggregate Time Import
3674
+ *
3675
+ * **Required scope:**
3676
+ *
3677
+ * `pay_periods.imports.aggregate_times:create`
3678
+ *
3679
+ */
3680
+ static createAggregateTimeImport(options) {
3681
+ return (options.client ?? client).post({
3682
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3683
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/aggregate_times',
3684
+ ...options,
3685
+ headers: {
3686
+ 'Content-Type': 'application/json',
3687
+ ...options.headers
3688
+ }
3689
+ });
3690
+ }
3691
+ /**
3692
+ * Get Aggregate Time Import
3693
+ *
3694
+ * **Required scope:**
3695
+ *
3696
+ * `pay_periods.imports.aggregate_times:read`
3697
+ *
3698
+ */
3699
+ static getAggregateTimeImport(options) {
3700
+ return (options.client ?? client).get({
3701
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3702
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/aggregate_times/{id}',
3703
+ ...options
3704
+ });
3705
+ }
3706
+ }
3707
+ export class CprImports {
3708
+ /**
3709
+ * List CPR Imports
3710
+ *
3711
+ * **Required scope:**
3712
+ *
3713
+ * `pay_periods.imports.dsptch_cprs:read`
3714
+ *
3715
+ */
3716
+ static listDsptchCprImports(options) {
3717
+ return (options.client ?? client).get({
3718
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3719
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/dsptch_cprs',
3720
+ ...options
3721
+ });
3722
+ }
3723
+ /**
3724
+ * Create CPR Import
3725
+ *
3726
+ * **Required scope:**
3727
+ *
3728
+ * `pay_periods.imports.dsptch_cprs:create`
3729
+ *
3730
+ */
3731
+ static createDsptchCprImport(options) {
3732
+ return (options.client ?? client).post({
3733
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3734
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/dsptch_cprs',
3735
+ ...options,
3736
+ headers: {
3737
+ 'Content-Type': 'application/json',
3738
+ ...options.headers
3739
+ }
3740
+ });
3741
+ }
3742
+ /**
3743
+ * Get CPR Import
3744
+ *
3745
+ * **Required scope:**
3746
+ *
3747
+ * `pay_periods.imports.dsptch_cprs:read`
3748
+ *
3749
+ */
3750
+ static getDsptchCprImport(options) {
3751
+ return (options.client ?? client).get({
3752
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3753
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/dsptch_cprs/{id}',
3754
+ ...options
3755
+ });
3756
+ }
3757
+ }
3758
+ export class TimeEntryImports {
3759
+ /**
3760
+ * List Time Entry Imports
3761
+ *
3762
+ * **Required scope:**
3763
+ *
3764
+ * `pay_periods.imports.time_entries:read`
3765
+ *
3766
+ */
3767
+ static listTimeEntryImports(options) {
3768
+ return (options.client ?? client).get({
3769
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3770
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/time_entries',
3771
+ ...options
3772
+ });
3773
+ }
3774
+ /**
3775
+ * Create Time Entry Import
3776
+ *
3777
+ * **Required scope:**
3778
+ *
3779
+ * `pay_periods.imports.time_entries:create`
3780
+ *
3781
+ */
3782
+ static createTimeEntryImport(options) {
3783
+ return (options.client ?? client).post({
3784
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3785
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/time_entries',
3786
+ ...options,
3787
+ headers: {
3788
+ 'Content-Type': 'application/json',
3789
+ ...options.headers
3790
+ }
3791
+ });
3792
+ }
3793
+ /**
3794
+ * Get Time Entry Import
3795
+ *
3796
+ * **Required scope:**
3797
+ *
3798
+ * `pay_periods.imports.time_entries:read`
3799
+ *
3800
+ */
3801
+ static getTimeEntryImport(options) {
3802
+ return (options.client ?? client).get({
3803
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3804
+ url: '/api/v1/pay_periods/{pay_period_id}/imports/time_entries/{id}',
3805
+ ...options
3806
+ });
3807
+ }
3808
+ }
3283
3809
  export class PayPeriods {
3284
3810
  /**
3285
3811
  * List pay periods
@@ -4090,7 +4616,7 @@ export class Projects {
4090
4616
  * returns 422. Switching `federal_pwa_mode` to `none` forces `asset_owner` false
4091
4617
  * and drops the federal-PWA-only params (previously persisted values are left
4092
4618
  * untouched); `budget_currency` defaults to USD when blank. A project owned by
4093
- * another company returns 403; an unknown id returns 404.
4619
+ * another company, or an unknown id, returns 404.
4094
4620
  *
4095
4621
  *
4096
4622
  * **Required scope:**
@@ -4373,6 +4899,99 @@ export class Users {
4373
4899
  });
4374
4900
  }
4375
4901
  }
4902
+ export class PwaTradeApprenticeScope {
4903
+ /**
4904
+ * List apprentice scope decisions
4905
+ *
4906
+ * The reviewed (occupation, craft) pairs on this trade. A pair with no row here is
4907
+ * undecided, which denies apprentice treatment just as `out_of_scope` does — the two
4908
+ * differ only in whether the pair still prompts a curator for review.
4909
+ *
4910
+ *
4911
+ * **Required scope:**
4912
+ *
4913
+ * `pwa.trades.apprenticeship_occupations:read`
4914
+ *
4915
+ */
4916
+ static listApprenticeshipOccupations(options) {
4917
+ return (options.client ?? client).get({
4918
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4919
+ url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations',
4920
+ ...options
4921
+ });
4922
+ }
4923
+ /**
4924
+ * Record an apprentice scope decision
4925
+ *
4926
+ * Records a reviewed verdict for an (occupation, craft) pair. Writes are the
4927
+ * occupation's employer companies' to make — a credential may read the decisions on any
4928
+ * trade it can see, but may only write those whose occupation belongs to a program it
4929
+ * is enrolled in as an employer.
4930
+ *
4931
+ * The decision re-prices every hour the occupation's apprentices charged to this craft,
4932
+ * so it takes effect on recorded work, not only on work going forward.
4933
+ *
4934
+ *
4935
+ * **Required scope:**
4936
+ *
4937
+ * `pwa.trades.apprenticeship_occupations:create`
4938
+ *
4939
+ */
4940
+ static createApprenticeshipOccupation(options) {
4941
+ return (options.client ?? client).post({
4942
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4943
+ url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations',
4944
+ ...options,
4945
+ headers: {
4946
+ 'Content-Type': 'application/json',
4947
+ ...options.headers
4948
+ }
4949
+ });
4950
+ }
4951
+ /**
4952
+ * Remove an apprentice scope decision
4953
+ *
4954
+ * Returns the pair to undecided, which re-opens it for review. Apprentice treatment is
4955
+ * denied either way, so this is a request to decide again rather than a way to grant it.
4956
+ *
4957
+ *
4958
+ * **Required scope:**
4959
+ *
4960
+ * `pwa.trades.apprenticeship_occupations:delete`
4961
+ *
4962
+ */
4963
+ static deleteApprenticeshipOccupation(options) {
4964
+ return (options.client ?? client).delete({
4965
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4966
+ url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations/{id}',
4967
+ ...options
4968
+ });
4969
+ }
4970
+ /**
4971
+ * Flip an apprentice scope decision
4972
+ *
4973
+ * Changes the verdict on a reviewed pair. The occupation is create-only — a decision is
4974
+ * replaced rather than re-pointed, so re-pointing one would move the verdict to a
4975
+ * different pair with no recompute for either.
4976
+ *
4977
+ *
4978
+ * **Required scope:**
4979
+ *
4980
+ * `pwa.trades.apprenticeship_occupations:update`
4981
+ *
4982
+ */
4983
+ static updateApprenticeshipOccupation(options) {
4984
+ return (options.client ?? client).patch({
4985
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4986
+ url: '/api/v1/pwa/trades/{trade_id}/apprenticeship_occupations/{id}',
4987
+ ...options,
4988
+ headers: {
4989
+ 'Content-Type': 'application/json',
4990
+ ...options.headers
4991
+ }
4992
+ });
4993
+ }
4994
+ }
4376
4995
  export class Tasks {
4377
4996
  /**
4378
4997
  * Create form assignment task