@izak0s/spacebring-api 9.8.0 → 10.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 +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +338 -40
- package/dist/index.d.ts +338 -40
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -651,6 +651,14 @@ function createBenefits(client, defaults) {
|
|
|
651
651
|
async delete(benefitId, options) {
|
|
652
652
|
return unwrap(await client.DELETE("/benefits/v1/{benefitId}", { params: { path: { benefitId } }, signal: options?.signal }), "DELETE /benefits/v1/{benefitId}");
|
|
653
653
|
},
|
|
654
|
+
/**
|
|
655
|
+
* Create a media upload
|
|
656
|
+
*
|
|
657
|
+
* Create a media upload for a benefit 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 benefit within an hour; an image that is not attached by then is discarded.
|
|
658
|
+
*/
|
|
659
|
+
async createMedia(media, options) {
|
|
660
|
+
return unwrapProp(await client.POST("/benefits/v1/media", { body: { media }, signal: options?.signal }), "media", "POST /benefits/v1/media");
|
|
661
|
+
},
|
|
654
662
|
applications: {
|
|
655
663
|
/**
|
|
656
664
|
* Retrieve applications
|