@izak0s/spacebring-api 2.1.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 -->182 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
@@ -2508,6 +2508,17 @@ function createTransactions(client, defaults) {
2508
2508
  "transactions"
2509
2509
  );
2510
2510
  },
2511
+ /**
2512
+ * Retrieve a day pass transaction
2513
+ *
2514
+ * Retrieve a day passes transaction.
2515
+ *
2516
+ * @param id The id of the transaction
2517
+ * @param options Request options (abort signal).
2518
+ */
2519
+ async get(id, options) {
2520
+ return unwrapProp(await client.GET("/transactions/day_passes/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "transaction", "GET /transactions/day_passes/v1/{id}");
2521
+ },
2511
2522
  /**
2512
2523
  * Create a day pass transaction
2513
2524
  *
@@ -2515,6 +2526,27 @@ function createTransactions(client, defaults) {
2515
2526
  */
2516
2527
  async create(transaction, options) {
2517
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
+ }
2518
2550
  }
2519
2551
  },
2520
2552
  money: {