@dsptch-work/api-client 0.8.0 → 0.9.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
  *
@@ -4203,12 +4258,37 @@ export class TimeEntries {
4203
4258
  * overview): poll with `filter[created_at][gte]` set to your
4204
4259
  * watermark, deduplicate on `(id, event, timestamp)`, and
4205
4260
  * 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.
4261
+ * The feed carries `create`, `update`, and `destroy` events,
4262
+ * returned oldest event first.
4263
+ *
4264
+ * Events are guaranteed for at least the last 30 days. Older
4265
+ * events are served for as long as they remain stored, and
4266
+ * may be removed without notice.
4267
+ *
4268
+ * One request covers at most 32 days of event time, and
4269
+ * `filter[created_at][gte]` and `[lte]` place that interval
4270
+ * anywhere in the feed's history. Sending only `[gte]`
4271
+ * covers the 32 days after it, only `[lte]` the 32 days
4272
+ * before it, and neither the 32 days beginning 30 days ago.
4273
+ * A wider interval is refused with a `422` of type
4274
+ * `interval_too_wide` rather than narrowed to fit — split it
4275
+ * into consecutive windows and read them in order, and their
4276
+ * pages join without gaps. Both bounds are inclusive, so an
4277
+ * event stamped exactly on a shared bound appears in both
4278
+ * pages — deduplicate as usual. An interval whose `[lte]`
4279
+ * precedes its `[gte]` is refused too, as a `422` of type
4280
+ * `invalid_filter_value`, rather than answered with the empty
4281
+ * page it names.
4282
+ *
4283
+ * `meta.complete_through` is never later than the end of the
4284
+ * interval you asked for, so a request ending in the past
4285
+ * reports its own `[lte]`. Advancing your watermark to it
4286
+ * walks a consumer that has fallen behind forward one window
4287
+ * per poll, rather than past events no response carried.
4288
+ *
4289
+ * `filter[event]` narrows the payload, not the work: the
4290
+ * feed is indexed on event time, so a filtered request costs
4291
+ * what an unfiltered one over the same interval costs.
4212
4292
  *
4213
4293
  *
4214
4294
  * **Required scope:**
@@ -4308,8 +4388,8 @@ export class TimeEntries {
4308
4388
  * optional and only supplied fields change. Authorization is re-checked after
4309
4389
  * attributes are assigned, so moving the entry to a time card in another
4310
4390
  * 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
4391
+ * minutes past the time card's overtime eligible minutes, the request returns
4392
+ * 422 unless confirm_allocation_conflict is sent true. The feature-allocation cap is
4313
4393
  * enforced, and because a persisted feature_ids= writes its join rows
4314
4394
  * immediately, a rejected save rolls them back within the enclosing
4315
4395
  * transaction.
@@ -4673,7 +4753,7 @@ export class AttestationConfigs {
4673
4753
  static listAttestationConfigs(options) {
4674
4754
  return (options.client ?? client).get({
4675
4755
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4676
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/attestation_configs',
4756
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/attestation_configs',
4677
4757
  ...options
4678
4758
  });
4679
4759
  }
@@ -4688,7 +4768,7 @@ export class AttestationConfigs {
4688
4768
  static createAttestationConfig(options) {
4689
4769
  return (options.client ?? client).post({
4690
4770
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4691
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/attestation_configs',
4771
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/attestation_configs',
4692
4772
  ...options,
4693
4773
  headers: {
4694
4774
  'Content-Type': 'application/json',
@@ -4707,7 +4787,7 @@ export class AttestationConfigs {
4707
4787
  static deleteAttestationConfig(options) {
4708
4788
  return (options.client ?? client).delete({
4709
4789
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4710
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/attestation_configs/{id}',
4790
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/attestation_configs/{id}',
4711
4791
  ...options
4712
4792
  });
4713
4793
  }
@@ -4722,7 +4802,7 @@ export class AttestationConfigs {
4722
4802
  static getAttestationConfig(options) {
4723
4803
  return (options.client ?? client).get({
4724
4804
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4725
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/attestation_configs/{id}',
4805
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/attestation_configs/{id}',
4726
4806
  ...options
4727
4807
  });
4728
4808
  }
@@ -4750,7 +4830,7 @@ export class PaySchedules {
4750
4830
  static listPayPeriodConfigHistory(options) {
4751
4831
  return (options.client ?? client).get({
4752
4832
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4753
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/history',
4833
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/history',
4754
4834
  ...options
4755
4835
  });
4756
4836
  }
@@ -4780,7 +4860,7 @@ export class PaySchedules {
4780
4860
  static getPayPeriodConfig(options) {
4781
4861
  return (options.client ?? client).get({
4782
4862
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4783
- url: '/api/v1/timekeeping/pay_period_configs/{uid}',
4863
+ url: '/api/v1/timekeeping/pay_period_configs/{id}',
4784
4864
  ...options
4785
4865
  });
4786
4866
  }
@@ -4797,7 +4877,7 @@ export class Holidays {
4797
4877
  static listHolidays(options) {
4798
4878
  return (options.client ?? client).get({
4799
4879
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4800
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/holidays',
4880
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/holidays',
4801
4881
  ...options
4802
4882
  });
4803
4883
  }
@@ -4812,7 +4892,7 @@ export class Holidays {
4812
4892
  static createHoliday(options) {
4813
4893
  return (options.client ?? client).post({
4814
4894
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4815
- 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',
4816
4896
  ...options,
4817
4897
  headers: {
4818
4898
  'Content-Type': 'application/json',
@@ -4831,7 +4911,7 @@ export class Holidays {
4831
4911
  static deleteHoliday(options) {
4832
4912
  return (options.client ?? client).delete({
4833
4913
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4834
- url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_uid}/holidays/{id}',
4914
+ url: '/api/v1/timekeeping/pay_period_configs/{pay_period_config_id}/holidays/{id}',
4835
4915
  ...options
4836
4916
  });
4837
4917
  }
@@ -4846,7 +4926,7 @@ export class Holidays {
4846
4926
  static updateHoliday(options) {
4847
4927
  return (options.client ?? client).patch({
4848
4928
  security: [{ name: 'X-Api-Key', type: 'apiKey' }],
4849
- 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}',
4850
4930
  ...options,
4851
4931
  headers: {
4852
4932
  'Content-Type': 'application/json',