@seatlayer/core 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.
- package/dist/index.cjs +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3135,6 +3135,26 @@ var PickerController = class {
|
|
|
3135
3135
|
throw err;
|
|
3136
3136
|
}
|
|
3137
3137
|
}
|
|
3138
|
+
/**
|
|
3139
|
+
* P4 "need more time?": extend the OPEN hold's server-side expiry and re-arm
|
|
3140
|
+
* the client expiry timer to match (via setHold), so the controller doesn't
|
|
3141
|
+
* fire a false expiry and start polling. Returns the new hold, or null if
|
|
3142
|
+
* there's no open hold or the transport can't extend / the server refused
|
|
3143
|
+
* (hold gone, expired, or at its renewal cap). Never throws for the refusal
|
|
3144
|
+
* case — the caller decides the copy.
|
|
3145
|
+
*/
|
|
3146
|
+
async extendHold(ttlMs) {
|
|
3147
|
+
const current = this.hold_;
|
|
3148
|
+
if (!current || !this.api.extend) return null;
|
|
3149
|
+
try {
|
|
3150
|
+
const result = await this.api.extend(this.key, current.holdId, ttlMs);
|
|
3151
|
+
if (this.hold_?.holdId !== current.holdId) return this.hold_;
|
|
3152
|
+
this.setHold({ holdId: current.holdId, labels: current.labels, expiresAt: result.expiresAt, items: current.items });
|
|
3153
|
+
return this.hold_;
|
|
3154
|
+
} catch {
|
|
3155
|
+
return null;
|
|
3156
|
+
}
|
|
3157
|
+
}
|
|
3138
3158
|
/** Public GA inventory derived from the live synthetic-unit status stream. */
|
|
3139
3159
|
/**
|
|
3140
3160
|
* Live seats-left per category key (status 'free' right now). Recompute on
|