@izak0s/spacebring-api 11.4.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 +364 -458
- package/dist/index.d.ts +364 -458
- package/dist/index.js +11 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -571,6 +571,15 @@ function createAltcurrencies(client, defaults) {
|
|
|
571
571
|
"altCurrencies"
|
|
572
572
|
);
|
|
573
573
|
},
|
|
574
|
+
/**
|
|
575
|
+
* Retrieve an alternative currency
|
|
576
|
+
*
|
|
577
|
+
* @param id The id of the alternative currency
|
|
578
|
+
* @param options Request options (abort signal).
|
|
579
|
+
*/
|
|
580
|
+
async get(id, options) {
|
|
581
|
+
return unwrapProp(await client.GET("/alt_currencies/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "altCurrency", "GET /alt_currencies/v1/{id}");
|
|
582
|
+
},
|
|
574
583
|
/** Create an alternative currency */
|
|
575
584
|
async create(altCurrency, options) {
|
|
576
585
|
return unwrapProp(await client.POST("/alt_currencies/v1", { body: { altCurrency }, signal: options?.signal }), "altCurrency", "POST /alt_currencies/v1");
|
|
@@ -1442,7 +1451,7 @@ function createDiscounts(client, defaults) {
|
|
|
1442
1451
|
/**
|
|
1443
1452
|
* Retrieve coupons
|
|
1444
1453
|
*
|
|
1445
|
-
* Retrieve
|
|
1454
|
+
* Retrieve the coupons of a location, or of every location in the network.
|
|
1446
1455
|
*/
|
|
1447
1456
|
async list(query, options) {
|
|
1448
1457
|
return unwrap(await client.GET("/discounts/v1/coupons", { params: { query }, signal: options?.signal }), "GET /discounts/v1/coupons");
|
|
@@ -1450,7 +1459,7 @@ function createDiscounts(client, defaults) {
|
|
|
1450
1459
|
/**
|
|
1451
1460
|
* Retrieve coupons — iterates every item across all pages.
|
|
1452
1461
|
*
|
|
1453
|
-
* Retrieve
|
|
1462
|
+
* Retrieve the coupons of a location, or of every location in the network.
|
|
1454
1463
|
*/
|
|
1455
1464
|
iterate(query, options) {
|
|
1456
1465
|
return paginate(
|
|
@@ -2038,22 +2047,6 @@ function createPlans(client, defaults) {
|
|
|
2038
2047
|
*/
|
|
2039
2048
|
async delete(planId, options) {
|
|
2040
2049
|
return unwrap(await client.DELETE("/plans/v1/{planId}", { params: { path: { planId } }, signal: options?.signal }), "DELETE /plans/v1/{planId}");
|
|
2041
|
-
},
|
|
2042
|
-
/**
|
|
2043
|
-
* Delete plans
|
|
2044
|
-
*
|
|
2045
|
-
* Delete up to 100 plans at once. Plans that are already deleted are skipped.
|
|
2046
|
-
*/
|
|
2047
|
-
async deletePlans(planIds, options) {
|
|
2048
|
-
return unwrap(await client.DELETE("/plans/v1", { body: { planIds }, signal: options?.signal }), "DELETE /plans/v1");
|
|
2049
|
-
},
|
|
2050
|
-
/**
|
|
2051
|
-
* Update plans
|
|
2052
|
-
*
|
|
2053
|
-
* 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.
|
|
2054
|
-
*/
|
|
2055
|
-
async patchPlans(plans, options) {
|
|
2056
|
-
return unwrap(await client.PATCH("/plans/v1", { body: { plans }, signal: options?.signal }), "PATCH /plans/v1");
|
|
2057
2050
|
}
|
|
2058
2051
|
};
|
|
2059
2052
|
}
|