@izak0s/spacebring-api 13.0.0 → 15.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 +98 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1045 -71
- package/dist/index.d.ts +1045 -71
- package/dist/index.js +98 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -668,6 +668,18 @@ function createBenefits(client, defaults) {
|
|
|
668
668
|
async createMedia(media, options) {
|
|
669
669
|
return unwrapProp(await client.POST("/benefits/v1/media", { body: { media }, signal: options?.signal }), "media", "POST /benefits/v1/media");
|
|
670
670
|
},
|
|
671
|
+
/**
|
|
672
|
+
* Partially update a benefit
|
|
673
|
+
*
|
|
674
|
+
* Update the fields of a benefit that the request sets; omitted fields keep their current values.
|
|
675
|
+
*
|
|
676
|
+
* @param benefitId The id of the benefit
|
|
677
|
+
* @param benefit The `benefit` payload.
|
|
678
|
+
* @param options Request options (abort signal).
|
|
679
|
+
*/
|
|
680
|
+
async patch(benefitId, benefit, options) {
|
|
681
|
+
return unwrap(await client.PATCH("/benefits/v1/{benefitId}", { params: { path: { benefitId } }, body: { benefit }, signal: options?.signal }), "PATCH /benefits/v1/{benefitId}");
|
|
682
|
+
},
|
|
671
683
|
applications: {
|
|
672
684
|
/**
|
|
673
685
|
* Retrieve applications
|
|
@@ -818,6 +830,17 @@ function createBilling(client, defaults) {
|
|
|
818
830
|
*/
|
|
819
831
|
async preview(creditNote, options) {
|
|
820
832
|
return unwrapProp(await client.POST("/billing/credit_notes/v1/preview", { body: { creditNote }, signal: options?.signal }), "creditNote", "POST /billing/credit_notes/v1/preview");
|
|
833
|
+
},
|
|
834
|
+
/**
|
|
835
|
+
* Void a credit note
|
|
836
|
+
*
|
|
837
|
+
* Void a credit note permanently: the amount it took off the invoice is owed again. Only an issued credit note of type `prePayment` can be voided, while its invoice is still issued, unpaid and has no payment in progress.
|
|
838
|
+
*
|
|
839
|
+
* @param id The id of the credit note
|
|
840
|
+
* @param options Request options (abort signal).
|
|
841
|
+
*/
|
|
842
|
+
async void(id, options) {
|
|
843
|
+
return unwrapProp(await client.PUT("/billing/credit_notes/v1/{id}/void", { params: { path: { id } }, signal: options?.signal }), "creditNote", "PUT /billing/credit_notes/v1/{id}/void");
|
|
821
844
|
}
|
|
822
845
|
},
|
|
823
846
|
invoices: {
|
|
@@ -1586,6 +1609,18 @@ function createEvents(client, defaults) {
|
|
|
1586
1609
|
async createMedia(media, options) {
|
|
1587
1610
|
return unwrapProp(await client.POST("/events/v1/media", { body: { media }, signal: options?.signal }), "media", "POST /events/v1/media");
|
|
1588
1611
|
},
|
|
1612
|
+
/**
|
|
1613
|
+
* Partially update an event
|
|
1614
|
+
*
|
|
1615
|
+
* Update the fields of an event that the request sets; omitted fields keep their current values.
|
|
1616
|
+
*
|
|
1617
|
+
* @param id The id of the event.
|
|
1618
|
+
* @param event The `event` payload.
|
|
1619
|
+
* @param options Request options (abort signal).
|
|
1620
|
+
*/
|
|
1621
|
+
async patch(id, event, options) {
|
|
1622
|
+
return unwrap(await client.PATCH("/events/v1/{id}", { params: { path: { id } }, body: { event }, signal: options?.signal }), "PATCH /events/v1/{id}");
|
|
1623
|
+
},
|
|
1589
1624
|
tickets: {
|
|
1590
1625
|
/**
|
|
1591
1626
|
* Retrieve tickets
|
|
@@ -1802,6 +1837,18 @@ function createFeed(client, defaults) {
|
|
|
1802
1837
|
*/
|
|
1803
1838
|
async getLikes(id, options) {
|
|
1804
1839
|
return unwrapProp(await client.GET("/feed/posts/v1/{id}/likes", { params: { path: { id } }, signal: options?.signal }), "likes", "GET /feed/posts/v1/{id}/likes");
|
|
1840
|
+
},
|
|
1841
|
+
/**
|
|
1842
|
+
* Partially update a post
|
|
1843
|
+
*
|
|
1844
|
+
* Update the fields of a feed post that the request sets; omitted fields keep their current values.
|
|
1845
|
+
*
|
|
1846
|
+
* @param id The id of the post.
|
|
1847
|
+
* @param post The `post` payload.
|
|
1848
|
+
* @param options Request options (abort signal).
|
|
1849
|
+
*/
|
|
1850
|
+
async patch(id, post, options) {
|
|
1851
|
+
return unwrap(await client.PATCH("/feed/posts/v1/{id}", { params: { path: { id } }, body: { post }, signal: options?.signal }), "PATCH /feed/posts/v1/{id}");
|
|
1805
1852
|
}
|
|
1806
1853
|
}
|
|
1807
1854
|
};
|
|
@@ -1962,6 +2009,15 @@ function createPackages(client, defaults) {
|
|
|
1962
2009
|
"packages"
|
|
1963
2010
|
);
|
|
1964
2011
|
},
|
|
2012
|
+
/**
|
|
2013
|
+
* Retrieve a package
|
|
2014
|
+
*
|
|
2015
|
+
* @param packageId The id of the package.
|
|
2016
|
+
* @param options Request options (abort signal).
|
|
2017
|
+
*/
|
|
2018
|
+
async get(packageId, options) {
|
|
2019
|
+
return unwrapProp(await client.GET("/packages/v1/{packageId}", { params: { path: { packageId } }, signal: options?.signal }), "package", "GET /packages/v1/{packageId}");
|
|
2020
|
+
},
|
|
1965
2021
|
/** Create a package */
|
|
1966
2022
|
async create(packageBody, options) {
|
|
1967
2023
|
return unwrapProp(await client.POST("/packages/v1", { body: { package: packageBody }, signal: options?.signal }), "package", "POST /packages/v1");
|
|
@@ -2129,6 +2185,15 @@ function createResources(client, defaults) {
|
|
|
2129
2185
|
async update(resourceId, resource, options) {
|
|
2130
2186
|
return unwrap(await client.PATCH("/resources/v1/{resourceId}", { params: { path: { resourceId } }, body: { resource }, signal: options?.signal }), "PATCH /resources/v1/{resourceId}");
|
|
2131
2187
|
},
|
|
2188
|
+
/**
|
|
2189
|
+
* Delete a resource
|
|
2190
|
+
*
|
|
2191
|
+
* @param resourceId The id of the resource.
|
|
2192
|
+
* @param options Request options (abort signal).
|
|
2193
|
+
*/
|
|
2194
|
+
async delete(resourceId, options) {
|
|
2195
|
+
return unwrap(await client.DELETE("/resources/v1/{resourceId}", { params: { path: { resourceId } }, signal: options?.signal }), "DELETE /resources/v1/{resourceId}");
|
|
2196
|
+
},
|
|
2132
2197
|
/**
|
|
2133
2198
|
* Create a media upload
|
|
2134
2199
|
*
|
|
@@ -2169,6 +2234,15 @@ function createResources(client, defaults) {
|
|
|
2169
2234
|
"assignments"
|
|
2170
2235
|
);
|
|
2171
2236
|
},
|
|
2237
|
+
/**
|
|
2238
|
+
* Get a resource assignment
|
|
2239
|
+
*
|
|
2240
|
+
* @param assignmentId The id of the assignment.
|
|
2241
|
+
* @param options Request options (abort signal).
|
|
2242
|
+
*/
|
|
2243
|
+
async get(assignmentId, options) {
|
|
2244
|
+
return unwrapProp(await client.GET("/resources/v1/assignments/{assignmentId}", { params: { path: { assignmentId } }, signal: options?.signal }), "assignment", "GET /resources/v1/assignments/{assignmentId}");
|
|
2245
|
+
},
|
|
2172
2246
|
/**
|
|
2173
2247
|
* Create a resource assignment
|
|
2174
2248
|
*
|
|
@@ -2188,6 +2262,17 @@ function createResources(client, defaults) {
|
|
|
2188
2262
|
*/
|
|
2189
2263
|
async update(assignmentId, assignment, options) {
|
|
2190
2264
|
return unwrap(await client.PATCH("/resources/v1/assignments/{assignmentId}", { params: { path: { assignmentId } }, body: { assignment }, signal: options?.signal }), "PATCH /resources/v1/assignments/{assignmentId}");
|
|
2265
|
+
},
|
|
2266
|
+
/**
|
|
2267
|
+
* Delete a resource assignment
|
|
2268
|
+
*
|
|
2269
|
+
* Delete a resource assignment. An assignment created by a subscription is removed with its subscription instead.
|
|
2270
|
+
*
|
|
2271
|
+
* @param assignmentId The id of the assignment.
|
|
2272
|
+
* @param options Request options (abort signal).
|
|
2273
|
+
*/
|
|
2274
|
+
async delete(assignmentId, options) {
|
|
2275
|
+
return unwrap(await client.DELETE("/resources/v1/assignments/{assignmentId}", { params: { path: { assignmentId } }, signal: options?.signal }), "DELETE /resources/v1/assignments/{assignmentId}");
|
|
2191
2276
|
}
|
|
2192
2277
|
},
|
|
2193
2278
|
bookings: {
|
|
@@ -2255,7 +2340,7 @@ function createShop(client, defaults) {
|
|
|
2255
2340
|
/**
|
|
2256
2341
|
* Retrieve categories
|
|
2257
2342
|
*
|
|
2258
|
-
* Retrieve
|
|
2343
|
+
* Retrieve the shop categories of a location, or of every location in the network.
|
|
2259
2344
|
*/
|
|
2260
2345
|
async list(query, options) {
|
|
2261
2346
|
return unwrapProp(await client.GET("/shop/categories/v1", { params: { query }, signal: options?.signal }), "categories", "GET /shop/categories/v1");
|
|
@@ -2404,6 +2489,18 @@ function createShop(client, defaults) {
|
|
|
2404
2489
|
*/
|
|
2405
2490
|
async createMedia(media, options) {
|
|
2406
2491
|
return unwrapProp(await client.POST("/shop/products/v1/media", { body: { media }, signal: options?.signal }), "media", "POST /shop/products/v1/media");
|
|
2492
|
+
},
|
|
2493
|
+
/**
|
|
2494
|
+
* Partially update a product
|
|
2495
|
+
*
|
|
2496
|
+
* Update the fields of a product that the request sets; omitted fields keep their current values.
|
|
2497
|
+
*
|
|
2498
|
+
* @param productId The id of the product.
|
|
2499
|
+
* @param product The `product` payload.
|
|
2500
|
+
* @param options Request options (abort signal).
|
|
2501
|
+
*/
|
|
2502
|
+
async patch(productId, product, options) {
|
|
2503
|
+
return unwrap(await client.PATCH("/shop/products/v1/{productId}", { params: { path: { productId } }, body: { product }, signal: options?.signal }), "PATCH /shop/products/v1/{productId}");
|
|
2407
2504
|
}
|
|
2408
2505
|
}
|
|
2409
2506
|
};
|