@dsptch-work/api-client 0.21.0 → 0.22.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 +13 -0
- package/dist/gen/index.d.ts +1 -1
- package/dist/gen/sdk.gen.d.ts +115 -1
- package/dist/gen/sdk.gen.js +176 -0
- package/dist/gen/types.gen.d.ts +540 -1
- package/dist/gen/zod.gen.d.ts +421 -0
- package/dist/gen/zod.gen.js +142 -0
- package/package.json +1 -1
package/dist/gen/sdk.gen.js
CHANGED
|
@@ -4700,6 +4700,39 @@ export class Paystubs {
|
|
|
4700
4700
|
}
|
|
4701
4701
|
}
|
|
4702
4702
|
export class People {
|
|
4703
|
+
/**
|
|
4704
|
+
* Correct employment hire-date boundary
|
|
4705
|
+
*
|
|
4706
|
+
* Correct where one employment stint's valid-time timeline begins.
|
|
4707
|
+
* Moving the date earlier extends the first version; moving it later
|
|
4708
|
+
* removes older versions or coverage before the new date. This is a
|
|
4709
|
+
* valid-time correction and does not preserve removed versions as
|
|
4710
|
+
* bitemporal history.
|
|
4711
|
+
*
|
|
4712
|
+
* Employments with no recorded hire-date boundary cannot use this
|
|
4713
|
+
* endpoint because employment reconciliation requires a finite start.
|
|
4714
|
+
* Read the employment again after a successful correction; the response
|
|
4715
|
+
* carries the family's new `ETag`.
|
|
4716
|
+
*
|
|
4717
|
+
* Conditional: send the employment's `ETag` as `If-Match`.
|
|
4718
|
+
*
|
|
4719
|
+
*
|
|
4720
|
+
* **Required scope:**
|
|
4721
|
+
*
|
|
4722
|
+
* `people.employments.genesis:update`
|
|
4723
|
+
*
|
|
4724
|
+
*/
|
|
4725
|
+
static updateGenesis(options) {
|
|
4726
|
+
return (options.client ?? client).patch({
|
|
4727
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4728
|
+
url: '/api/v1/people/employments/{employment_id}/genesis',
|
|
4729
|
+
...options,
|
|
4730
|
+
headers: {
|
|
4731
|
+
'Content-Type': 'application/json',
|
|
4732
|
+
...options.headers
|
|
4733
|
+
}
|
|
4734
|
+
});
|
|
4735
|
+
}
|
|
4703
4736
|
/**
|
|
4704
4737
|
* List employment history
|
|
4705
4738
|
*
|
|
@@ -4743,6 +4776,123 @@ export class People {
|
|
|
4743
4776
|
...options
|
|
4744
4777
|
});
|
|
4745
4778
|
}
|
|
4779
|
+
/**
|
|
4780
|
+
* Schedule an employment change
|
|
4781
|
+
*
|
|
4782
|
+
* Create one strictly future employment-version boundary. `effective_date` is
|
|
4783
|
+
* interpreted at midnight in the credential company's time zone. This operation
|
|
4784
|
+
* cannot move or replace an existing boundary.
|
|
4785
|
+
*
|
|
4786
|
+
* Conditional: send the employment's `ETag` as `If-Match`.
|
|
4787
|
+
*
|
|
4788
|
+
*
|
|
4789
|
+
* **Required scope:**
|
|
4790
|
+
*
|
|
4791
|
+
* `people.employments.scheduled_changes:create`
|
|
4792
|
+
*
|
|
4793
|
+
*/
|
|
4794
|
+
static createEmploymentScheduledChange(options) {
|
|
4795
|
+
return (options.client ?? client).post({
|
|
4796
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4797
|
+
url: '/api/v1/people/employments/{employment_id}/scheduled_changes',
|
|
4798
|
+
...options,
|
|
4799
|
+
headers: {
|
|
4800
|
+
'Content-Type': 'application/json',
|
|
4801
|
+
...options.headers
|
|
4802
|
+
}
|
|
4803
|
+
});
|
|
4804
|
+
}
|
|
4805
|
+
/**
|
|
4806
|
+
* Cancel one employment change at an exact boundary
|
|
4807
|
+
*
|
|
4808
|
+
* Cancel only the exact strictly future boundary named by the path. Its preceding
|
|
4809
|
+
* version expands across the removed interval; any later boundary remains in place.
|
|
4810
|
+
*
|
|
4811
|
+
* Conditional: send the employment's `ETag` as `If-Match`.
|
|
4812
|
+
*
|
|
4813
|
+
*
|
|
4814
|
+
* **Required scope:**
|
|
4815
|
+
*
|
|
4816
|
+
* `people.employments.scheduled_changes:delete`
|
|
4817
|
+
*
|
|
4818
|
+
*/
|
|
4819
|
+
static deleteEmploymentScheduledChange(options) {
|
|
4820
|
+
return (options.client ?? client).delete({
|
|
4821
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4822
|
+
url: '/api/v1/people/employments/{employment_id}/scheduled_changes/{effective_date}',
|
|
4823
|
+
...options
|
|
4824
|
+
});
|
|
4825
|
+
}
|
|
4826
|
+
/**
|
|
4827
|
+
* Edit an employment change at an exact boundary
|
|
4828
|
+
*
|
|
4829
|
+
* Change values at the exact strictly future boundary named by the path. The
|
|
4830
|
+
* boundary itself never moves; a date inside a version does not identify it.
|
|
4831
|
+
*
|
|
4832
|
+
* Conditional: send the employment's `ETag` as `If-Match`.
|
|
4833
|
+
*
|
|
4834
|
+
*
|
|
4835
|
+
* **Required scope:**
|
|
4836
|
+
*
|
|
4837
|
+
* `people.employments.scheduled_changes:update`
|
|
4838
|
+
*
|
|
4839
|
+
*/
|
|
4840
|
+
static updateEmploymentScheduledChange(options) {
|
|
4841
|
+
return (options.client ?? client).patch({
|
|
4842
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4843
|
+
url: '/api/v1/people/employments/{employment_id}/scheduled_changes/{effective_date}',
|
|
4844
|
+
...options,
|
|
4845
|
+
headers: {
|
|
4846
|
+
'Content-Type': 'application/json',
|
|
4847
|
+
...options.headers
|
|
4848
|
+
}
|
|
4849
|
+
});
|
|
4850
|
+
}
|
|
4851
|
+
/**
|
|
4852
|
+
* Cancel a scheduled employment termination
|
|
4853
|
+
*
|
|
4854
|
+
* **Required scope:**
|
|
4855
|
+
*
|
|
4856
|
+
* `people.employments.scheduled_terminations:delete`
|
|
4857
|
+
*
|
|
4858
|
+
*/
|
|
4859
|
+
static deleteScheduledTermination(options) {
|
|
4860
|
+
return (options.client ?? client).delete({
|
|
4861
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4862
|
+
url: '/api/v1/people/employments/{employment_id}/scheduled_termination',
|
|
4863
|
+
...options
|
|
4864
|
+
});
|
|
4865
|
+
}
|
|
4866
|
+
/**
|
|
4867
|
+
* Schedule an employment termination
|
|
4868
|
+
*
|
|
4869
|
+
* Close this employment stint's timeline at `effective_date`. The employment remains
|
|
4870
|
+
* readable in history strictly before that date, but stops applying at company-local
|
|
4871
|
+
* midnight starting that date. This does not delete the employment family; family
|
|
4872
|
+
* deletion is a separate operation.
|
|
4873
|
+
*
|
|
4874
|
+
* A family with a termination already standing returns `409`. To move its end, cancel it
|
|
4875
|
+
* with `DELETE` and then make a new `POST` with the replacement date.
|
|
4876
|
+
* A termination at or before the employment's genesis is refused with `422`.
|
|
4877
|
+
* Conditional: send the employment's `ETag` as `If-Match`.
|
|
4878
|
+
*
|
|
4879
|
+
*
|
|
4880
|
+
* **Required scope:**
|
|
4881
|
+
*
|
|
4882
|
+
* `people.employments.scheduled_terminations:create`
|
|
4883
|
+
*
|
|
4884
|
+
*/
|
|
4885
|
+
static createEmploymentScheduledTermination(options) {
|
|
4886
|
+
return (options.client ?? client).post({
|
|
4887
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4888
|
+
url: '/api/v1/people/employments/{employment_id}/scheduled_termination',
|
|
4889
|
+
...options,
|
|
4890
|
+
headers: {
|
|
4891
|
+
'Content-Type': 'application/json',
|
|
4892
|
+
...options.headers
|
|
4893
|
+
}
|
|
4894
|
+
});
|
|
4895
|
+
}
|
|
4746
4896
|
/**
|
|
4747
4897
|
* List employments
|
|
4748
4898
|
*
|
|
@@ -4764,6 +4914,32 @@ export class People {
|
|
|
4764
4914
|
...options
|
|
4765
4915
|
});
|
|
4766
4916
|
}
|
|
4917
|
+
/**
|
|
4918
|
+
* Create employment
|
|
4919
|
+
*
|
|
4920
|
+
* Create a new employment stint for an existing user in the
|
|
4921
|
+
* credential company. `hire_date` is interpreted at midnight in
|
|
4922
|
+
* the company time zone. A rehire creates a distinct stint; an
|
|
4923
|
+
* overlapping stint is rejected. This operation creates no user,
|
|
4924
|
+
* invitation, role, group, or login identity.
|
|
4925
|
+
*
|
|
4926
|
+
*
|
|
4927
|
+
* **Required scope:**
|
|
4928
|
+
*
|
|
4929
|
+
* `people.employments:create`
|
|
4930
|
+
*
|
|
4931
|
+
*/
|
|
4932
|
+
static createEmployment(options) {
|
|
4933
|
+
return (options.client ?? client).post({
|
|
4934
|
+
security: [{ name: 'X-Api-Key', type: 'apiKey' }],
|
|
4935
|
+
url: '/api/v1/people/employments',
|
|
4936
|
+
...options,
|
|
4937
|
+
headers: {
|
|
4938
|
+
'Content-Type': 'application/json',
|
|
4939
|
+
...options.headers
|
|
4940
|
+
}
|
|
4941
|
+
});
|
|
4942
|
+
}
|
|
4767
4943
|
/**
|
|
4768
4944
|
* Get employment
|
|
4769
4945
|
*
|