@izak0s/spacebring-api 16.0.0 → 16.2.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
@@ -1091,6 +1091,18 @@ function createCheckins(client, defaults) {
1091
1091
  async get(checkInId, options) {
1092
1092
  return unwrapProp(await client.GET("/check_ins/v1/{checkInId}", { params: { path: { checkInId } }, signal: options?.signal }), "checkIn", "GET /check_ins/v1/{checkInId}");
1093
1093
  },
1094
+ /**
1095
+ * Update a check-in
1096
+ *
1097
+ * Change when a customer arrived, or when they left on a check-in that is checked out. Fields left out keep their values. The booking, event ticket, or visit behind the check-in gets the new dates too. The customer and administrators are not notified. With bearer token authentication, the user must be an administrator of the check-in's location.
1098
+ *
1099
+ * @param checkInId The ID of the check-in.
1100
+ * @param checkIn The `checkIn` payload.
1101
+ * @param options Request options (abort signal).
1102
+ */
1103
+ async update(checkInId, checkIn, options) {
1104
+ return unwrap(await client.PATCH("/check_ins/v1/{checkInId}", { params: { path: { checkInId } }, body: { checkIn }, signal: options?.signal }), "PATCH /check_ins/v1/{checkInId}");
1105
+ },
1094
1106
  /**
1095
1107
  * Check in
1096
1108
  *
@@ -2103,6 +2115,14 @@ function createPlans(client, defaults) {
2103
2115
  */
2104
2116
  async delete(planId, options) {
2105
2117
  return unwrap(await client.DELETE("/plans/v1/{planId}", { params: { path: { planId } }, signal: options?.signal }), "DELETE /plans/v1/{planId}");
2118
+ },
2119
+ /**
2120
+ * Create a media upload
2121
+ *
2122
+ * Create a media upload for a plan cover image. The response carries a presigned URL: send the raw file bytes with a PUT request within a minute, using exactly the headers returned. Once the file is stored, pass the returned key as `media[0].key` when creating or updating a plan within an hour; an image that is not attached by then is discarded.
2123
+ */
2124
+ async createMedia(media, options) {
2125
+ return unwrapProp(await client.POST("/plans/v1/media", { body: { media }, signal: options?.signal }), "media", "POST /plans/v1/media");
2106
2126
  }
2107
2127
  };
2108
2128
  }