@izak0s/spacebring-api 9.5.0 → 9.6.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/README.md +1 -1
- package/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +211 -7
- package/dist/index.d.ts +211 -7
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ A fully-typed TypeScript client for the [Spacebring](https://www.spacebring.com)
|
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
17
|
|
|
18
|
-
- **<!-- coverage -->
|
|
18
|
+
- **<!-- coverage -->196 operations across 21 resource groups<!-- /coverage -->** — the full Spacebring API surface
|
|
19
19
|
- **Auto-generated** from the official OpenAPI spec — types and facade regenerate anytime the spec changes
|
|
20
20
|
- **Nested, discoverable API** — `sb.billing.invoices.pay(id)`, `sb.visitors.visits.checkIn(body)`
|
|
21
21
|
- **Auto-pagination** — every paginated list endpoint has an `iterate()` async generator that walks `nextPageToken` for you
|
package/dist/index.cjs
CHANGED
|
@@ -2052,6 +2052,18 @@ function createResources(client, defaults) {
|
|
|
2052
2052
|
async update(resourceId, resource, options) {
|
|
2053
2053
|
return unwrap(await client.PATCH("/resources/v1/{resourceId}", { params: { path: { resourceId } }, body: { resource }, signal: options?.signal }), "PATCH /resources/v1/{resourceId}");
|
|
2054
2054
|
},
|
|
2055
|
+
/**
|
|
2056
|
+
* Check resource availability
|
|
2057
|
+
*
|
|
2058
|
+
* Check whether a resource can be booked for a slot before creating the booking. The same rules as booking creation apply: capacity, the location and resource schedule, duration limits and the booking window. When the slot is unavailable, the response carries the code the booking would fail with.
|
|
2059
|
+
*
|
|
2060
|
+
* @param resourceId The id of the resource.
|
|
2061
|
+
* @param body Request body.
|
|
2062
|
+
* @param options Request options (abort signal).
|
|
2063
|
+
*/
|
|
2064
|
+
async getResourceAvailability(resourceId, body, options) {
|
|
2065
|
+
return unwrap(await client.POST("/resources/v1/{resourceId}/availability", { params: { path: { resourceId } }, body, signal: options?.signal }), "POST /resources/v1/{resourceId}/availability");
|
|
2066
|
+
},
|
|
2055
2067
|
assignments: {
|
|
2056
2068
|
/**
|
|
2057
2069
|
* Retrieve resource assignments
|