@dsptch-work/api-client 0.11.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.
- package/CHANGELOG.md +54 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +198 -1
- package/dist/gen/sdk.gen.js +333 -0
- package/dist/gen/types.gen.d.ts +912 -27
- package/dist/gen/zod.gen.d.ts +1154 -176
- package/dist/gen/zod.gen.js +309 -6
- package/package.json +1 -1
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -779,6 +779,44 @@ export class AssetsItems {
|
|
|
779
779
|
}
|
|
780
780
|
});
|
|
781
781
|
}
|
|
782
|
+
/**
|
|
783
|
+
* Unarchive an Item
|
|
784
|
+
*
|
|
785
|
+
* **Required scope:**
|
|
786
|
+
*
|
|
787
|
+
* `assets.items.archives:delete`
|
|
788
|
+
*
|
|
789
|
+
*/
|
|
790
|
+
static unarchiveItem(options) {
|
|
791
|
+
return (options.client ?? client).delete({
|
|
792
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
793
|
+
url: '/api/v1/assets/items/{item_id}/archive',
|
|
794
|
+
...options,
|
|
795
|
+
headers: {
|
|
796
|
+
'Content-Type': 'application/json',
|
|
797
|
+
...options.headers
|
|
798
|
+
}
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Archive an Item
|
|
803
|
+
*
|
|
804
|
+
* **Required scope:**
|
|
805
|
+
*
|
|
806
|
+
* `assets.items.archives:create`
|
|
807
|
+
*
|
|
808
|
+
*/
|
|
809
|
+
static archiveItem(options) {
|
|
810
|
+
return (options.client ?? client).post({
|
|
811
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
812
|
+
url: '/api/v1/assets/items/{item_id}/archive',
|
|
813
|
+
...options,
|
|
814
|
+
headers: {
|
|
815
|
+
'Content-Type': 'application/json',
|
|
816
|
+
...options.headers
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
}
|
|
782
820
|
/**
|
|
783
821
|
* List service schedules
|
|
784
822
|
*
|
|
@@ -1196,6 +1234,44 @@ export class AssetsProducts {
|
|
|
1196
1234
|
}
|
|
1197
1235
|
});
|
|
1198
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
|
+
}
|
|
1199
1275
|
/**
|
|
1200
1276
|
* Adjust inventory on-hand count
|
|
1201
1277
|
*
|
|
@@ -1441,6 +1517,91 @@ export class AssetsSites {
|
|
|
1441
1517
|
});
|
|
1442
1518
|
}
|
|
1443
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
|
+
}
|
|
1444
1605
|
export class AssetsTransfers {
|
|
1445
1606
|
/**
|
|
1446
1607
|
* List transfers
|
|
@@ -2657,6 +2818,41 @@ export class JobWageDeterminationRateRules {
|
|
|
2657
2818
|
}
|
|
2658
2819
|
}
|
|
2659
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
|
+
}
|
|
2660
2856
|
/**
|
|
2661
2857
|
* List job wage determination version history
|
|
2662
2858
|
*
|
|
@@ -2686,6 +2882,100 @@ export class JobWageDeterminations {
|
|
|
2686
2882
|
...options
|
|
2687
2883
|
});
|
|
2688
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
|
+
}
|
|
2689
2979
|
/**
|
|
2690
2980
|
* List job wage determinations
|
|
2691
2981
|
*
|
|
@@ -2750,6 +3040,37 @@ export class JobWageDeterminations {
|
|
|
2750
3040
|
...options
|
|
2751
3041
|
});
|
|
2752
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
|
+
}
|
|
2753
3074
|
}
|
|
2754
3075
|
export class Jobs {
|
|
2755
3076
|
/**
|
|
@@ -2893,6 +3214,12 @@ export class OversiteSiteCheckIns {
|
|
|
2893
3214
|
/**
|
|
2894
3215
|
* List Site Check-ins
|
|
2895
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
|
+
*
|
|
2896
3223
|
* **Required scope:**
|
|
2897
3224
|
*
|
|
2898
3225
|
* `oversite.sites.check_ins:read`
|
|
@@ -2908,6 +3235,12 @@ export class OversiteSiteCheckIns {
|
|
|
2908
3235
|
/**
|
|
2909
3236
|
* Show Site Check-in
|
|
2910
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
|
+
*
|
|
2911
3244
|
* **Required scope:**
|
|
2912
3245
|
*
|
|
2913
3246
|
* `oversite.sites.check_ins:read`
|