@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/dist/index.js CHANGED
@@ -2481,6 +2481,17 @@ function createTransactions(client, defaults) {
2481
2481
  "transactions"
2482
2482
  );
2483
2483
  },
2484
+ /**
2485
+ * Retrieve a day pass transaction
2486
+ *
2487
+ * Retrieve a day passes transaction.
2488
+ *
2489
+ * @param id The id of the transaction
2490
+ * @param options Request options (abort signal).
2491
+ */
2492
+ async get(id, options) {
2493
+ return unwrapProp(await client.GET("/transactions/day_passes/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "transaction", "GET /transactions/day_passes/v1/{id}");
2494
+ },
2484
2495
  /**
2485
2496
  * Create a day pass transaction
2486
2497
  *
@@ -2488,6 +2499,27 @@ function createTransactions(client, defaults) {
2488
2499
  */
2489
2500
  async create(transaction, options) {
2490
2501
  return unwrapProp(await client.POST("/transactions/day_passes/v1", { body: { transaction }, signal: options?.signal }), "transaction", "POST /transactions/day_passes/v1");
2502
+ },
2503
+ scheduled: {
2504
+ /**
2505
+ * Retrieve scheduled day pass transactions
2506
+ *
2507
+ * Retrieve scheduled day passes transactions of a subscription or a customer.
2508
+ */
2509
+ async list(query, options) {
2510
+ return unwrap(await client.GET("/transactions/day_passes/scheduled/v1", { params: { query }, signal: options?.signal }), "GET /transactions/day_passes/scheduled/v1");
2511
+ },
2512
+ /**
2513
+ * Retrieve scheduled day pass transactions — iterates every item across all pages.
2514
+ *
2515
+ * Retrieve scheduled day passes transactions of a subscription or a customer.
2516
+ */
2517
+ iterate(query, options) {
2518
+ return paginate(
2519
+ async (nextPageToken) => unwrap(await client.GET("/transactions/day_passes/scheduled/v1", { params: { query: { ...query, nextPageToken } }, signal: options?.signal }), "GET /transactions/day_passes/scheduled/v1"),
2520
+ "scheduledTransactions"
2521
+ );
2522
+ }
2491
2523
  }
2492
2524
  },
2493
2525
  money: {