@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.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 all coupons in the location.
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 all coupons in the location.
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(
@@ -1953,6 +1962,15 @@ function createPackages(client, defaults) {
1953
1962
  "packages"
1954
1963
  );
1955
1964
  },
1965
+ /**
1966
+ * Retrieve a package
1967
+ *
1968
+ * @param packageId The id of the package.
1969
+ * @param options Request options (abort signal).
1970
+ */
1971
+ async get(packageId, options) {
1972
+ return unwrapProp(await client.GET("/packages/v1/{packageId}", { params: { path: { packageId } }, signal: options?.signal }), "package", "GET /packages/v1/{packageId}");
1973
+ },
1956
1974
  /** Create a package */
1957
1975
  async create(packageBody, options) {
1958
1976
  return unwrapProp(await client.POST("/packages/v1", { body: { package: packageBody }, signal: options?.signal }), "package", "POST /packages/v1");
@@ -2038,22 +2056,6 @@ function createPlans(client, defaults) {
2038
2056
  */
2039
2057
  async delete(planId, options) {
2040
2058
  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
2059
  }
2058
2060
  };
2059
2061
  }