@izak0s/spacebring-api 12.0.0 → 14.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/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 all coupons in the location.
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 all coupons in the location.
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(
@@ -1980,6 +1989,15 @@ function createPackages(client, defaults) {
1980
1989
  "packages"
1981
1990
  );
1982
1991
  },
1992
+ /**
1993
+ * Retrieve a package
1994
+ *
1995
+ * @param packageId The id of the package.
1996
+ * @param options Request options (abort signal).
1997
+ */
1998
+ async get(packageId, options) {
1999
+ return unwrapProp(await client.GET("/packages/v1/{packageId}", { params: { path: { packageId } }, signal: options?.signal }), "package", "GET /packages/v1/{packageId}");
2000
+ },
1983
2001
  /** Create a package */
1984
2002
  async create(packageBody, options) {
1985
2003
  return unwrapProp(await client.POST("/packages/v1", { body: { package: packageBody }, signal: options?.signal }), "package", "POST /packages/v1");
@@ -2065,22 +2083,6 @@ function createPlans(client, defaults) {
2065
2083
  */
2066
2084
  async delete(planId, options) {
2067
2085
  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
2086
  }
2085
2087
  };
2086
2088
  }