@dsptch-work/api-client 0.42.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.
@@ -238,7 +238,7 @@ export const zProblem = z.object({
238
238
  *
239
239
  * **Certified Payroll Format Unavailable**
240
240
  *
241
- * The named job does not offer this certified payroll format. WH-347 is available only on a job that tracks federal prevailing wage. Use a job that offers the format.
241
+ * The named job does not offer this certified payroll format. Each format is available only on a job that tracks the matching prevailing-wage jurisdiction. Use a job that offers the format.
242
242
  *
243
243
  * ### company_not_employer
244
244
  *
@@ -5240,6 +5240,44 @@ export const zJobGoodFaithEffortExceptionUpdateParameters = z.object({
5240
5240
  no_availability_proof_signed_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional(),
5241
5241
  performed_by_user_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/).optional()
5242
5242
  });
5243
+ /**
5244
+ * A job-scoped CA DIR eCPR XML certified-payroll export. The generation handle is polled through this same document; `file` is null until an XML or ZIP is attached. Signing fields are not published. This format has no form version.
5245
+ */
5246
+ export const zJobCaEcprXmlExportResponseObject = z.object({
5247
+ id: z.string(),
5248
+ job_id: z.string(),
5249
+ start_date: z.iso.date(),
5250
+ end_date: z.iso.date(),
5251
+ status: z.enum([
5252
+ 'pending',
5253
+ 'processing',
5254
+ 'signing',
5255
+ 'signed',
5256
+ 'certifying',
5257
+ 'success',
5258
+ 'failed'
5259
+ ]),
5260
+ file: z.object({
5261
+ filename: z.string(),
5262
+ content_type: z.string().nullable(),
5263
+ byte_size: z.int(),
5264
+ url: z.string()
5265
+ }).nullable(),
5266
+ invalidated_at: z.iso.datetime().nullable(),
5267
+ invalidation_reason: z.enum([
5268
+ 'source_data_changed',
5269
+ 'source_records_deleted',
5270
+ 'ratio_status_changed'
5271
+ ]).nullable(),
5272
+ created_at: z.iso.datetime()
5273
+ });
5274
+ /**
5275
+ * Start a job-scoped CA DIR eCPR XML certified-payroll export over a calendar window. Creation requires a user-scoped API key, because the generation handle attributes the export to a person. The response is the pending export; poll the member GET for status and the file URL. Filename is server-owned. A job that does not offer CA eCPR answers 422 certified_payroll_format_unavailable. A window with no reportable pay periods answers 422 nothing_exportable.
5276
+ */
5277
+ export const zJobCaEcprXmlExportCreateParameters = z.object({
5278
+ start_date: z.iso.date(),
5279
+ end_date: z.iso.date()
5280
+ });
5243
5281
  /**
5244
5282
  * A job-scoped WH-347 certified-payroll export. The generation handle is polled through this same document; `file` is null until a ZIP is attached. Signing fields are not published.
5245
5283
  */
@@ -5873,6 +5911,101 @@ export const zProductionJobScopePriceResponseObject = z.object({
5873
5911
  created_at: z.iso.datetime(),
5874
5912
  updated_at: z.iso.datetime()
5875
5913
  });
5914
+ /**
5915
+ * Add one named intention. Re-adding a retained pair preserves omitted metadata and restores its membership.
5916
+ */
5917
+ export const zProductionPlannedFeatureTaskParameters = z.object({
5918
+ name: z.string().optional(),
5919
+ description: z.string().nullish(),
5920
+ time_due: z.iso.datetime().nullish(),
5921
+ tz_name: z.string().optional(),
5922
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
5923
+ performed_by_user_id: z.string().max(36).regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/).optional(),
5924
+ feature_id: z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)
5925
+ });
5926
+ /**
5927
+ * Edit only intended Task metadata, preserving every omitted field and the original creator.
5928
+ */
5929
+ export const zProductionPlannedFeatureTaskUpdateParameters = z.object({
5930
+ name: z.string().optional(),
5931
+ description: z.string().nullish(),
5932
+ time_due: z.iso.datetime().nullish(),
5933
+ tz_name: z.string().optional(),
5934
+ task_assignee_user_ids: z.array(z.string().regex(/[^\x09-\x0D\x20…   - ‧-‪   ]|[‧‪]/)).optional(),
5935
+ performed_by_user_id: z.string().max(36).regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/).optional()
5936
+ });
5937
+ /**
5938
+ * Set retained membership idempotently, without removing the pair, its Task or actual evidence.
5939
+ */
5940
+ export const zProductionPlannedFeatureTaskArchiveParameters = z.object({
5941
+ archived: z.boolean(),
5942
+ performed_by_user_id: z.string().max(36).regex(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/).optional()
5943
+ });
5944
+ /**
5945
+ * One retained scope/Feature intention and its optional intended metadata. Actual Completion remains the sole production evidence.
5946
+ */
5947
+ export const zProductionPlannedFeatureTaskResponseObject = z.object({
5948
+ id: z.string(),
5949
+ production_job_scope_price_id: z.string(),
5950
+ feature_id: z.string(),
5951
+ task_id: z.string(),
5952
+ production_completion_id: z.string().nullable(),
5953
+ archived_at: z.iso.datetime().nullable(),
5954
+ name: z.string(),
5955
+ description: z.string(),
5956
+ time_due: z.iso.datetime().nullable(),
5957
+ tz_name: z.string(),
5958
+ task_assignee_user_ids: z.array(z.string()),
5959
+ created_at: z.iso.datetime(),
5960
+ updated_at: z.iso.datetime()
5961
+ });
5962
+ /**
5963
+ * Create a dated commitment on a Feature-tracked Job scope. The date and condition object are required; condition.requirement_kind is required. Omission answers 400. The server chooses and owns the condition type and identity. A Quantity-tracked scope answers 422. No performed_by_user_id is required or accepted; audit records the authenticated user, or null for a company key.
5964
+ */
5965
+ export const zProductionDeliveryTargetParameters = z.object({
5966
+ due_date: z.iso.date(),
5967
+ condition_attributes: z.object({
5968
+ requirement_kind: z.enum(['count', 'all']),
5969
+ required_count: z.int().gte(1).nullish()
5970
+ })
5971
+ });
5972
+ /**
5973
+ * Change a target's date or whole-service rule. Omitted fields retain their current values, including required_count when changing modes. Send required_count null when switching count to all; send a positive count when switching all to count. The server preserves target and condition identities. Null date, condition object or requirement kind answers 422. A rejected write changes neither record.
5974
+ */
5975
+ export const zProductionDeliveryTargetUpdateParameters = z.object({
5976
+ due_date: z.iso.date().optional(),
5977
+ condition_attributes: z.object({
5978
+ requirement_kind: z.enum(['count', 'all']).optional(),
5979
+ required_count: z.int().gte(1).nullish()
5980
+ }).optional()
5981
+ });
5982
+ /**
5983
+ * A scope-owned target and current assessment. No Feature identities, private counts or prices are exposed. Assessments use current named membership and effective actual work dates, rather than Task completion flags or filing times.
5984
+ */
5985
+ export const zProductionDeliveryTargetResponseObject = z.object({
5986
+ id: z.string(),
5987
+ production_job_scope_price_id: z.string(),
5988
+ due_date: z.iso.date(),
5989
+ condition: z.object({
5990
+ requirement_kind: z.enum(['count', 'all']),
5991
+ required_count: z.int().nullable()
5992
+ }),
5993
+ assessment: z.object({
5994
+ required_total: z.int().nullable(),
5995
+ qualifying_count: z.int().nullable(),
5996
+ current_achieved_count: z.int().nullable(),
5997
+ shortfall: z.int().nullable(),
5998
+ state: z.enum([
5999
+ 'unavailable',
6000
+ 'awaiting_named_scope',
6001
+ 'met_by_date',
6002
+ 'remaining_before_deadline',
6003
+ 'shortfall_after_deadline'
6004
+ ])
6005
+ }),
6006
+ created_at: z.iso.datetime(),
6007
+ updated_at: z.iso.datetime()
6008
+ });
5876
6009
  /**
5877
6010
  * Record a completion against a scope price. The server takes the completable subtype from the production tracking kind of the scope price's job, never from the request: a feature-tracked job records which feature was completed, and a quantity-tracked job how many units were completed. completable_attributes declares both kinds' keys; sending the other kind's key answers 422 subtype_foreign_keys with an entry pointing at it, and nothing is written.
5878
6011
  */
@@ -5898,6 +6031,12 @@ export const zProductionCompletionUpdateParameters = z.object({
5898
6031
  quantity_completed: z.int().gte(1).optional()
5899
6032
  }).optional()
5900
6033
  });
6034
+ /**
6035
+ * Explicit retained Feature lifecycle command. Both states are idempotent; Quantity withdrawal and restoration return 422.
6036
+ */
6037
+ export const zProductionCompletionWithdrawalParameters = z.object({
6038
+ withdrawn: z.boolean()
6039
+ });
5901
6040
  /**
5902
6041
  * A completion recorded on a feature-tracked job — a unit of scoped work finished by a crew, identifying which feature was completed.
5903
6042
  */
@@ -5915,7 +6054,8 @@ export const zProductionFeatureCompletionResponseObject = z.object({
5915
6054
  feature_id: z.string(),
5916
6055
  created_at: z.iso.datetime(),
5917
6056
  updated_at: z.iso.datetime(),
5918
- work_date: z.iso.date()
6057
+ work_date: z.iso.date(),
6058
+ withdrawn_at: z.iso.datetime().nullable()
5919
6059
  });
5920
6060
  /**
5921
6061
  * A completion recorded on a quantity-tracked job — a unit of scoped work finished by a crew, counting how many units were completed.
@@ -5934,7 +6074,8 @@ export const zProductionQuantityCompletionResponseObject = z.object({
5934
6074
  quantity_completed: z.int(),
5935
6075
  created_at: z.iso.datetime(),
5936
6076
  updated_at: z.iso.datetime(),
5937
- work_date: z.iso.date()
6077
+ work_date: z.iso.date(),
6078
+ withdrawn_at: z.iso.datetime().nullable()
5938
6079
  });
5939
6080
  /**
5940
6081
  * A recorded production completion. The completable_type discriminator selects the feature-tracked or quantity-tracked representation.
@@ -6536,6 +6677,14 @@ export const zJobGoodFaithEffortExceptionsResponseObject = z.object({
6536
6677
  links: zLinks,
6537
6678
  data: z.array(zJobGoodFaithEffortExceptionResponseObject)
6538
6679
  });
6680
+ /**
6681
+ * A page of a job's CA DIR eCPR XML certified-payroll exports, with pagination metadata and navigation links.
6682
+ */
6683
+ export const zJobCaEcprXmlExportsResponseObject = z.object({
6684
+ meta: zMeta,
6685
+ links: zLinks,
6686
+ data: z.array(zJobCaEcprXmlExportResponseObject)
6687
+ });
6539
6688
  /**
6540
6689
  * A page of a job's WH-347 certified-payroll exports, with pagination metadata and navigation links.
6541
6690
  */
@@ -11058,6 +11207,118 @@ export const zUpdateJobFormAssignmentTaskPath = z.object({
11058
11207
  * Success
11059
11208
  */
11060
11209
  export const zUpdateJobFormAssignmentTaskResponse = zJobFormAssignmentResponseObject;
11210
+ export const zListDeliveryTargetsPath = z.object({
11211
+ job_id: z.string(),
11212
+ job_scope_price_id: z.string()
11213
+ });
11214
+ export const zListDeliveryTargetsQuery = z.object({
11215
+ 'page[cursor]': z.string().optional(),
11216
+ 'page[limit]': z.int().gte(1).optional().default(20),
11217
+ page: z.string().optional()
11218
+ });
11219
+ /**
11220
+ * Success
11221
+ */
11222
+ export const zListDeliveryTargetsResponse = z.object({
11223
+ meta: zMeta,
11224
+ links: zLinks,
11225
+ data: z.array(zProductionDeliveryTargetResponseObject)
11226
+ });
11227
+ export const zCreateDeliveryTargetBody = zProductionDeliveryTargetParameters;
11228
+ export const zCreateDeliveryTargetPath = z.object({
11229
+ job_id: z.string(),
11230
+ job_scope_price_id: z.string()
11231
+ });
11232
+ /**
11233
+ * Created
11234
+ */
11235
+ export const zCreateDeliveryTargetResponse = zProductionDeliveryTargetResponseObject;
11236
+ export const zDeleteDeliveryTargetPath = z.object({
11237
+ job_id: z.string(),
11238
+ job_scope_price_id: z.string(),
11239
+ id: z.string()
11240
+ });
11241
+ /**
11242
+ * No Content
11243
+ */
11244
+ export const zDeleteDeliveryTargetResponse = z.void();
11245
+ export const zGetDeliveryTargetPath = z.object({
11246
+ job_id: z.string(),
11247
+ job_scope_price_id: z.string(),
11248
+ id: z.string()
11249
+ });
11250
+ /**
11251
+ * Success
11252
+ */
11253
+ export const zGetDeliveryTargetResponse = zProductionDeliveryTargetResponseObject;
11254
+ export const zUpdateDeliveryTargetBody = zProductionDeliveryTargetUpdateParameters;
11255
+ export const zUpdateDeliveryTargetPath = z.object({
11256
+ job_id: z.string(),
11257
+ job_scope_price_id: z.string(),
11258
+ id: z.string()
11259
+ });
11260
+ /**
11261
+ * Success
11262
+ */
11263
+ export const zUpdateDeliveryTargetResponse = zProductionDeliveryTargetResponseObject;
11264
+ export const zUpdateArchiveBody = zProductionPlannedFeatureTaskArchiveParameters;
11265
+ export const zUpdateArchivePath = z.object({
11266
+ job_id: z.string(),
11267
+ job_scope_price_id: z.string(),
11268
+ planned_feature_task_id: z.string()
11269
+ });
11270
+ /**
11271
+ * Success
11272
+ */
11273
+ export const zUpdateArchiveResponse = zProductionPlannedFeatureTaskResponseObject;
11274
+ export const zListPlannedFeatureTasksPath = z.object({
11275
+ job_id: z.string(),
11276
+ job_scope_price_id: z.string()
11277
+ });
11278
+ export const zListPlannedFeatureTasksQuery = z.object({
11279
+ 'filter[archived]': z.boolean().optional(),
11280
+ filter: z.string().optional(),
11281
+ 'filter[unexpected]': z.string().optional(),
11282
+ 'page[cursor]': z.string().optional(),
11283
+ 'page[limit]': z.int().gte(1).optional().default(20),
11284
+ page: z.string().optional()
11285
+ });
11286
+ /**
11287
+ * Success
11288
+ */
11289
+ export const zListPlannedFeatureTasksResponse = z.object({
11290
+ meta: zMeta,
11291
+ links: zLinks,
11292
+ data: z.array(zProductionPlannedFeatureTaskResponseObject)
11293
+ });
11294
+ export const zCreatePlannedFeatureTaskBody = zProductionPlannedFeatureTaskParameters;
11295
+ export const zCreatePlannedFeatureTaskPath = z.object({
11296
+ job_id: z.string(),
11297
+ job_scope_price_id: z.string()
11298
+ });
11299
+ /**
11300
+ * Created
11301
+ */
11302
+ export const zCreatePlannedFeatureTaskResponse = zProductionPlannedFeatureTaskResponseObject;
11303
+ export const zGetPlannedFeatureTaskPath = z.object({
11304
+ job_id: z.string(),
11305
+ job_scope_price_id: z.string(),
11306
+ id: z.string()
11307
+ });
11308
+ /**
11309
+ * Success
11310
+ */
11311
+ export const zGetPlannedFeatureTaskResponse = zProductionPlannedFeatureTaskResponseObject;
11312
+ export const zUpdatePlannedFeatureTaskBody = zProductionPlannedFeatureTaskUpdateParameters;
11313
+ export const zUpdatePlannedFeatureTaskPath = z.object({
11314
+ job_id: z.string(),
11315
+ job_scope_price_id: z.string(),
11316
+ id: z.string()
11317
+ });
11318
+ /**
11319
+ * Success
11320
+ */
11321
+ export const zUpdatePlannedFeatureTaskResponse = zProductionPlannedFeatureTaskResponseObject;
11061
11322
  export const zListJobScopePricesPath = z.object({
11062
11323
  job_id: z.string()
11063
11324
  });
@@ -11161,6 +11422,37 @@ export const zUpdateGoodFaithEffortExceptionPath = z.object({
11161
11422
  * Success
11162
11423
  */
11163
11424
  export const zUpdateGoodFaithEffortExceptionResponse = zJobGoodFaithEffortExceptionResponseObject;
11425
+ export const zListCaEcprXmlExportsPath = z.object({
11426
+ job_id: z.string()
11427
+ });
11428
+ export const zListCaEcprXmlExportsQuery = z.object({
11429
+ 'filter[status]': z.string().optional(),
11430
+ filter: z.string().optional(),
11431
+ 'filter[unexpected]': z.string().optional(),
11432
+ 'page[cursor]': z.string().optional(),
11433
+ 'page[limit]': z.int().gte(1).optional().default(20),
11434
+ page: z.string().optional()
11435
+ });
11436
+ /**
11437
+ * Success
11438
+ */
11439
+ export const zListCaEcprXmlExportsResponse = zJobCaEcprXmlExportsResponseObject;
11440
+ export const zCreateCaEcprXmlExportBody = zJobCaEcprXmlExportCreateParameters;
11441
+ export const zCreateCaEcprXmlExportPath = z.object({
11442
+ job_id: z.string()
11443
+ });
11444
+ /**
11445
+ * Created
11446
+ */
11447
+ export const zCreateCaEcprXmlExportResponse = zJobCaEcprXmlExportResponseObject;
11448
+ export const zGetCaEcprXmlExportPath = z.object({
11449
+ job_id: z.string(),
11450
+ id: z.string()
11451
+ });
11452
+ /**
11453
+ * Success
11454
+ */
11455
+ export const zGetCaEcprXmlExportResponse = zJobCaEcprXmlExportResponseObject;
11164
11456
  export const zListWh347ExportsPath = z.object({
11165
11457
  job_id: z.string()
11166
11458
  });
@@ -12904,6 +13196,41 @@ export const zUpdatePositionFunctionPath = z.object({
12904
13196
  * Success
12905
13197
  */
12906
13198
  export const zUpdatePositionFunctionResponse = zPositionFunctionResponseObject;
13199
+ export const zListCompletionHistoryQuery = z.object({
13200
+ 'filter[job_id]': z.string().optional(),
13201
+ 'filter[scope_kind]': z.string().optional(),
13202
+ 'filter[feature_id]': z.string().optional(),
13203
+ 'filter[work_date][gte]': z.iso.date().optional(),
13204
+ 'filter[work_date][lte]': z.iso.date().optional(),
13205
+ filter: z.string().optional(),
13206
+ 'filter[unexpected]': z.string().optional(),
13207
+ 'page[cursor]': z.string().optional(),
13208
+ 'page[limit]': z.int().gte(1).optional().default(20),
13209
+ page: z.string().optional()
13210
+ });
13211
+ /**
13212
+ * Success
13213
+ */
13214
+ export const zListCompletionHistoryResponse = z.object({
13215
+ meta: zMeta,
13216
+ links: zLinks,
13217
+ data: z.array(zProductionCompletionResponseObject)
13218
+ });
13219
+ export const zGetCompletionHistoryPath = z.object({
13220
+ id: z.string()
13221
+ });
13222
+ /**
13223
+ * Success
13224
+ */
13225
+ export const zGetCompletionHistoryResponse = zProductionCompletionResponseObject;
13226
+ export const zSetCompletionWithdrawalBody = zProductionCompletionWithdrawalParameters;
13227
+ export const zSetCompletionWithdrawalPath = z.object({
13228
+ completion_id: z.string()
13229
+ });
13230
+ /**
13231
+ * Success
13232
+ */
13233
+ export const zSetCompletionWithdrawalResponse = zProductionCompletionResponseObject;
12907
13234
  export const zListCompletionsQuery = z.object({
12908
13235
  'filter[job_id]': z.string().optional(),
12909
13236
  'filter[scope_kind]': z.string().optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsptch-work/api-client",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "Generated TypeScript client for the DSPTCH REST API.",
5
5
  "keywords": [
6
6
  "dsptch",
@@ -51,11 +51,11 @@
51
51
  "access": "public"
52
52
  },
53
53
  "dependencies": {
54
- "zod": "^4.4.3"
54
+ "zod": "^4.6.7"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@hey-api/openapi-ts": "^0.99.0",
58
- "publint": "^0.3.22",
58
+ "publint": "^0.3.25",
59
59
  "typescript": "^6.0.3",
60
60
  "vitest": "^5.0.2"
61
61
  },