@izak0s/spacebring-api 1.9.0 → 1.11.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
@@ -871,6 +871,25 @@ function createBilling(client, defaults) {
871
871
  return unwrap(await client.PATCH("/billing/invoices/v1/{invoiceId}/void", { params: { path: { invoiceId } }, signal: options?.signal }), "PATCH /billing/invoices/v1/{invoiceId}/void");
872
872
  },
873
873
  items: {
874
+ /**
875
+ * List invoice items
876
+ *
877
+ * List invoice items filtered customer, location, type, status, or date range. Status and issue date filters match items connected to an invoice.
878
+ */
879
+ async list(query, options) {
880
+ return unwrap(await client.GET("/billing/invoices/v1/items", { params: { query }, signal: options?.signal }), "GET /billing/invoices/v1/items");
881
+ },
882
+ /**
883
+ * List invoice items — iterates every item across all pages.
884
+ *
885
+ * List invoice items filtered customer, location, type, status, or date range. Status and issue date filters match items connected to an invoice.
886
+ */
887
+ iterate(query, options) {
888
+ return paginate(
889
+ async (nextPageToken) => unwrap(await client.GET("/billing/invoices/v1/items", { params: { query: { ...query, nextPageToken } }, signal: options?.signal }), "GET /billing/invoices/v1/items"),
890
+ "invoiceItems"
891
+ );
892
+ },
874
893
  /**
875
894
  * Retrieve an invoice item
876
895
  *