@izak0s/spacebring-api 7.2.0 → 8.1.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.js CHANGED
@@ -2015,13 +2015,35 @@ function createResources(client, defaults) {
2015
2015
  async update(resourceId, resource, options) {
2016
2016
  return unwrap(await client.PATCH("/resources/v1/{resourceId}", { params: { path: { resourceId } }, body: { resource }, signal: options?.signal }), "PATCH /resources/v1/{resourceId}");
2017
2017
  },
2018
- /**
2019
- * Retrieve resource assignments
2020
- *
2021
- * 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.
2022
- */
2023
- async getAssignments(query, options) {
2024
- return unwrapProp(await client.GET("/resources/v1/assignments", { params: { query }, signal: options?.signal }), "assignments", "GET /resources/v1/assignments");
2018
+ assignments: {
2019
+ /**
2020
+ * Retrieve resource assignments
2021
+ *
2022
+ * 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.
2023
+ */
2024
+ async list(query, options) {
2025
+ return unwrapProp(await client.GET("/resources/v1/assignments", { params: { query }, signal: options?.signal }), "assignments", "GET /resources/v1/assignments");
2026
+ },
2027
+ /**
2028
+ * Create a resource assignment
2029
+ *
2030
+ * Create a resource assignment. An assignment links a resource, or a number of seats in it, to a company or a member.
2031
+ */
2032
+ async create(assignment, options) {
2033
+ return unwrapProp(await client.POST("/resources/v1/assignments", { body: { assignment }, signal: options?.signal }), "assignment", "POST /resources/v1/assignments");
2034
+ },
2035
+ /**
2036
+ * Update a resource assignment
2037
+ *
2038
+ * Update a resource assignment. Fields left out of the request keep their current value.
2039
+ *
2040
+ * @param assignmentId The id of the assignment.
2041
+ * @param assignment The `assignment` payload.
2042
+ * @param options Request options (abort signal).
2043
+ */
2044
+ async update(assignmentId, assignment, options) {
2045
+ return unwrap(await client.PATCH("/resources/v1/assignments/{assignmentId}", { params: { path: { assignmentId } }, body: { assignment }, signal: options?.signal }), "PATCH /resources/v1/assignments/{assignmentId}");
2046
+ }
2025
2047
  },
2026
2048
  bookings: {
2027
2049
  /**