@dsptch-work/api-client 0.41.0 → 0.43.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,144 @@ export class Jobs {
4212
4263
  }
4213
4264
  });
4214
4265
  }
4266
+ /**
4267
+ * List CA eCPR XML exports
4268
+ *
4269
+ * Returns the job-scoped CA DIR eCPR XML certified-payroll exports nested on
4270
+ * the named job. A missing or out-of-scope job reads as not found. A visible
4271
+ * job with no exports returns an empty list. Ordered by created_at descending
4272
+ * then id. Read-only. Poll a member GET for generation status and the file URL.
4273
+ *
4274
+ *
4275
+ * **Required scope:**
4276
+ *
4277
+ * `jobs.pwa.certified_payrolls.ca_ecpr_xml_exports:read`
4278
+ *
4279
+ */
4280
+ static listCaEcprXmlExports(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/ca_ecpr_xml_exports',
4284
+ ...options
4285
+ });
4286
+ }
4287
+ /**
4288
+ * Create CA eCPR XML export
4289
+ *
4290
+ * Enqueues a job-scoped CA DIR eCPR XML certified-payroll export over
4291
+ * `start_date`..`end_date`. Returns the pending export (201); poll the member
4292
+ * GET for generation status and the file URL. Requires a user-scoped key. A
4293
+ * job that does not offer CA eCPR 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.ca_ecpr_xml_exports:create`
4301
+ *
4302
+ */
4303
+ static createCaEcprXmlExport(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/ca_ecpr_xml_exports',
4307
+ ...options,
4308
+ headers: {
4309
+ 'Content-Type': 'application/json',
4310
+ ...options.headers
4311
+ }
4312
+ });
4313
+ }
4314
+ /**
4315
+ * Get CA eCPR XML export
4316
+ *
4317
+ * Returns one job-scoped CA DIR eCPR XML export nested on the named job. Poll
4318
+ * this document for generation status; `file` may be null until the file is
4319
+ * attached, 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.ca_ecpr_xml_exports:read`
4326
+ *
4327
+ */
4328
+ static getCaEcprXmlExport(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/ca_ecpr_xml_exports/{id}',
4332
+ ...options
4333
+ });
4334
+ }
4335
+ /**
4336
+ * List WH-347 exports
4337
+ *
4338
+ * Returns the job-scoped WH-347 certified-payroll exports nested on the named
4339
+ * job. A missing or out-of-scope job reads as not found. A visible job with no
4340
+ * exports returns an empty list. Ordered by created_at descending then id.
4341
+ * Read-only. Poll a member GET for generation status and the file URL.
4342
+ *
4343
+ *
4344
+ * **Required scope:**
4345
+ *
4346
+ * `jobs.pwa.certified_payrolls.wh347_exports:read`
4347
+ *
4348
+ */
4349
+ static listWh347Exports(options) {
4350
+ return (options.client ?? client).get({
4351
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4352
+ url: '/api/v1/jobs/{job_id}/pwa/certified_payrolls/wh347_exports',
4353
+ ...options
4354
+ });
4355
+ }
4356
+ /**
4357
+ * Create WH-347 export
4358
+ *
4359
+ * Enqueues a job-scoped WH-347 certified-payroll export over `start_date`..
4360
+ * `end_date`. Returns the pending export (201); poll the member GET for
4361
+ * generation status and the file URL. Requires a user-scoped key. A job
4362
+ * that does not offer WH-347 is 422 `certified_payroll_format_unavailable`.
4363
+ * A window with no reportable pay periods is 422 `nothing_exportable`.
4364
+ * Does not start DocuSeal signing.
4365
+ *
4366
+ *
4367
+ * **Required scope:**
4368
+ *
4369
+ * `jobs.pwa.certified_payrolls.wh347_exports:create`
4370
+ *
4371
+ */
4372
+ static createWh347Export(options) {
4373
+ return (options.client ?? client).post({
4374
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4375
+ url: '/api/v1/jobs/{job_id}/pwa/certified_payrolls/wh347_exports',
4376
+ ...options,
4377
+ headers: {
4378
+ 'Content-Type': 'application/json',
4379
+ ...options.headers
4380
+ }
4381
+ });
4382
+ }
4383
+ /**
4384
+ * Get WH-347 export
4385
+ *
4386
+ * Returns one job-scoped WH-347 export nested on the named job. Poll this
4387
+ * document for generation status; `file` may be null until the file is attached,
4388
+ * including when status is `success`.
4389
+ * A missing, misnested, or out-of-scope id reads as not found. Read-only.
4390
+ *
4391
+ *
4392
+ * **Required scope:**
4393
+ *
4394
+ * `jobs.pwa.certified_payrolls.wh347_exports:read`
4395
+ *
4396
+ */
4397
+ static getWh347Export(options) {
4398
+ return (options.client ?? client).get({
4399
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4400
+ url: '/api/v1/jobs/{job_id}/pwa/certified_payrolls/wh347_exports/{id}',
4401
+ ...options
4402
+ });
4403
+ }
4215
4404
  /**
4216
4405
  * List cure payments
4217
4406
  *
@@ -4620,6 +4809,230 @@ export class Jobs {
4620
4809
  });
4621
4810
  }
4622
4811
  }
4812
+ export class ProductionDeliveryTargets {
4813
+ /**
4814
+ * List delivery targets
4815
+ *
4816
+ * Lists the scope's targets in due-date, then ID order. Each target
4817
+ * is assessed against the whole current named scope and effective
4818
+ * completion evidence; pagination limits targets, never evidence.
4819
+ * Missing named membership or evidence visibility makes the
4820
+ * assessment unavailable while preserving explicit target facts.
4821
+ *
4822
+ *
4823
+ * **Required scope:**
4824
+ *
4825
+ * `jobs.production.delivery_targets:read`
4826
+ *
4827
+ */
4828
+ static listDeliveryTargets(options) {
4829
+ return (options.client ?? client).get({
4830
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4831
+ url: '/api/v1/jobs/{job_id}/production/job_scope_prices/{job_scope_price_id}/delivery_targets',
4832
+ ...options
4833
+ });
4834
+ }
4835
+ /**
4836
+ * Create delivery target
4837
+ *
4838
+ * Creates one scope-owned target with a server-selected whole-service
4839
+ * condition. Accepts a Job-local due_date and condition_attributes
4840
+ * containing requirement_kind (count or all) and required_count.
4841
+ * Count requires a positive integer; all requires no count. Only
4842
+ * Feature-tracked Jobs admit targets. Company keys need no human
4843
+ * attribution field; user keys use the authenticated user for audit.
4844
+ *
4845
+ *
4846
+ * **Required scope:**
4847
+ *
4848
+ * `jobs.production.delivery_targets:create`
4849
+ *
4850
+ */
4851
+ static createDeliveryTarget(options) {
4852
+ return (options.client ?? client).post({
4853
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4854
+ url: '/api/v1/jobs/{job_id}/production/job_scope_prices/{job_scope_price_id}/delivery_targets',
4855
+ ...options,
4856
+ headers: {
4857
+ 'Content-Type': 'application/json',
4858
+ ...options.headers
4859
+ }
4860
+ });
4861
+ }
4862
+ /**
4863
+ * Delete delivery target
4864
+ *
4865
+ * Removes an erroneous target and its owned condition. Returns 204
4866
+ * with no response body. Current named work, Tasks, completions and
4867
+ * other targets remain. A later GET of the removed target is 404.
4868
+ *
4869
+ *
4870
+ * **Required scope:**
4871
+ *
4872
+ * `jobs.production.delivery_targets:delete`
4873
+ *
4874
+ */
4875
+ static deleteDeliveryTarget(options) {
4876
+ return (options.client ?? client).delete({
4877
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4878
+ url: '/api/v1/jobs/{job_id}/production/job_scope_prices/{job_scope_price_id}/delivery_targets/{id}',
4879
+ ...options
4880
+ });
4881
+ }
4882
+ /**
4883
+ * Get delivery target
4884
+ *
4885
+ * **Required scope:**
4886
+ *
4887
+ * `jobs.production.delivery_targets:read`
4888
+ *
4889
+ */
4890
+ static getDeliveryTarget(options) {
4891
+ return (options.client ?? client).get({
4892
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4893
+ url: '/api/v1/jobs/{job_id}/production/job_scope_prices/{job_scope_price_id}/delivery_targets/{id}',
4894
+ ...options
4895
+ });
4896
+ }
4897
+ /**
4898
+ * Update delivery target
4899
+ *
4900
+ * Changes only submitted date and condition fields. Omissions keep
4901
+ * locked current values, including required_count when the mode
4902
+ * changes. Switch count to all with required_count null, or all to
4903
+ * count with a positive N. The resulting whole rule must be valid.
4904
+ * Target and condition identities are preserved; neither can be moved.
4905
+ *
4906
+ *
4907
+ * **Required scope:**
4908
+ *
4909
+ * `jobs.production.delivery_targets:update`
4910
+ *
4911
+ */
4912
+ static updateDeliveryTarget(options) {
4913
+ return (options.client ?? client).patch({
4914
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4915
+ url: '/api/v1/jobs/{job_id}/production/job_scope_prices/{job_scope_price_id}/delivery_targets/{id}',
4916
+ ...options,
4917
+ headers: {
4918
+ 'Content-Type': 'application/json',
4919
+ ...options.headers
4920
+ }
4921
+ });
4922
+ }
4923
+ }
4924
+ export class ProductionPlannedFeatureTasks {
4925
+ /**
4926
+ * Set planned Feature archive state
4927
+ *
4928
+ * Set archived to true to remove current named membership,
4929
+ * or false to restore the same pair. Actual reports are retained.
4930
+ * This is an idempotent desired-state operation. Company keys
4931
+ * name a responsible company-member human on every call.
4932
+ * User keys act only as their authenticated user. Wrong Job
4933
+ * kind or ineligible restoration returns 422 from domain validity.
4934
+ *
4935
+ *
4936
+ * **Required scope:**
4937
+ *
4938
+ * `jobs.production.job_scope_prices.planned_feature_tasks.archives:update`
4939
+ *
4940
+ */
4941
+ static updateArchive(options) {
4942
+ return (options.client ?? client).patch({
4943
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4944
+ url: '/api/v1/jobs/{job_id}/production/job_scope_prices/{job_scope_price_id}/planned_feature_tasks/{planned_feature_task_id}/archive',
4945
+ ...options,
4946
+ headers: {
4947
+ 'Content-Type': 'application/json',
4948
+ ...options.headers
4949
+ }
4950
+ });
4951
+ }
4952
+ /**
4953
+ * List planned Feature work
4954
+ *
4955
+ * **Required scope:**
4956
+ *
4957
+ * `jobs.production.job_scope_prices.planned_feature_tasks:read`
4958
+ *
4959
+ */
4960
+ static listPlannedFeatureTasks(options) {
4961
+ return (options.client ?? client).get({
4962
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4963
+ url: '/api/v1/jobs/{job_id}/production/job_scope_prices/{job_scope_price_id}/planned_feature_tasks',
4964
+ ...options
4965
+ });
4966
+ }
4967
+ /**
4968
+ * Add planned Feature work
4969
+ *
4970
+ * Adds or restores the retained scope/Feature pair. Omitted
4971
+ * metadata remains unchanged on re-add. Company keys must
4972
+ * name performed_by_user_id on every write (400 if absent,
4973
+ * 422 if invalid or outside the company). User keys use only
4974
+ * their authenticated user; another person's UUID is 403.
4975
+ * Optional intended people never become actual crew.
4976
+ *
4977
+ *
4978
+ * **Required scope:**
4979
+ *
4980
+ * `jobs.production.job_scope_prices.planned_feature_tasks:create`
4981
+ *
4982
+ */
4983
+ static createPlannedFeatureTask(options) {
4984
+ return (options.client ?? client).post({
4985
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4986
+ url: '/api/v1/jobs/{job_id}/production/job_scope_prices/{job_scope_price_id}/planned_feature_tasks',
4987
+ ...options,
4988
+ headers: {
4989
+ 'Content-Type': 'application/json',
4990
+ ...options.headers
4991
+ }
4992
+ });
4993
+ }
4994
+ /**
4995
+ * Get planned Feature work
4996
+ *
4997
+ * **Required scope:**
4998
+ *
4999
+ * `jobs.production.job_scope_prices.planned_feature_tasks:read`
5000
+ *
5001
+ */
5002
+ static getPlannedFeatureTask(options) {
5003
+ return (options.client ?? client).get({
5004
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5005
+ url: '/api/v1/jobs/{job_id}/production/job_scope_prices/{job_scope_price_id}/planned_feature_tasks/{id}',
5006
+ ...options
5007
+ });
5008
+ }
5009
+ /**
5010
+ * Update planned Feature metadata
5011
+ *
5012
+ * Edits intended metadata, never actual work facts. Company
5013
+ * keys name a responsible company member on every write.
5014
+ * User keys may omit the actor or supply their own UUID;
5015
+ * a different UUID is forbidden. Omitted fields are preserved,
5016
+ * nullable fields may be cleared, and [] clears intended people.
5017
+ *
5018
+ *
5019
+ * **Required scope:**
5020
+ *
5021
+ * `jobs.production.job_scope_prices.planned_feature_tasks:update`
5022
+ *
5023
+ */
5024
+ static updatePlannedFeatureTask(options) {
5025
+ return (options.client ?? client).patch({
5026
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
5027
+ url: '/api/v1/jobs/{job_id}/production/job_scope_prices/{job_scope_price_id}/planned_feature_tasks/{id}',
5028
+ ...options,
5029
+ headers: {
5030
+ 'Content-Type': 'application/json',
5031
+ ...options.headers
5032
+ }
5033
+ });
5034
+ }
5035
+ }
4623
5036
  export class ProductionJobScopePrices {
4624
5037
  /**
4625
5038
  * List production job scope prices
@@ -4629,7 +5042,8 @@ export class ProductionJobScopePrices {
4629
5042
  * manager, or field lead of the company that owns the job,
4630
5043
  * receive `unit_price_cents` and `contracted_count`. Other user
4631
5044
  * keys, held by crew on the job, receive the same rows
4632
- * without those two fields.
5045
+ * without those two fields. A present `unit_price_cents` is an
5046
+ * exact decimal string, or null when the current price is unknown.
4633
5047
  *
4634
5048
  *
4635
5049
  * **Required scope:**
@@ -4649,9 +5063,10 @@ export class ProductionJobScopePrices {
4649
5063
  *
4650
5064
  * Creates a scope price on the URL's job. The body accepts only `scope_kind`,
4651
5065
  * `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.
5066
+ * including the retired dollar `unit_price`, or a missing `scope_kind` return
5067
+ * `400`. Omit `unit_price_cents` or send null for an unknown price; "0" is a
5068
+ * known zero. Supplied nonnull prices must be nonnegative decimal strings;
5069
+ * blank, numeric, negative, or wrong-typed prices return `422` without a write.
4655
5070
  *
4656
5071
  *
4657
5072
  * **Required scope:**
@@ -4693,7 +5108,8 @@ export class ProductionJobScopePrices {
4693
5108
  * manager, or field lead of the company that owns the job,
4694
5109
  * receive `unit_price_cents` and `contracted_count`. Other user
4695
5110
  * keys, held by crew on the job, receive the price without
4696
- * those two fields.
5111
+ * those two fields. A present `unit_price_cents` is an exact
5112
+ * decimal string, or null when the current price is unknown.
4697
5113
  *
4698
5114
  *
4699
5115
  * **Required scope:**
@@ -4712,9 +5128,11 @@ export class ProductionJobScopePrices {
4712
5128
  * Update production job scope price
4713
5129
  *
4714
5130
  * 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.
5131
+ * and `unit_of_measure`. Omission preserves the stored value; null
5132
+ * `unit_price_cents` clears the price to unknown, and null `contracted_count`
5133
+ * clears the target. Undeclared keys, including the retired dollar `unit_price`,
5134
+ * return `400`. Invalid supplied values return `422` without changing the scope
5135
+ * price. Prices remain nonnegative decimal strings; "0" is a known zero.
4718
5136
  * The job stays on the URL.
4719
5137
  *
4720
5138
  *
@@ -5572,6 +5990,30 @@ export class OversiteFeatureFormAssignmentTasks {
5572
5990
  }
5573
5991
  });
5574
5992
  }
5993
+ /**
5994
+ * Delete form assignment task on feature
5995
+ *
5996
+ * Ends the open incomplete permanent copy of this nested
5997
+ * form-completion task, the same mutation as the web unassign
5998
+ * control. Recurrence stays on PATCH. A copy that is not an
5999
+ * incomplete permanent copy is refused with
6000
+ * `not_incomplete_permanent_copy`. A missing, misnested, or
6001
+ * other-company id on this shared feature reads as not found.
6002
+ * Returns `204`.
6003
+ *
6004
+ *
6005
+ * **Required scope:**
6006
+ *
6007
+ * `oversite.sites.features.form_assignment_tasks:delete`
6008
+ *
6009
+ */
6010
+ static deleteFeatureFormAssignmentTask(options) {
6011
+ return (options.client ?? client).delete({
6012
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6013
+ url: '/api/v1/oversite/sites/{site_id}/features/{feature_id}/form_assignment_tasks/{id}',
6014
+ ...options
6015
+ });
6016
+ }
5575
6017
  /**
5576
6018
  * Show form assignment task on feature
5577
6019
  *
@@ -5667,6 +6109,30 @@ export class OversiteSiteFormAssignmentTasks {
5667
6109
  }
5668
6110
  });
5669
6111
  }
6112
+ /**
6113
+ * Delete form assignment task on site
6114
+ *
6115
+ * Ends the open incomplete permanent copy of this nested
6116
+ * form-completion task, the same mutation as the web unassign
6117
+ * control. Recurrence stays on PATCH. A copy that is not an
6118
+ * incomplete permanent copy is refused with
6119
+ * `not_incomplete_permanent_copy`. A missing, misnested, or
6120
+ * other-company id on this shared site reads as not found.
6121
+ * Returns `204`.
6122
+ *
6123
+ *
6124
+ * **Required scope:**
6125
+ *
6126
+ * `oversite.sites.form_assignment_tasks:delete`
6127
+ *
6128
+ */
6129
+ static deleteSiteFormAssignmentTask(options) {
6130
+ return (options.client ?? client).delete({
6131
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
6132
+ url: '/api/v1/oversite/sites/{site_id}/form_assignment_tasks/{id}',
6133
+ ...options
6134
+ });
6135
+ }
5670
6136
  /**
5671
6137
  * Show form assignment task on site
5672
6138
  *
@@ -7508,8 +7974,10 @@ export class PerDiems {
7508
7974
  * List per diems
7509
7975
  *
7510
7976
  * 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.
7977
+ * (meals, lodging, travel) available to attach to workers' time. Returned oldest
7978
+ * first; narrow the results with the `filter[...]` query parameters. Company keys
7979
+ * and the user keys of company admins and managers can list the catalog; other
7980
+ * user keys are refused with `403`.
7513
7981
  *
7514
7982
  *
7515
7983
  * **Required scope:**
@@ -7571,7 +8039,9 @@ export class PerDiems {
7571
8039
  /**
7572
8040
  * Show per diem
7573
8041
  *
7574
- * Fetch a single per diem by id.
8042
+ * Fetch a single per diem by id. Company keys and the user keys of company
8043
+ * admins and managers can read it; other user keys are refused with `403`.
8044
+ *
7575
8045
  *
7576
8046
  * **Required scope:**
7577
8047
  *
@@ -7695,6 +8165,75 @@ export class PositionFunctions {
7695
8165
  }
7696
8166
  }
7697
8167
  export class ProductionCompletions {
8168
+ /**
8169
+ * List retained completion states
8170
+ *
8171
+ * Lists all authorized retained Completion records: active and withdrawn Feature
8172
+ * claims and current Quantity records. Each identity occurs once with its current
8173
+ * corrected facts. This is not a PaperTrail version or audit-event feed.
8174
+ * Ordinary completion reads remain effective-only. Malformed work-date bounds
8175
+ * return 422 invalid_date; inverted ranges return 422 invalid_filter_value.
8176
+ *
8177
+ *
8178
+ * **Required scope:**
8179
+ *
8180
+ * `production.completions.history:read`
8181
+ *
8182
+ */
8183
+ static listCompletionHistory(options) {
8184
+ return (options?.client ?? client).get({
8185
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
8186
+ url: '/api/v1/production/completions/history',
8187
+ ...options
8188
+ });
8189
+ }
8190
+ /**
8191
+ * Get retained completion state
8192
+ *
8193
+ * Returns one authorized retained Completion with its current corrected facts.
8194
+ * The same lookup remains available after withdrawal or restoration;
8195
+ * it does not return prior versions.
8196
+ *
8197
+ *
8198
+ * **Required scope:**
8199
+ *
8200
+ * `production.completions.history:read`
8201
+ *
8202
+ */
8203
+ static getCompletionHistory(options) {
8204
+ return (options.client ?? client).get({
8205
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
8206
+ url: '/api/v1/production/completions/history/{id}',
8207
+ ...options
8208
+ });
8209
+ }
8210
+ /**
8211
+ * Set completion withdrawal state
8212
+ *
8213
+ * Set withdrawn to true to withdraw a Feature claim, or false to restore its
8214
+ * retained ID. Both commands are idempotent. Restoration returns 422 if another
8215
+ * effective claim already records the same Feature and scope. Quantity
8216
+ * completions do not support either command. No reason or responsible-person
8217
+ * body field is required. The audit actor is the authenticating user,
8218
+ * or null for a company key.
8219
+ *
8220
+ *
8221
+ * **Required scope:**
8222
+ *
8223
+ * `production.completions.withdrawals:update`
8224
+ *
8225
+ */
8226
+ static setCompletionWithdrawal(options) {
8227
+ return (options.client ?? client).patch({
8228
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
8229
+ url: '/api/v1/production/completions/{completion_id}/withdrawal',
8230
+ ...options,
8231
+ headers: {
8232
+ 'Content-Type': 'application/json',
8233
+ ...options.headers
8234
+ }
8235
+ });
8236
+ }
7698
8237
  /**
7699
8238
  * List production completions
7700
8239
  *
@@ -9749,8 +10288,9 @@ export class TimeEntries {
9749
10288
  * company's default timecodes), state, description, hourly_rate_cents (derived
9750
10289
  * from the position/user default when omitted), and feature_ids. Supplying
9751
10290
  * 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.
10291
+ * job that requires a feature allocation. The optional overtime premium cents inputs
10292
+ * set the complete tier premiums, additional to base hourly pay. Financial
10293
+ * rate inputs are admin only on user-scoped keys.
9754
10294
  *
9755
10295
  *
9756
10296
  * **Required scope:**
@@ -9827,7 +10367,8 @@ export class TimeEntries {
9827
10367
  * 422 unless confirm_allocation_conflict is sent true. The feature-allocation cap is
9828
10368
  * enforced, and because a persisted feature_ids= writes its join rows
9829
10369
  * immediately, a rejected save rolls them back within the enclosing
9830
- * transaction. hourly_rate_cents is admin only on user-scoped keys.
10370
+ * transaction. Omitted overtime premium cents inputs keep their saved values; null
10371
+ * resets a tier to automatic. Financial rate inputs are admin only on user-scoped keys.
9831
10372
  *
9832
10373
  *
9833
10374
  * **Required scope:**