@dsptch-work/api-client 0.2.0 → 0.4.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 +105 -0
- package/dist/gen/client/index.d.ts +2 -0
- package/dist/gen/client/utils.gen.d.ts +1 -1
- package/dist/gen/client.gen.d.ts +2 -2
- package/dist/gen/core/auth.gen.d.ts +7 -0
- package/dist/gen/core/params.gen.d.ts +2 -2
- package/dist/gen/core/params.gen.js +20 -11
- package/dist/gen/core/queryKeySerializer.gen.d.ts +1 -1
- package/dist/gen/core/types.gen.d.ts +5 -0
- package/dist/gen/index.d.ts +2 -2
- package/dist/gen/index.js +1 -1
- package/dist/gen/sdk.gen.d.ts +333 -304
- package/dist/gen/sdk.gen.js +78 -37
- package/dist/gen/types.gen.d.ts +1427 -861
- package/dist/gen/zod.gen.d.ts +1322 -544
- package/dist/gen/zod.gen.js +657 -154
- package/package.json +4 -4
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -1615,7 +1615,7 @@ export class AtlasFeatures {
|
|
|
1615
1615
|
/**
|
|
1616
1616
|
* List features
|
|
1617
1617
|
*
|
|
1618
|
-
*
|
|
1618
|
+
* Company- and user-authenticated keys require the paid Atlas entitlement for the key's company.
|
|
1619
1619
|
*
|
|
1620
1620
|
* **Required scope:**
|
|
1621
1621
|
*
|
|
@@ -1632,7 +1632,7 @@ export class AtlasFeatures {
|
|
|
1632
1632
|
/**
|
|
1633
1633
|
* Show feature
|
|
1634
1634
|
*
|
|
1635
|
-
*
|
|
1635
|
+
* Company- and user-authenticated keys require the paid Atlas entitlement for the key's company.
|
|
1636
1636
|
*
|
|
1637
1637
|
* **Required scope:**
|
|
1638
1638
|
*
|
|
@@ -1651,7 +1651,7 @@ export class AtlasSites {
|
|
|
1651
1651
|
/**
|
|
1652
1652
|
* List sites
|
|
1653
1653
|
*
|
|
1654
|
-
*
|
|
1654
|
+
* Company- and user-authenticated keys require the paid Atlas entitlement for the key's company.
|
|
1655
1655
|
*
|
|
1656
1656
|
* **Required scope:**
|
|
1657
1657
|
*
|
|
@@ -1668,7 +1668,7 @@ export class AtlasSites {
|
|
|
1668
1668
|
/**
|
|
1669
1669
|
* Show site
|
|
1670
1670
|
*
|
|
1671
|
-
*
|
|
1671
|
+
* Company- and user-authenticated keys require the paid Atlas entitlement for the key's company.
|
|
1672
1672
|
*
|
|
1673
1673
|
* **Required scope:**
|
|
1674
1674
|
*
|
|
@@ -2041,6 +2041,25 @@ export class Companies {
|
|
|
2041
2041
|
...options
|
|
2042
2042
|
});
|
|
2043
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
|
+
}
|
|
2044
2063
|
}
|
|
2045
2064
|
export class ComplianceChecks {
|
|
2046
2065
|
/**
|
|
@@ -2843,6 +2862,38 @@ export class Jobs {
|
|
|
2843
2862
|
});
|
|
2844
2863
|
}
|
|
2845
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
|
+
}
|
|
2846
2897
|
export class PayPeriods {
|
|
2847
2898
|
/**
|
|
2848
2899
|
* List pay periods
|
|
@@ -2903,8 +2954,11 @@ export class ExternalMaps {
|
|
|
2903
2954
|
* each itself a full external map as previously recorded, so a client
|
|
2904
2955
|
* that wants a field-level diff compares two of them. Pass
|
|
2905
2956
|
* `as_of[transaction]` to read the timeline as it was recorded at a past
|
|
2906
|
-
* moment
|
|
2907
|
-
*
|
|
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.
|
|
2908
2962
|
*
|
|
2909
2963
|
*
|
|
2910
2964
|
* **Required scope:**
|
|
@@ -3339,7 +3393,7 @@ export class PerDiems {
|
|
|
3339
3393
|
*
|
|
3340
3394
|
* Permanently remove a per diem, for undoing one created in error. The removed
|
|
3341
3395
|
* rate is returned. A per diem already applied to a time card cannot be removed
|
|
3342
|
-
* (`422`); deactivate it instead with `PATCH
|
|
3396
|
+
* (`422`); deactivate it instead with `PATCH active: false`, which retires it
|
|
3343
3397
|
* while time-card history keeps its reference.
|
|
3344
3398
|
*
|
|
3345
3399
|
*
|
|
@@ -4144,6 +4198,15 @@ export class TimeEntries {
|
|
|
4144
4198
|
/**
|
|
4145
4199
|
* List time entry versions
|
|
4146
4200
|
*
|
|
4201
|
+
* Change feed for time entries, following the API-wide
|
|
4202
|
+
* change-feed contract (see "Change feeds" in the API
|
|
4203
|
+
* overview): poll with `filter[created_at][gte]` set to your
|
|
4204
|
+
* watermark, deduplicate on `(id, event, timestamp)`, and
|
|
4205
|
+
* advance the watermark only to `meta.complete_through`.
|
|
4206
|
+
* The feed carries `create`, `update`, and `destroy` events,
|
|
4207
|
+
* retained for at least 30 days.
|
|
4208
|
+
*
|
|
4209
|
+
*
|
|
4147
4210
|
* **Required scope:**
|
|
4148
4211
|
*
|
|
4149
4212
|
* `time_entries.deltas:read`
|
|
@@ -4164,7 +4227,7 @@ export class TimeEntries {
|
|
|
4164
4227
|
* and approval status. Results are ordered by start_time then id (ascending)
|
|
4165
4228
|
* and cursor-paginated. Narrow with filter[user_id], filter[job_id] (or
|
|
4166
4229
|
* filter[job_id][null]=true for entries with no job), and
|
|
4167
|
-
* filter[
|
|
4230
|
+
* filter[timekeeping_time_card_id]; the controller also accepts gte/lte time-range
|
|
4168
4231
|
* filters on start_time, end_time, created_at, and updated_at.
|
|
4169
4232
|
*
|
|
4170
4233
|
*
|
|
@@ -4183,12 +4246,12 @@ export class TimeEntries {
|
|
|
4183
4246
|
/**
|
|
4184
4247
|
* Create time entry
|
|
4185
4248
|
*
|
|
4186
|
-
* Create a time entry. Required:
|
|
4249
|
+
* Create a time entry. Required: timekeeping_time_card_id, start_time, and end_time;
|
|
4187
4250
|
* user_id is derived server-side from the time card. Both start_time and
|
|
4188
4251
|
* end_time must fall on a whole-minute boundary (nonzero seconds are
|
|
4189
4252
|
* rejected); start_time must fall within the time card's pay period, and
|
|
4190
4253
|
* end_time must be after start_time. Optional job_id (the worker must have a
|
|
4191
|
-
* Position covering that job at start_time),
|
|
4254
|
+
* Position covering that job at start_time), timekeeping_timecode_id (must be one of the
|
|
4192
4255
|
* company's default timecodes), state, description, hourly_rate_cents (derived
|
|
4193
4256
|
* from the position/user default when omitted), and feature_ids. Supplying
|
|
4194
4257
|
* feature_ids — or setting feature_allocation_acknowledged true — satisfies a
|
|
@@ -4295,8 +4358,11 @@ export class Timecodes {
|
|
|
4295
4358
|
* each itself a full timecode as previously recorded, so a client that
|
|
4296
4359
|
* wants a field-level diff compares two of them. Pass
|
|
4297
4360
|
* `as_of[transaction]` to read the timeline as it was recorded at a past
|
|
4298
|
-
* moment
|
|
4299
|
-
*
|
|
4361
|
+
* moment — nested corrections stop at the same point and each
|
|
4362
|
+
* version reports the `transaction_to` it had then, while
|
|
4363
|
+
* `version_status` stays relative to now; `as_of[valid]` is rejected,
|
|
4364
|
+
* since pinning a point on the valid axis would collapse the sequence
|
|
4365
|
+
* this endpoint returns.
|
|
4300
4366
|
*
|
|
4301
4367
|
*
|
|
4302
4368
|
* **Required scope:**
|
|
@@ -4423,31 +4489,6 @@ export class Timecodes {
|
|
|
4423
4489
|
}
|
|
4424
4490
|
});
|
|
4425
4491
|
}
|
|
4426
|
-
/**
|
|
4427
|
-
* Terminate timecode
|
|
4428
|
-
*
|
|
4429
|
-
* Terminate a timecode by closing its valid-time range — a soft delete that
|
|
4430
|
-
* sets `valid_to` to the supplied `termination_date` (defaulting to today)
|
|
4431
|
-
* rather than removing the row, and returns the updated timecode. A
|
|
4432
|
-
* `termination_date` earlier than the timecode's `valid_from` returns 422.
|
|
4433
|
-
*
|
|
4434
|
-
*
|
|
4435
|
-
* **Required scope:**
|
|
4436
|
-
*
|
|
4437
|
-
* `timecodes:delete`
|
|
4438
|
-
*
|
|
4439
|
-
*/
|
|
4440
|
-
static terminateTimecode(options) {
|
|
4441
|
-
return (options.client ?? client).delete({
|
|
4442
|
-
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4443
|
-
url: '/api/v1/timecodes/{id}',
|
|
4444
|
-
...options,
|
|
4445
|
-
headers: {
|
|
4446
|
-
'Content-Type': 'application/json',
|
|
4447
|
-
...options.headers
|
|
4448
|
-
}
|
|
4449
|
-
});
|
|
4450
|
-
}
|
|
4451
4492
|
/**
|
|
4452
4493
|
* Show timecode
|
|
4453
4494
|
*
|