@dsptch-work/api-client 0.28.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`
@@ -5258,6 +5313,57 @@ export class PaystubImports {
5258
5313
  });
5259
5314
  }
5260
5315
  }
5316
+ export class WidePaystubImports {
5317
+ /**
5318
+ * List Wide Paystub Imports
5319
+ *
5320
+ * **Required scope:**
5321
+ *
5322
+ * `payrolls.payroll_runs.imports.wide_paystubs:read`
5323
+ *
5324
+ */
5325
+ static listWidePaystubImports(options) {
5326
+ return (options.client ?? client).get({
5327
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5328
+ url: '/api/v1/payrolls/payroll_runs/{payroll_run_id}/imports/wide_paystubs',
5329
+ ...options
5330
+ });
5331
+ }
5332
+ /**
5333
+ * Create Wide Paystub Import
5334
+ *
5335
+ * **Required scope:**
5336
+ *
5337
+ * `payrolls.payroll_runs.imports.wide_paystubs:create`
5338
+ *
5339
+ */
5340
+ static createWidePaystubImport(options) {
5341
+ return (options.client ?? client).post({
5342
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5343
+ url: '/api/v1/payrolls/payroll_runs/{payroll_run_id}/imports/wide_paystubs',
5344
+ ...options,
5345
+ headers: {
5346
+ 'Content-Type': 'application/json',
5347
+ ...options.headers
5348
+ }
5349
+ });
5350
+ }
5351
+ /**
5352
+ * Get Wide Paystub Import
5353
+ *
5354
+ * **Required scope:**
5355
+ *
5356
+ * `payrolls.payroll_runs.imports.wide_paystubs:read`
5357
+ *
5358
+ */
5359
+ static getWidePaystubImport(options) {
5360
+ return (options.client ?? client).get({
5361
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5362
+ url: '/api/v1/payrolls/payroll_runs/{payroll_run_id}/imports/wide_paystubs/{id}',
5363
+ ...options
5364
+ });
5365
+ }
5366
+ }
5261
5367
  export class PayrollRuns {
5262
5368
  /**
5263
5369
  * List payroll runs
@@ -5301,6 +5407,11 @@ export class PayrollRuns {
5301
5407
  /**
5302
5408
  * Delete payroll run
5303
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
+ *
5304
5415
  * **Required scope:**
5305
5416
  *
5306
5417
  * `payrolls.payroll_runs:delete`
@@ -5316,6 +5427,11 @@ export class PayrollRuns {
5316
5427
  /**
5317
5428
  * Show payroll run
5318
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
+ *
5319
5435
  * **Required scope:**
5320
5436
  *
5321
5437
  * `payrolls.payroll_runs:read`
@@ -5335,6 +5451,8 @@ export class PayrollRuns {
5335
5451
  * admins can update the same payroll run fields. Manager and
5336
5452
  * technician user keys cannot update runs. The owning company is
5337
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.
5338
5456
  *
5339
5457
  *
5340
5458
  * **Required scope:**
@@ -5392,6 +5510,11 @@ export class PaystubLineItems {
5392
5510
  /**
5393
5511
  * Delete paystub line item
5394
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
+ *
5395
5518
  * **Required scope:**
5396
5519
  *
5397
5520
  * `paystub_line_items:delete`
@@ -5407,6 +5530,11 @@ export class PaystubLineItems {
5407
5530
  /**
5408
5531
  * Show paystub line item
5409
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
+ *
5410
5538
  * **Required scope:**
5411
5539
  *
5412
5540
  * `paystub_line_items:read`
@@ -5477,6 +5605,11 @@ export class Paystubs {
5477
5605
  /**
5478
5606
  * Delete paystub
5479
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
+ *
5480
5613
  * **Required scope:**
5481
5614
  *
5482
5615
  * `paystubs:delete`
@@ -5492,6 +5625,11 @@ export class Paystubs {
5492
5625
  /**
5493
5626
  * Show paystub
5494
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
+ *
5495
5633
  * **Required scope:**
5496
5634
  *
5497
5635
  * `paystubs:read`
@@ -6323,6 +6461,7 @@ export class Projects {
6323
6461
  * Remove a participant's jobs before removing it from this set. Returns 201
6324
6462
  * with the project; unknown or inaccessible parent or
6325
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.
6326
6465
  *
6327
6466
  *
6328
6467
  * **Required scope:**
@@ -6366,8 +6505,8 @@ export class Projects {
6366
6505
  * Update project
6367
6506
  *
6368
6507
  * Update a project's attributes. `name` cannot be blanked, and
6369
- * `created_by_user_id` is immutable — any request that sets, changes, or clears it
6370
- * 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
6371
6510
  * dates) and `asset_owner` apply only while `federal_pwa_mode` is not `none`:
6372
6511
  * switching it to `none` clears the stored values and forces `asset_owner`
6373
6512
  * false, and sending one of them while federal tracking is off — even as null —
@@ -6376,7 +6515,7 @@ export class Projects {
6376
6515
  * still accepts updates that keep that parent. `participating_company_ids`
6377
6516
  * replaces the complete set of participating companies. Remove a participant's
6378
6517
  * jobs before removing it from this set. Only the owning company may update the
6379
- * project.
6518
+ * project. Undeclared body keys return 400 before any project or relationship changes.
6380
6519
  *
6381
6520
  *
6382
6521
  * **Required scope:**
@@ -6811,6 +6950,14 @@ export class Tasks {
6811
6950
  /**
6812
6951
  * Create form assignment task
6813
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
+ *
6814
6961
  * **Required scope:**
6815
6962
  *
6816
6963
  * `tasks.form_assignment_tasks:create`
@@ -7657,6 +7804,8 @@ export class AttestationConfigs {
7657
7804
  /**
7658
7805
  * Create attestation config
7659
7806
  *
7807
+ * Creates a question on the addressed pay schedule. Undeclared body keys return 400 before the question is saved.
7808
+ *
7660
7809
  * **Required scope:**
7661
7810
  *
7662
7811
  * `timekeeping.pay_period_configs.attestation_configs:create`
@@ -7676,6 +7825,8 @@ export class AttestationConfigs {
7676
7825
  /**
7677
7826
  * Delete attestation config
7678
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
+ *
7679
7830
  * **Required scope:**
7680
7831
  *
7681
7832
  * `timekeeping.pay_period_configs.attestation_configs:delete`
@@ -7888,6 +8039,48 @@ export class TimeCardActuals {
7888
8039
  });
7889
8040
  }
7890
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
+ }
7891
8084
  export class TimeSessions {
7892
8085
  /**
7893
8086
  * List time sessions