@izak0s/spacebring-api 7.1.0 → 8.0.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 +29 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +324 -8
- package/dist/index.d.ts +324 -8
- package/dist/index.js +29 -7
- 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 -->190 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
|
@@ -2042,13 +2042,35 @@ function createResources(client, defaults) {
|
|
|
2042
2042
|
async update(resourceId, resource, options) {
|
|
2043
2043
|
return unwrap(await client.PATCH("/resources/v1/{resourceId}", { params: { path: { resourceId } }, body: { resource }, signal: options?.signal }), "PATCH /resources/v1/{resourceId}");
|
|
2044
2044
|
},
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2045
|
+
assignments: {
|
|
2046
|
+
/**
|
|
2047
|
+
* Retrieve resource assignments
|
|
2048
|
+
*
|
|
2049
|
+
* Retrieve resource assignments in the location. An assignment links a resource, or a number of seats in it, to a company or a member for the duration of a subscription.
|
|
2050
|
+
*/
|
|
2051
|
+
async list(query, options) {
|
|
2052
|
+
return unwrapProp(await client.GET("/resources/v1/assignments", { params: { query }, signal: options?.signal }), "assignments", "GET /resources/v1/assignments");
|
|
2053
|
+
},
|
|
2054
|
+
/**
|
|
2055
|
+
* Create a resource assignment
|
|
2056
|
+
*
|
|
2057
|
+
* Create a resource assignment. An assignment links a resource, or a number of seats in it, to a company or a member.
|
|
2058
|
+
*/
|
|
2059
|
+
async create(assignment, options) {
|
|
2060
|
+
return unwrapProp(await client.POST("/resources/v1/assignments", { body: { assignment }, signal: options?.signal }), "assignment", "POST /resources/v1/assignments");
|
|
2061
|
+
},
|
|
2062
|
+
/**
|
|
2063
|
+
* Update a resource assignment
|
|
2064
|
+
*
|
|
2065
|
+
* Update a resource assignment. Fields left out of the request keep their current value.
|
|
2066
|
+
*
|
|
2067
|
+
* @param assignmentId The id of the assignment.
|
|
2068
|
+
* @param assignment The `assignment` payload.
|
|
2069
|
+
* @param options Request options (abort signal).
|
|
2070
|
+
*/
|
|
2071
|
+
async update(assignmentId, assignment, options) {
|
|
2072
|
+
return unwrap(await client.PATCH("/resources/v1/assignments/{assignmentId}", { params: { path: { assignmentId } }, body: { assignment }, signal: options?.signal }), "PATCH /resources/v1/assignments/{assignmentId}");
|
|
2073
|
+
}
|
|
2052
2074
|
},
|
|
2053
2075
|
bookings: {
|
|
2054
2076
|
/**
|