@dsptch-work/api-client 0.8.0 → 0.10.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.
@@ -2234,6 +2234,61 @@ export class Forms {
2234
2234
  ...options
2235
2235
  });
2236
2236
  }
2237
+ /**
2238
+ * List form submission versions
2239
+ *
2240
+ * Change feed for form submissions, following the API-wide change-feed
2241
+ * contract (see "Change feeds" in the API overview): poll with
2242
+ * `filter[created_at][gte]` set to your watermark, deduplicate on
2243
+ * `(id, event, timestamp)`, and advance the watermark only to
2244
+ * `meta.complete_through`. The feed carries `destroy` events only, returned
2245
+ * oldest event first: archiving hard-deletes the row, so the live index
2246
+ * offers no deletion signal, while creates and updates surface there through
2247
+ * `created_at` / `updated_at` — and un-archiving does not exist in the
2248
+ * product, so a `destroy` here is final.
2249
+ *
2250
+ * Events are guaranteed for at least the last 30 days. Older events are
2251
+ * served for as long as they remain stored, and may be removed without
2252
+ * notice. Past the retention window, or after a lost watermark, resync by
2253
+ * re-listing the live index and diffing your replica.
2254
+ *
2255
+ * One request covers at most 32 days of event time, and
2256
+ * `filter[created_at][gte]` and `[lte]` place that interval anywhere in the
2257
+ * feed's history. Sending only `[gte]` covers the 32 days after it, only
2258
+ * `[lte]` the 32 days before it, and neither the 32 days beginning 30 days
2259
+ * ago. A wider interval is refused with a `422` of type `interval_too_wide`
2260
+ * rather than narrowed to fit — split it into consecutive windows and read
2261
+ * them in order, and their pages join without gaps. Both bounds are
2262
+ * inclusive, so an event stamped exactly on a shared bound appears in both
2263
+ * pages — deduplicate as usual. An interval whose `[lte]` precedes its
2264
+ * `[gte]` is refused too, as a `422` of type `invalid_filter_value`, rather
2265
+ * than answered with the empty page it names.
2266
+ *
2267
+ * `meta.complete_through` is never later than the end of the interval you
2268
+ * asked for, so a request ending in the past reports its own `[lte]`.
2269
+ * Advancing your watermark to it walks a consumer that has fallen behind
2270
+ * forward one window per poll, rather than past events no response carried.
2271
+ *
2272
+ * Visibility is re-derived from the definition and submitter retained on the
2273
+ * event; the live index also grants access through a job assignment, which
2274
+ * archival clears, so a user-scoped key sees a subset of its index-visible
2275
+ * events, never a superset. A company-scoped key reads the whole tenant and
2276
+ * is unaffected. `timestamp` (and the `filter[created_at]` range) is the
2277
+ * time the event occurred, not the submission's own timestamps.
2278
+ *
2279
+ *
2280
+ * **Required scope:**
2281
+ *
2282
+ * `form_submissions.deltas:read`
2283
+ *
2284
+ */
2285
+ static listFormSubmissionDeltas(options) {
2286
+ return (options?.client ?? client).get({
2287
+ security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2288
+ url: '/api/v1/form_submissions/deltas',
2289
+ ...options
2290
+ });
2291
+ }
2237
2292
  /**
2238
2293
  * List form submissions
2239
2294
  *
@@ -2560,7 +2615,10 @@ export class JobWageDeterminationRateRules {
2560
2615
  *
2561
2616
  * A rule's whole valid-time sequence, newest window first and cursor-paginated.
2562
2617
  * 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`.
2618
+ * window and a `version_status` of `scheduled`, `current` or `historical`. An
2619
+ * entry carries the family key as `pay_rates_rule_id` and no `id` or `uid` of
2620
+ * its own — every version shares the family key, so versions are told apart by
2621
+ * their window coordinates.
2564
2622
  *
2565
2623
  * `corrections` is always empty here: a rule keeps no audit layer, so what a
2566
2624
  * version replaced was not recorded. The field is still returned, because the
@@ -2578,7 +2636,7 @@ export class JobWageDeterminationRateRules {
2578
2636
  static listRateRuleHistory(options) {
2579
2637
  return (options.client ?? client).get({
2580
2638
  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',
2639
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules/{rate_rule_id}/history',
2582
2640
  ...options
2583
2641
  });
2584
2642
  }
@@ -2593,7 +2651,7 @@ export class JobWageDeterminationRateRules {
2593
2651
  static listRateRules(options) {
2594
2652
  return (options.client ?? client).get({
2595
2653
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2596
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules',
2654
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules',
2597
2655
  ...options
2598
2656
  });
2599
2657
  }
@@ -2608,7 +2666,7 @@ export class JobWageDeterminationRateRules {
2608
2666
  static createRateRule(options) {
2609
2667
  return (options.client ?? client).post({
2610
2668
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2611
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules',
2669
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules',
2612
2670
  ...options,
2613
2671
  headers: {
2614
2672
  'Content-Type': 'application/json',
@@ -2627,7 +2685,7 @@ export class JobWageDeterminationRateRules {
2627
2685
  static getRateRule(options) {
2628
2686
  return (options.client ?? client).get({
2629
2687
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2630
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/rate_rules/{uid}',
2688
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/rate_rules/{id}',
2631
2689
  ...options
2632
2690
  });
2633
2691
  }
@@ -2641,7 +2699,10 @@ export class JobWageDeterminations {
2641
2699
  * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
2642
2700
  * `current` or `historical`, and the `corrections` that version replaced —
2643
2701
  * 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
2702
+ * that wants a field-level diff compares two of them. An entry carries
2703
+ * the family key as `job_wage_determination_id` and no `id` or `uid` of
2704
+ * its own — every version shares the family key, so versions are told
2705
+ * apart by their window coordinates. `as_of[valid]` is
2645
2706
  * rejected, since pinning a point on the valid axis would collapse the
2646
2707
  * sequence this endpoint returns, and a determination records no
2647
2708
  * transaction axis to read `as_of[transaction]` against.
@@ -2655,7 +2716,7 @@ export class JobWageDeterminations {
2655
2716
  static listJobWageDeterminationHistory(options) {
2656
2717
  return (options.client ?? client).get({
2657
2718
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2658
- url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_uid}/history',
2719
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{wage_determination_id}/history',
2659
2720
  ...options
2660
2721
  });
2661
2722
  }
@@ -2704,7 +2765,7 @@ export class JobWageDeterminations {
2704
2765
  static deleteWageDetermination(options) {
2705
2766
  return (options.client ?? client).delete({
2706
2767
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2707
- url: '/api/v1/jobs/{job_id}/wage_determinations/{uid}',
2768
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{id}',
2708
2769
  ...options
2709
2770
  });
2710
2771
  }
@@ -2719,7 +2780,7 @@ export class JobWageDeterminations {
2719
2780
  static getJobWageDetermination(options) {
2720
2781
  return (options.client ?? client).get({
2721
2782
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
2722
- url: '/api/v1/jobs/{job_id}/wage_determinations/{uid}',
2783
+ url: '/api/v1/jobs/{job_id}/wage_determinations/{id}',
2723
2784
  ...options
2724
2785
  });
2725
2786
  }
@@ -2952,7 +3013,10 @@ export class ExternalMaps {
2952
3013
  * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
2953
3014
  * `current` or `historical`, and the `corrections` that window replaced —
2954
3015
  * each itself a full external map as previously recorded, so a client
2955
- * that wants a field-level diff compares two of them. Pass
3016
+ * that wants a field-level diff compares two of them. An entry carries
3017
+ * the family key as `payrolls_external_map_id` and no `id` or
3018
+ * `bitemporal_id` of its own — every version shares the family key, so
3019
+ * versions are told apart by their window coordinates. Pass
2956
3020
  * `as_of[transaction]` to read the timeline as it was recorded at a past
2957
3021
  * moment — nested corrections stop at the same point and each
2958
3022
  * version reports the `transaction_to` it had then, while
@@ -4203,12 +4267,37 @@ export class TimeEntries {
4203
4267
  * overview): poll with `filter[created_at][gte]` set to your
4204
4268
  * watermark, deduplicate on `(id, event, timestamp)`, and
4205
4269
  * advance the watermark only to `meta.complete_through`.
4206
- * The feed carries `create`, `update`, and `destroy` events
4207
- * for the last 30 days, returned oldest event first. A
4208
- * watermark older than that window is refused with a `422`
4209
- * rather than answered with a page that cannot be complete
4210
- * resync by re-crawling `/api/v1/time_entries` and diffing
4211
- * against your replica.
4270
+ * The feed carries `create`, `update`, and `destroy` events,
4271
+ * returned oldest event first.
4272
+ *
4273
+ * Events are guaranteed for at least the last 30 days. Older
4274
+ * events are served for as long as they remain stored, and
4275
+ * may be removed without notice.
4276
+ *
4277
+ * One request covers at most 32 days of event time, and
4278
+ * `filter[created_at][gte]` and `[lte]` place that interval
4279
+ * anywhere in the feed's history. Sending only `[gte]`
4280
+ * covers the 32 days after it, only `[lte]` the 32 days
4281
+ * before it, and neither the 32 days beginning 30 days ago.
4282
+ * A wider interval is refused with a `422` of type
4283
+ * `interval_too_wide` rather than narrowed to fit — split it
4284
+ * into consecutive windows and read them in order, and their
4285
+ * pages join without gaps. Both bounds are inclusive, so an
4286
+ * event stamped exactly on a shared bound appears in both
4287
+ * pages — deduplicate as usual. An interval whose `[lte]`
4288
+ * precedes its `[gte]` is refused too, as a `422` of type
4289
+ * `invalid_filter_value`, rather than answered with the empty
4290
+ * page it names.
4291
+ *
4292
+ * `meta.complete_through` is never later than the end of the
4293
+ * interval you asked for, so a request ending in the past
4294
+ * reports its own `[lte]`. Advancing your watermark to it
4295
+ * walks a consumer that has fallen behind forward one window
4296
+ * per poll, rather than past events no response carried.
4297
+ *
4298
+ * `filter[event]` narrows the payload, not the work: the
4299
+ * feed is indexed on event time, so a filtered request costs
4300
+ * what an unfiltered one over the same interval costs.
4212
4301
  *
4213
4302
  *
4214
4303
  * **Required scope:**
@@ -4308,8 +4397,8 @@ export class TimeEntries {
4308
4397
  * optional and only supplied fields change. Authorization is re-checked after
4309
4398
  * attributes are assigned, so moving the entry to a time card in another
4310
4399
  * company is forbidden (403). If the change would push categorized allocation
4311
- * minutes past the time card's worked minutes, the request returns 422 unless
4312
- * confirm_allocation_conflict is sent true. The feature-allocation cap is
4400
+ * minutes past the time card's overtime eligible minutes, the request returns
4401
+ * 422 unless confirm_allocation_conflict is sent true. The feature-allocation cap is
4313
4402
  * enforced, and because a persisted feature_ids= writes its join rows
4314
4403
  * immediately, a rejected save rolls them back within the enclosing
4315
4404
  * transaction.
@@ -4399,7 +4488,10 @@ export class Timecodes {
4399
4488
  * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
4400
4489
  * `current` or `historical`, and the `corrections` that window replaced —
4401
4490
  * each itself a full timecode as previously recorded, so a client that
4402
- * wants a field-level diff compares two of them. Pass
4491
+ * wants a field-level diff compares two of them. An entry carries the
4492
+ * family key as `timekeeping_timecode_id` and no `id` of its own —
4493
+ * every version shares the family key, so versions are told apart by
4494
+ * their window coordinates. Pass
4403
4495
  * `as_of[transaction]` to read the timeline as it was recorded at a past
4404
4496
  * moment — nested corrections stop at the same point and each
4405
4497
  * version reports the `transaction_to` it had then, while
@@ -4673,7 +4765,7 @@ export class AttestationConfigs {
4673
4765
  static listAttestationConfigs(options) {
4674
4766
  return (options.client ?? client).get({
4675
4767
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4676
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/attestation_configs',
4768
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/attestation_configs',
4677
4769
  ...options
4678
4770
  });
4679
4771
  }
@@ -4688,7 +4780,7 @@ export class AttestationConfigs {
4688
4780
  static createAttestationConfig(options) {
4689
4781
  return (options.client ?? client).post({
4690
4782
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4691
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/attestation_configs',
4783
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/attestation_configs',
4692
4784
  ...options,
4693
4785
  headers: {
4694
4786
  'Content-Type': 'application/json',
@@ -4707,7 +4799,7 @@ export class AttestationConfigs {
4707
4799
  static deleteAttestationConfig(options) {
4708
4800
  return (options.client ?? client).delete({
4709
4801
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4710
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/attestation_configs/{id}',
4802
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/attestation_configs/{id}',
4711
4803
  ...options
4712
4804
  });
4713
4805
  }
@@ -4722,7 +4814,7 @@ export class AttestationConfigs {
4722
4814
  static getAttestationConfig(options) {
4723
4815
  return (options.client ?? client).get({
4724
4816
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4725
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/attestation_configs/{id}',
4817
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/attestation_configs/{id}',
4726
4818
  ...options
4727
4819
  });
4728
4820
  }
@@ -4736,7 +4828,10 @@ export class PaySchedules {
4736
4828
  * `valid_from` / `valid_to` window, a `version_status` of `scheduled`,
4737
4829
  * `current` or `historical`, and the `corrections` that version replaced —
4738
4830
  * each itself a full pay schedule as previously recorded, so a client that
4739
- * wants a field-level diff compares two of them. `as_of[valid]` is
4831
+ * wants a field-level diff compares two of them. An entry carries the
4832
+ * family key as `timekeeping_pay_period_config_id` and no identifier of
4833
+ * its own — every version shares the family key, so versions are told
4834
+ * apart by their window coordinates. `as_of[valid]` is
4740
4835
  * rejected, since pinning a point on the valid axis would collapse the
4741
4836
  * sequence this endpoint returns, and a pay schedule records no
4742
4837
  * transaction axis to read `as_of[transaction]` against.
@@ -4750,7 +4845,7 @@ export class PaySchedules {
4750
4845
  static listPayPeriodConfigHistory(options) {
4751
4846
  return (options.client ?? client).get({
4752
4847
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4753
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/history',
4848
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/history',
4754
4849
  ...options
4755
4850
  });
4756
4851
  }
@@ -4780,7 +4875,7 @@ export class PaySchedules {
4780
4875
  static getPayPeriodConfig(options) {
4781
4876
  return (options.client ?? client).get({
4782
4877
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4783
- url: '/api/v1/timekeeping/pay_period_configs/{uid}',
4878
+ url: '/api/v1/timekeeping/pay_period_configs/{id}',
4784
4879
  ...options
4785
4880
  });
4786
4881
  }
@@ -4797,7 +4892,7 @@ export class Holidays {
4797
4892
  static listHolidays(options) {
4798
4893
  return (options.client ?? client).get({
4799
4894
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4800
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/holidays',
4895
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/holidays',
4801
4896
  ...options
4802
4897
  });
4803
4898
  }
@@ -4812,7 +4907,7 @@ export class Holidays {
4812
4907
  static createHoliday(options) {
4813
4908
  return (options.client ?? client).post({
4814
4909
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4815
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/holidays',
4910
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/holidays',
4816
4911
  ...options,
4817
4912
  headers: {
4818
4913
  'Content-Type': 'application/json',
@@ -4831,7 +4926,7 @@ export class Holidays {
4831
4926
  static deleteHoliday(options) {
4832
4927
  return (options.client ?? client).delete({
4833
4928
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4834
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/holidays/{id}',
4929
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/holidays/{id}',
4835
4930
  ...options
4836
4931
  });
4837
4932
  }
@@ -4846,7 +4941,7 @@ export class Holidays {
4846
4941
  static updateHoliday(options) {
4847
4942
  return (options.client ?? client).patch({
4848
4943
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4849
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/holidays/{id}',
4944
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/holidays/{id}',
4850
4945
  ...options,
4851
4946
  headers: {
4852
4947
  'Content-Type': 'application/json',