@dsptch-work/api-client 0.29.0 → 0.30.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.
@@ -640,6 +640,8 @@ export class AssetsAttributes {
640
640
  /**
641
641
  * Create Attribute
642
642
  *
643
+ * Only documented body keys are accepted, including inside `options`. An undeclared key returns 400 before any attribute or option is written.
644
+ *
643
645
  * **Required scope:**
644
646
  *
645
647
  * `assets.attributes:create`
@@ -659,6 +661,8 @@ export class AssetsAttributes {
659
661
  /**
660
662
  * Delete Attribute
661
663
  *
664
+ * A missing attribute or one outside the key company or user visibility returns 404.
665
+ *
662
666
  * **Required scope:**
663
667
  *
664
668
  * `assets.attributes:delete`
@@ -674,6 +678,8 @@ export class AssetsAttributes {
674
678
  /**
675
679
  * Get Attribute
676
680
  *
681
+ * A missing attribute or one outside the key company or user visibility returns 404.
682
+ *
677
683
  * **Required scope:**
678
684
  *
679
685
  * `assets.attributes:read`
@@ -689,6 +695,8 @@ export class AssetsAttributes {
689
695
  /**
690
696
  * Update Attribute
691
697
  *
698
+ * Only documented body keys are accepted, including inside `options`. An undeclared key returns 400 without changing the attribute or its options. A missing attribute or one outside the key company or user visibility returns 404.
699
+ *
692
700
  * **Required scope:**
693
701
  *
694
702
  * `assets.attributes:update`
@@ -725,6 +733,8 @@ export class AssetsCategories {
725
733
  /**
726
734
  * Create Category
727
735
  *
736
+ * Only documented body keys are accepted, including inside `category_attributes`. An undeclared key returns 400 before any category or assignment is written.
737
+ *
728
738
  * **Required scope:**
729
739
  *
730
740
  * `assets.categories:create`
@@ -774,6 +784,8 @@ export class AssetsCategories {
774
784
  /**
775
785
  * Update Category
776
786
  *
787
+ * Only documented body keys are accepted, including inside `category_attributes`. An undeclared key returns 400 before any category or assignment is written.
788
+ *
777
789
  * **Required scope:**
778
790
  *
779
791
  * `assets.categories:update`
@@ -874,6 +886,8 @@ export class AssetsFormAssignmentTriggers {
874
886
  /**
875
887
  * Create Form Assignment Trigger
876
888
  *
889
+ * New form, assignee, and product references must be visible to the API key in its company. Refused writes preserve the trigger and its associations.
890
+ *
877
891
  * **Required scope:**
878
892
  *
879
893
  * `assets.form_assignment_triggers:create`
@@ -923,6 +937,8 @@ export class AssetsFormAssignmentTriggers {
923
937
  /**
924
938
  * Update Form Assignment Trigger
925
939
  *
940
+ * New form, assignee, and product references must be visible to the API key in its company. Refused writes preserve the trigger and its associations.
941
+ *
926
942
  * **Required scope:**
927
943
  *
928
944
  * `assets.form_assignment_triggers:update`
@@ -1195,6 +1211,8 @@ export class AssetsItems {
1195
1211
  /**
1196
1212
  * Create service event
1197
1213
  *
1214
+ * Undeclared JSON-body keys, including keys within attachments_attributes, return 400 unknown_key before any service-event or attachment changes are saved.
1215
+ *
1198
1216
  * **Required scope:**
1199
1217
  *
1200
1218
  * `assets.items.service_events:create`
@@ -1244,6 +1262,8 @@ export class AssetsItems {
1244
1262
  /**
1245
1263
  * Update service event
1246
1264
  *
1265
+ * Undeclared JSON-body keys, including keys within attachments_attributes, return 400 unknown_key before any service-event or attachment changes are saved.
1266
+ *
1247
1267
  * **Required scope:**
1248
1268
  *
1249
1269
  * `assets.items.service_events:update`
@@ -1728,6 +1748,8 @@ export class AssetsSites {
1728
1748
  /**
1729
1749
  * Create Site
1730
1750
  *
1751
+ * Only `site_id`, `kind`, and `name` are writable. An undeclared key returns 400 before any site is written.
1752
+ *
1731
1753
  * **Required scope:**
1732
1754
  *
1733
1755
  * `assets.sites:create`
@@ -1777,6 +1799,8 @@ export class AssetsSites {
1777
1799
  /**
1778
1800
  * Update Site
1779
1801
  *
1802
+ * Only `site_id`, `kind`, and `name` are writable. An undeclared key returns 400 before any site is written.
1803
+ *
1780
1804
  * **Required scope:**
1781
1805
  *
1782
1806
  * `assets.sites:update`
@@ -2416,6 +2440,10 @@ export class CompaniesDepartments {
2416
2440
  /**
2417
2441
  * Create department
2418
2442
  *
2443
+ * Creates a department in the key's company. The body accepts only `name` and
2444
+ * `description`; undeclared keys return `400` without creating a department.
2445
+ *
2446
+ *
2419
2447
  * **Required scope:**
2420
2448
  *
2421
2449
  * `companies.departments:create`
@@ -2476,6 +2504,12 @@ export class CompaniesDepartments {
2476
2504
  /**
2477
2505
  * Update department
2478
2506
  *
2507
+ * Updates only the supplied `name` and `description`. Undeclared body keys
2508
+ * return `400` without changing the department. A missing or out-of-scope id
2509
+ * returns `404`, matching GET and DELETE. A visible department still requires
2510
+ * write authorization.
2511
+ *
2512
+ *
2479
2513
  * **Required scope:**
2480
2514
  *
2481
2515
  * `companies.departments:update`
@@ -3184,6 +3218,7 @@ export class Jobs {
3184
3218
  */
3185
3219
  static listJobs(options) {
3186
3220
  return (options?.client ?? client).get({
3221
+ querySerializer: { parameters: { 'filter[federal_pwa_mode]': { array: { explode: false } }, 'filter[regional_pwa_mode]': { array: { explode: false } } } },
3187
3222
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3188
3223
  url: '/api/v1/jobs',
3189
3224
  ...options
@@ -3387,6 +3422,11 @@ export class ProductionJobScopePrices {
3387
3422
  /**
3388
3423
  * Create production job scope price
3389
3424
  *
3425
+ * Creates a scope price on the URL's job. The body accepts only `scope_kind`,
3426
+ * `unit_price`, `contracted_count`, and `unit_of_measure`. Undeclared keys return
3427
+ * `400` without creating a price.
3428
+ *
3429
+ *
3390
3430
  * **Required scope:**
3391
3431
  *
3392
3432
  * `jobs.production.job_scope_prices:create`
@@ -3444,6 +3484,11 @@ export class ProductionJobScopePrices {
3444
3484
  /**
3445
3485
  * Update production job scope price
3446
3486
  *
3487
+ * Updates only the supplied `scope_kind`, `unit_price`, `contracted_count`,
3488
+ * and `unit_of_measure`. Undeclared body keys return `400` without changing
3489
+ * the scope price. The job stays on the URL.
3490
+ *
3491
+ *
3447
3492
  * **Required scope:**
3448
3493
  *
3449
3494
  * `jobs.production.job_scope_prices:update`
@@ -5160,6 +5205,11 @@ export class FringeBenefitPlans {
5160
5205
  /**
5161
5206
  * Delete fringe benefit plan
5162
5207
  *
5208
+ * A missing record or a record outside the key's company
5209
+ * visibility returns 404. User-scoped keys also require user
5210
+ * visibility. A forbidden action on a visible record returns 403.
5211
+ *
5212
+ *
5163
5213
  * **Required scope:**
5164
5214
  *
5165
5215
  * `payrolls.fringe_benefit_plans:delete`
@@ -5175,6 +5225,11 @@ export class FringeBenefitPlans {
5175
5225
  /**
5176
5226
  * Show fringe benefit plan
5177
5227
  *
5228
+ * A missing record or a record outside the key's company
5229
+ * visibility returns 404. User-scoped keys also require user
5230
+ * visibility. A forbidden action on a visible record returns 403.
5231
+ *
5232
+ *
5178
5233
  * **Required scope:**
5179
5234
  *
5180
5235
  * `payrolls.fringe_benefit_plans:read`
@@ -5352,6 +5407,11 @@ export class PayrollRuns {
5352
5407
  /**
5353
5408
  * Delete payroll run
5354
5409
  *
5410
+ * A missing record or a record outside the key's company
5411
+ * visibility returns 404. User-scoped keys also require user
5412
+ * visibility. A forbidden action on a visible record returns 403.
5413
+ *
5414
+ *
5355
5415
  * **Required scope:**
5356
5416
  *
5357
5417
  * `payrolls.payroll_runs:delete`
@@ -5367,6 +5427,11 @@ export class PayrollRuns {
5367
5427
  /**
5368
5428
  * Show payroll run
5369
5429
  *
5430
+ * A missing record or a record outside the key's company
5431
+ * visibility returns 404. User-scoped keys also require user
5432
+ * visibility. A forbidden action on a visible record returns 403.
5433
+ *
5434
+ *
5370
5435
  * **Required scope:**
5371
5436
  *
5372
5437
  * `payrolls.payroll_runs:read`
@@ -5386,6 +5451,8 @@ export class PayrollRuns {
5386
5451
  * admins can update the same payroll run fields. Manager and
5387
5452
  * technician user keys cannot update runs. The owning company is
5388
5453
  * fixed at creation; company_id is rejected on update.
5454
+ * A missing run or a run outside the key's company and user
5455
+ * visibility returns 404, including manager and technician keys.
5389
5456
  *
5390
5457
  *
5391
5458
  * **Required scope:**
@@ -5443,6 +5510,11 @@ export class PaystubLineItems {
5443
5510
  /**
5444
5511
  * Delete paystub line item
5445
5512
  *
5513
+ * A missing record or a record outside the key's company
5514
+ * visibility returns 404. User-scoped keys also require user
5515
+ * visibility. A forbidden action on a visible record returns 403.
5516
+ *
5517
+ *
5446
5518
  * **Required scope:**
5447
5519
  *
5448
5520
  * `paystub_line_items:delete`
@@ -5458,6 +5530,11 @@ export class PaystubLineItems {
5458
5530
  /**
5459
5531
  * Show paystub line item
5460
5532
  *
5533
+ * A missing record or a record outside the key's company
5534
+ * visibility returns 404. User-scoped keys also require user
5535
+ * visibility. A forbidden action on a visible record returns 403.
5536
+ *
5537
+ *
5461
5538
  * **Required scope:**
5462
5539
  *
5463
5540
  * `paystub_line_items:read`
@@ -5528,6 +5605,11 @@ export class Paystubs {
5528
5605
  /**
5529
5606
  * Delete paystub
5530
5607
  *
5608
+ * A missing record or a record outside the key's company
5609
+ * visibility returns 404. User-scoped keys also require user
5610
+ * visibility. A forbidden action on a visible record returns 403.
5611
+ *
5612
+ *
5531
5613
  * **Required scope:**
5532
5614
  *
5533
5615
  * `paystubs:delete`
@@ -5543,6 +5625,11 @@ export class Paystubs {
5543
5625
  /**
5544
5626
  * Show paystub
5545
5627
  *
5628
+ * A missing record or a record outside the key's company
5629
+ * visibility returns 404. User-scoped keys also require user
5630
+ * visibility. A forbidden action on a visible record returns 403.
5631
+ *
5632
+ *
5546
5633
  * **Required scope:**
5547
5634
  *
5548
5635
  * `paystubs:read`
@@ -6374,6 +6461,7 @@ export class Projects {
6374
6461
  * Remove a participant's jobs before removing it from this set. Returns 201
6375
6462
  * with the project; unknown or inaccessible parent or
6376
6463
  * company IDs return 404, and invalid attributes or relationships return 422.
6464
+ * Undeclared body keys return 400 before any project or relationship is saved.
6377
6465
  *
6378
6466
  *
6379
6467
  * **Required scope:**
@@ -6417,8 +6505,8 @@ export class Projects {
6417
6505
  * Update project
6418
6506
  *
6419
6507
  * Update a project's attributes. `name` cannot be blanked, and
6420
- * `created_by_user_id` is immutable — any request that sets, changes, or clears it
6421
- * returns 422. The federal-PWA-only fields (administrator contact, budget, IRA
6508
+ * `created_by_user_id` is create-only — any update that includes it returns 400,
6509
+ * even when the value is unchanged. Omit it on PATCH. The federal-PWA-only fields (administrator contact, budget, IRA
6422
6510
  * dates) and `asset_owner` apply only while `federal_pwa_mode` is not `none`:
6423
6511
  * switching it to `none` clears the stored values and forces `asset_owner`
6424
6512
  * false, and sending one of them while federal tracking is off — even as null —
@@ -6427,7 +6515,7 @@ export class Projects {
6427
6515
  * still accepts updates that keep that parent. `participating_company_ids`
6428
6516
  * replaces the complete set of participating companies. Remove a participant's
6429
6517
  * jobs before removing it from this set. Only the owning company may update the
6430
- * project.
6518
+ * project. Undeclared body keys return 400 before any project or relationship changes.
6431
6519
  *
6432
6520
  *
6433
6521
  * **Required scope:**
@@ -6862,6 +6950,14 @@ export class Tasks {
6862
6950
  /**
6863
6951
  * Create form assignment task
6864
6952
  *
6953
+ * Creates a shared form assignment, or one assignment per user
6954
+ * when `spread_assignees` is true. Supplied
6955
+ * `task_attributes.task_assignee_user_ids` must be an array of
6956
+ * strings; null, scalars, and non-string members return 422.
6957
+ * Omitted or empty assignees fail ordinary task validation;
6958
+ * spread creation returns an empty array without creating tasks.
6959
+ *
6960
+ *
6865
6961
  * **Required scope:**
6866
6962
  *
6867
6963
  * `tasks.form_assignment_tasks:create`
@@ -7708,6 +7804,8 @@ export class AttestationConfigs {
7708
7804
  /**
7709
7805
  * Create attestation config
7710
7806
  *
7807
+ * Creates a question on the addressed pay schedule. Undeclared body keys return 400 before the question is saved.
7808
+ *
7711
7809
  * **Required scope:**
7712
7810
  *
7713
7811
  * `timekeeping.pay_period_configs.attestation_configs:create`
@@ -7727,6 +7825,8 @@ export class AttestationConfigs {
7727
7825
  /**
7728
7826
  * Delete attestation config
7729
7827
  *
7828
+ * Retires a question on the addressed pay schedule at its current pay period end. Repeated retirement preserves the earliest cutoff. A question from another pay schedule returns 404.
7829
+ *
7730
7830
  * **Required scope:**
7731
7831
  *
7732
7832
  * `timekeeping.pay_period_configs.attestation_configs:delete`
@@ -7939,6 +8039,48 @@ export class TimeCardActuals {
7939
8039
  });
7940
8040
  }
7941
8041
  }
8042
+ export class TimeOffRequests {
8043
+ /**
8044
+ * List time off requests
8045
+ *
8046
+ * List the company's time-off requests (R&R, PTO, and the other absence
8047
+ * types). Results are ordered by created_at descending then id and
8048
+ * cursor-paginated. Narrow with filter[user_id] and filter[status]; omitted
8049
+ * keys do not change the list. Combined filters AND.
8050
+ *
8051
+ *
8052
+ * **Required scope:**
8053
+ *
8054
+ * `timekeeping.time_off_requests:read`
8055
+ *
8056
+ */
8057
+ static listTimeOffRequests(options) {
8058
+ return (options?.client ?? client).get({
8059
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
8060
+ url: '/api/v1/timekeeping/time_off_requests',
8061
+ ...options
8062
+ });
8063
+ }
8064
+ /**
8065
+ * Show time off request
8066
+ *
8067
+ * Fetch one time-off request by id. A missing or other-company id reads as
8068
+ * not found.
8069
+ *
8070
+ *
8071
+ * **Required scope:**
8072
+ *
8073
+ * `timekeeping.time_off_requests:read`
8074
+ *
8075
+ */
8076
+ static getTimeOffRequest(options) {
8077
+ return (options.client ?? client).get({
8078
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
8079
+ url: '/api/v1/timekeeping/time_off_requests/{id}',
8080
+ ...options
8081
+ });
8082
+ }
8083
+ }
7942
8084
  export class TimeSessions {
7943
8085
  /**
7944
8086
  * List time sessions