@dsptch-work/api-client 0.1.0 → 0.2.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.
@@ -1,5 +1,23 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { client } from './client.gen.js';
3
+ export class ApiKeyScopes {
4
+ /**
5
+ * List key scopes
6
+ *
7
+ * **No scope required:**
8
+ *
9
+ * Every authenticated API key may call this endpoint. It returns the key's persisted scopes;
10
+ * the endpoint's baseline capability is not included.
11
+ *
12
+ */
13
+ static listApiKeyScopes(options) {
14
+ return (options?.client ?? client).get({
15
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
16
+ url: '/api/v1/api_key/scopes',
17
+ ...options
18
+ });
19
+ }
20
+ }
3
21
  export class ApprenticeshipApprentices {
4
22
  /**
5
23
  * List apprenticeship apprentices
@@ -1597,6 +1615,8 @@ export class AtlasFeatures {
1597
1615
  /**
1598
1616
  * List features
1599
1617
  *
1618
+ * For company- and user-authenticated keys, Atlas API access must be enabled for the key's company.
1619
+ *
1600
1620
  * **Required scope:**
1601
1621
  *
1602
1622
  * `atlas.features:read`
@@ -1612,6 +1632,8 @@ export class AtlasFeatures {
1612
1632
  /**
1613
1633
  * Show feature
1614
1634
  *
1635
+ * For company- and user-authenticated keys, Atlas API access must be enabled for the key's company.
1636
+ *
1615
1637
  * **Required scope:**
1616
1638
  *
1617
1639
  * `atlas.features:read`
@@ -1629,6 +1651,8 @@ export class AtlasSites {
1629
1651
  /**
1630
1652
  * List sites
1631
1653
  *
1654
+ * For company- and user-authenticated keys, Atlas API access must be enabled for the key's company.
1655
+ *
1632
1656
  * **Required scope:**
1633
1657
  *
1634
1658
  * `atlas.sites:read`
@@ -1644,6 +1668,8 @@ export class AtlasSites {
1644
1668
  /**
1645
1669
  * Show site
1646
1670
  *
1671
+ * For company- and user-authenticated keys, Atlas API access must be enabled for the key's company.
1672
+ *
1647
1673
  * **Required scope:**
1648
1674
  *
1649
1675
  * `atlas.sites:read`
@@ -2510,6 +2536,33 @@ export class PwaTrades {
2510
2536
  }
2511
2537
  }
2512
2538
  export class JobWageDeterminationRateRules {
2539
+ /**
2540
+ * List rate rule version history
2541
+ *
2542
+ * A rule's whole valid-time sequence, newest window first and cursor-paginated.
2543
+ * Each entry is a full rate rule carrying its own `valid_from` / `valid_to`
2544
+ * window and a `version_status` of `scheduled`, `current` or `historical`.
2545
+ *
2546
+ * `corrections` is always empty here: a rule keeps no audit layer, so what a
2547
+ * version replaced was not recorded. The field is still returned, because the
2548
+ * timeline answers one shape across every temporal resource. `as_of[valid]` is
2549
+ * rejected, since pinning a point on the valid axis would collapse the sequence
2550
+ * this endpoint returns, and a rule records no transaction axis to read
2551
+ * `as_of[transaction]` against.
2552
+ *
2553
+ *
2554
+ * **Required scope:**
2555
+ *
2556
+ * `jobs.pwa.wage_determinations.rate_rules.history:read`
2557
+ *
2558
+ */
2559
+ static listRateRuleHistory(options) {
2560
+ return (options.client ?? client).get({
2561
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2562
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules/{rate_rule_uid}/history',
2563
+ ...options
2564
+ });
2565
+ }
2513
2566
  /**
2514
2567
  * List rate rules
2515
2568
  *
@@ -2521,7 +2574,7 @@ export class JobWageDeterminationRateRules {
2521
2574
  static listRateRules(options) {
2522
2575
  return (options.client ?? client).get({
2523
2576
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2524
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules',
2577
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules',
2525
2578
  ...options
2526
2579
  });
2527
2580
  }
@@ -2536,7 +2589,7 @@ export class JobWageDeterminationRateRules {
2536
2589
  static createRateRule(options) {
2537
2590
  return (options.client ?? client).post({
2538
2591
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2539
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules',
2592
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules',
2540
2593
  ...options,
2541
2594
  headers: {
2542
2595
  'Content-Type': 'application/json',
@@ -2555,12 +2608,38 @@ export class JobWageDeterminationRateRules {
2555
2608
  static getRateRule(options) {
2556
2609
  return (options.client ?? client).get({
2557
2610
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2558
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules/{id}',
2611
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules/{uid}',
2559
2612
  ...options
2560
2613
  });
2561
2614
  }
2562
2615
  }
2563
2616
  export class JobWageDeterminations {
2617
+ /**
2618
+ * List job wage determination version history
2619
+ *
2620
+ * A determination's whole valid-time sequence, newest window first and
2621
+ * cursor-paginated. Each entry is a full determination carrying its own
2622
+ * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
2623
+ * `current` or `historical`, and the `corrections` that version replaced —
2624
+ * each itself a full determination as previously recorded, so a client
2625
+ * that wants a field-level diff compares two of them. `as_of[valid]` is
2626
+ * rejected, since pinning a point on the valid axis would collapse the
2627
+ * sequence this endpoint returns, and a determination records no
2628
+ * transaction axis to read `as_of[transaction]` against.
2629
+ *
2630
+ *
2631
+ * **Required scope:**
2632
+ *
2633
+ * `jobs.wage_determinations.history:read`
2634
+ *
2635
+ */
2636
+ static listJobWageDeterminationHistory(options) {
2637
+ return (options.client ?? client).get({
2638
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2639
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/history',
2640
+ ...options
2641
+ });
2642
+ }
2564
2643
  /**
2565
2644
  * List job wage determinations
2566
2645
  *
@@ -2606,7 +2685,7 @@ export class JobWageDeterminations {
2606
2685
  static deleteWageDetermination(options) {
2607
2686
  return (options.client ?? client).delete({
2608
2687
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2609
- url: '/api/v1/jobs/{job_id}/wage_determinations/{id}',
2688
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{uid}',
2610
2689
  ...options
2611
2690
  });
2612
2691
  }
@@ -2621,7 +2700,7 @@ export class JobWageDeterminations {
2621
2700
  static getJobWageDetermination(options) {
2622
2701
  return (options.client ?? client).get({
2623
2702
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2624
- url: '/api/v1/jobs/{job_id}/wage_determinations/{id}',
2703
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{uid}',
2625
2704
  ...options
2626
2705
  });
2627
2706
  }
@@ -2814,6 +2893,32 @@ export class CompensationElements {
2814
2893
  }
2815
2894
  }
2816
2895
  export class ExternalMaps {
2896
+ /**
2897
+ * List external map version history
2898
+ *
2899
+ * An external map's whole valid-time sequence, newest window first and
2900
+ * cursor-paginated. Each entry is a full external map carrying its own
2901
+ * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
2902
+ * `current` or `historical`, and the `corrections` that window replaced —
2903
+ * each itself a full external map as previously recorded, so a client
2904
+ * that wants a field-level diff compares two of them. Pass
2905
+ * `as_of[transaction]` to read the timeline as it was recorded at a past
2906
+ * moment; `as_of[valid]` is rejected, since pinning a point on the valid
2907
+ * axis would collapse the sequence this endpoint returns.
2908
+ *
2909
+ *
2910
+ * **Required scope:**
2911
+ *
2912
+ * `payrolls.external_maps.history:read`
2913
+ *
2914
+ */
2915
+ static listExternalMapHistory(options) {
2916
+ return (options.client ?? client).get({
2917
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2918
+ url: '/api/v1/payrolls/external_maps/{external_map_id}/history',
2919
+ ...options
2920
+ });
2921
+ }
2817
2922
  /**
2818
2923
  * List external maps
2819
2924
  *
@@ -4180,6 +4285,32 @@ export class TimeEntries {
4180
4285
  }
4181
4286
  }
4182
4287
  export class Timecodes {
4288
+ /**
4289
+ * List timecode version history
4290
+ *
4291
+ * A timecode's whole valid-time sequence, newest window first and
4292
+ * cursor-paginated. Each entry is a full timecode carrying its own
4293
+ * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
4294
+ * `current` or `historical`, and the `corrections` that window replaced —
4295
+ * each itself a full timecode as previously recorded, so a client that
4296
+ * wants a field-level diff compares two of them. Pass
4297
+ * `as_of[transaction]` to read the timeline as it was recorded at a past
4298
+ * moment; `as_of[valid]` is rejected, since pinning a point on the valid
4299
+ * axis would collapse the sequence this endpoint returns.
4300
+ *
4301
+ *
4302
+ * **Required scope:**
4303
+ *
4304
+ * `timecodes.history:read`
4305
+ *
4306
+ */
4307
+ static listTimecodeHistory(options) {
4308
+ return (options.client ?? client).get({
4309
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4310
+ url: '/api/v1/timecodes/{timecode_id}/history',
4311
+ ...options
4312
+ });
4313
+ }
4183
4314
  /**
4184
4315
  * Cancel all scheduled changes
4185
4316
  *
@@ -4320,7 +4451,11 @@ export class Timecodes {
4320
4451
  /**
4321
4452
  * Show timecode
4322
4453
  *
4323
- * Fetch a single timecode by id.
4454
+ * Fetch a single timecode by id. Pass `as_of[valid]` /
4455
+ * `as_of[transaction]` to read the version at a point on the
4456
+ * bitemporal plane; both default to now, so an unqualified request
4457
+ * returns the currently-effective version.
4458
+ *
4324
4459
  *
4325
4460
  * **Required scope:**
4326
4461
  *
@@ -4462,6 +4597,64 @@ export class AttestationConfigs {
4462
4597
  });
4463
4598
  }
4464
4599
  }
4600
+ export class PaySchedules {
4601
+ /**
4602
+ * List pay schedule version history
4603
+ *
4604
+ * A pay schedule's whole valid-time sequence, newest window first and
4605
+ * cursor-paginated. Each entry is a full pay schedule carrying its own
4606
+ * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
4607
+ * `current` or `historical`, and the `corrections` that version replaced —
4608
+ * each itself a full pay schedule as previously recorded, so a client that
4609
+ * wants a field-level diff compares two of them. `as_of[valid]` is
4610
+ * rejected, since pinning a point on the valid axis would collapse the
4611
+ * sequence this endpoint returns, and a pay schedule records no
4612
+ * transaction axis to read `as_of[transaction]` against.
4613
+ *
4614
+ *
4615
+ * **Required scope:**
4616
+ *
4617
+ * `timekeeping.pay_period_configs.history:read`
4618
+ *
4619
+ */
4620
+ static listPayPeriodConfigHistory(options) {
4621
+ return (options.client ?? client).get({
4622
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4623
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/history',
4624
+ ...options
4625
+ });
4626
+ }
4627
+ /**
4628
+ * List pay schedules
4629
+ *
4630
+ * **Required scope:**
4631
+ *
4632
+ * `timekeeping.pay_period_configs:read`
4633
+ *
4634
+ */
4635
+ static listPayPeriodConfigs(options) {
4636
+ return (options?.client ?? client).get({
4637
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4638
+ url: '/api/v1/timekeeping/pay_period_configs',
4639
+ ...options
4640
+ });
4641
+ }
4642
+ /**
4643
+ * Show pay schedule
4644
+ *
4645
+ * **Required scope:**
4646
+ *
4647
+ * `timekeeping.pay_period_configs:read`
4648
+ *
4649
+ */
4650
+ static getPayPeriodConfig(options) {
4651
+ return (options.client ?? client).get({
4652
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4653
+ url: '/api/v1/timekeeping/pay_period_configs/{uid}',
4654
+ ...options
4655
+ });
4656
+ }
4657
+ }
4465
4658
  export class Holidays {
4466
4659
  /**
4467
4660
  * List holidays
@@ -4532,38 +4725,6 @@ export class Holidays {
4532
4725
  });
4533
4726
  }
4534
4727
  }
4535
- export class PaySchedules {
4536
- /**
4537
- * List pay schedules
4538
- *
4539
- * **Required scope:**
4540
- *
4541
- * `timekeeping.pay_period_configs:read`
4542
- *
4543
- */
4544
- static listPayPeriodConfigs(options) {
4545
- return (options?.client ?? client).get({
4546
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4547
- url: '/api/v1/timekeeping/pay_period_configs',
4548
- ...options
4549
- });
4550
- }
4551
- /**
4552
- * Show pay schedule
4553
- *
4554
- * **Required scope:**
4555
- *
4556
- * `timekeeping.pay_period_configs:read`
4557
- *
4558
- */
4559
- static getPayPeriodConfig(options) {
4560
- return (options.client ?? client).get({
4561
- security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4562
- url: '/api/v1/timekeeping/pay_period_configs/{uid}',
4563
- ...options
4564
- });
4565
- }
4566
- }
4567
4728
  export class TimeCardActuals {
4568
4729
  /**
4569
4730
  * List time card actuals