@izak0s/spacebring-api 10.6.0 → 11.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 -->209 operations across 22 resource groups<!-- /coverage -->** — the full Spacebring API surface
18
+ - **<!-- coverage -->208 operations across 22 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
@@ -922,17 +922,6 @@ function createBilling(client, defaults) {
922
922
  async duplicate(invoiceId, options) {
923
923
  return unwrapProp(await client.POST("/billing/invoices/v1/{invoiceId}/duplicate", { params: { path: { invoiceId } }, signal: options?.signal }), "invoice", "POST /billing/invoices/v1/{invoiceId}/duplicate");
924
924
  },
925
- /**
926
- * List invoice items
927
- *
928
- * List all items for a specific invoice.
929
- *
930
- * @param invoiceId The id of an invoice.
931
- * @param options Request options (abort signal).
932
- */
933
- async getItems(invoiceId, options) {
934
- return unwrap(await client.GET("/billing/invoices/v1/{invoiceId}/items", { params: { path: { invoiceId } }, signal: options?.signal }), "GET /billing/invoices/v1/{invoiceId}/items");
935
- },
936
925
  /**
937
926
  * Retrieve the upcoming invoice
938
927
  *
@@ -991,7 +980,7 @@ function createBilling(client, defaults) {
991
980
  /**
992
981
  * List invoice items
993
982
  *
994
- * List invoice items filtered by customer, location, type, status, pending, or date range. Status and issue date filters match items connected to an invoice. Pending items are not on an invoice and not part of a subscription.
983
+ * List invoice items filtered by customer, location, type, status, pending, or date range. The createDate filter matches when the item was created; the status and issueDate filters match the invoice the item is on, so they return only items connected to an invoice. Pending items are not on an invoice and not part of a subscription: pass pending=true with customerRef for one customer's pending items, or with locationRef for every pending item at a location.
995
984
  */
996
985
  async list(query, options) {
997
986
  return unwrap(await client.GET("/billing/invoices/v1/items", { params: { query }, signal: options?.signal }), "GET /billing/invoices/v1/items");
@@ -999,7 +988,7 @@ function createBilling(client, defaults) {
999
988
  /**
1000
989
  * List invoice items — iterates every item across all pages.
1001
990
  *
1002
- * List invoice items filtered by customer, location, type, status, pending, or date range. Status and issue date filters match items connected to an invoice. Pending items are not on an invoice and not part of a subscription.
991
+ * List invoice items filtered by customer, location, type, status, pending, or date range. The createDate filter matches when the item was created; the status and issueDate filters match the invoice the item is on, so they return only items connected to an invoice. Pending items are not on an invoice and not part of a subscription: pass pending=true with customerRef for one customer's pending items, or with locationRef for every pending item at a location.
1003
992
  */
1004
993
  iterate(query, options) {
1005
994
  return paginate(
@@ -1049,7 +1038,13 @@ function createBilling(client, defaults) {
1049
1038
  async delete(id, options) {
1050
1039
  return unwrap(await client.DELETE("/billing/invoices/v1/items/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /billing/invoices/v1/items/{id}");
1051
1040
  },
1052
- /** List upcoming invoice items */
1041
+ /**
1042
+ * List upcoming invoice items
1043
+ *
1044
+ * List a customer's pending invoice items. Deprecated: use List invoice items with `pending=true` and `customerRef` instead.
1045
+ *
1046
+ * @deprecated Marked as deprecated in the OpenAPI spec.
1047
+ */
1053
1048
  async getUpcoming(query, options) {
1054
1049
  return unwrapProp(await client.GET("/billing/invoices/v1/items/upcoming", { params: { query }, signal: options?.signal }), "invoiceItems", "GET /billing/invoices/v1/items/upcoming");
1055
1050
  }