@izak0s/spacebring-api 12.0.0 → 13.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 +11 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +329 -394
- package/dist/index.d.ts +329 -394
- package/dist/index.js +11 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 -->
|
|
18
|
+
- **<!-- coverage -->209 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
|
@@ -598,6 +598,15 @@ function createAltcurrencies(client, defaults) {
|
|
|
598
598
|
"altCurrencies"
|
|
599
599
|
);
|
|
600
600
|
},
|
|
601
|
+
/**
|
|
602
|
+
* Retrieve an alternative currency
|
|
603
|
+
*
|
|
604
|
+
* @param id The id of the alternative currency
|
|
605
|
+
* @param options Request options (abort signal).
|
|
606
|
+
*/
|
|
607
|
+
async get(id, options) {
|
|
608
|
+
return unwrapProp(await client.GET("/alt_currencies/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "altCurrency", "GET /alt_currencies/v1/{id}");
|
|
609
|
+
},
|
|
601
610
|
/** Create an alternative currency */
|
|
602
611
|
async create(altCurrency, options) {
|
|
603
612
|
return unwrapProp(await client.POST("/alt_currencies/v1", { body: { altCurrency }, signal: options?.signal }), "altCurrency", "POST /alt_currencies/v1");
|
|
@@ -1469,7 +1478,7 @@ function createDiscounts(client, defaults) {
|
|
|
1469
1478
|
/**
|
|
1470
1479
|
* Retrieve coupons
|
|
1471
1480
|
*
|
|
1472
|
-
* Retrieve
|
|
1481
|
+
* Retrieve the coupons of a location, or of every location in the network.
|
|
1473
1482
|
*/
|
|
1474
1483
|
async list(query, options) {
|
|
1475
1484
|
return unwrap(await client.GET("/discounts/v1/coupons", { params: { query }, signal: options?.signal }), "GET /discounts/v1/coupons");
|
|
@@ -1477,7 +1486,7 @@ function createDiscounts(client, defaults) {
|
|
|
1477
1486
|
/**
|
|
1478
1487
|
* Retrieve coupons — iterates every item across all pages.
|
|
1479
1488
|
*
|
|
1480
|
-
* Retrieve
|
|
1489
|
+
* Retrieve the coupons of a location, or of every location in the network.
|
|
1481
1490
|
*/
|
|
1482
1491
|
iterate(query, options) {
|
|
1483
1492
|
return paginate(
|
|
@@ -2065,22 +2074,6 @@ function createPlans(client, defaults) {
|
|
|
2065
2074
|
*/
|
|
2066
2075
|
async delete(planId, options) {
|
|
2067
2076
|
return unwrap(await client.DELETE("/plans/v1/{planId}", { params: { path: { planId } }, signal: options?.signal }), "DELETE /plans/v1/{planId}");
|
|
2068
|
-
},
|
|
2069
|
-
/**
|
|
2070
|
-
* Delete plans
|
|
2071
|
-
*
|
|
2072
|
-
* Delete up to 100 plans at once. Plans that are already deleted are skipped.
|
|
2073
|
-
*/
|
|
2074
|
-
async deletePlans(planIds, options) {
|
|
2075
|
-
return unwrap(await client.DELETE("/plans/v1", { body: { planIds }, signal: options?.signal }), "DELETE /plans/v1");
|
|
2076
|
-
},
|
|
2077
|
-
/**
|
|
2078
|
-
* Update plans
|
|
2079
|
-
*
|
|
2080
|
-
* Turn sign-up on with a type, or off, for up to 100 plans at once. Plans that already have this sign-up are left unchanged. A free plan can't use immediate sign-up.
|
|
2081
|
-
*/
|
|
2082
|
-
async patchPlans(plans, options) {
|
|
2083
|
-
return unwrap(await client.PATCH("/plans/v1", { body: { plans }, signal: options?.signal }), "PATCH /plans/v1");
|
|
2084
2077
|
}
|
|
2085
2078
|
};
|
|
2086
2079
|
}
|