@izak0s/spacebring-api 3.6.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 +1 -1
- package/dist/index.cjs +32 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1766 -151
- package/dist/index.d.ts +1766 -151
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 -->
|
|
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
|
@@ -2487,6 +2487,17 @@ function createTransactions(client, defaults) {
|
|
|
2487
2487
|
"transactions"
|
|
2488
2488
|
);
|
|
2489
2489
|
},
|
|
2490
|
+
/**
|
|
2491
|
+
* Retrieve a credit transaction
|
|
2492
|
+
*
|
|
2493
|
+
* Retrieve a credits transaction.
|
|
2494
|
+
*
|
|
2495
|
+
* @param id The id of the transaction
|
|
2496
|
+
* @param options Request options (abort signal).
|
|
2497
|
+
*/
|
|
2498
|
+
async get(id, options) {
|
|
2499
|
+
return unwrapProp(await client.GET("/transactions/credits/v1/{id}", { params: { path: { id } }, signal: options?.signal }), "transaction", "GET /transactions/credits/v1/{id}");
|
|
2500
|
+
},
|
|
2490
2501
|
/**
|
|
2491
2502
|
* Create a credit transaction
|
|
2492
2503
|
*
|
|
@@ -2494,6 +2505,27 @@ function createTransactions(client, defaults) {
|
|
|
2494
2505
|
*/
|
|
2495
2506
|
async create(transaction, options) {
|
|
2496
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
|
+
}
|
|
2497
2529
|
}
|
|
2498
2530
|
},
|
|
2499
2531
|
dayPasses: {
|