@dsptch-work/api-client 0.18.0 → 0.19.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.
@@ -18,6 +18,57 @@ export class ApiKeyScopes {
18
18
  });
19
19
  }
20
20
  }
21
+ export class ApprenticeshipAllocations {
22
+ /**
23
+ * List apprenticeship allocations
24
+ *
25
+ * **Required scope:**
26
+ *
27
+ * `apprenticeship.apprentices.allocations:read`
28
+ *
29
+ */
30
+ static listAllocations(options) {
31
+ return (options.client ?? client).get({
32
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
33
+ url: '/api/v1/apprenticeship/apprentices/{apprentice_id}/allocations',
34
+ ...options
35
+ });
36
+ }
37
+ /**
38
+ * Show apprenticeship allocation
39
+ *
40
+ * **Required scope:**
41
+ *
42
+ * `apprenticeship.apprentices.allocations:read`
43
+ *
44
+ */
45
+ static getAllocation(options) {
46
+ return (options.client ?? client).get({
47
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
48
+ url: '/api/v1/apprenticeship/apprentices/{apprentice_id}/allocations/{id}',
49
+ ...options
50
+ });
51
+ }
52
+ /**
53
+ * Update apprenticeship allocation effective date
54
+ *
55
+ * **Required scope:**
56
+ *
57
+ * `apprenticeship.apprentices.allocations:update`
58
+ *
59
+ */
60
+ static updateAllocation(options) {
61
+ return (options.client ?? client).patch({
62
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
63
+ url: '/api/v1/apprenticeship/apprentices/{apprentice_id}/allocations/{id}',
64
+ ...options,
65
+ headers: {
66
+ 'Content-Type': 'application/json',
67
+ ...options.headers
68
+ }
69
+ });
70
+ }
71
+ }
21
72
  export class ApprenticeshipApprentices {
22
73
  /**
23
74
  * List apprenticeship apprentices
@@ -4310,6 +4361,82 @@ export class Paystubs {
4310
4361
  });
4311
4362
  }
4312
4363
  }
4364
+ export class People {
4365
+ /**
4366
+ * List employment history
4367
+ *
4368
+ * Every valid-time version of one employment stint, newest first. Each
4369
+ * entry uses `people_employment_id` rather than an entry-level id and
4370
+ * includes prior recorded corrections.
4371
+ *
4372
+ *
4373
+ * **Required scope:**
4374
+ *
4375
+ * `people.employments.history:read`
4376
+ *
4377
+ */
4378
+ static listEmploymentHistory(options) {
4379
+ return (options.client ?? client).get({
4380
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4381
+ url: '/api/v1/people/employments/{employment_id}/history',
4382
+ ...options
4383
+ });
4384
+ }
4385
+ /**
4386
+ * List employment histories
4387
+ *
4388
+ * Employment history across all authorized stints in the credential
4389
+ * company, including ended stints and rehired employments.
4390
+ *
4391
+ *
4392
+ * **Required scope:**
4393
+ *
4394
+ * `people.employments.history:read`
4395
+ *
4396
+ */
4397
+ static listEmploymentsHistory(options) {
4398
+ return (options?.client ?? client).get({
4399
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4400
+ url: '/api/v1/people/employments/history',
4401
+ ...options
4402
+ });
4403
+ }
4404
+ /**
4405
+ * List employments
4406
+ *
4407
+ * Current employments in the credential company, or versions at
4408
+ * `as_of[valid]`. A user key sees its own records unless it is a
4409
+ * company administrator.
4410
+ *
4411
+ *
4412
+ * **Required scope:**
4413
+ *
4414
+ * `people.employments:read`
4415
+ *
4416
+ */
4417
+ static listEmployments(options) {
4418
+ return (options?.client ?? client).get({
4419
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4420
+ url: '/api/v1/people/employments',
4421
+ ...options
4422
+ });
4423
+ }
4424
+ /**
4425
+ * Get employment
4426
+ *
4427
+ * **Required scope:**
4428
+ *
4429
+ * `people.employments:read`
4430
+ *
4431
+ */
4432
+ static getEmployment(options) {
4433
+ return (options.client ?? client).get({
4434
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4435
+ url: '/api/v1/people/employments/{id}',
4436
+ ...options
4437
+ });
4438
+ }
4439
+ }
4313
4440
  export class PerDiems {
4314
4441
  /**
4315
4442
  * List per diems
@@ -4615,10 +4742,11 @@ export class Projects {
4615
4742
  * Create a project owned by the API key's company (owned_by_company_id is set
4616
4743
  * automatically from the key). Requires `name`, and `created_by_user_id` must
4617
4744
  * reference a member of the owning company. `budget_currency` defaults to USD;
4618
- * when `federal_pwa_mode` is `none`, `asset_owner` is forced to false and the
4619
- * federal-PWA-only fields (administrator name/email/phone, budget, and the
4745
+ * the federal-PWA-only fields (administrator name/email/phone, budget, and the
4620
4746
  * prevailing-wage lock-in / beginning-of-construction / placed-in-service dates)
4621
- * are dropped. Returns 201 with the created project; a duplicate name within the
4747
+ * and `asset_owner` apply only while `federal_pwa_mode` is not `none`, so sending
4748
+ * one of them on a project that tracks no federal PWA — even as null — returns
4749
+ * 422. Returns 201 with the created project; a duplicate name within the
4622
4750
  * company, a creator outside the owning company, end_date before start_date, an
4623
4751
  * unknown PWA mode, an unparseable date, or a regional mode without a region each
4624
4752
  * return 422.
@@ -4664,9 +4792,11 @@ export class Projects {
4664
4792
  *
4665
4793
  * Update a project's attributes. `name` cannot be blanked, and
4666
4794
  * `created_by_user_id` is immutable — any request that sets, changes, or clears it
4667
- * returns 422. Switching `federal_pwa_mode` to `none` forces `asset_owner` false
4668
- * and drops the federal-PWA-only params (previously persisted values are left
4669
- * untouched); `budget_currency` defaults to USD when blank. A project owned by
4795
+ * returns 422. The federal-PWA-only fields (administrator contact, budget, IRA
4796
+ * dates) and `asset_owner` apply only while `federal_pwa_mode` is not `none`:
4797
+ * switching it to `none` clears the stored values and forces `asset_owner`
4798
+ * false, and sending one of them while federal tracking is off — even as null —
4799
+ * returns 422. `budget_currency` defaults to USD when blank. A project owned by
4670
4800
  * another company, or an unknown id, returns 404.
4671
4801
  *
4672
4802
  *