@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.
- package/CHANGELOG.md +45 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +162 -4
- package/dist/gen/sdk.gen.js +196 -3
- package/dist/gen/types.gen.d.ts +523 -20
- package/dist/gen/zod.gen.d.ts +351 -11
- package/dist/gen/zod.gen.js +160 -6
- package/package.json +2 -2
package/dist/gen/zod.gen.js
CHANGED
|
@@ -440,6 +440,7 @@ export const zDirectUploadParameters = z.object({
|
|
|
440
440
|
'pay_periods.imports.dsptch_cprs',
|
|
441
441
|
'pay_periods.imports.time_entries',
|
|
442
442
|
'payrolls.payroll_runs.imports.paystubs',
|
|
443
|
+
'payrolls.payroll_runs.imports.wide_paystubs',
|
|
443
444
|
'users'
|
|
444
445
|
]),
|
|
445
446
|
blob: z.object({
|
|
@@ -2754,6 +2755,35 @@ export const zPaystubImportResponseObject = z.object({
|
|
|
2754
2755
|
export const zPaystubImportParameters = z.object({
|
|
2755
2756
|
file_signed_id: z.string()
|
|
2756
2757
|
});
|
|
2758
|
+
/**
|
|
2759
|
+
* One bulk upload of wide paystub amounts against a payroll run, and how it turned out.
|
|
2760
|
+
*/
|
|
2761
|
+
export const zWidePaystubImportResponseObject = z.object({
|
|
2762
|
+
id: z.string(),
|
|
2763
|
+
payrolls_payroll_run_id: z.string(),
|
|
2764
|
+
status: z.enum([
|
|
2765
|
+
'pending',
|
|
2766
|
+
'processing',
|
|
2767
|
+
'processed',
|
|
2768
|
+
'success',
|
|
2769
|
+
'failed',
|
|
2770
|
+
'superseded',
|
|
2771
|
+
'withdrawn'
|
|
2772
|
+
]),
|
|
2773
|
+
processed_rows_count: z.int(),
|
|
2774
|
+
processing_errors: z.array(zImportProcessingError),
|
|
2775
|
+
completed_at: z.iso.datetime().nullable(),
|
|
2776
|
+
created_at: z.iso.datetime(),
|
|
2777
|
+
updated_at: z.iso.datetime()
|
|
2778
|
+
});
|
|
2779
|
+
/**
|
|
2780
|
+
* Submit a spreadsheet of wide paystub amounts for a payroll run. Each row is one employee: payroll_id names them, and every other column is a pay, deduction, or contribution amount. Extra pay-element columns are accepted; they are not unknown columns. The run's pay schedule must record the contributor on the external map (`requires_external_map_contributor`) and must not be connected to a payroll provider; where a provider is configured the paystubs come from that connection and a file is refused. payroll_id must be present as a header and carry a value on every row, or the file is refused naming what is missing. Header matching ignores case and treats spaces as underscores, and column order does not matter.
|
|
2781
|
+
*
|
|
2782
|
+
* Because acceptance is synchronous but the write happens in the background, only one wide paystub import at a time is accepted for a payroll run: while an earlier one is still `pending` or `processing`, a second answers 409 naming `import_in_progress`, and nothing is written. Poll the earlier import until it reports, then submit again.
|
|
2783
|
+
*/
|
|
2784
|
+
export const zWidePaystubImportParameters = z.object({
|
|
2785
|
+
file_signed_id: z.string()
|
|
2786
|
+
});
|
|
2757
2787
|
/**
|
|
2758
2788
|
* One bulk upload of time entries against a pay period, and how it turned out.
|
|
2759
2789
|
*/
|
|
@@ -2962,6 +2992,37 @@ export const zTimeSessionResponseObject = z.object({
|
|
|
2962
2992
|
created_at: z.iso.datetime(),
|
|
2963
2993
|
updated_at: z.iso.datetime()
|
|
2964
2994
|
});
|
|
2995
|
+
/**
|
|
2996
|
+
* A worker request for non-working time (R&R, PTO, and the other absence types). Approval produces an Absence; this read surface does not nest that Absence or the request's comments.
|
|
2997
|
+
*/
|
|
2998
|
+
export const zTimeOffRequestResponseObject = z.object({
|
|
2999
|
+
id: z.string(),
|
|
3000
|
+
user_id: z.string(),
|
|
3001
|
+
status: z.enum([
|
|
3002
|
+
'pending',
|
|
3003
|
+
'approved',
|
|
3004
|
+
'denied',
|
|
3005
|
+
'cancelled',
|
|
3006
|
+
'expired'
|
|
3007
|
+
]),
|
|
3008
|
+
absence_type: z.enum([
|
|
3009
|
+
'rest_and_recovery',
|
|
3010
|
+
'vacation',
|
|
3011
|
+
'bereavement',
|
|
3012
|
+
'ca_covid_19_sick',
|
|
3013
|
+
'custom',
|
|
3014
|
+
'jury_duty',
|
|
3015
|
+
'unpaid',
|
|
3016
|
+
'training',
|
|
3017
|
+
'bench'
|
|
3018
|
+
]),
|
|
3019
|
+
start_time: z.iso.datetime(),
|
|
3020
|
+
end_time: z.iso.datetime(),
|
|
3021
|
+
reviewed_at: z.iso.datetime().nullable(),
|
|
3022
|
+
reviewer_user_id: z.string().nullable(),
|
|
3023
|
+
created_at: z.iso.datetime(),
|
|
3024
|
+
updated_at: z.iso.datetime()
|
|
3025
|
+
});
|
|
2965
3026
|
/**
|
|
2966
3027
|
* Request body for locking or unlocking a time card.
|
|
2967
3028
|
*/
|
|
@@ -3293,7 +3354,7 @@ export const zProjectResponseObject = z.object({
|
|
|
3293
3354
|
updated_at: z.iso.datetime()
|
|
3294
3355
|
});
|
|
3295
3356
|
/**
|
|
3296
|
-
* Request body for creating
|
|
3357
|
+
* Request body for creating a project. `name` and `created_by_user_id` are required; the creator must be a member of the owning company. The owning company is inferred from the API key and is not part of the body. Undeclared body keys return 400 before any project or relationship is saved.
|
|
3297
3358
|
*/
|
|
3298
3359
|
export const zProjectParameters = z.object({
|
|
3299
3360
|
external_id: z.string().nullish(),
|
|
@@ -3329,7 +3390,7 @@ export const zProjectParameters = z.object({
|
|
|
3329
3390
|
placed_in_service_date: z.iso.date().nullish()
|
|
3330
3391
|
});
|
|
3331
3392
|
/**
|
|
3332
|
-
* Request body for updating a project. Every field is optional; omit a field to preserve its current value. The resulting project must still satisfy conditional PWA, regional, and schedule validation rules. `created_by_user_id` is create-only
|
|
3393
|
+
* Request body for updating a project. Every field is optional; omit a field to preserve its current value. The resulting project must still satisfy conditional PWA, regional, and schedule validation rules. `created_by_user_id` is create-only; omit it on PATCH. Every update that includes it returns 400, even when unchanged. Undeclared body keys return 400 before any project or relationship changes.
|
|
3333
3394
|
*/
|
|
3334
3395
|
export const zProjectUpdateParameters = z.object({
|
|
3335
3396
|
external_id: z.string().nullish(),
|
|
@@ -4089,7 +4150,7 @@ export const zPaystubLineItemResponseObject = z.object({
|
|
|
4089
4150
|
updated_at: z.iso.datetime()
|
|
4090
4151
|
});
|
|
4091
4152
|
/**
|
|
4092
|
-
* Request body for creating a paystub line item. All four fields are required.
|
|
4153
|
+
* Request body for creating a paystub line item. All four fields are required. Undeclared body keys are rejected with 400; references outside the authenticated company return 404.
|
|
4093
4154
|
*/
|
|
4094
4155
|
export const zPaystubLineItemParameters = z.object({
|
|
4095
4156
|
payrolls_paystub_id: z.string(),
|
|
@@ -4098,7 +4159,7 @@ export const zPaystubLineItemParameters = z.object({
|
|
|
4098
4159
|
payrolls_external_map_id: z.string()
|
|
4099
4160
|
});
|
|
4100
4161
|
/**
|
|
4101
|
-
* Request body for updating a paystub line item. Send only the fields to change.
|
|
4162
|
+
* Request body for updating a paystub line item. Send only the fields to change. Undeclared body keys are rejected with 400; newly supplied references outside the authenticated company return 404.
|
|
4102
4163
|
*/
|
|
4103
4164
|
export const zPaystubLineItemUpdateParameters = z.object({
|
|
4104
4165
|
payrolls_paystub_id: z.string().optional(),
|
|
@@ -5205,7 +5266,7 @@ export const zUserParameters = z.intersection(z.union([
|
|
|
5205
5266
|
dol_apprentice_no: z.string().optional(),
|
|
5206
5267
|
winda_id: z.string().optional(),
|
|
5207
5268
|
linkedin_url: z.string().optional(),
|
|
5208
|
-
roles: z.array(z.string()).
|
|
5269
|
+
roles: z.array(z.string()).nullish(),
|
|
5209
5270
|
avatar_signed_id: z.string().optional(),
|
|
5210
5271
|
created_by_user_id: z.string().optional(),
|
|
5211
5272
|
last_sent_by_user_id: z.string().nullish(),
|
|
@@ -5227,7 +5288,7 @@ export const zUserParameters = z.intersection(z.union([
|
|
|
5227
5288
|
holiday_annual_minutes: z.string().optional(),
|
|
5228
5289
|
training_annual_minutes: z.string().optional(),
|
|
5229
5290
|
hire_date: z.string().optional(),
|
|
5230
|
-
group_ids: z.array(z.
|
|
5291
|
+
group_ids: z.array(z.uuid()).nullish(),
|
|
5231
5292
|
custom_fields: z.array(z.object({
|
|
5232
5293
|
custom_field_config_id: z.string(),
|
|
5233
5294
|
value: z.string().nullable()
|
|
@@ -5468,6 +5529,14 @@ export const zTimeSessionsResponseObject = z.object({
|
|
|
5468
5529
|
links: zLinks,
|
|
5469
5530
|
data: z.array(zTimeSessionResponseObject)
|
|
5470
5531
|
});
|
|
5532
|
+
/**
|
|
5533
|
+
* A page of time-off requests, with pagination metadata and navigation links.
|
|
5534
|
+
*/
|
|
5535
|
+
export const zTimeOffRequestsResponseObject = z.object({
|
|
5536
|
+
meta: zMeta,
|
|
5537
|
+
links: zLinks,
|
|
5538
|
+
data: z.array(zTimeOffRequestResponseObject)
|
|
5539
|
+
});
|
|
5471
5540
|
/**
|
|
5472
5541
|
* A page of payroll runs, with pagination metadata and navigation links.
|
|
5473
5542
|
*/
|
|
@@ -8902,6 +8971,7 @@ export const zListFormSubmissionDeltasQuery = z.object({
|
|
|
8902
8971
|
export const zListFormSubmissionDeltasResponse = zFormSubmissionDeltasResponse;
|
|
8903
8972
|
export const zListFormSubmissionsQuery = z.object({
|
|
8904
8973
|
'filter[form_definition_id]': z.string().optional(),
|
|
8974
|
+
'filter[user_id]': z.string().optional(),
|
|
8905
8975
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
8906
8976
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
8907
8977
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
@@ -9361,6 +9431,18 @@ export const zListJobsQuery = z.object({
|
|
|
9361
9431
|
]).optional(),
|
|
9362
9432
|
'filter[name]': z.string().optional(),
|
|
9363
9433
|
'filter[purchase_order_number]': z.string().optional(),
|
|
9434
|
+
'filter[federal_pwa_mode]': z.array(z.enum([
|
|
9435
|
+
'all',
|
|
9436
|
+
'pw_only',
|
|
9437
|
+
'ap_only',
|
|
9438
|
+
'none'
|
|
9439
|
+
])).optional(),
|
|
9440
|
+
'filter[regional_pwa_mode]': z.array(z.enum([
|
|
9441
|
+
'all',
|
|
9442
|
+
'pw_only',
|
|
9443
|
+
'ap_only',
|
|
9444
|
+
'none'
|
|
9445
|
+
])).optional(),
|
|
9364
9446
|
'page[cursor]': z.string().optional(),
|
|
9365
9447
|
'page[limit]': z.int().gte(1).optional().default(20),
|
|
9366
9448
|
page: z.string().optional(),
|
|
@@ -10173,9 +10255,51 @@ export const zGetPaystubImportPath = z.object({
|
|
|
10173
10255
|
* Success
|
|
10174
10256
|
*/
|
|
10175
10257
|
export const zGetPaystubImportResponse = zPaystubImportResponseObject;
|
|
10258
|
+
export const zListWidePaystubImportsPath = z.object({
|
|
10259
|
+
payroll_run_id: z.string()
|
|
10260
|
+
});
|
|
10261
|
+
export const zListWidePaystubImportsQuery = z.object({
|
|
10262
|
+
'filter[status]': z.string().optional(),
|
|
10263
|
+
'filter[completed_at][gte]': z.iso.datetime().optional(),
|
|
10264
|
+
'filter[completed_at][lte]': z.iso.datetime().optional(),
|
|
10265
|
+
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
10266
|
+
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
10267
|
+
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
10268
|
+
'filter[updated_at][lte]': z.iso.datetime().optional(),
|
|
10269
|
+
'page[cursor]': z.string().optional(),
|
|
10270
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
10271
|
+
page: z.string().optional(),
|
|
10272
|
+
filter: z.string().optional(),
|
|
10273
|
+
'filter[unexpected]': z.string().optional()
|
|
10274
|
+
});
|
|
10275
|
+
/**
|
|
10276
|
+
* Success
|
|
10277
|
+
*/
|
|
10278
|
+
export const zListWidePaystubImportsResponse = z.object({
|
|
10279
|
+
meta: zMeta,
|
|
10280
|
+
links: zLinks,
|
|
10281
|
+
data: z.array(zWidePaystubImportResponseObject)
|
|
10282
|
+
});
|
|
10283
|
+
export const zCreateWidePaystubImportBody = zWidePaystubImportParameters;
|
|
10284
|
+
export const zCreateWidePaystubImportPath = z.object({
|
|
10285
|
+
payroll_run_id: z.string()
|
|
10286
|
+
});
|
|
10287
|
+
/**
|
|
10288
|
+
* Created
|
|
10289
|
+
*/
|
|
10290
|
+
export const zCreateWidePaystubImportResponse = zWidePaystubImportResponseObject;
|
|
10291
|
+
export const zGetWidePaystubImportPath = z.object({
|
|
10292
|
+
payroll_run_id: z.string(),
|
|
10293
|
+
id: z.string()
|
|
10294
|
+
});
|
|
10295
|
+
/**
|
|
10296
|
+
* Success
|
|
10297
|
+
*/
|
|
10298
|
+
export const zGetWidePaystubImportResponse = zWidePaystubImportResponseObject;
|
|
10176
10299
|
export const zListPayrollRunsQuery = z.object({
|
|
10177
10300
|
'filter[run_type]': z.string().optional(),
|
|
10178
10301
|
'filter[timekeeping_pay_period_id]': z.string().optional(),
|
|
10302
|
+
'filter[user_id]': z.string().optional(),
|
|
10179
10303
|
'filter[run_date][gte]': z.iso.date().optional(),
|
|
10180
10304
|
'filter[run_date][lte]': z.iso.date().optional(),
|
|
10181
10305
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
@@ -10938,6 +11062,9 @@ export const zListPositionsPath = z.object({
|
|
|
10938
11062
|
job_id: z.string()
|
|
10939
11063
|
});
|
|
10940
11064
|
export const zListPositionsQuery = z.object({
|
|
11065
|
+
'filter[fulfilled_by_user_id]': z.string().optional(),
|
|
11066
|
+
'filter[fulfilled_by_user_id][null]': z.boolean().optional(),
|
|
11067
|
+
'filter[position_function_id]': z.string().optional(),
|
|
10941
11068
|
'filter[created_at][gte]': z.iso.datetime().optional(),
|
|
10942
11069
|
'filter[created_at][lte]': z.iso.datetime().optional(),
|
|
10943
11070
|
'filter[updated_at][gte]': z.iso.datetime().optional(),
|
|
@@ -11154,6 +11281,7 @@ export const zCreateWorkerTimeCardApprovalResponse = zTimeCardApprovalResponseOb
|
|
|
11154
11281
|
export const zListTimeCardsQuery = z.object({
|
|
11155
11282
|
'filter[timekeeping_pay_period_id]': z.string().optional(),
|
|
11156
11283
|
'filter[user_id]': z.string().optional(),
|
|
11284
|
+
'filter[job_id]': z.string().optional(),
|
|
11157
11285
|
'filter[start_time][gte]': z.iso.datetime().optional(),
|
|
11158
11286
|
'filter[start_time][lte]': z.iso.datetime().optional(),
|
|
11159
11287
|
filter: z.string().optional(),
|
|
@@ -11560,6 +11688,30 @@ export const zGetTimeCardActualPath = z.object({
|
|
|
11560
11688
|
* Success
|
|
11561
11689
|
*/
|
|
11562
11690
|
export const zGetTimeCardActualResponse = zTimeCardActualsResponseObject;
|
|
11691
|
+
export const zListTimeOffRequestsQuery = z.object({
|
|
11692
|
+
'filter[user_id]': z.string().optional(),
|
|
11693
|
+
'filter[status]': z.enum([
|
|
11694
|
+
'pending',
|
|
11695
|
+
'approved',
|
|
11696
|
+
'denied',
|
|
11697
|
+
'cancelled',
|
|
11698
|
+
'expired'
|
|
11699
|
+
]).optional(),
|
|
11700
|
+
'page[cursor]': z.string().optional(),
|
|
11701
|
+
'page[limit]': z.int().gte(1).optional().default(20),
|
|
11702
|
+
page: z.string().optional()
|
|
11703
|
+
});
|
|
11704
|
+
/**
|
|
11705
|
+
* Success
|
|
11706
|
+
*/
|
|
11707
|
+
export const zListTimeOffRequestsResponse = zTimeOffRequestsResponseObject;
|
|
11708
|
+
export const zGetTimeOffRequestPath = z.object({
|
|
11709
|
+
id: z.string()
|
|
11710
|
+
});
|
|
11711
|
+
/**
|
|
11712
|
+
* Success
|
|
11713
|
+
*/
|
|
11714
|
+
export const zGetTimeOffRequestResponse = zTimeOffRequestResponseObject;
|
|
11563
11715
|
export const zListTimeSessionsQuery = z.object({
|
|
11564
11716
|
'filter[user_id]': z.string().optional(),
|
|
11565
11717
|
'filter[job_id]': z.string().optional(),
|
|
@@ -11714,6 +11866,8 @@ export const zListUsersQuery = z.object({
|
|
|
11714
11866
|
'all'
|
|
11715
11867
|
]).optional(),
|
|
11716
11868
|
'filter[name]': z.string().optional(),
|
|
11869
|
+
'filter[manager_user_id]': z.string().optional(),
|
|
11870
|
+
'filter[department_id]': z.string().optional(),
|
|
11717
11871
|
'page[cursor]': z.string().optional(),
|
|
11718
11872
|
'page[limit]': z.int().gte(1).optional().default(20),
|
|
11719
11873
|
page: z.string().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsptch-work/api-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "Generated TypeScript client for the DSPTCH REST API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsptch",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
58
58
|
"publint": "^0.3.22",
|
|
59
59
|
"typescript": "^6.0.3",
|
|
60
|
-
"vitest": "^
|
|
60
|
+
"vitest": "^5.0.2"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"generate": "openapi-ts",
|