@dsptch-work/api-client 0.41.0 → 0.42.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.
@@ -1314,6 +1314,29 @@ export class AssetsItems {
1314
1314
  }
1315
1315
  });
1316
1316
  }
1317
+ /**
1318
+ * Delete form assignment
1319
+ *
1320
+ * Ends the open incomplete permanent copy of this nested
1321
+ * form-completion task, the same mutation as the web unassign
1322
+ * control. Recurrence stays on PATCH. A copy that is not an
1323
+ * incomplete permanent copy is refused with
1324
+ * `not_incomplete_permanent_copy`. A missing, misnested, or
1325
+ * out-of-scope id reads as not found. Returns `204`.
1326
+ *
1327
+ *
1328
+ * **Required scope:**
1329
+ *
1330
+ * `assets.items.form_assignment_tasks:delete`
1331
+ *
1332
+ */
1333
+ static deleteFormAssignmentTask(options) {
1334
+ return (options.client ?? client).delete({
1335
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
1336
+ url: '/api/v1/assets/items/{item_id}/form_assignment_tasks/{id}',
1337
+ ...options
1338
+ });
1339
+ }
1317
1340
  /**
1318
1341
  * Show form assignment
1319
1342
  *
@@ -2119,6 +2142,11 @@ export class Billing {
2119
2142
  /**
2120
2143
  * List PWA user counts
2121
2144
  *
2145
+ * Lists each month's PWA head count per billable unit: a project, or a
2146
+ * job outside any project. Rows run newest month first, then projects by
2147
+ * name, then jobs outside any project by name.
2148
+ *
2149
+ *
2122
2150
  * **Required scope:**
2123
2151
  *
2124
2152
  * `billing.pwa_user_counts_by_project_by_months:read`
@@ -4052,6 +4080,29 @@ export class Jobs {
4052
4080
  }
4053
4081
  });
4054
4082
  }
4083
+ /**
4084
+ * Delete form assignment task on job
4085
+ *
4086
+ * Ends the open incomplete permanent copy of this nested
4087
+ * form-completion task, the same mutation as the web unassign
4088
+ * control. Recurrence stays on PATCH. A copy that is not an
4089
+ * incomplete permanent copy is refused with
4090
+ * `not_incomplete_permanent_copy`. A missing, misnested, or
4091
+ * out-of-scope id reads as not found. Returns `204`.
4092
+ *
4093
+ *
4094
+ * **Required scope:**
4095
+ *
4096
+ * `jobs.form_assignment_tasks:delete`
4097
+ *
4098
+ */
4099
+ static deleteJobFormAssignmentTask(options) {
4100
+ return (options.client ?? client).delete({
4101
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4102
+ url: '/api/v1/jobs/{job_id}/form_assignment_tasks/{id}',
4103
+ ...options
4104
+ });
4105
+ }
4055
4106
  /**
4056
4107
  * Show form assignment task on job
4057
4108
  *
@@ -4212,6 +4263,75 @@ export class Jobs {
4212
4263
  }
4213
4264
  });
4214
4265
  }
4266
+ /**
4267
+ * List WH-347 exports
4268
+ *
4269
+ * Returns the job-scoped WH-347 certified-payroll exports nested on the named
4270
+ * job. A missing or out-of-scope job reads as not found. A visible job with no
4271
+ * exports returns an empty list. Ordered by created_at descending then id.
4272
+ * Read-only. Poll a member GET for generation status and the file URL.
4273
+ *
4274
+ *
4275
+ * **Required scope:**
4276
+ *
4277
+ * `jobs.pwa.certified_payrolls.wh347_exports:read`
4278
+ *
4279
+ */
4280
+ static listWh347Exports(options) {
4281
+ return (options.client ?? client).get({
4282
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4283
+ url: '/api/v1/jobs/{job_id}/pwa/certified_payrolls/wh347_exports',
4284
+ ...options
4285
+ });
4286
+ }
4287
+ /**
4288
+ * Create WH-347 export
4289
+ *
4290
+ * Enqueues a job-scoped WH-347 certified-payroll export over `start_date`..
4291
+ * `end_date`. Returns the pending export (201); poll the member GET for
4292
+ * generation status and the file URL. Requires a user-scoped key. A job
4293
+ * that does not offer WH-347 is 422 `certified_payroll_format_unavailable`.
4294
+ * A window with no reportable pay periods is 422 `nothing_exportable`.
4295
+ * Does not start DocuSeal signing.
4296
+ *
4297
+ *
4298
+ * **Required scope:**
4299
+ *
4300
+ * `jobs.pwa.certified_payrolls.wh347_exports:create`
4301
+ *
4302
+ */
4303
+ static createWh347Export(options) {
4304
+ return (options.client ?? client).post({
4305
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4306
+ url: '/api/v1/jobs/{job_id}/pwa/certified_payrolls/wh347_exports',
4307
+ ...options,
4308
+ headers: {
4309
+ 'Content-Type': 'application/json',
4310
+ ...options.headers
4311
+ }
4312
+ });
4313
+ }
4314
+ /**
4315
+ * Get WH-347 export
4316
+ *
4317
+ * Returns one job-scoped WH-347 export nested on the named job. Poll this
4318
+ * document for generation status; `file` may be null until the file is attached,
4319
+ * including when status is `success`.
4320
+ * A missing, misnested, or out-of-scope id reads as not found. Read-only.
4321
+ *
4322
+ *
4323
+ * **Required scope:**
4324
+ *
4325
+ * `jobs.pwa.certified_payrolls.wh347_exports:read`
4326
+ *
4327
+ */
4328
+ static getWh347Export(options) {
4329
+ return (options.client ?? client).get({
4330
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4331
+ url: '/api/v1/jobs/{job_id}/pwa/certified_payrolls/wh347_exports/{id}',
4332
+ ...options
4333
+ });
4334
+ }
4215
4335
  /**
4216
4336
  * List cure payments
4217
4337
  *
@@ -4629,7 +4749,8 @@ export class ProductionJobScopePrices {
4629
4749
  * manager, or field lead of the company that owns the job,
4630
4750
  * receive `unit_price_cents` and `contracted_count`. Other user
4631
4751
  * keys, held by crew on the job, receive the same rows
4632
- * without those two fields.
4752
+ * without those two fields. A present `unit_price_cents` is an
4753
+ * exact decimal string, or null when the current price is unknown.
4633
4754
  *
4634
4755
  *
4635
4756
  * **Required scope:**
@@ -4649,9 +4770,10 @@ export class ProductionJobScopePrices {
4649
4770
  *
4650
4771
  * Creates a scope price on the URL's job. The body accepts only `scope_kind`,
4651
4772
  * `unit_price_cents`, `contracted_count`, and `unit_of_measure`. Undeclared keys,
4652
- * including the retired dollar `unit_price`, or a missing `scope_kind` or
4653
- * `unit_price_cents` return `400`, and a null or wrong-typed value returns `422`,
4654
- * without creating a price.
4773
+ * including the retired dollar `unit_price`, or a missing `scope_kind` return
4774
+ * `400`. Omit `unit_price_cents` or send null for an unknown price; "0" is a
4775
+ * known zero. Supplied nonnull prices must be nonnegative decimal strings;
4776
+ * blank, numeric, negative, or wrong-typed prices return `422` without a write.
4655
4777
  *
4656
4778
  *
4657
4779
  * **Required scope:**
@@ -4693,7 +4815,8 @@ export class ProductionJobScopePrices {
4693
4815
  * manager, or field lead of the company that owns the job,
4694
4816
  * receive `unit_price_cents` and `contracted_count`. Other user
4695
4817
  * keys, held by crew on the job, receive the price without
4696
- * those two fields.
4818
+ * those two fields. A present `unit_price_cents` is an exact
4819
+ * decimal string, or null when the current price is unknown.
4697
4820
  *
4698
4821
  *
4699
4822
  * **Required scope:**
@@ -4712,9 +4835,11 @@ export class ProductionJobScopePrices {
4712
4835
  * Update production job scope price
4713
4836
  *
4714
4837
  * Updates only the supplied `scope_kind`, `unit_price_cents`, `contracted_count`,
4715
- * and `unit_of_measure`; a null `contracted_count` clears it. Undeclared body
4716
- * keys, including the retired dollar `unit_price`, return `400`, and a null or
4717
- * wrong-typed value elsewhere returns `422`, without changing the scope price.
4838
+ * and `unit_of_measure`. Omission preserves the stored value; null
4839
+ * `unit_price_cents` clears the price to unknown, and null `contracted_count`
4840
+ * clears the target. Undeclared keys, including the retired dollar `unit_price`,
4841
+ * return `400`. Invalid supplied values return `422` without changing the scope
4842
+ * price. Prices remain nonnegative decimal strings; "0" is a known zero.
4718
4843
  * The job stays on the URL.
4719
4844
  *
4720
4845
  *
@@ -5572,6 +5697,30 @@ export class OversiteFeatureFormAssignmentTasks {
5572
5697
  }
5573
5698
  });
5574
5699
  }
5700
+ /**
5701
+ * Delete form assignment task on feature
5702
+ *
5703
+ * Ends the open incomplete permanent copy of this nested
5704
+ * form-completion task, the same mutation as the web unassign
5705
+ * control. Recurrence stays on PATCH. A copy that is not an
5706
+ * incomplete permanent copy is refused with
5707
+ * `not_incomplete_permanent_copy`. A missing, misnested, or
5708
+ * other-company id on this shared feature reads as not found.
5709
+ * Returns `204`.
5710
+ *
5711
+ *
5712
+ * **Required scope:**
5713
+ *
5714
+ * `oversite.sites.features.form_assignment_tasks:delete`
5715
+ *
5716
+ */
5717
+ static deleteFeatureFormAssignmentTask(options) {
5718
+ return (options.client ?? client).delete({
5719
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5720
+ url: '/api/v1/oversite/sites/{site_id}/features/{feature_id}/form_assignment_tasks/{id}',
5721
+ ...options
5722
+ });
5723
+ }
5575
5724
  /**
5576
5725
  * Show form assignment task on feature
5577
5726
  *
@@ -5667,6 +5816,30 @@ export class OversiteSiteFormAssignmentTasks {
5667
5816
  }
5668
5817
  });
5669
5818
  }
5819
+ /**
5820
+ * Delete form assignment task on site
5821
+ *
5822
+ * Ends the open incomplete permanent copy of this nested
5823
+ * form-completion task, the same mutation as the web unassign
5824
+ * control. Recurrence stays on PATCH. A copy that is not an
5825
+ * incomplete permanent copy is refused with
5826
+ * `not_incomplete_permanent_copy`. A missing, misnested, or
5827
+ * other-company id on this shared site reads as not found.
5828
+ * Returns `204`.
5829
+ *
5830
+ *
5831
+ * **Required scope:**
5832
+ *
5833
+ * `oversite.sites.form_assignment_tasks:delete`
5834
+ *
5835
+ */
5836
+ static deleteSiteFormAssignmentTask(options) {
5837
+ return (options.client ?? client).delete({
5838
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5839
+ url: '/api/v1/oversite/sites/{site_id}/form_assignment_tasks/{id}',
5840
+ ...options
5841
+ });
5842
+ }
5670
5843
  /**
5671
5844
  * Show form assignment task on site
5672
5845
  *
@@ -7508,8 +7681,10 @@ export class PerDiems {
7508
7681
  * List per diems
7509
7682
  *
7510
7683
  * List the per diems configured for the company — the named daily allowances
7511
- * (meals, lodging, travel) available to attach to workers' time. Returned newest
7512
- * first; narrow the results with the `filter[...]` query parameters.
7684
+ * (meals, lodging, travel) available to attach to workers' time. Returned oldest
7685
+ * first; narrow the results with the `filter[...]` query parameters. Company keys
7686
+ * and the user keys of company admins and managers can list the catalog; other
7687
+ * user keys are refused with `403`.
7513
7688
  *
7514
7689
  *
7515
7690
  * **Required scope:**
@@ -7571,7 +7746,9 @@ export class PerDiems {
7571
7746
  /**
7572
7747
  * Show per diem
7573
7748
  *
7574
- * Fetch a single per diem by id.
7749
+ * Fetch a single per diem by id. Company keys and the user keys of company
7750
+ * admins and managers can read it; other user keys are refused with `403`.
7751
+ *
7575
7752
  *
7576
7753
  * **Required scope:**
7577
7754
  *
@@ -9749,8 +9926,9 @@ export class TimeEntries {
9749
9926
  * company's default timecodes), state, description, hourly_rate_cents (derived
9750
9927
  * from the position/user default when omitted), and feature_ids. Supplying
9751
9928
  * feature_ids — or setting feature_allocation_acknowledged true — satisfies a
9752
- * job that requires a feature allocation. hourly_rate_cents is admin only on
9753
- * user-scoped keys.
9929
+ * job that requires a feature allocation. The optional overtime premium cents inputs
9930
+ * set the complete tier premiums, additional to base hourly pay. Financial
9931
+ * rate inputs are admin only on user-scoped keys.
9754
9932
  *
9755
9933
  *
9756
9934
  * **Required scope:**
@@ -9827,7 +10005,8 @@ export class TimeEntries {
9827
10005
  * 422 unless confirm_allocation_conflict is sent true. The feature-allocation cap is
9828
10006
  * enforced, and because a persisted feature_ids= writes its join rows
9829
10007
  * immediately, a rejected save rolls them back within the enclosing
9830
- * transaction. hourly_rate_cents is admin only on user-scoped keys.
10008
+ * transaction. Omitted overtime premium cents inputs keep their saved values; null
10009
+ * resets a tier to automatic. Financial rate inputs are admin only on user-scoped keys.
9831
10010
  *
9832
10011
  *
9833
10012
  * **Required scope:**