@dsptch-work/api-client 0.10.0 → 0.12.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.
@@ -780,32 +780,36 @@ export class AssetsItems {
780
780
  });
781
781
  }
782
782
  /**
783
- * Unretire item
783
+ * Unarchive an Item
784
784
  *
785
785
  * **Required scope:**
786
786
  *
787
- * `assets.items.retirements:delete`
787
+ * `assets.items.archives:delete`
788
788
  *
789
789
  */
790
- static unretireItem(options) {
790
+ static unarchiveItem(options) {
791
791
  return (options.client ?? client).delete({
792
792
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
793
- url: '/api/v1/assets/items/{item_id}/retirement',
794
- ...options
793
+ url: '/api/v1/assets/items/{item_id}/archive',
794
+ ...options,
795
+ headers: {
796
+ 'Content-Type': 'application/json',
797
+ ...options.headers
798
+ }
795
799
  });
796
800
  }
797
801
  /**
798
- * Retire item
802
+ * Archive an Item
799
803
  *
800
804
  * **Required scope:**
801
805
  *
802
- * `assets.items.retirements:create`
806
+ * `assets.items.archives:create`
803
807
  *
804
808
  */
805
- static retireItem(options) {
809
+ static archiveItem(options) {
806
810
  return (options.client ?? client).post({
807
811
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
808
- url: '/api/v1/assets/items/{item_id}/retirement',
812
+ url: '/api/v1/assets/items/{item_id}/archive',
809
813
  ...options,
810
814
  headers: {
811
815
  'Content-Type': 'application/json',
@@ -1230,6 +1234,44 @@ export class AssetsProducts {
1230
1234
  }
1231
1235
  });
1232
1236
  }
1237
+ /**
1238
+ * Unarchive a Product
1239
+ *
1240
+ * **Required scope:**
1241
+ *
1242
+ * `assets.products.archives:delete`
1243
+ *
1244
+ */
1245
+ static unarchiveProduct(options) {
1246
+ return (options.client ?? client).delete({
1247
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
1248
+ url: '/api/v1/assets/products/{product_id}/archive',
1249
+ ...options,
1250
+ headers: {
1251
+ 'Content-Type': 'application/json',
1252
+ ...options.headers
1253
+ }
1254
+ });
1255
+ }
1256
+ /**
1257
+ * Archive a Product
1258
+ *
1259
+ * **Required scope:**
1260
+ *
1261
+ * `assets.products.archives:create`
1262
+ *
1263
+ */
1264
+ static archiveProduct(options) {
1265
+ return (options.client ?? client).post({
1266
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
1267
+ url: '/api/v1/assets/products/{product_id}/archive',
1268
+ ...options,
1269
+ headers: {
1270
+ 'Content-Type': 'application/json',
1271
+ ...options.headers
1272
+ }
1273
+ });
1274
+ }
1233
1275
  /**
1234
1276
  * Adjust inventory on-hand count
1235
1277
  *
@@ -1475,6 +1517,91 @@ export class AssetsSites {
1475
1517
  });
1476
1518
  }
1477
1519
  }
1520
+ export class AssetsSubLocations {
1521
+ /**
1522
+ * List Sub Locations
1523
+ *
1524
+ * **Required scope:**
1525
+ *
1526
+ * `assets.sub_locations:read`
1527
+ *
1528
+ */
1529
+ static listSubLocations(options) {
1530
+ return (options?.client ?? client).get({
1531
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
1532
+ url: '/api/v1/assets/sub_locations',
1533
+ ...options
1534
+ });
1535
+ }
1536
+ /**
1537
+ * Create Sub Location
1538
+ *
1539
+ * **Required scope:**
1540
+ *
1541
+ * `assets.sub_locations:create`
1542
+ *
1543
+ */
1544
+ static createSubLocation(options) {
1545
+ return (options?.client ?? client).post({
1546
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
1547
+ url: '/api/v1/assets/sub_locations',
1548
+ ...options,
1549
+ headers: {
1550
+ 'Content-Type': 'application/json',
1551
+ ...options?.headers
1552
+ }
1553
+ });
1554
+ }
1555
+ /**
1556
+ * Delete Sub Location
1557
+ *
1558
+ * **Required scope:**
1559
+ *
1560
+ * `assets.sub_locations:delete`
1561
+ *
1562
+ */
1563
+ static deleteSubLocation(options) {
1564
+ return (options.client ?? client).delete({
1565
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
1566
+ url: '/api/v1/assets/sub_locations/{id}',
1567
+ ...options
1568
+ });
1569
+ }
1570
+ /**
1571
+ * Get Sub Location
1572
+ *
1573
+ * **Required scope:**
1574
+ *
1575
+ * `assets.sub_locations:read`
1576
+ *
1577
+ */
1578
+ static getSubLocation(options) {
1579
+ return (options.client ?? client).get({
1580
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
1581
+ url: '/api/v1/assets/sub_locations/{id}',
1582
+ ...options
1583
+ });
1584
+ }
1585
+ /**
1586
+ * Update Sub Location
1587
+ *
1588
+ * **Required scope:**
1589
+ *
1590
+ * `assets.sub_locations:update`
1591
+ *
1592
+ */
1593
+ static updateSubLocation(options) {
1594
+ return (options.client ?? client).patch({
1595
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
1596
+ url: '/api/v1/assets/sub_locations/{id}',
1597
+ ...options,
1598
+ headers: {
1599
+ 'Content-Type': 'application/json',
1600
+ ...options.headers
1601
+ }
1602
+ });
1603
+ }
1604
+ }
1478
1605
  export class AssetsTransfers {
1479
1606
  /**
1480
1607
  * List transfers
@@ -2691,6 +2818,41 @@ export class JobWageDeterminationRateRules {
2691
2818
  }
2692
2819
  }
2693
2820
  export class JobWageDeterminations {
2821
+ /**
2822
+ * Shift job wage determination genesis
2823
+ *
2824
+ * Move when a determination's timeline begins. Shifting it earlier extends
2825
+ * the first version back; shifting it later drops the coverage before it,
2826
+ * and what that removes stops being readable through `as_of[valid]` and
2827
+ * `/history`.
2828
+ *
2829
+ * This changes *when* the determination existed rather than what it said —
2830
+ * no version's attributes are rewritten. Moving the other end of the timeline
2831
+ * is `scheduled_termination`, and changing a version's values is the
2832
+ * determination update.
2833
+ *
2834
+ * A shift to or past a scheduled termination is refused with `422`, since it
2835
+ * would leave no coverage at all.
2836
+ *
2837
+ * Conditional: send the determination's `ETag` as `If-Match`.
2838
+ *
2839
+ *
2840
+ * **Required scope:**
2841
+ *
2842
+ * `jobs.wage_determinations.genesis:update`
2843
+ *
2844
+ */
2845
+ static shiftJobWageDeterminationGenesis(options) {
2846
+ return (options.client ?? client).patch({
2847
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2848
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/genesis',
2849
+ ...options,
2850
+ headers: {
2851
+ 'Content-Type': 'application/json',
2852
+ ...options.headers
2853
+ }
2854
+ });
2855
+ }
2694
2856
  /**
2695
2857
  * List job wage determination version history
2696
2858
  *
@@ -2720,6 +2882,100 @@ export class JobWageDeterminations {
2720
2882
  ...options
2721
2883
  });
2722
2884
  }
2885
+ /**
2886
+ * Cancel scheduled changes on job wage determination
2887
+ *
2888
+ * **Required scope:**
2889
+ *
2890
+ * `jobs.wage_determinations.scheduled_changes:delete`
2891
+ *
2892
+ */
2893
+ static cancelJobWageDeterminationScheduledChanges(options) {
2894
+ return (options.client ?? client).delete({
2895
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2896
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/scheduled_changes',
2897
+ ...options
2898
+ });
2899
+ }
2900
+ /**
2901
+ * List scheduled changes for job wage determination
2902
+ *
2903
+ * **Required scope:**
2904
+ *
2905
+ * `jobs.wage_determinations.scheduled_changes:read`
2906
+ *
2907
+ */
2908
+ static listJobWageDeterminationScheduledChanges(options) {
2909
+ return (options.client ?? client).get({
2910
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2911
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/scheduled_changes',
2912
+ ...options
2913
+ });
2914
+ }
2915
+ /**
2916
+ * Schedule effective-dated change on job wage determination
2917
+ *
2918
+ * **Required scope:**
2919
+ *
2920
+ * `jobs.wage_determinations.scheduled_changes:create`
2921
+ *
2922
+ */
2923
+ static scheduleJobWageDeterminationChange(options) {
2924
+ return (options.client ?? client).post({
2925
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2926
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/scheduled_changes',
2927
+ ...options,
2928
+ headers: {
2929
+ 'Content-Type': 'application/json',
2930
+ ...options.headers
2931
+ }
2932
+ });
2933
+ }
2934
+ /**
2935
+ * Cancel scheduled termination on job wage determination
2936
+ *
2937
+ * **Required scope:**
2938
+ *
2939
+ * `jobs.wage_determinations.scheduled_terminations:delete`
2940
+ *
2941
+ */
2942
+ static cancelJobWageDeterminationScheduledTermination(options) {
2943
+ return (options.client ?? client).delete({
2944
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2945
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/scheduled_termination',
2946
+ ...options
2947
+ });
2948
+ }
2949
+ /**
2950
+ * Schedule termination on job wage determination
2951
+ *
2952
+ * End a determination's valid coverage at `effective_date`: segments beyond
2953
+ * it are dropped and one spanning it is truncated, so the determination stops
2954
+ * being valid from that point on. Earlier versions are untouched and stay
2955
+ * readable through `as_of[valid]` and `/history`.
2956
+ *
2957
+ * Moving an end is cancel-then-schedule: cancel the standing termination,
2958
+ * then schedule the one you want.
2959
+ *
2960
+ * Conditional: send the determination's `ETag` as `If-Match`.
2961
+ *
2962
+ *
2963
+ * **Required scope:**
2964
+ *
2965
+ * `jobs.wage_determinations.scheduled_terminations:create`
2966
+ *
2967
+ */
2968
+ static scheduleJobWageDeterminationTermination(options) {
2969
+ return (options.client ?? client).post({
2970
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2971
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/scheduled_termination',
2972
+ ...options,
2973
+ headers: {
2974
+ 'Content-Type': 'application/json',
2975
+ ...options.headers
2976
+ }
2977
+ });
2978
+ }
2723
2979
  /**
2724
2980
  * List job wage determinations
2725
2981
  *
@@ -2784,6 +3040,37 @@ export class JobWageDeterminations {
2784
3040
  ...options
2785
3041
  });
2786
3042
  }
3043
+ /**
3044
+ * Update job wage determination
3045
+ *
3046
+ * Edit a determination's values from `effective_from` forward: every version
3047
+ * starting at or after that instant takes the new values, and earlier
3048
+ * versions are untouched. Where an edit starts inside a version and changes
3049
+ * its values, a boundary is created at `effective_from` so the change applies
3050
+ * only from there.
3051
+ *
3052
+ * This rewrites what the determination said, not when it existed — moving
3053
+ * either end of the timeline is `genesis` or `scheduled_termination`.
3054
+ *
3055
+ * Conditional: send the determination's `ETag` as `If-Match`.
3056
+ *
3057
+ *
3058
+ * **Required scope:**
3059
+ *
3060
+ * `jobs.wage_determinations:update`
3061
+ *
3062
+ */
3063
+ static updateJobWageDetermination(options) {
3064
+ return (options.client ?? client).patch({
3065
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
3066
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{id}',
3067
+ ...options,
3068
+ headers: {
3069
+ 'Content-Type': 'application/json',
3070
+ ...options.headers
3071
+ }
3072
+ });
3073
+ }
2787
3074
  }
2788
3075
  export class Jobs {
2789
3076
  /**
@@ -2927,6 +3214,12 @@ export class OversiteSiteCheckIns {
2927
3214
  /**
2928
3215
  * List Site Check-ins
2929
3216
  *
3217
+ * Returns only the check-ins visible to the API key's company: those made by its
3218
+ * currently-employed members, plus all of the site's check-ins when the company
3219
+ * holds a claim on it with check-in features enabled. Other check-ins are
3220
+ * omitted, so a visible site can return an empty list.
3221
+ *
3222
+ *
2930
3223
  * **Required scope:**
2931
3224
  *
2932
3225
  * `oversite.sites.check_ins:read`
@@ -2942,6 +3235,12 @@ export class OversiteSiteCheckIns {
2942
3235
  /**
2943
3236
  * Show Site Check-in
2944
3237
  *
3238
+ * A check-in is visible to the API key's company when its author is a
3239
+ * currently-employed member, or when the company holds a claim on the site
3240
+ * with check-in features enabled; requesting one outside that visibility
3241
+ * returns `404`.
3242
+ *
3243
+ *
2945
3244
  * **Required scope:**
2946
3245
  *
2947
3246
  * `oversite.sites.check_ins:read`