@dsptch-work/api-client 0.24.0 → 0.25.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 +24 -0
- package/dist/gen/index.d.ts +1 -1
- package/dist/gen/sdk.gen.d.ts +190 -1
- package/dist/gen/sdk.gen.js +271 -0
- package/dist/gen/types.gen.d.ts +437 -20
- package/dist/gen/zod.gen.d.ts +275 -14
- package/dist/gen/zod.gen.js +125 -10
- package/package.json +1 -1
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -53,6 +53,27 @@ export class ApprenticeshipAllocations {
|
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Delete apprenticeship allocation
|
|
58
|
+
*
|
|
59
|
+
* Deletes an allocation nested under the apprentice in the path. Success is
|
|
60
|
+
* `204` and a later GET of the same id is not found. A missing, out-of-scope,
|
|
61
|
+
* or mismatched apprentice/allocation pair is `404`. Company-scoped keys may
|
|
62
|
+
* delete; unlike create, this operation does not require a user-scoped key.
|
|
63
|
+
*
|
|
64
|
+
*
|
|
65
|
+
* **Required scope:**
|
|
66
|
+
*
|
|
67
|
+
* `apprenticeship.apprentices.allocations:delete`
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
static deleteAllocation(options) {
|
|
71
|
+
return (options.client ?? client).delete({
|
|
72
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
73
|
+
url: '/api/v1/apprenticeship/apprentices/{apprentice_id}/allocations/{id}',
|
|
74
|
+
...options
|
|
75
|
+
});
|
|
76
|
+
}
|
|
56
77
|
/**
|
|
57
78
|
* Show apprenticeship allocation
|
|
58
79
|
*
|
|
@@ -159,6 +180,47 @@ export class ApprenticeshipOccupations {
|
|
|
159
180
|
}
|
|
160
181
|
});
|
|
161
182
|
}
|
|
183
|
+
/**
|
|
184
|
+
* Delete apprenticeship occupation
|
|
185
|
+
*
|
|
186
|
+
* Deletes an unused occupation. An occupation that still has work-process
|
|
187
|
+
* categories, wage schedules, or trade apprenticeship links is refused
|
|
188
|
+
* with a `422` — remove those dependents first. An unused occupation
|
|
189
|
+
* returns `204` and is gone from a later GET.
|
|
190
|
+
*
|
|
191
|
+
*
|
|
192
|
+
* **Required scope:**
|
|
193
|
+
*
|
|
194
|
+
* `apprenticeship.programs.occupations:delete`
|
|
195
|
+
*
|
|
196
|
+
*/
|
|
197
|
+
static deleteOccupation(options) {
|
|
198
|
+
return (options.client ?? client).delete({
|
|
199
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
200
|
+
url: '/api/v1/apprenticeship/programs/{program_id}/occupations/{id}',
|
|
201
|
+
...options
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Show apprenticeship occupation
|
|
206
|
+
*
|
|
207
|
+
* Returns one occupation in a program the key's company sponsors or is
|
|
208
|
+
* enrolled in as an employer. A missing, mismatched, or out-of-scope id
|
|
209
|
+
* reads as not found.
|
|
210
|
+
*
|
|
211
|
+
*
|
|
212
|
+
* **Required scope:**
|
|
213
|
+
*
|
|
214
|
+
* `apprenticeship.programs.occupations:read`
|
|
215
|
+
*
|
|
216
|
+
*/
|
|
217
|
+
static getOccupation(options) {
|
|
218
|
+
return (options.client ?? client).get({
|
|
219
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
220
|
+
url: '/api/v1/apprenticeship/programs/{program_id}/occupations/{id}',
|
|
221
|
+
...options
|
|
222
|
+
});
|
|
223
|
+
}
|
|
162
224
|
/**
|
|
163
225
|
* Update apprenticeship occupation
|
|
164
226
|
*
|
|
@@ -284,6 +346,45 @@ export class ApprenticeshipPrograms {
|
|
|
284
346
|
}
|
|
285
347
|
});
|
|
286
348
|
}
|
|
349
|
+
/**
|
|
350
|
+
* Delete apprenticeship program
|
|
351
|
+
*
|
|
352
|
+
* Deletes an unused program. A program that still has occupations is refused
|
|
353
|
+
* with a `422` — remove those occupations first. An unused program returns
|
|
354
|
+
* `204` and is gone from a later GET.
|
|
355
|
+
*
|
|
356
|
+
*
|
|
357
|
+
* **Required scope:**
|
|
358
|
+
*
|
|
359
|
+
* `apprenticeship.programs:delete`
|
|
360
|
+
*
|
|
361
|
+
*/
|
|
362
|
+
static deleteProgram(options) {
|
|
363
|
+
return (options.client ?? client).delete({
|
|
364
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
365
|
+
url: '/api/v1/apprenticeship/programs/{id}',
|
|
366
|
+
...options
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Show apprenticeship program
|
|
371
|
+
*
|
|
372
|
+
* Returns one program the key's company sponsors or is enrolled in as an
|
|
373
|
+
* employer. A missing or out-of-scope id reads as not found.
|
|
374
|
+
*
|
|
375
|
+
*
|
|
376
|
+
* **Required scope:**
|
|
377
|
+
*
|
|
378
|
+
* `apprenticeship.programs:read`
|
|
379
|
+
*
|
|
380
|
+
*/
|
|
381
|
+
static getProgram(options) {
|
|
382
|
+
return (options.client ?? client).get({
|
|
383
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
384
|
+
url: '/api/v1/apprenticeship/programs/{id}',
|
|
385
|
+
...options
|
|
386
|
+
});
|
|
387
|
+
}
|
|
287
388
|
/**
|
|
288
389
|
* Update apprenticeship program
|
|
289
390
|
*
|
|
@@ -394,6 +495,49 @@ export class ApprenticeshipWageSchedules {
|
|
|
394
495
|
}
|
|
395
496
|
});
|
|
396
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* Delete apprenticeship wage schedule
|
|
500
|
+
*
|
|
501
|
+
* Deletes an unused wage schedule nested under the occupation in the path.
|
|
502
|
+
* A schedule that still has apprentices is refused with a `422`. An unused
|
|
503
|
+
* schedule returns `204`. Deletes are sponsor-only; an enrolled employer is
|
|
504
|
+
* `403`. A missing, out-of-scope, or mismatched occupation/schedule pair is
|
|
505
|
+
* `404`. Periods on the schedule are removed with it.
|
|
506
|
+
*
|
|
507
|
+
*
|
|
508
|
+
* **Required scope:**
|
|
509
|
+
*
|
|
510
|
+
* `apprenticeship.occupations.wage_schedules:delete`
|
|
511
|
+
*
|
|
512
|
+
*/
|
|
513
|
+
static deleteWageSchedule(options) {
|
|
514
|
+
return (options.client ?? client).delete({
|
|
515
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
516
|
+
url: '/api/v1/apprenticeship/occupations/{occupation_id}/wage_schedules/{id}',
|
|
517
|
+
...options
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Show apprenticeship wage schedule
|
|
522
|
+
*
|
|
523
|
+
* Returns one wage schedule nested under the occupation in the path. The
|
|
524
|
+
* object matches the list, create, and update door. A missing, out-of-scope,
|
|
525
|
+
* or mismatched occupation/schedule pair is not found. Nested periods are a
|
|
526
|
+
* separate resource.
|
|
527
|
+
*
|
|
528
|
+
*
|
|
529
|
+
* **Required scope:**
|
|
530
|
+
*
|
|
531
|
+
* `apprenticeship.occupations.wage_schedules:read`
|
|
532
|
+
*
|
|
533
|
+
*/
|
|
534
|
+
static getWageSchedule(options) {
|
|
535
|
+
return (options.client ?? client).get({
|
|
536
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
537
|
+
url: '/api/v1/apprenticeship/occupations/{occupation_id}/wage_schedules/{id}',
|
|
538
|
+
...options
|
|
539
|
+
});
|
|
540
|
+
}
|
|
397
541
|
/**
|
|
398
542
|
* Update apprenticeship wage schedule
|
|
399
543
|
*
|
|
@@ -3398,6 +3542,47 @@ export class Jobs {
|
|
|
3398
3542
|
}
|
|
3399
3543
|
});
|
|
3400
3544
|
}
|
|
3545
|
+
/**
|
|
3546
|
+
* Delete position on job
|
|
3547
|
+
*
|
|
3548
|
+
* Deletes a position that has no logged work and no restricting
|
|
3549
|
+
* associations. A position still referenced by time entries,
|
|
3550
|
+
* time-card per diems, completion positions, or aggregate logged
|
|
3551
|
+
* work is refused with a `422`. An unused position returns `204`
|
|
3552
|
+
* and is gone from a later GET.
|
|
3553
|
+
*
|
|
3554
|
+
*
|
|
3555
|
+
* **Required scope:**
|
|
3556
|
+
*
|
|
3557
|
+
* `jobs.positions:delete`
|
|
3558
|
+
*
|
|
3559
|
+
*/
|
|
3560
|
+
static deletePosition(options) {
|
|
3561
|
+
return (options.client ?? client).delete({
|
|
3562
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3563
|
+
url: '/api/v1/jobs/{job_id}/positions/{id}',
|
|
3564
|
+
...options
|
|
3565
|
+
});
|
|
3566
|
+
}
|
|
3567
|
+
/**
|
|
3568
|
+
* Show position on job
|
|
3569
|
+
*
|
|
3570
|
+
* Returns one position on the named job. A missing, misnested, or
|
|
3571
|
+
* out-of-scope id reads as not found.
|
|
3572
|
+
*
|
|
3573
|
+
*
|
|
3574
|
+
* **Required scope:**
|
|
3575
|
+
*
|
|
3576
|
+
* `jobs.positions:read`
|
|
3577
|
+
*
|
|
3578
|
+
*/
|
|
3579
|
+
static getPosition(options) {
|
|
3580
|
+
return (options.client ?? client).get({
|
|
3581
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
3582
|
+
url: '/api/v1/jobs/{job_id}/positions/{id}',
|
|
3583
|
+
...options
|
|
3584
|
+
});
|
|
3585
|
+
}
|
|
3401
3586
|
/**
|
|
3402
3587
|
* Update position on job
|
|
3403
3588
|
*
|
|
@@ -4085,6 +4270,27 @@ export class PayRateRulePackages {
|
|
|
4085
4270
|
}
|
|
4086
4271
|
});
|
|
4087
4272
|
}
|
|
4273
|
+
/**
|
|
4274
|
+
* Delete a pay rate rule package
|
|
4275
|
+
*
|
|
4276
|
+
* Permanently remove a pay rate rule package. An unused package (no rules,
|
|
4277
|
+
* positions, job or project wage determinations, or employments) returns
|
|
4278
|
+
* `204` and is gone from a later GET. A package still referenced is refused
|
|
4279
|
+
* with `422` `destroy_restricted`.
|
|
4280
|
+
*
|
|
4281
|
+
*
|
|
4282
|
+
* **Required scope:**
|
|
4283
|
+
*
|
|
4284
|
+
* `pay.rates.rule_packages:delete`
|
|
4285
|
+
*
|
|
4286
|
+
*/
|
|
4287
|
+
static deletePayRateRulePackage(options) {
|
|
4288
|
+
return (options.client ?? client).delete({
|
|
4289
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4290
|
+
url: '/api/v1/pay/rates/rule_packages/{id}',
|
|
4291
|
+
...options
|
|
4292
|
+
});
|
|
4293
|
+
}
|
|
4088
4294
|
/**
|
|
4089
4295
|
* Get a pay rate rule package
|
|
4090
4296
|
*
|
|
@@ -4100,6 +4306,30 @@ export class PayRateRulePackages {
|
|
|
4100
4306
|
...options
|
|
4101
4307
|
});
|
|
4102
4308
|
}
|
|
4309
|
+
/**
|
|
4310
|
+
* Update a pay rate rule package
|
|
4311
|
+
*
|
|
4312
|
+
* Rename or re-describe a pay rate rule package. Only supplied fields change.
|
|
4313
|
+
* `default`, `selectable`, and `scoped_to_job_id` are not writable — those
|
|
4314
|
+
* remain the values set at create (or by the web door).
|
|
4315
|
+
*
|
|
4316
|
+
*
|
|
4317
|
+
* **Required scope:**
|
|
4318
|
+
*
|
|
4319
|
+
* `pay.rates.rule_packages:update`
|
|
4320
|
+
*
|
|
4321
|
+
*/
|
|
4322
|
+
static updatePayRateRulePackage(options) {
|
|
4323
|
+
return (options.client ?? client).patch({
|
|
4324
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4325
|
+
url: '/api/v1/pay/rates/rule_packages/{id}',
|
|
4326
|
+
...options,
|
|
4327
|
+
headers: {
|
|
4328
|
+
'Content-Type': 'application/json',
|
|
4329
|
+
...options.headers
|
|
4330
|
+
}
|
|
4331
|
+
});
|
|
4332
|
+
}
|
|
4103
4333
|
}
|
|
4104
4334
|
export class AggregateTimeImports {
|
|
4105
4335
|
/**
|
|
@@ -5534,6 +5764,25 @@ export class Users {
|
|
|
5534
5764
|
}
|
|
5535
5765
|
});
|
|
5536
5766
|
}
|
|
5767
|
+
/**
|
|
5768
|
+
* Delete PWA company user details
|
|
5769
|
+
*
|
|
5770
|
+
* Deletes the PWA company-user details row. A missing or out-of-scope
|
|
5771
|
+
* id reads as not found. Delete removes the row; it does not archive.
|
|
5772
|
+
*
|
|
5773
|
+
*
|
|
5774
|
+
* **Required scope:**
|
|
5775
|
+
*
|
|
5776
|
+
* `pwa.company_user_details:delete`
|
|
5777
|
+
*
|
|
5778
|
+
*/
|
|
5779
|
+
static deleteCompanyUserDetail(options) {
|
|
5780
|
+
return (options.client ?? client).delete({
|
|
5781
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
5782
|
+
url: '/api/v1/pwa/company_user_details/{id}',
|
|
5783
|
+
...options
|
|
5784
|
+
});
|
|
5785
|
+
}
|
|
5537
5786
|
/**
|
|
5538
5787
|
* Update PWA company user details
|
|
5539
5788
|
*
|
|
@@ -6289,6 +6538,28 @@ export class TimeEntries {
|
|
|
6289
6538
|
...options
|
|
6290
6539
|
});
|
|
6291
6540
|
}
|
|
6541
|
+
/**
|
|
6542
|
+
* Show time entry
|
|
6543
|
+
*
|
|
6544
|
+
* Fetch one time entry by id. The response is the same object the list,
|
|
6545
|
+
* create, and update doors serialize. An entry outside the key's read
|
|
6546
|
+
* scope is not found (404), including a colleague's entry for a
|
|
6547
|
+
* technician or field-lead key — even when that entry is writable via
|
|
6548
|
+
* PATCH.
|
|
6549
|
+
*
|
|
6550
|
+
*
|
|
6551
|
+
* **Required scope:**
|
|
6552
|
+
*
|
|
6553
|
+
* `time_entries:read`
|
|
6554
|
+
*
|
|
6555
|
+
*/
|
|
6556
|
+
static getTimeEntry(options) {
|
|
6557
|
+
return (options.client ?? client).get({
|
|
6558
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
6559
|
+
url: '/api/v1/time_entries/{id}',
|
|
6560
|
+
...options
|
|
6561
|
+
});
|
|
6562
|
+
}
|
|
6292
6563
|
/**
|
|
6293
6564
|
* Update time entry
|
|
6294
6565
|
*
|