@delopay/sdk 0.217.0 → 0.218.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/dist/index.cjs CHANGED
@@ -3349,6 +3349,44 @@ var Routing = class {
3349
3349
  async connectorCaps(profileId) {
3350
3350
  return this.request("GET", `/routing/connector-caps/${encodeURIComponent(profileId)}`);
3351
3351
  }
3352
+ /** Read a shop's dated limit overrides. `GET /routing/connector-cap-schedules/{profileId}` */
3353
+ async connectorCapSchedules(profileId) {
3354
+ return this.request("GET", `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`);
3355
+ }
3356
+ /**
3357
+ * Replace a shop's complete schedule using its last-read revision.
3358
+ * Remove an entry to cancel it; ordinary configured caps are unchanged.
3359
+ * Instants require explicit offsets, and overlapping entries for the same
3360
+ * account and unit are refused by the server. Capability preflight refuses
3361
+ * unsupported backends before submitting any schedule.
3362
+ *
3363
+ * `PUT /routing/connector-cap-schedules/{profileId}`
3364
+ */
3365
+ async setConnectorCapSchedules(profileId, params) {
3366
+ const caps = await this.connectorCaps(profileId);
3367
+ if (!caps.features?.includes("limit_schedules")) {
3368
+ throw new Error("Connector limit schedules are unsupported by the serving backend");
3369
+ }
3370
+ return this.request(
3371
+ "PUT",
3372
+ `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}`,
3373
+ {
3374
+ body: params
3375
+ }
3376
+ );
3377
+ }
3378
+ /** Change the drawn value of an active scheduled range; preserves all usage. */
3379
+ async shuffleConnectorCapSchedule(profileId, params) {
3380
+ const caps = await this.connectorCaps(profileId);
3381
+ if (!caps.features?.includes("limit_schedules")) {
3382
+ throw new Error("Connector limit schedules are unsupported by the serving backend");
3383
+ }
3384
+ return this.request(
3385
+ "POST",
3386
+ `/routing/connector-cap-schedules/${encodeURIComponent(profileId)}/shuffle`,
3387
+ { body: params }
3388
+ );
3389
+ }
3352
3390
  /**
3353
3391
  * The live `routing_volume` counters behind a shop's active advanced
3354
3392
  * program: one per distinct budget the program reads, each with the window