@izak0s/spacebring-api 16.3.0 → 16.4.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.d.cts CHANGED
@@ -524,7 +524,7 @@ interface paths {
524
524
  };
525
525
  /**
526
526
  * Retrieve invoices
527
- * @description Retrieve all invoices based on certain parameters. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
527
+ * @description Retrieve the invoices of a customer, a location, or the whole network when neither customerRef nor locationRef is set. An administrator limited to some locations needs customerRef or locationRef. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
528
528
  */
529
529
  get: operations["getInvoices"];
530
530
  put?: never;
@@ -696,7 +696,7 @@ interface paths {
696
696
  };
697
697
  /**
698
698
  * List invoice items
699
- * @description List invoice items filtered by customer, location, invoice, type, status, pending, or date range. Pass invoiceRef for the items of one invoice; they page like the rest of the list. 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. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
699
+ * @description List invoice items filtered by customer, location, invoice, type, status, pending, or date range. Pass invoiceRef for the items of one invoice; they page like the rest of the list. 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. Without customerRef, invoiceRef or locationRef, lists the items of the whole network; an administrator limited to some locations needs one of them. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
700
700
  */
701
701
  get: operations["listInvoiceItems"];
702
702
  put?: never;
@@ -789,7 +789,7 @@ interface paths {
789
789
  };
790
790
  /**
791
791
  * Retrieve credit notes
792
- * @description Retrieve all credit notes for a specific invoice or location. One of invoiceRef or locationRef is required. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
792
+ * @description Retrieve the credit notes of an invoice, a location, or the whole network when neither invoiceRef nor locationRef is set. An administrator limited to some locations needs invoiceRef or locationRef. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
793
793
  */
794
794
  get: operations["getCreditNotes"];
795
795
  put?: never;
@@ -28485,7 +28485,7 @@ interface operations {
28485
28485
  "createDate[gte]"?: string;
28486
28486
  /** @description Filter invoices created on or before this date (ISO 8601). Use with createDate[gte] for a range. */
28487
28487
  "createDate[lte]"?: string;
28488
- /** @description UUID of the customer whose invoices to list. */
28488
+ /** @description UUID of the customer whose invoices to list. Without customerRef or locationRef, lists the invoices of the whole network. */
28489
28489
  customerRef?: string;
28490
28490
  /** @description Filter invoices issued on or after this date (ISO 8601). Use with issueDate[lte] for a range. */
28491
28491
  "issueDate[gte]"?: string;
@@ -28499,7 +28499,7 @@ interface operations {
28499
28499
  membershipRef?: string;
28500
28500
  /** @description Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
28501
28501
  nextPageToken?: string;
28502
- /** @description Case-insensitive search by invoice code or number. Requires customerRef or locationRef. */
28502
+ /** @description Case-insensitive search by invoice code or number. */
28503
28503
  q?: string;
28504
28504
  /** @description Filter by invoice status: draft (created but not sent), issued (sent to the customer but unpaid), paid (fully paid) or voided (cancelled and no longer valid). Comma-separated, one or more of: draft, issued, paid, voided. */
28505
28505
  status?: string;
@@ -28895,7 +28895,7 @@ interface operations {
28895
28895
  "issueDate[lte]"?: string;
28896
28896
  /** @description Maximum number of invoice items per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
28897
28897
  limit?: number;
28898
- /** @description UUID of the location whose invoice items to list. */
28898
+ /** @description UUID of the location whose invoice items to list. Without customerRef, invoiceRef or locationRef, lists the invoice items of the whole network. */
28899
28899
  locationRef?: string;
28900
28900
  /** @description Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
28901
28901
  nextPageToken?: string;
@@ -29165,7 +29165,7 @@ interface operations {
29165
29165
  invoiceRef?: string;
29166
29166
  /** @description Maximum number of credit notes per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
29167
29167
  limit?: number;
29168
- /** @description UUID of the location whose credit notes to list. */
29168
+ /** @description UUID of the location whose credit notes to list. Without invoiceRef or locationRef, lists the credit notes of the whole network. */
29169
29169
  locationRef?: string;
29170
29170
  /** @description Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
29171
29171
  nextPageToken?: string;
@@ -37281,7 +37281,7 @@ interface GetCreditNotesQuery {
37281
37281
  invoiceRef?: string;
37282
37282
  /** Maximum number of credit notes per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
37283
37283
  limit?: number;
37284
- /** UUID of the location whose credit notes to list. */
37284
+ /** UUID of the location whose credit notes to list. Without invoiceRef or locationRef, lists the credit notes of the whole network. */
37285
37285
  locationRef?: string;
37286
37286
  /** Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
37287
37287
  nextPageToken?: string;
@@ -37296,7 +37296,7 @@ interface GetInvoicesQuery {
37296
37296
  "createDate[gte]"?: string;
37297
37297
  /** Filter invoices created on or before this date (ISO 8601). Use with createDate[gte] for a range. */
37298
37298
  "createDate[lte]"?: string;
37299
- /** UUID of the customer whose invoices to list. */
37299
+ /** UUID of the customer whose invoices to list. Without customerRef or locationRef, lists the invoices of the whole network. */
37300
37300
  customerRef?: string;
37301
37301
  /** Filter invoices issued on or after this date (ISO 8601). Use with issueDate[lte] for a range. */
37302
37302
  "issueDate[gte]"?: string;
@@ -37310,7 +37310,7 @@ interface GetInvoicesQuery {
37310
37310
  membershipRef?: string;
37311
37311
  /** Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
37312
37312
  nextPageToken?: string;
37313
- /** Case-insensitive search by invoice code or number. Requires customerRef or locationRef. */
37313
+ /** Case-insensitive search by invoice code or number. */
37314
37314
  q?: string;
37315
37315
  /** Filter by invoice status: draft (created but not sent), issued (sent to the customer but unpaid), paid (fully paid) or voided (cancelled and no longer valid). Comma-separated, one or more of: draft, issued, paid, voided. */
37316
37316
  status?: string;
@@ -37343,7 +37343,7 @@ interface ListInvoiceItemsQuery {
37343
37343
  "issueDate[lte]"?: string;
37344
37344
  /** Maximum number of invoice items per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
37345
37345
  limit?: number;
37346
- /** UUID of the location whose invoice items to list. */
37346
+ /** UUID of the location whose invoice items to list. Without customerRef, invoiceRef or locationRef, lists the invoice items of the whole network. */
37347
37347
  locationRef?: string;
37348
37348
  /** Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
37349
37349
  nextPageToken?: string;
package/dist/index.d.ts CHANGED
@@ -524,7 +524,7 @@ interface paths {
524
524
  };
525
525
  /**
526
526
  * Retrieve invoices
527
- * @description Retrieve all invoices based on certain parameters. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
527
+ * @description Retrieve the invoices of a customer, a location, or the whole network when neither customerRef nor locationRef is set. An administrator limited to some locations needs customerRef or locationRef. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
528
528
  */
529
529
  get: operations["getInvoices"];
530
530
  put?: never;
@@ -696,7 +696,7 @@ interface paths {
696
696
  };
697
697
  /**
698
698
  * List invoice items
699
- * @description List invoice items filtered by customer, location, invoice, type, status, pending, or date range. Pass invoiceRef for the items of one invoice; they page like the rest of the list. 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. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
699
+ * @description List invoice items filtered by customer, location, invoice, type, status, pending, or date range. Pass invoiceRef for the items of one invoice; they page like the rest of the list. 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. Without customerRef, invoiceRef or locationRef, lists the items of the whole network; an administrator limited to some locations needs one of them. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
700
700
  */
701
701
  get: operations["listInvoiceItems"];
702
702
  put?: never;
@@ -789,7 +789,7 @@ interface paths {
789
789
  };
790
790
  /**
791
791
  * Retrieve credit notes
792
- * @description Retrieve all credit notes for a specific invoice or location. One of invoiceRef or locationRef is required. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
792
+ * @description Retrieve the credit notes of an invoice, a location, or the whole network when neither invoiceRef nor locationRef is set. An administrator limited to some locations needs invoiceRef or locationRef. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
793
793
  */
794
794
  get: operations["getCreditNotes"];
795
795
  put?: never;
@@ -28485,7 +28485,7 @@ interface operations {
28485
28485
  "createDate[gte]"?: string;
28486
28486
  /** @description Filter invoices created on or before this date (ISO 8601). Use with createDate[gte] for a range. */
28487
28487
  "createDate[lte]"?: string;
28488
- /** @description UUID of the customer whose invoices to list. */
28488
+ /** @description UUID of the customer whose invoices to list. Without customerRef or locationRef, lists the invoices of the whole network. */
28489
28489
  customerRef?: string;
28490
28490
  /** @description Filter invoices issued on or after this date (ISO 8601). Use with issueDate[lte] for a range. */
28491
28491
  "issueDate[gte]"?: string;
@@ -28499,7 +28499,7 @@ interface operations {
28499
28499
  membershipRef?: string;
28500
28500
  /** @description Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
28501
28501
  nextPageToken?: string;
28502
- /** @description Case-insensitive search by invoice code or number. Requires customerRef or locationRef. */
28502
+ /** @description Case-insensitive search by invoice code or number. */
28503
28503
  q?: string;
28504
28504
  /** @description Filter by invoice status: draft (created but not sent), issued (sent to the customer but unpaid), paid (fully paid) or voided (cancelled and no longer valid). Comma-separated, one or more of: draft, issued, paid, voided. */
28505
28505
  status?: string;
@@ -28895,7 +28895,7 @@ interface operations {
28895
28895
  "issueDate[lte]"?: string;
28896
28896
  /** @description Maximum number of invoice items per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
28897
28897
  limit?: number;
28898
- /** @description UUID of the location whose invoice items to list. */
28898
+ /** @description UUID of the location whose invoice items to list. Without customerRef, invoiceRef or locationRef, lists the invoice items of the whole network. */
28899
28899
  locationRef?: string;
28900
28900
  /** @description Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
28901
28901
  nextPageToken?: string;
@@ -29165,7 +29165,7 @@ interface operations {
29165
29165
  invoiceRef?: string;
29166
29166
  /** @description Maximum number of credit notes per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
29167
29167
  limit?: number;
29168
- /** @description UUID of the location whose credit notes to list. */
29168
+ /** @description UUID of the location whose credit notes to list. Without invoiceRef or locationRef, lists the credit notes of the whole network. */
29169
29169
  locationRef?: string;
29170
29170
  /** @description Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
29171
29171
  nextPageToken?: string;
@@ -37281,7 +37281,7 @@ interface GetCreditNotesQuery {
37281
37281
  invoiceRef?: string;
37282
37282
  /** Maximum number of credit notes per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
37283
37283
  limit?: number;
37284
- /** UUID of the location whose credit notes to list. */
37284
+ /** UUID of the location whose credit notes to list. Without invoiceRef or locationRef, lists the credit notes of the whole network. */
37285
37285
  locationRef?: string;
37286
37286
  /** Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
37287
37287
  nextPageToken?: string;
@@ -37296,7 +37296,7 @@ interface GetInvoicesQuery {
37296
37296
  "createDate[gte]"?: string;
37297
37297
  /** Filter invoices created on or before this date (ISO 8601). Use with createDate[gte] for a range. */
37298
37298
  "createDate[lte]"?: string;
37299
- /** UUID of the customer whose invoices to list. */
37299
+ /** UUID of the customer whose invoices to list. Without customerRef or locationRef, lists the invoices of the whole network. */
37300
37300
  customerRef?: string;
37301
37301
  /** Filter invoices issued on or after this date (ISO 8601). Use with issueDate[lte] for a range. */
37302
37302
  "issueDate[gte]"?: string;
@@ -37310,7 +37310,7 @@ interface GetInvoicesQuery {
37310
37310
  membershipRef?: string;
37311
37311
  /** Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
37312
37312
  nextPageToken?: string;
37313
- /** Case-insensitive search by invoice code or number. Requires customerRef or locationRef. */
37313
+ /** Case-insensitive search by invoice code or number. */
37314
37314
  q?: string;
37315
37315
  /** Filter by invoice status: draft (created but not sent), issued (sent to the customer but unpaid), paid (fully paid) or voided (cancelled and no longer valid). Comma-separated, one or more of: draft, issued, paid, voided. */
37316
37316
  status?: string;
@@ -37343,7 +37343,7 @@ interface ListInvoiceItemsQuery {
37343
37343
  "issueDate[lte]"?: string;
37344
37344
  /** Maximum number of invoice items per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
37345
37345
  limit?: number;
37346
- /** UUID of the location whose invoice items to list. */
37346
+ /** UUID of the location whose invoice items to list. Without customerRef, invoiceRef or locationRef, lists the invoice items of the whole network. */
37347
37347
  locationRef?: string;
37348
37348
  /** Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
37349
37349
  nextPageToken?: string;
package/dist/index.js CHANGED
@@ -778,7 +778,7 @@ function createBilling(client, defaults) {
778
778
  /**
779
779
  * Retrieve credit notes
780
780
  *
781
- * Retrieve all credit notes for a specific invoice or location. One of invoiceRef or locationRef is required.
781
+ * Retrieve the credit notes of an invoice, a location, or the whole network when neither invoiceRef nor locationRef is set. An administrator limited to some locations needs invoiceRef or locationRef.
782
782
  */
783
783
  async list(query, options) {
784
784
  return unwrap(await client.GET("/billing/credit_notes/v1", { params: { query }, signal: options?.signal }), "GET /billing/credit_notes/v1");
@@ -786,7 +786,7 @@ function createBilling(client, defaults) {
786
786
  /**
787
787
  * Retrieve credit notes — iterates every item across all pages.
788
788
  *
789
- * Retrieve all credit notes for a specific invoice or location. One of invoiceRef or locationRef is required.
789
+ * Retrieve the credit notes of an invoice, a location, or the whole network when neither invoiceRef nor locationRef is set. An administrator limited to some locations needs invoiceRef or locationRef.
790
790
  */
791
791
  iterate(query, options) {
792
792
  return paginate(
@@ -847,7 +847,7 @@ function createBilling(client, defaults) {
847
847
  /**
848
848
  * Retrieve invoices
849
849
  *
850
- * Retrieve all invoices based on certain parameters.
850
+ * Retrieve the invoices of a customer, a location, or the whole network when neither customerRef nor locationRef is set. An administrator limited to some locations needs customerRef or locationRef.
851
851
  */
852
852
  async list(query, options) {
853
853
  return unwrap(await client.GET("/billing/invoices/v1", { params: { query }, signal: options?.signal }), "GET /billing/invoices/v1");
@@ -855,7 +855,7 @@ function createBilling(client, defaults) {
855
855
  /**
856
856
  * Retrieve invoices — iterates every item across all pages.
857
857
  *
858
- * Retrieve all invoices based on certain parameters.
858
+ * Retrieve the invoices of a customer, a location, or the whole network when neither customerRef nor locationRef is set. An administrator limited to some locations needs customerRef or locationRef.
859
859
  */
860
860
  iterate(query, options) {
861
861
  return paginate(
@@ -985,7 +985,7 @@ function createBilling(client, defaults) {
985
985
  /**
986
986
  * List invoice items
987
987
  *
988
- * List invoice items filtered by customer, location, invoice, type, status, pending, or date range. Pass invoiceRef for the items of one invoice; they page like the rest of the list. 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.
988
+ * List invoice items filtered by customer, location, invoice, type, status, pending, or date range. Pass invoiceRef for the items of one invoice; they page like the rest of the list. 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. Without customerRef, invoiceRef or locationRef, lists the items of the whole network; an administrator limited to some locations needs one of them.
989
989
  */
990
990
  async list(query, options) {
991
991
  return unwrap(await client.GET("/billing/invoices/v1/items", { params: { query }, signal: options?.signal }), "GET /billing/invoices/v1/items");
@@ -993,7 +993,7 @@ function createBilling(client, defaults) {
993
993
  /**
994
994
  * List invoice items — iterates every item across all pages.
995
995
  *
996
- * List invoice items filtered by customer, location, invoice, type, status, pending, or date range. Pass invoiceRef for the items of one invoice; they page like the rest of the list. 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.
996
+ * List invoice items filtered by customer, location, invoice, type, status, pending, or date range. Pass invoiceRef for the items of one invoice; they page like the rest of the list. 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. Without customerRef, invoiceRef or locationRef, lists the items of the whole network; an administrator limited to some locations needs one of them.
997
997
  */
998
998
  iterate(query, options) {
999
999
  return paginate(