@dsptch-work/api-client 0.31.0 → 0.33.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.
@@ -2689,6 +2689,100 @@ export class CompetenciesEvidenceItems {
2689
2689
  });
2690
2690
  }
2691
2691
  }
2692
+ export class CompetenciesAssessorAuthorizations {
2693
+ /**
2694
+ * List assessor authorizations
2695
+ *
2696
+ * **Required scope:**
2697
+ *
2698
+ * `competencies.assessor_authorizations:read`
2699
+ *
2700
+ */
2701
+ static listAssessorAuthorizations(options) {
2702
+ return (options?.client ?? client).get({
2703
+ querySerializer: { parameters: { 'filter[kind]': { array: { explode: false } } } },
2704
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2705
+ url: '/api/v1/competencies/assessor_authorizations',
2706
+ ...options
2707
+ });
2708
+ }
2709
+ /**
2710
+ * Create assessor authorization
2711
+ *
2712
+ * Grants an assessor role for one standard. A user key grants as its user. A company key
2713
+ * names an admin or safety manager in granted_by_user_id.
2714
+ *
2715
+ *
2716
+ * **Required scope:**
2717
+ *
2718
+ * `competencies.assessor_authorizations:create`
2719
+ *
2720
+ */
2721
+ static createAssessorAuthorization(options) {
2722
+ return (options.client ?? client).post({
2723
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2724
+ url: '/api/v1/competencies/assessor_authorizations',
2725
+ ...options,
2726
+ headers: {
2727
+ 'Content-Type': 'application/json',
2728
+ ...options.headers
2729
+ }
2730
+ });
2731
+ }
2732
+ /**
2733
+ * Show assessor authorization
2734
+ *
2735
+ * **Required scope:**
2736
+ *
2737
+ * `competencies.assessor_authorizations:read`
2738
+ *
2739
+ */
2740
+ static getAssessorAuthorization(options) {
2741
+ return (options.client ?? client).get({
2742
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2743
+ url: '/api/v1/competencies/assessor_authorizations/{id}',
2744
+ ...options
2745
+ });
2746
+ }
2747
+ /**
2748
+ * Update assessor authorization
2749
+ *
2750
+ * **Required scope:**
2751
+ *
2752
+ * `competencies.assessor_authorizations:update`
2753
+ *
2754
+ */
2755
+ static updateAssessorAuthorization(options) {
2756
+ return (options.client ?? client).patch({
2757
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2758
+ url: '/api/v1/competencies/assessor_authorizations/{id}',
2759
+ ...options,
2760
+ headers: {
2761
+ 'Content-Type': 'application/json',
2762
+ ...options.headers
2763
+ }
2764
+ });
2765
+ }
2766
+ /**
2767
+ * Revoke assessor authorization
2768
+ *
2769
+ * **Required scope:**
2770
+ *
2771
+ * `competencies.assessor_authorizations.revocations:create`
2772
+ *
2773
+ */
2774
+ static revokeAssessorAuthorization(options) {
2775
+ return (options.client ?? client).post({
2776
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2777
+ url: '/api/v1/competencies/assessor_authorizations/{assessor_authorization_id}/revocation',
2778
+ ...options,
2779
+ headers: {
2780
+ 'Content-Type': 'application/json',
2781
+ ...options.headers
2782
+ }
2783
+ });
2784
+ }
2785
+ }
2692
2786
  export class CompetenciesQualifications {
2693
2787
  /**
2694
2788
  * List competence qualifications
@@ -3927,6 +4021,11 @@ export class JobWageDeterminationRateRules {
3927
4021
  /**
3928
4022
  * List rate rules
3929
4023
  *
4024
+ * The determination family remains addressable before its start
4025
+ * and after its end. The rule temporal lens still controls
4026
+ * returned versions.
4027
+ *
4028
+ *
3930
4029
  * **Required scope:**
3931
4030
  *
3932
4031
  * `jobs.pwa.wage_determinations.rate_rules:read`
@@ -3942,6 +4041,14 @@ export class JobWageDeterminationRateRules {
3942
4041
  /**
3943
4042
  * Create rate rule
3944
4043
  *
4044
+ * Requires a user-scoped API key; company keys without a user
4045
+ * receive 403 user_scoped_key_required.
4046
+ *
4047
+ * Unknown fields return 400. Malformed conditions or nonnumeric
4048
+ * cents return 422. Concurrent writes to the determination
4049
+ * family can return retryable 503 without creating a rule or package.
4050
+ *
4051
+ *
3945
4052
  * **Required scope:**
3946
4053
  *
3947
4054
  * `jobs.pwa.wage_determinations.rate_rules:create`
@@ -3978,6 +4085,9 @@ export class JobWageDeterminations {
3978
4085
  /**
3979
4086
  * Shift job wage determination genesis
3980
4087
  *
4088
+ * Requires a user-scoped API key; company keys without a user
4089
+ * receive 403 user_scoped_key_required.
4090
+ *
3981
4091
  * Move when a determination's timeline begins. Shifting it earlier extends
3982
4092
  * the first version back; shifting it later drops the coverage before it,
3983
4093
  * and what that removes stops being readable through `as_of[valid]` and
@@ -4042,6 +4152,10 @@ export class JobWageDeterminations {
4042
4152
  /**
4043
4153
  * Cancel scheduled changes on job wage determination
4044
4154
  *
4155
+ * Requires a user-scoped API key; company keys without a user
4156
+ * receive 403 user_scoped_key_required.
4157
+ *
4158
+ *
4045
4159
  * **Required scope:**
4046
4160
  *
4047
4161
  * `jobs.wage_determinations.scheduled_changes:delete`
@@ -4072,6 +4186,10 @@ export class JobWageDeterminations {
4072
4186
  /**
4073
4187
  * Schedule effective-dated change on job wage determination
4074
4188
  *
4189
+ * Requires a user-scoped API key; company keys without a user
4190
+ * receive 403 user_scoped_key_required.
4191
+ *
4192
+ *
4075
4193
  * **Required scope:**
4076
4194
  *
4077
4195
  * `jobs.wage_determinations.scheduled_changes:create`
@@ -4151,6 +4269,10 @@ export class JobWageDeterminations {
4151
4269
  /**
4152
4270
  * Create job wage determination
4153
4271
  *
4272
+ * Requires a user-scoped API key; company keys without a user
4273
+ * receive 403 user_scoped_key_required.
4274
+ *
4275
+ *
4154
4276
  * **Required scope:**
4155
4277
  *
4156
4278
  * `jobs.wage_determinations:create`
@@ -4170,6 +4292,10 @@ export class JobWageDeterminations {
4170
4292
  /**
4171
4293
  * Delete job wage determination
4172
4294
  *
4295
+ * Requires a user-scoped API key; company keys without a user
4296
+ * receive 403 user_scoped_key_required.
4297
+ *
4298
+ *
4173
4299
  * **Required scope:**
4174
4300
  *
4175
4301
  * `jobs.wage_determinations:delete`
@@ -4200,6 +4326,9 @@ export class JobWageDeterminations {
4200
4326
  /**
4201
4327
  * Update job wage determination
4202
4328
  *
4329
+ * Requires a user-scoped API key; company keys without a user
4330
+ * receive 403 user_scoped_key_required.
4331
+ *
4203
4332
  * Edit a determination's values from `effective_from` forward: every version
4204
4333
  * starting at or after that instant takes the new values, and earlier
4205
4334
  * versions are untouched. Where an edit starts inside a version and changes
@@ -6543,6 +6672,87 @@ export class ProductionCompletions {
6543
6672
  });
6544
6673
  }
6545
6674
  }
6675
+ export class ProjectWageDeterminationRateRules {
6676
+ /**
6677
+ * List project wage determination rate rule history
6678
+ *
6679
+ * A rule's whole valid-time sequence, newest window first and cursor-paginated.
6680
+ * Each entry is a full rate rule carrying its own `valid_from` / `valid_to`
6681
+ * window and a `version_status` of `scheduled`, `current` or `historical`. An
6682
+ * entry carries the family key as `pay_rates_rule_id` and no `id` or `uid` of
6683
+ * its own — every version shares the family key, so versions are told apart by
6684
+ * their window coordinates.
6685
+ *
6686
+ * `corrections` is always empty here: a rule keeps no audit layer, so what a
6687
+ * version replaced was not recorded. The field is still returned, because the
6688
+ * timeline answers one shape across every temporal resource. `as_of[valid]` is
6689
+ * rejected, since pinning a point on the valid axis would collapse the sequence
6690
+ * this endpoint returns, and a rule records no transaction axis to read
6691
+ * `as_of[transaction]` against.
6692
+ *
6693
+ *
6694
+ * **Required scope:**
6695
+ *
6696
+ * `projects.pwa.wage_determinations.rate_rules.history:read`
6697
+ *
6698
+ */
6699
+ static listProjectWageDeterminationRateRuleHistory(options) {
6700
+ return (options.client ?? client).get({
6701
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6702
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/rate_rules/{rate_rule_id}/history',
6703
+ ...options
6704
+ });
6705
+ }
6706
+ /**
6707
+ * List project wage determination rate rules
6708
+ *
6709
+ * **Required scope:**
6710
+ *
6711
+ * `projects.pwa.wage_determinations.rate_rules:read`
6712
+ *
6713
+ */
6714
+ static listProjectWageDeterminationRateRules(options) {
6715
+ return (options.client ?? client).get({
6716
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6717
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/rate_rules',
6718
+ ...options
6719
+ });
6720
+ }
6721
+ /**
6722
+ * Create project wage determination rate rule
6723
+ *
6724
+ * **Required scope:**
6725
+ *
6726
+ * `projects.pwa.wage_determinations.rate_rules:create`
6727
+ *
6728
+ */
6729
+ static createProjectWageDeterminationRateRule(options) {
6730
+ return (options.client ?? client).post({
6731
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6732
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/rate_rules',
6733
+ ...options,
6734
+ headers: {
6735
+ 'Content-Type': 'application/json',
6736
+ ...options.headers
6737
+ }
6738
+ });
6739
+ }
6740
+ /**
6741
+ * Show project wage determination rate rule
6742
+ *
6743
+ * **Required scope:**
6744
+ *
6745
+ * `projects.pwa.wage_determinations.rate_rules:read`
6746
+ *
6747
+ */
6748
+ static getProjectWageDeterminationRateRule(options) {
6749
+ return (options.client ?? client).get({
6750
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6751
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/rate_rules/{id}',
6752
+ ...options
6753
+ });
6754
+ }
6755
+ }
6546
6756
  export class ProjectSites {
6547
6757
  /**
6548
6758
  * List project sites
@@ -6657,6 +6867,169 @@ export class ProjectSites {
6657
6867
  }
6658
6868
  }
6659
6869
  export class ProjectWageDeterminations {
6870
+ /**
6871
+ * Shift project wage determination genesis
6872
+ *
6873
+ * Move when a determination's timeline begins. Shifting it earlier extends
6874
+ * the first version back; shifting it later drops the coverage before it,
6875
+ * and what that removes stops being readable through `as_of[valid]` and
6876
+ * `/history`.
6877
+ *
6878
+ * This changes *when* the determination existed rather than what it said —
6879
+ * no version's attributes are rewritten. Moving the other end of the timeline
6880
+ * is `scheduled_termination`, and changing a version's values is the
6881
+ * determination update.
6882
+ *
6883
+ * A shift to or past a scheduled termination is refused with `422`, since it
6884
+ * would leave no coverage at all.
6885
+ *
6886
+ * Conditional: send the determination's `ETag` as `If-Match`.
6887
+ *
6888
+ *
6889
+ * **Required scope:**
6890
+ *
6891
+ * `projects.wage_determinations.genesis:update`
6892
+ *
6893
+ */
6894
+ static shiftProjectWageDeterminationGenesis(options) {
6895
+ return (options.client ?? client).patch({
6896
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6897
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/genesis',
6898
+ ...options,
6899
+ headers: {
6900
+ 'Content-Type': 'application/json',
6901
+ ...options.headers
6902
+ }
6903
+ });
6904
+ }
6905
+ /**
6906
+ * List project wage determination version history
6907
+ *
6908
+ * A determination's whole valid-time sequence, newest window first and
6909
+ * cursor-paginated. Each entry is a full determination carrying its own
6910
+ * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
6911
+ * `current` or `historical`, and the `corrections` that version replaced —
6912
+ * each itself a full determination as previously recorded, so a client
6913
+ * that wants a field-level diff compares two of them. An entry carries
6914
+ * the family key as `project_wage_determination_id` and no `id` or `uid` of
6915
+ * its own — every version shares the family key, so versions are told
6916
+ * apart by their window coordinates. `as_of[valid]` is
6917
+ * rejected, since pinning a point on the valid axis would collapse the
6918
+ * sequence this endpoint returns, and a determination records no
6919
+ * transaction axis to read `as_of[transaction]` against.
6920
+ *
6921
+ *
6922
+ * **Required scope:**
6923
+ *
6924
+ * `projects.wage_determinations.history:read`
6925
+ *
6926
+ */
6927
+ static listProjectWageDeterminationHistory(options) {
6928
+ return (options.client ?? client).get({
6929
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6930
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/history',
6931
+ ...options
6932
+ });
6933
+ }
6934
+ /**
6935
+ * Cancel scheduled changes on project wage determination
6936
+ *
6937
+ * **Required scope:**
6938
+ *
6939
+ * `projects.wage_determinations.scheduled_changes:delete`
6940
+ *
6941
+ */
6942
+ static cancelProjectWageDeterminationScheduledChanges(options) {
6943
+ return (options.client ?? client).delete({
6944
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6945
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/scheduled_changes',
6946
+ ...options
6947
+ });
6948
+ }
6949
+ /**
6950
+ * List scheduled changes for project wage determination
6951
+ *
6952
+ * **Required scope:**
6953
+ *
6954
+ * `projects.wage_determinations.scheduled_changes:read`
6955
+ *
6956
+ */
6957
+ static listProjectWageDeterminationScheduledChanges(options) {
6958
+ return (options.client ?? client).get({
6959
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6960
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/scheduled_changes',
6961
+ ...options
6962
+ });
6963
+ }
6964
+ /**
6965
+ * Schedule effective-dated change on project wage determination
6966
+ *
6967
+ * **Required scope:**
6968
+ *
6969
+ * `projects.wage_determinations.scheduled_changes:create`
6970
+ *
6971
+ */
6972
+ static scheduleProjectWageDeterminationChange(options) {
6973
+ return (options.client ?? client).post({
6974
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6975
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/scheduled_changes',
6976
+ ...options,
6977
+ headers: {
6978
+ 'Content-Type': 'application/json',
6979
+ ...options.headers
6980
+ }
6981
+ });
6982
+ }
6983
+ /**
6984
+ * Cancel scheduled termination on project wage determination
6985
+ *
6986
+ * **Required scope:**
6987
+ *
6988
+ * `projects.wage_determinations.scheduled_terminations:delete`
6989
+ *
6990
+ */
6991
+ static cancelProjectWageDeterminationScheduledTermination(options) {
6992
+ return (options.client ?? client).delete({
6993
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6994
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/scheduled_termination',
6995
+ ...options
6996
+ });
6997
+ }
6998
+ /**
6999
+ * Schedule termination on project wage determination
7000
+ *
7001
+ * End a determination's valid coverage at `effective_date`: segments beyond
7002
+ * it are dropped and one spanning it is truncated, so the determination stops
7003
+ * being valid from that point on. Earlier versions are untouched and stay
7004
+ * readable through `as_of[valid]` and `/history`.
7005
+ *
7006
+ * Copies on jobs starting on or after the end are removed. A copy still in
7007
+ * use (assigned positions, apprenticeship determinations or referenced
7008
+ * work) refuses the end with a 422 `validation_failed` problem carrying the
7009
+ * copy's own reason, and both timelines stay unchanged.
7010
+ *
7011
+ * Moving an end is cancel-then-schedule: cancel the standing termination,
7012
+ * then schedule the one you want.
7013
+ *
7014
+ * Conditional: send the determination's `ETag` as `If-Match`.
7015
+ *
7016
+ *
7017
+ * **Required scope:**
7018
+ *
7019
+ * `projects.wage_determinations.scheduled_terminations:create`
7020
+ *
7021
+ */
7022
+ static scheduleProjectWageDeterminationTermination(options) {
7023
+ return (options.client ?? client).post({
7024
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
7025
+ url: '/api/v1/projects/{project_id}/wage_determinations/{wage_determination_id}/scheduled_termination',
7026
+ ...options,
7027
+ headers: {
7028
+ 'Content-Type': 'application/json',
7029
+ ...options.headers
7030
+ }
7031
+ });
7032
+ }
6660
7033
  /**
6661
7034
  * List project wage determinations
6662
7035
  *