@izak0s/spacebring-api 16.0.0 → 16.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/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 -->218 operations across 22 resource groups<!-- /coverage -->** — the full Spacebring API surface
18
+ - **<!-- coverage -->219 operations across 22 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
@@ -2130,6 +2130,14 @@ function createPlans(client, defaults) {
2130
2130
  */
2131
2131
  async delete(planId, options) {
2132
2132
  return unwrap(await client.DELETE("/plans/v1/{planId}", { params: { path: { planId } }, signal: options?.signal }), "DELETE /plans/v1/{planId}");
2133
+ },
2134
+ /**
2135
+ * Create a media upload
2136
+ *
2137
+ * 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.
2138
+ */
2139
+ async createMedia(media, options) {
2140
+ return unwrapProp(await client.POST("/plans/v1/media", { body: { media }, signal: options?.signal }), "media", "POST /plans/v1/media");
2133
2141
  }
2134
2142
  };
2135
2143
  }