@dsptch-work/api-client 0.1.0 → 0.3.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
+ * Company- and user-authenticated keys require the paid Atlas entitlement 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
+ * Company- and user-authenticated keys require the paid Atlas entitlement 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
+ * Company- and user-authenticated keys require the paid Atlas entitlement 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
+ * Company- and user-authenticated keys require the paid Atlas entitlement for the key's company.
1672
+ *
1647
1673
  * **Required scope:**
1648
1674
  *
1649
1675
  * `atlas.sites:read`
@@ -2015,6 +2041,25 @@ export class Companies {
2015
2041
  ...options
2016
2042
  });
2017
2043
  }
2044
+ /**
2045
+ * Update Company
2046
+ *
2047
+ * **Required scope:**
2048
+ *
2049
+ * `companies:update`
2050
+ *
2051
+ */
2052
+ static updateCompanyProfile(options) {
2053
+ return (options.client ?? client).patch({
2054
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2055
+ url: '/api/v1/companies/{id}',
2056
+ ...options,
2057
+ headers: {
2058
+ 'Content-Type': 'application/json',
2059
+ ...options.headers
2060
+ }
2061
+ });
2062
+ }
2018
2063
  }
2019
2064
  export class ComplianceChecks {
2020
2065
  /**
@@ -2510,6 +2555,33 @@ export class PwaTrades {
2510
2555
  }
2511
2556
  }
2512
2557
  export class JobWageDeterminationRateRules {
2558
+ /**
2559
+ * List rate rule version history
2560
+ *
2561
+ * A rule's whole valid-time sequence, newest window first and cursor-paginated.
2562
+ * Each entry is a full rate rule carrying its own `valid_from` / `valid_to`
2563
+ * window and a `version_status` of `scheduled`, `current` or `historical`.
2564
+ *
2565
+ * `corrections` is always empty here: a rule keeps no audit layer, so what a
2566
+ * version replaced was not recorded. The field is still returned, because the
2567
+ * timeline answers one shape across every temporal resource. `as_of[valid]` is
2568
+ * rejected, since pinning a point on the valid axis would collapse the sequence
2569
+ * this endpoint returns, and a rule records no transaction axis to read
2570
+ * `as_of[transaction]` against.
2571
+ *
2572
+ *
2573
+ * **Required scope:**
2574
+ *
2575
+ * `jobs.pwa.wage_determinations.rate_rules.history:read`
2576
+ *
2577
+ */
2578
+ static listRateRuleHistory(options) {
2579
+ return (options.client ?? client).get({
2580
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2581
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules/{rate_rule_uid}/history',
2582
+ ...options
2583
+ });
2584
+ }
2513
2585
  /**
2514
2586
  * List rate rules
2515
2587
  *
@@ -2521,7 +2593,7 @@ export class JobWageDeterminationRateRules {
2521
2593
  static listRateRules(options) {
2522
2594
  return (options.client ?? client).get({
2523
2595
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2524
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules',
2596
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules',
2525
2597
  ...options
2526
2598
  });
2527
2599
  }
@@ -2536,7 +2608,7 @@ export class JobWageDeterminationRateRules {
2536
2608
  static createRateRule(options) {
2537
2609
  return (options.client ?? client).post({
2538
2610
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2539
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules',
2611
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules',
2540
2612
  ...options,
2541
2613
  headers: {
2542
2614
  'Content-Type': 'application/json',
@@ -2555,12 +2627,38 @@ export class JobWageDeterminationRateRules {
2555
2627
  static getRateRule(options) {
2556
2628
  return (options.client ?? client).get({
2557
2629
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2558
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules/{id}',
2630
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules/{uid}',
2559
2631
  ...options
2560
2632
  });
2561
2633
  }
2562
2634
  }
2563
2635
  export class JobWageDeterminations {
2636
+ /**
2637
+ * List job wage determination version history
2638
+ *
2639
+ * A determination's whole valid-time sequence, newest window first and
2640
+ * cursor-paginated. Each entry is a full determination carrying its own
2641
+ * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
2642
+ * `current` or `historical`, and the `corrections` that version replaced —
2643
+ * each itself a full determination as previously recorded, so a client
2644
+ * that wants a field-level diff compares two of them. `as_of[valid]` is
2645
+ * rejected, since pinning a point on the valid axis would collapse the
2646
+ * sequence this endpoint returns, and a determination records no
2647
+ * transaction axis to read `as_of[transaction]` against.
2648
+ *
2649
+ *
2650
+ * **Required scope:**
2651
+ *
2652
+ * `jobs.wage_determinations.history:read`
2653
+ *
2654
+ */
2655
+ static listJobWageDeterminationHistory(options) {
2656
+ return (options.client ?? client).get({
2657
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2658
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/history',
2659
+ ...options
2660
+ });
2661
+ }
2564
2662
  /**
2565
2663
  * List job wage determinations
2566
2664
  *
@@ -2606,7 +2704,7 @@ export class JobWageDeterminations {
2606
2704
  static deleteWageDetermination(options) {
2607
2705
  return (options.client ?? client).delete({
2608
2706
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2609
- url: '/api/v1/jobs/{job_id}/wage_determinations/{id}',
2707
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{uid}',
2610
2708
  ...options
2611
2709
  });
2612
2710
  }
@@ -2621,7 +2719,7 @@ export class JobWageDeterminations {
2621
2719
  static getJobWageDetermination(options) {
2622
2720
  return (options.client ?? client).get({
2623
2721
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2624
- url: '/api/v1/jobs/{job_id}/wage_determinations/{id}',
2722
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{uid}',
2625
2723
  ...options
2626
2724
  });
2627
2725
  }
@@ -2764,6 +2862,38 @@ export class Jobs {
2764
2862
  });
2765
2863
  }
2766
2864
  }
2865
+ export class OversiteSiteCheckIns {
2866
+ /**
2867
+ * List Site Check-ins
2868
+ *
2869
+ * **Required scope:**
2870
+ *
2871
+ * `oversite.sites.check_ins:read`
2872
+ *
2873
+ */
2874
+ static listSiteCheckIns(options) {
2875
+ return (options.client ?? client).get({
2876
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2877
+ url: '/api/v1/oversite/sites/{site_id}/check_ins',
2878
+ ...options
2879
+ });
2880
+ }
2881
+ /**
2882
+ * Show Site Check-in
2883
+ *
2884
+ * **Required scope:**
2885
+ *
2886
+ * `oversite.sites.check_ins:read`
2887
+ *
2888
+ */
2889
+ static getSiteCheckIn(options) {
2890
+ return (options.client ?? client).get({
2891
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2892
+ url: '/api/v1/oversite/sites/{site_id}/check_ins/{id}',
2893
+ ...options
2894
+ });
2895
+ }
2896
+ }
2767
2897
  export class PayPeriods {
2768
2898
  /**
2769
2899
  * List pay periods
@@ -2814,6 +2944,35 @@ export class CompensationElements {
2814
2944
  }
2815
2945
  }
2816
2946
  export class ExternalMaps {
2947
+ /**
2948
+ * List external map version history
2949
+ *
2950
+ * An external map's whole valid-time sequence, newest window first and
2951
+ * cursor-paginated. Each entry is a full external map carrying its own
2952
+ * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
2953
+ * `current` or `historical`, and the `corrections` that window replaced —
2954
+ * each itself a full external map as previously recorded, so a client
2955
+ * that wants a field-level diff compares two of them. Pass
2956
+ * `as_of[transaction]` to read the timeline as it was recorded at a past
2957
+ * moment — nested corrections stop at the same point and each
2958
+ * version reports the `transaction_to` it had then, while
2959
+ * `version_status` stays relative to now; `as_of[valid]` is rejected,
2960
+ * since pinning a point on the valid axis would collapse the sequence
2961
+ * this endpoint returns.
2962
+ *
2963
+ *
2964
+ * **Required scope:**
2965
+ *
2966
+ * `payrolls.external_maps.history:read`
2967
+ *
2968
+ */
2969
+ static listExternalMapHistory(options) {
2970
+ return (options.client ?? client).get({
2971
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2972
+ url: '/api/v1/payrolls/external_maps/{external_map_id}/history',
2973
+ ...options
2974
+ });
2975
+ }
2817
2976
  /**
2818
2977
  * List external maps
2819
2978
  *
@@ -3234,7 +3393,7 @@ export class PerDiems {
3234
3393
  *
3235
3394
  * Permanently remove a per diem, for undoing one created in error. The removed
3236
3395
  * rate is returned. A per diem already applied to a time card cannot be removed
3237
- * (`422`); deactivate it instead with `PATCH is_active: false`, which retires it
3396
+ * (`422`); deactivate it instead with `PATCH active: false`, which retires it
3238
3397
  * while time-card history keeps its reference.
3239
3398
  *
3240
3399
  *
@@ -4180,6 +4339,35 @@ export class TimeEntries {
4180
4339
  }
4181
4340
  }
4182
4341
  export class Timecodes {
4342
+ /**
4343
+ * List timecode version history
4344
+ *
4345
+ * A timecode's whole valid-time sequence, newest window first and
4346
+ * cursor-paginated. Each entry is a full timecode carrying its own
4347
+ * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
4348
+ * `current` or `historical`, and the `corrections` that window replaced —
4349
+ * each itself a full timecode as previously recorded, so a client that
4350
+ * wants a field-level diff compares two of them. Pass
4351
+ * `as_of[transaction]` to read the timeline as it was recorded at a past
4352
+ * moment — nested corrections stop at the same point and each
4353
+ * version reports the `transaction_to` it had then, while
4354
+ * `version_status` stays relative to now; `as_of[valid]` is rejected,
4355
+ * since pinning a point on the valid axis would collapse the sequence
4356
+ * this endpoint returns.
4357
+ *
4358
+ *
4359
+ * **Required scope:**
4360
+ *
4361
+ * `timecodes.history:read`
4362
+ *
4363
+ */
4364
+ static listTimecodeHistory(options) {
4365
+ return (options.client ?? client).get({
4366
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4367
+ url: '/api/v1/timecodes/{timecode_id}/history',
4368
+ ...options
4369
+ });
4370
+ }
4183
4371
  /**
4184
4372
  * Cancel all scheduled changes
4185
4373
  *
@@ -4320,7 +4508,11 @@ export class Timecodes {
4320
4508
  /**
4321
4509
  * Show timecode
4322
4510
  *
4323
- * Fetch a single timecode by id.
4511
+ * Fetch a single timecode by id. Pass `as_of[valid]` /
4512
+ * `as_of[transaction]` to read the version at a point on the
4513
+ * bitemporal plane; both default to now, so an unqualified request
4514
+ * returns the currently-effective version.
4515
+ *
4324
4516
  *
4325
4517
  * **Required scope:**
4326
4518
  *
@@ -4462,6 +4654,64 @@ export class AttestationConfigs {
4462
4654
  });
4463
4655
  }
4464
4656
  }
4657
+ export class PaySchedules {
4658
+ /**
4659
+ * List pay schedule version history
4660
+ *
4661
+ * A pay schedule's whole valid-time sequence, newest window first and
4662
+ * cursor-paginated. Each entry is a full pay schedule carrying its own
4663
+ * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
4664
+ * `current` or `historical`, and the `corrections` that version replaced —
4665
+ * each itself a full pay schedule as previously recorded, so a client that
4666
+ * wants a field-level diff compares two of them. `as_of[valid]` is
4667
+ * rejected, since pinning a point on the valid axis would collapse the
4668
+ * sequence this endpoint returns, and a pay schedule records no
4669
+ * transaction axis to read `as_of[transaction]` against.
4670
+ *
4671
+ *
4672
+ * **Required scope:**
4673
+ *
4674
+ * `timekeeping.pay_period_configs.history:read`
4675
+ *
4676
+ */
4677
+ static listPayPeriodConfigHistory(options) {
4678
+ return (options.client ?? client).get({
4679
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4680
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/history',
4681
+ ...options
4682
+ });
4683
+ }
4684
+ /**
4685
+ * List pay schedules
4686
+ *
4687
+ * **Required scope:**
4688
+ *
4689
+ * `timekeeping.pay_period_configs:read`
4690
+ *
4691
+ */
4692
+ static listPayPeriodConfigs(options) {
4693
+ return (options?.client ?? client).get({
4694
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4695
+ url: '/api/v1/timekeeping/pay_period_configs',
4696
+ ...options
4697
+ });
4698
+ }
4699
+ /**
4700
+ * Show pay schedule
4701
+ *
4702
+ * **Required scope:**
4703
+ *
4704
+ * `timekeeping.pay_period_configs:read`
4705
+ *
4706
+ */
4707
+ static getPayPeriodConfig(options) {
4708
+ return (options.client ?? client).get({
4709
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4710
+ url: '/api/v1/timekeeping/pay_period_configs/{uid}',
4711
+ ...options
4712
+ });
4713
+ }
4714
+ }
4465
4715
  export class Holidays {
4466
4716
  /**
4467
4717
  * List holidays
@@ -4532,38 +4782,6 @@ export class Holidays {
4532
4782
  });
4533
4783
  }
4534
4784
  }
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
4785
  export class TimeCardActuals {
4568
4786
  /**
4569
4787
  * List time card actuals