@izak0s/spacebring-api 3.0.0 → 3.1.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 -->183 operations across 21 resource groups<!-- /coverage -->** — the full Spacebring API surface
18
+ - **<!-- coverage -->184 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
@@ -2526,6 +2526,27 @@ function createTransactions(client, defaults) {
2526
2526
  */
2527
2527
  async create(transaction, options) {
2528
2528
  return unwrapProp(await client.POST("/transactions/day_passes/v1", { body: { transaction }, signal: options?.signal }), "transaction", "POST /transactions/day_passes/v1");
2529
+ },
2530
+ scheduled: {
2531
+ /**
2532
+ * Retrieve scheduled day pass transactions
2533
+ *
2534
+ * Retrieve scheduled day passes transactions of a subscription or a customer.
2535
+ */
2536
+ async list(query, options) {
2537
+ return unwrap(await client.GET("/transactions/day_passes/scheduled/v1", { params: { query }, signal: options?.signal }), "GET /transactions/day_passes/scheduled/v1");
2538
+ },
2539
+ /**
2540
+ * Retrieve scheduled day pass transactions — iterates every item across all pages.
2541
+ *
2542
+ * Retrieve scheduled day passes transactions of a subscription or a customer.
2543
+ */
2544
+ iterate(query, options) {
2545
+ return paginate(
2546
+ async (nextPageToken) => unwrap(await client.GET("/transactions/day_passes/scheduled/v1", { params: { query: { ...query, nextPageToken } }, signal: options?.signal }), "GET /transactions/day_passes/scheduled/v1"),
2547
+ "scheduledTransactions"
2548
+ );
2549
+ }
2529
2550
  }
2530
2551
  },
2531
2552
  money: {