@izak0s/spacebring-api 4.0.0 → 5.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 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 -->186 operations across 21 resource groups<!-- /coverage -->** — the full Spacebring API surface
18
+ - **<!-- coverage -->187 operations across 21 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
@@ -2505,6 +2505,27 @@ function createTransactions(client, defaults) {
2505
2505
  */
2506
2506
  async create(transaction, options) {
2507
2507
  return unwrapProp(await client.POST("/transactions/credits/v1", { body: { transaction }, signal: options?.signal }), "transaction", "POST /transactions/credits/v1");
2508
+ },
2509
+ scheduled: {
2510
+ /**
2511
+ * Retrieve scheduled credits transactions
2512
+ *
2513
+ * Retrieve scheduled credits transactions of a subscription or a customer.
2514
+ */
2515
+ async list(query, options) {
2516
+ return unwrap(await client.GET("/transactions/credits/scheduled/v1", { params: { query }, signal: options?.signal }), "GET /transactions/credits/scheduled/v1");
2517
+ },
2518
+ /**
2519
+ * Retrieve scheduled credits transactions — iterates every item across all pages.
2520
+ *
2521
+ * Retrieve scheduled credits transactions of a subscription or a customer.
2522
+ */
2523
+ iterate(query, options) {
2524
+ return paginate(
2525
+ async (nextPageToken) => unwrap(await client.GET("/transactions/credits/scheduled/v1", { params: { query: { ...query, nextPageToken } }, signal: options?.signal }), "GET /transactions/credits/scheduled/v1"),
2526
+ "scheduledTransactions"
2527
+ );
2528
+ }
2508
2529
  }
2509
2530
  },
2510
2531
  dayPasses: {