@izak0s/spacebring-api 10.6.0 → 11.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/README.md +1 -1
- package/dist/index.cjs +9 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +254 -81
- package/dist/index.d.ts +254 -81
- package/dist/index.js +9 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -619,26 +619,6 @@ interface paths {
|
|
|
619
619
|
patch?: never;
|
|
620
620
|
trace?: never;
|
|
621
621
|
};
|
|
622
|
-
"/billing/invoices/v1/{invoiceId}/items": {
|
|
623
|
-
parameters: {
|
|
624
|
-
query?: never;
|
|
625
|
-
header?: never;
|
|
626
|
-
path?: never;
|
|
627
|
-
cookie?: never;
|
|
628
|
-
};
|
|
629
|
-
/**
|
|
630
|
-
* List invoice items
|
|
631
|
-
* @description List all items for a specific invoice. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
|
|
632
|
-
*/
|
|
633
|
-
get: operations["getInvoiceItems"];
|
|
634
|
-
put?: never;
|
|
635
|
-
post?: never;
|
|
636
|
-
delete?: never;
|
|
637
|
-
options?: never;
|
|
638
|
-
head?: never;
|
|
639
|
-
patch?: never;
|
|
640
|
-
trace?: never;
|
|
641
|
-
};
|
|
642
622
|
"/billing/invoices/v1/{invoiceId}/pay": {
|
|
643
623
|
parameters: {
|
|
644
624
|
query?: never;
|
|
@@ -708,7 +688,7 @@ interface paths {
|
|
|
708
688
|
};
|
|
709
689
|
/**
|
|
710
690
|
* List invoice items
|
|
711
|
-
* @description List invoice items filtered by customer, location, type, status, pending, or date range.
|
|
691
|
+
* @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>
|
|
712
692
|
*/
|
|
713
693
|
get: operations["listInvoiceItems"];
|
|
714
694
|
put?: never;
|
|
@@ -760,7 +740,8 @@ interface paths {
|
|
|
760
740
|
};
|
|
761
741
|
/**
|
|
762
742
|
* List upcoming invoice items
|
|
763
|
-
* @
|
|
743
|
+
* @deprecated
|
|
744
|
+
* @description List a customer's pending invoice items. Deprecated: use <a href="/developer/api/billing/list-invoice-items">List invoice items</a> with <code>pending=true</code> and <code>customerRef</code> instead. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
|
|
764
745
|
*/
|
|
765
746
|
get: operations["getUpcomingInvoiceItems"];
|
|
766
747
|
put?: never;
|
|
@@ -5269,6 +5250,11 @@ interface components {
|
|
|
5269
5250
|
* @description ID of the invoice this item belongs to.
|
|
5270
5251
|
*/
|
|
5271
5252
|
invoiceRef?: string;
|
|
5253
|
+
/**
|
|
5254
|
+
* Format: date-time
|
|
5255
|
+
* @description ISO timestamp of when the item was issued with its invoice.
|
|
5256
|
+
*/
|
|
5257
|
+
issueDate?: string;
|
|
5272
5258
|
/**
|
|
5273
5259
|
* Format: uuid
|
|
5274
5260
|
* @description ID of the organization (location).
|
|
@@ -5665,6 +5651,11 @@ interface components {
|
|
|
5665
5651
|
* @description ID of the invoice this item belongs to.
|
|
5666
5652
|
*/
|
|
5667
5653
|
invoiceRef?: string;
|
|
5654
|
+
/**
|
|
5655
|
+
* Format: date-time
|
|
5656
|
+
* @description ISO timestamp of when the item was issued with its invoice.
|
|
5657
|
+
*/
|
|
5658
|
+
issueDate?: string;
|
|
5668
5659
|
/**
|
|
5669
5660
|
* Format: uuid
|
|
5670
5661
|
* @description ID of the organization (location).
|
|
@@ -8920,7 +8911,7 @@ interface components {
|
|
|
8920
8911
|
legalName?: string;
|
|
8921
8912
|
/** @enum {string} */
|
|
8922
8913
|
locale?: "en" | "es" | "ko" | "uk" | "ru";
|
|
8923
|
-
/** @description
|
|
8914
|
+
/** @description Photos and videos of the location in the order administrators arranged them, with any added since first, newest first. The first one is the location's cover. */
|
|
8924
8915
|
media?: {
|
|
8925
8916
|
height?: number;
|
|
8926
8917
|
/** @description Storage key of the image. */
|
|
@@ -10278,6 +10269,60 @@ interface components {
|
|
|
10278
10269
|
* @enum {string}
|
|
10279
10270
|
*/
|
|
10280
10271
|
preparationMinutes: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
|
|
10272
|
+
/** @description Prices that replace the regular money and credit tiers for bookings starting on the selected weekdays. A booking is priced by the rule covering the weekday of its start in the location's time zone, and by the regular tiers when no rule covers it. */
|
|
10273
|
+
pricingRules: {
|
|
10274
|
+
/** @description Credit prices on the selected days. When omitted, the regular credit tiers apply on them. */
|
|
10275
|
+
credits?: {
|
|
10276
|
+
/** @description Stepped credit pricing tiers for the selected days. */
|
|
10277
|
+
tiers: {
|
|
10278
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
10279
|
+
flatAmount: number;
|
|
10280
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
10281
|
+
from: number;
|
|
10282
|
+
/**
|
|
10283
|
+
* @description Whether the tier is priced per hour or per day.
|
|
10284
|
+
* @enum {string}
|
|
10285
|
+
*/
|
|
10286
|
+
unit: "hour" | "day";
|
|
10287
|
+
/** @description Price per unit of booking time within this tier, never per minute. */
|
|
10288
|
+
unitAmount: number;
|
|
10289
|
+
}[];
|
|
10290
|
+
};
|
|
10291
|
+
/** @description Weekdays, in the location's time zone, on which a booking that starts gets these prices. */
|
|
10292
|
+
days: {
|
|
10293
|
+
/** @description Whether the rule applies to bookings starting on a Friday. */
|
|
10294
|
+
friday: boolean;
|
|
10295
|
+
/** @description Whether the rule applies to bookings starting on a Monday. */
|
|
10296
|
+
monday: boolean;
|
|
10297
|
+
/** @description Whether the rule applies to bookings starting on a Saturday. */
|
|
10298
|
+
saturday: boolean;
|
|
10299
|
+
/** @description Whether the rule applies to bookings starting on a Sunday. */
|
|
10300
|
+
sunday: boolean;
|
|
10301
|
+
/** @description Whether the rule applies to bookings starting on a Thursday. */
|
|
10302
|
+
thursday: boolean;
|
|
10303
|
+
/** @description Whether the rule applies to bookings starting on a Tuesday. */
|
|
10304
|
+
tuesday: boolean;
|
|
10305
|
+
/** @description Whether the rule applies to bookings starting on a Wednesday. */
|
|
10306
|
+
wednesday: boolean;
|
|
10307
|
+
};
|
|
10308
|
+
/** @description Money prices on the selected days. When omitted, the regular money tiers apply on them. */
|
|
10309
|
+
money?: {
|
|
10310
|
+
/** @description Stepped money pricing tiers for the selected days. */
|
|
10311
|
+
tiers: {
|
|
10312
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
10313
|
+
flatAmount: number;
|
|
10314
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
10315
|
+
from: number;
|
|
10316
|
+
/**
|
|
10317
|
+
* @description Whether the tier is priced per hour or per day.
|
|
10318
|
+
* @enum {string}
|
|
10319
|
+
*/
|
|
10320
|
+
unit: "hour" | "day";
|
|
10321
|
+
/** @description Price per unit of booking time within this tier, never per minute. */
|
|
10322
|
+
unitAmount: number;
|
|
10323
|
+
}[];
|
|
10324
|
+
};
|
|
10325
|
+
}[];
|
|
10281
10326
|
/**
|
|
10282
10327
|
* @description Refund threshold for cancellations.
|
|
10283
10328
|
* @enum {string}
|
|
@@ -10921,6 +10966,60 @@ interface components {
|
|
|
10921
10966
|
* @enum {string}
|
|
10922
10967
|
*/
|
|
10923
10968
|
preparationMinutes: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
|
|
10969
|
+
/** @description Prices that replace the regular money and credit tiers for bookings starting on the selected weekdays. A booking is priced by the rule covering the weekday of its start in the location's time zone, and by the regular tiers when no rule covers it. */
|
|
10970
|
+
pricingRules: {
|
|
10971
|
+
/** @description Credit prices on the selected days. When omitted, the regular credit tiers apply on them. */
|
|
10972
|
+
credits?: {
|
|
10973
|
+
/** @description Stepped credit pricing tiers for the selected days. */
|
|
10974
|
+
tiers: {
|
|
10975
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
10976
|
+
flatAmount: number;
|
|
10977
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
10978
|
+
from: number;
|
|
10979
|
+
/**
|
|
10980
|
+
* @description Whether the tier is priced per hour or per day.
|
|
10981
|
+
* @enum {string}
|
|
10982
|
+
*/
|
|
10983
|
+
unit: "hour" | "day";
|
|
10984
|
+
/** @description Price per unit of booking time within this tier, never per minute. */
|
|
10985
|
+
unitAmount: number;
|
|
10986
|
+
}[];
|
|
10987
|
+
};
|
|
10988
|
+
/** @description Weekdays, in the location's time zone, on which a booking that starts gets these prices. */
|
|
10989
|
+
days: {
|
|
10990
|
+
/** @description Whether the rule applies to bookings starting on a Friday. */
|
|
10991
|
+
friday: boolean;
|
|
10992
|
+
/** @description Whether the rule applies to bookings starting on a Monday. */
|
|
10993
|
+
monday: boolean;
|
|
10994
|
+
/** @description Whether the rule applies to bookings starting on a Saturday. */
|
|
10995
|
+
saturday: boolean;
|
|
10996
|
+
/** @description Whether the rule applies to bookings starting on a Sunday. */
|
|
10997
|
+
sunday: boolean;
|
|
10998
|
+
/** @description Whether the rule applies to bookings starting on a Thursday. */
|
|
10999
|
+
thursday: boolean;
|
|
11000
|
+
/** @description Whether the rule applies to bookings starting on a Tuesday. */
|
|
11001
|
+
tuesday: boolean;
|
|
11002
|
+
/** @description Whether the rule applies to bookings starting on a Wednesday. */
|
|
11003
|
+
wednesday: boolean;
|
|
11004
|
+
};
|
|
11005
|
+
/** @description Money prices on the selected days. When omitted, the regular money tiers apply on them. */
|
|
11006
|
+
money?: {
|
|
11007
|
+
/** @description Stepped money pricing tiers for the selected days. */
|
|
11008
|
+
tiers: {
|
|
11009
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
11010
|
+
flatAmount: number;
|
|
11011
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
11012
|
+
from: number;
|
|
11013
|
+
/**
|
|
11014
|
+
* @description Whether the tier is priced per hour or per day.
|
|
11015
|
+
* @enum {string}
|
|
11016
|
+
*/
|
|
11017
|
+
unit: "hour" | "day";
|
|
11018
|
+
/** @description Price per unit of booking time within this tier, never per minute. */
|
|
11019
|
+
unitAmount: number;
|
|
11020
|
+
}[];
|
|
11021
|
+
};
|
|
11022
|
+
}[];
|
|
10924
11023
|
/**
|
|
10925
11024
|
* @description Refund threshold for cancellations.
|
|
10926
11025
|
* @enum {string}
|
|
@@ -11628,6 +11727,11 @@ interface components {
|
|
|
11628
11727
|
};
|
|
11629
11728
|
/** @description ID of the invoice item the booking was billed on. */
|
|
11630
11729
|
invoiceItemRef?: string;
|
|
11730
|
+
/**
|
|
11731
|
+
* Format: uuid
|
|
11732
|
+
* @description Invoice the invoice item was added to. Not set while the item is pending.
|
|
11733
|
+
*/
|
|
11734
|
+
invoiceRef?: string;
|
|
11631
11735
|
/**
|
|
11632
11736
|
* Format: uuid
|
|
11633
11737
|
* @description Subscription the invoice item belongs to.
|
|
@@ -12058,6 +12162,11 @@ interface components {
|
|
|
12058
12162
|
};
|
|
12059
12163
|
/** @description ID of the invoice item the booking was billed on. */
|
|
12060
12164
|
invoiceItemRef?: string;
|
|
12165
|
+
/**
|
|
12166
|
+
* Format: uuid
|
|
12167
|
+
* @description Invoice the invoice item was added to. Not set while the item is pending.
|
|
12168
|
+
*/
|
|
12169
|
+
invoiceRef?: string;
|
|
12061
12170
|
/**
|
|
12062
12171
|
* Format: uuid
|
|
12063
12172
|
* @description Subscription the invoice item belongs to.
|
|
@@ -12700,6 +12809,11 @@ interface components {
|
|
|
12700
12809
|
};
|
|
12701
12810
|
/** @description ID of the invoice item the booking was billed on. */
|
|
12702
12811
|
invoiceItemRef?: string;
|
|
12812
|
+
/**
|
|
12813
|
+
* Format: uuid
|
|
12814
|
+
* @description Invoice the invoice item was added to. Not set while the item is pending.
|
|
12815
|
+
*/
|
|
12816
|
+
invoiceRef?: string;
|
|
12703
12817
|
/**
|
|
12704
12818
|
* Format: uuid
|
|
12705
12819
|
* @description Subscription the invoice item belongs to.
|
|
@@ -13130,6 +13244,11 @@ interface components {
|
|
|
13130
13244
|
};
|
|
13131
13245
|
/** @description ID of the invoice item the booking was billed on. */
|
|
13132
13246
|
invoiceItemRef?: string;
|
|
13247
|
+
/**
|
|
13248
|
+
* Format: uuid
|
|
13249
|
+
* @description Invoice the invoice item was added to. Not set while the item is pending.
|
|
13250
|
+
*/
|
|
13251
|
+
invoiceRef?: string;
|
|
13133
13252
|
/**
|
|
13134
13253
|
* Format: uuid
|
|
13135
13254
|
* @description Subscription the invoice item belongs to.
|
|
@@ -24477,6 +24596,50 @@ interface components {
|
|
|
24477
24596
|
* @enum {string}
|
|
24478
24597
|
*/
|
|
24479
24598
|
preparationMinutes?: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
|
|
24599
|
+
/** @description Prices that replace the regular money and credit tiers for bookings starting on the selected weekdays. The list holds at most one rule. On update the list replaces the current rule, and an empty list removes it. */
|
|
24600
|
+
pricingRules?: {
|
|
24601
|
+
/** @description Credit prices on the selected days, kept only while credits are enabled. Omit to keep the regular credit tiers on them. */
|
|
24602
|
+
credits?: {
|
|
24603
|
+
/** @description Stepped credit pricing tiers for the selected days. */
|
|
24604
|
+
tiers: {
|
|
24605
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
24606
|
+
flatAmount: number;
|
|
24607
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
24608
|
+
from: number;
|
|
24609
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
24610
|
+
unitAmount: number;
|
|
24611
|
+
}[];
|
|
24612
|
+
};
|
|
24613
|
+
/** @description Weekdays, in the location's time zone, on which a booking that starts gets these prices. Select at least one day. */
|
|
24614
|
+
days: {
|
|
24615
|
+
/** @description Whether the rule applies to bookings starting on a Friday. */
|
|
24616
|
+
friday: boolean;
|
|
24617
|
+
/** @description Whether the rule applies to bookings starting on a Monday. */
|
|
24618
|
+
monday: boolean;
|
|
24619
|
+
/** @description Whether the rule applies to bookings starting on a Saturday. */
|
|
24620
|
+
saturday: boolean;
|
|
24621
|
+
/** @description Whether the rule applies to bookings starting on a Sunday. */
|
|
24622
|
+
sunday: boolean;
|
|
24623
|
+
/** @description Whether the rule applies to bookings starting on a Thursday. */
|
|
24624
|
+
thursday: boolean;
|
|
24625
|
+
/** @description Whether the rule applies to bookings starting on a Tuesday. */
|
|
24626
|
+
tuesday: boolean;
|
|
24627
|
+
/** @description Whether the rule applies to bookings starting on a Wednesday. */
|
|
24628
|
+
wednesday: boolean;
|
|
24629
|
+
};
|
|
24630
|
+
/** @description Money prices on the selected days, kept only while money is enabled. Omit to keep the regular money tiers on them. */
|
|
24631
|
+
money?: {
|
|
24632
|
+
/** @description Stepped money pricing tiers for the selected days. */
|
|
24633
|
+
tiers: {
|
|
24634
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
24635
|
+
flatAmount: number;
|
|
24636
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
24637
|
+
from: number;
|
|
24638
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
24639
|
+
unitAmount: number;
|
|
24640
|
+
}[];
|
|
24641
|
+
};
|
|
24642
|
+
}[];
|
|
24480
24643
|
/**
|
|
24481
24644
|
* @description How long before start a booking remains refundable.
|
|
24482
24645
|
* @enum {string}
|
|
@@ -24916,6 +25079,50 @@ interface components {
|
|
|
24916
25079
|
* @enum {string}
|
|
24917
25080
|
*/
|
|
24918
25081
|
preparationMinutes?: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
|
|
25082
|
+
/** @description Prices that replace the regular money and credit tiers for bookings starting on the selected weekdays. The list holds at most one rule. On update the list replaces the current rule, and an empty list removes it. */
|
|
25083
|
+
pricingRules?: {
|
|
25084
|
+
/** @description Credit prices on the selected days, kept only while credits are enabled. Omit to keep the regular credit tiers on them. */
|
|
25085
|
+
credits?: {
|
|
25086
|
+
/** @description Stepped credit pricing tiers for the selected days. */
|
|
25087
|
+
tiers: {
|
|
25088
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
25089
|
+
flatAmount: number;
|
|
25090
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
25091
|
+
from: number;
|
|
25092
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
25093
|
+
unitAmount: number;
|
|
25094
|
+
}[];
|
|
25095
|
+
};
|
|
25096
|
+
/** @description Weekdays, in the location's time zone, on which a booking that starts gets these prices. Select at least one day. */
|
|
25097
|
+
days: {
|
|
25098
|
+
/** @description Whether the rule applies to bookings starting on a Friday. */
|
|
25099
|
+
friday: boolean;
|
|
25100
|
+
/** @description Whether the rule applies to bookings starting on a Monday. */
|
|
25101
|
+
monday: boolean;
|
|
25102
|
+
/** @description Whether the rule applies to bookings starting on a Saturday. */
|
|
25103
|
+
saturday: boolean;
|
|
25104
|
+
/** @description Whether the rule applies to bookings starting on a Sunday. */
|
|
25105
|
+
sunday: boolean;
|
|
25106
|
+
/** @description Whether the rule applies to bookings starting on a Thursday. */
|
|
25107
|
+
thursday: boolean;
|
|
25108
|
+
/** @description Whether the rule applies to bookings starting on a Tuesday. */
|
|
25109
|
+
tuesday: boolean;
|
|
25110
|
+
/** @description Whether the rule applies to bookings starting on a Wednesday. */
|
|
25111
|
+
wednesday: boolean;
|
|
25112
|
+
};
|
|
25113
|
+
/** @description Money prices on the selected days, kept only while money is enabled. Omit to keep the regular money tiers on them. */
|
|
25114
|
+
money?: {
|
|
25115
|
+
/** @description Stepped money pricing tiers for the selected days. */
|
|
25116
|
+
tiers: {
|
|
25117
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
25118
|
+
flatAmount: number;
|
|
25119
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
25120
|
+
from: number;
|
|
25121
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
25122
|
+
unitAmount: number;
|
|
25123
|
+
}[];
|
|
25124
|
+
};
|
|
25125
|
+
}[];
|
|
24919
25126
|
/**
|
|
24920
25127
|
* @description How long before start a booking remains refundable.
|
|
24921
25128
|
* @enum {string}
|
|
@@ -27638,44 +27845,6 @@ interface operations {
|
|
|
27638
27845
|
};
|
|
27639
27846
|
};
|
|
27640
27847
|
};
|
|
27641
|
-
getInvoiceItems: {
|
|
27642
|
-
parameters: {
|
|
27643
|
-
query?: never;
|
|
27644
|
-
header?: {
|
|
27645
|
-
/** @description The id of the network. Required when using bearer token authentication */
|
|
27646
|
-
"spacebring-network-id"?: string;
|
|
27647
|
-
};
|
|
27648
|
-
path: {
|
|
27649
|
-
/** @description The id of an invoice. */
|
|
27650
|
-
invoiceId: string;
|
|
27651
|
-
};
|
|
27652
|
-
cookie?: never;
|
|
27653
|
-
};
|
|
27654
|
-
requestBody?: never;
|
|
27655
|
-
responses: {
|
|
27656
|
-
/** @description OK */
|
|
27657
|
-
200: {
|
|
27658
|
-
headers: {
|
|
27659
|
-
[name: string]: unknown;
|
|
27660
|
-
};
|
|
27661
|
-
content: {
|
|
27662
|
-
"application/json": {
|
|
27663
|
-
invoice?: components["schemas"]["invoice"];
|
|
27664
|
-
invoiceItems?: components["schemas"]["invoiceItem"][];
|
|
27665
|
-
};
|
|
27666
|
-
};
|
|
27667
|
-
};
|
|
27668
|
-
/** @description Bad Request */
|
|
27669
|
-
400: {
|
|
27670
|
-
headers: {
|
|
27671
|
-
[name: string]: unknown;
|
|
27672
|
-
};
|
|
27673
|
-
content: {
|
|
27674
|
-
"application/json": components["schemas"]["responseError"];
|
|
27675
|
-
};
|
|
27676
|
-
};
|
|
27677
|
-
};
|
|
27678
|
-
};
|
|
27679
27848
|
payInvoice: {
|
|
27680
27849
|
parameters: {
|
|
27681
27850
|
query?: never;
|
|
@@ -27783,24 +27952,24 @@ interface operations {
|
|
|
27783
27952
|
listInvoiceItems: {
|
|
27784
27953
|
parameters: {
|
|
27785
27954
|
query?: {
|
|
27786
|
-
/** @description Filter
|
|
27955
|
+
/** @description Filter invoice items created on or after this date (ISO 8601). Use with createDate[lte] for a range. */
|
|
27787
27956
|
"createDate[gte]"?: string;
|
|
27788
|
-
/** @description Filter
|
|
27957
|
+
/** @description Filter invoice items created on or before this date (ISO 8601). Use with createDate[gte] for a range. */
|
|
27789
27958
|
"createDate[lte]"?: string;
|
|
27790
|
-
/** @description UUID of the customer whose
|
|
27959
|
+
/** @description UUID of the customer whose invoice items to list. */
|
|
27791
27960
|
customerRef?: string;
|
|
27792
|
-
/** @description Filter invoices issued on or after this date (ISO 8601). Use with issueDate[lte] for a range. */
|
|
27961
|
+
/** @description Filter invoice items on invoices issued on or after this date (ISO 8601). Items not on an issued invoice are excluded. Use with issueDate[lte] for a range. */
|
|
27793
27962
|
"issueDate[gte]"?: string;
|
|
27794
|
-
/** @description Filter invoices issued on or before this date (ISO 8601). Use with issueDate[gte] for a range. */
|
|
27963
|
+
/** @description Filter invoice items on invoices issued on or before this date (ISO 8601). Items not on an issued invoice are excluded. Use with issueDate[gte] for a range. */
|
|
27795
27964
|
"issueDate[lte]"?: string;
|
|
27796
|
-
/** @description Maximum number of
|
|
27965
|
+
/** @description Maximum number of invoice items per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
|
|
27797
27966
|
limit?: number;
|
|
27798
|
-
/** @description UUID of the location whose
|
|
27967
|
+
/** @description UUID of the location whose invoice items to list. */
|
|
27799
27968
|
locationRef?: string;
|
|
27800
27969
|
/** @description Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
|
|
27801
27970
|
nextPageToken?: string;
|
|
27802
27971
|
/**
|
|
27803
|
-
* @description Filter by invoice
|
|
27972
|
+
* @description Filter by the status of the invoice the item is on. Items not on an invoice are excluded. Comma-separated values, e.g. `draft,issued`.
|
|
27804
27973
|
*
|
|
27805
27974
|
* Supported values:
|
|
27806
27975
|
* - **draft** — created but not sent
|
|
@@ -27809,6 +27978,8 @@ interface operations {
|
|
|
27809
27978
|
* - **voided** — cancelled and no longer valid
|
|
27810
27979
|
*/
|
|
27811
27980
|
status?: string;
|
|
27981
|
+
/** @description UUID of the invoice whose items to list, in place of customerRef or locationRef or with them. Pages and sorts like the rest of the list, and the other filters still apply. */
|
|
27982
|
+
invoiceRef?: string;
|
|
27812
27983
|
/** @description Filter by whether the item is pending: not on an invoice and not part of a subscription. Pass true or false. */
|
|
27813
27984
|
pending?: "true" | "false";
|
|
27814
27985
|
/** @description Filter by invoice item type. Comma-separated values, e.g. `custom,order`. */
|
|
@@ -34661,6 +34832,8 @@ interface operations {
|
|
|
34661
34832
|
locationRef: string;
|
|
34662
34833
|
/** @description The id of the user, host of the visit. */
|
|
34663
34834
|
userRefHost?: string;
|
|
34835
|
+
/** @description The id of the user, visitor of the visit. */
|
|
34836
|
+
userRefVisitor?: string;
|
|
34664
34837
|
/** @description The date filter of items. */
|
|
34665
34838
|
createDate?: {
|
|
34666
34839
|
/**
|
|
@@ -34970,6 +35143,8 @@ interface GetVisitsQuery {
|
|
|
34970
35143
|
locationRef: string;
|
|
34971
35144
|
/** The id of the user, host of the visit. */
|
|
34972
35145
|
userRefHost?: string;
|
|
35146
|
+
/** The id of the user, visitor of the visit. */
|
|
35147
|
+
userRefVisitor?: string;
|
|
34973
35148
|
/** The date filter of items. */
|
|
34974
35149
|
createDate?: {
|
|
34975
35150
|
lte?: string;
|
|
@@ -35778,23 +35953,23 @@ interface GetUpcomingInvoiceQuery {
|
|
|
35778
35953
|
}
|
|
35779
35954
|
/** Query parameters for `sb.billing.invoices.items.list()`. */
|
|
35780
35955
|
interface ListInvoiceItemsQuery {
|
|
35781
|
-
/** Filter
|
|
35956
|
+
/** Filter invoice items created on or after this date (ISO 8601). Use with createDate[lte] for a range. */
|
|
35782
35957
|
"createDate[gte]"?: string;
|
|
35783
|
-
/** Filter
|
|
35958
|
+
/** Filter invoice items created on or before this date (ISO 8601). Use with createDate[gte] for a range. */
|
|
35784
35959
|
"createDate[lte]"?: string;
|
|
35785
|
-
/** UUID of the customer whose
|
|
35960
|
+
/** UUID of the customer whose invoice items to list. */
|
|
35786
35961
|
customerRef?: string;
|
|
35787
|
-
/** Filter invoices issued on or after this date (ISO 8601). Use with issueDate[lte] for a range. */
|
|
35962
|
+
/** Filter invoice items on invoices issued on or after this date (ISO 8601). Items not on an issued invoice are excluded. Use with issueDate[lte] for a range. */
|
|
35788
35963
|
"issueDate[gte]"?: string;
|
|
35789
|
-
/** Filter invoices issued on or before this date (ISO 8601). Use with issueDate[gte] for a range. */
|
|
35964
|
+
/** Filter invoice items on invoices issued on or before this date (ISO 8601). Items not on an issued invoice are excluded. Use with issueDate[gte] for a range. */
|
|
35790
35965
|
"issueDate[lte]"?: string;
|
|
35791
|
-
/** Maximum number of
|
|
35966
|
+
/** Maximum number of invoice items per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
|
|
35792
35967
|
limit?: number;
|
|
35793
|
-
/** UUID of the location whose
|
|
35968
|
+
/** UUID of the location whose invoice items to list. */
|
|
35794
35969
|
locationRef?: string;
|
|
35795
35970
|
/** Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
|
|
35796
35971
|
nextPageToken?: string;
|
|
35797
|
-
/** Filter by invoice
|
|
35972
|
+
/** Filter by the status of the invoice the item is on. Items not on an invoice are excluded. Comma-separated values, e.g. `draft,issued`.
|
|
35798
35973
|
|
|
35799
35974
|
Supported values:
|
|
35800
35975
|
- **draft** — created but not sent
|
|
@@ -35802,6 +35977,8 @@ interface ListInvoiceItemsQuery {
|
|
|
35802
35977
|
- **paid** — fully paid
|
|
35803
35978
|
- **voided** — cancelled and no longer valid */
|
|
35804
35979
|
status?: string;
|
|
35980
|
+
/** UUID of the invoice whose items to list, in place of customerRef or locationRef or with them. Pages and sorts like the rest of the list, and the other filters still apply. */
|
|
35981
|
+
invoiceRef?: string;
|
|
35805
35982
|
/** Filter by whether the item is pending: not on an invoice and not part of a subscription. Pass true or false. */
|
|
35806
35983
|
pending?: "true" | "false";
|
|
35807
35984
|
/** Filter by invoice item type. Comma-separated values, e.g. `custom,order`. */
|
|
@@ -35970,10 +36147,6 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
35970
36147
|
delete(invoiceId: string, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
35971
36148
|
cancelPayment(invoiceId: string, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
35972
36149
|
duplicate(invoiceId: string, options?: SpacebringRequestOptions): Promise<Invoice>;
|
|
35973
|
-
getItems(invoiceId: string, options?: SpacebringRequestOptions): Promise<{
|
|
35974
|
-
invoice?: Invoice;
|
|
35975
|
-
invoiceItems?: InvoiceItem[];
|
|
35976
|
-
}>;
|
|
35977
36150
|
getUpcoming(query?: GetUpcomingInvoiceQuery, options?: SpacebringRequestOptions): Promise<{
|
|
35978
36151
|
invoice?: Invoice;
|
|
35979
36152
|
invoiceItems?: InvoiceItem[];
|
package/dist/index.js
CHANGED
|
@@ -895,17 +895,6 @@ function createBilling(client, defaults) {
|
|
|
895
895
|
async duplicate(invoiceId, options) {
|
|
896
896
|
return unwrapProp(await client.POST("/billing/invoices/v1/{invoiceId}/duplicate", { params: { path: { invoiceId } }, signal: options?.signal }), "invoice", "POST /billing/invoices/v1/{invoiceId}/duplicate");
|
|
897
897
|
},
|
|
898
|
-
/**
|
|
899
|
-
* List invoice items
|
|
900
|
-
*
|
|
901
|
-
* List all items for a specific invoice.
|
|
902
|
-
*
|
|
903
|
-
* @param invoiceId The id of an invoice.
|
|
904
|
-
* @param options Request options (abort signal).
|
|
905
|
-
*/
|
|
906
|
-
async getItems(invoiceId, options) {
|
|
907
|
-
return unwrap(await client.GET("/billing/invoices/v1/{invoiceId}/items", { params: { path: { invoiceId } }, signal: options?.signal }), "GET /billing/invoices/v1/{invoiceId}/items");
|
|
908
|
-
},
|
|
909
898
|
/**
|
|
910
899
|
* Retrieve the upcoming invoice
|
|
911
900
|
*
|
|
@@ -964,7 +953,7 @@ function createBilling(client, defaults) {
|
|
|
964
953
|
/**
|
|
965
954
|
* List invoice items
|
|
966
955
|
*
|
|
967
|
-
* List invoice items filtered by customer, location, type, status, pending, or date range.
|
|
956
|
+
* 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.
|
|
968
957
|
*/
|
|
969
958
|
async list(query, options) {
|
|
970
959
|
return unwrap(await client.GET("/billing/invoices/v1/items", { params: { query }, signal: options?.signal }), "GET /billing/invoices/v1/items");
|
|
@@ -972,7 +961,7 @@ function createBilling(client, defaults) {
|
|
|
972
961
|
/**
|
|
973
962
|
* List invoice items — iterates every item across all pages.
|
|
974
963
|
*
|
|
975
|
-
* List invoice items filtered by customer, location, type, status, pending, or date range.
|
|
964
|
+
* 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.
|
|
976
965
|
*/
|
|
977
966
|
iterate(query, options) {
|
|
978
967
|
return paginate(
|
|
@@ -1022,7 +1011,13 @@ function createBilling(client, defaults) {
|
|
|
1022
1011
|
async delete(id, options) {
|
|
1023
1012
|
return unwrap(await client.DELETE("/billing/invoices/v1/items/{id}", { params: { path: { id } }, signal: options?.signal }), "DELETE /billing/invoices/v1/items/{id}");
|
|
1024
1013
|
},
|
|
1025
|
-
/**
|
|
1014
|
+
/**
|
|
1015
|
+
* List upcoming invoice items
|
|
1016
|
+
*
|
|
1017
|
+
* List a customer's pending invoice items. Deprecated: use List invoice items with `pending=true` and `customerRef` instead.
|
|
1018
|
+
*
|
|
1019
|
+
* @deprecated Marked as deprecated in the OpenAPI spec.
|
|
1020
|
+
*/
|
|
1026
1021
|
async getUpcoming(query, options) {
|
|
1027
1022
|
return unwrapProp(await client.GET("/billing/invoices/v1/items/upcoming", { params: { query }, signal: options?.signal }), "invoiceItems", "GET /billing/invoices/v1/items/upcoming");
|
|
1028
1023
|
}
|