@dsptch-work/api-client 0.42.0 → 0.44.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.
@@ -4263,6 +4263,75 @@ export class Jobs {
4263
4263
  }
4264
4264
  });
4265
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
+ }
4266
4335
  /**
4267
4336
  * List WH-347 exports
4268
4337
  *
@@ -4740,6 +4809,230 @@ export class Jobs {
4740
4809
  });
4741
4810
  }
4742
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
+ }
4743
5036
  export class ProductionJobScopePrices {
4744
5037
  /**
4745
5038
  * List production job scope prices
@@ -4907,6 +5200,11 @@ export class PwaTrades {
4907
5200
  * decisions carry over where the target holds none of its own, and the emptied
4908
5201
  * craft is deleted — all in one transaction.
4909
5202
  *
5203
+ * A merge is refused (422) when the two crafts decided an occupation's apprentice
5204
+ * scope opposite ways, in scope on one and out of scope on the other. The detail
5205
+ * lists each clash and the employer companies of the occupation's program, whose
5206
+ * admins and managers can change either decision or remove one. Nothing changes.
5207
+ *
4910
5208
  * Use this rather than `DELETE` when the craft still groups determinations:
4911
5209
  * deleting one is refused precisely because it would orphan them, and merging
4912
5210
  * moves them first.
@@ -7872,6 +8170,75 @@ export class PositionFunctions {
7872
8170
  }
7873
8171
  }
7874
8172
  export class ProductionCompletions {
8173
+ /**
8174
+ * List retained completion states
8175
+ *
8176
+ * Lists all authorized retained Completion records: active and withdrawn Feature
8177
+ * claims and current Quantity records. Each identity occurs once with its current
8178
+ * corrected facts. This is not a PaperTrail version or audit-event feed.
8179
+ * Ordinary completion reads remain effective-only. Malformed work-date bounds
8180
+ * return 422 invalid_date; inverted ranges return 422 invalid_filter_value.
8181
+ *
8182
+ *
8183
+ * **Required scope:**
8184
+ *
8185
+ * `production.completions.history:read`
8186
+ *
8187
+ */
8188
+ static listCompletionHistory(options) {
8189
+ return (options?.client ?? client).get({
8190
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
8191
+ url: '/api/v1/production/completions/history',
8192
+ ...options
8193
+ });
8194
+ }
8195
+ /**
8196
+ * Get retained completion state
8197
+ *
8198
+ * Returns one authorized retained Completion with its current corrected facts.
8199
+ * The same lookup remains available after withdrawal or restoration;
8200
+ * it does not return prior versions.
8201
+ *
8202
+ *
8203
+ * **Required scope:**
8204
+ *
8205
+ * `production.completions.history:read`
8206
+ *
8207
+ */
8208
+ static getCompletionHistory(options) {
8209
+ return (options.client ?? client).get({
8210
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
8211
+ url: '/api/v1/production/completions/history/{id}',
8212
+ ...options
8213
+ });
8214
+ }
8215
+ /**
8216
+ * Set completion withdrawal state
8217
+ *
8218
+ * Set withdrawn to true to withdraw a Feature claim, or false to restore its
8219
+ * retained ID. Both commands are idempotent. Restoration returns 422 if another
8220
+ * effective claim already records the same Feature and scope. Quantity
8221
+ * completions do not support either command. No reason or responsible-person
8222
+ * body field is required. The audit actor is the authenticating user,
8223
+ * or null for a company key.
8224
+ *
8225
+ *
8226
+ * **Required scope:**
8227
+ *
8228
+ * `production.completions.withdrawals:update`
8229
+ *
8230
+ */
8231
+ static setCompletionWithdrawal(options) {
8232
+ return (options.client ?? client).patch({
8233
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
8234
+ url: '/api/v1/production/completions/{completion_id}/withdrawal',
8235
+ ...options,
8236
+ headers: {
8237
+ 'Content-Type': 'application/json',
8238
+ ...options.headers
8239
+ }
8240
+ });
8241
+ }
7875
8242
  /**
7876
8243
  * List production completions
7877
8244
  *
@@ -10755,9 +11122,10 @@ export class Todos {
10755
11122
  /**
10756
11123
  * List Todos
10757
11124
  *
10758
- * List your company's open work in one list: todos that are not yet completed, and failing
10759
- * compliance checks on a requirement your company has highlighted. Entries come back
10760
- * soonest-due first, with undated entries last.
11125
+ * List your company's open work in one list: todos that are not yet completed, and
11126
+ * compliance checks on a requirement your company has highlighted that are failing or
11127
+ * waiting for an approval decision (`status` is `failed` or `pending`). Entries come
11128
+ * back soonest-due first, with undated entries last.
10761
11129
  *
10762
11130
  * Read `kind` on an entry before anything else — a `todo` and a `compliance_check` are
10763
11131
  * different resources, with different fields and separate id spaces. Both also carry a