@izak0s/spacebring-api 10.5.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 +1 -1
- package/dist/index.cjs +9 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +298 -81
- package/dist/index.d.ts +298 -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 customer, location, type, status, or date range.
|
|
691
|
+
* @description 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. <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. */
|
|
@@ -9888,6 +9879,18 @@ interface components {
|
|
|
9888
9879
|
* @enum {string}
|
|
9889
9880
|
*/
|
|
9890
9881
|
bookingUnit: "hour" | "day";
|
|
9882
|
+
/** @description How soon and how far ahead users can book this resource. While enabled is false, the resource follows the booking window its location sets for the resource type. */
|
|
9883
|
+
bookingWindow: {
|
|
9884
|
+
/**
|
|
9885
|
+
* @description How far ahead users can book the resource.
|
|
9886
|
+
* @enum {string}
|
|
9887
|
+
*/
|
|
9888
|
+
bookAhead?: "oneDay" | "twoDays" | "oneWeek" | "twoWeeks" | "oneMonth" | "threeMonths" | "sixMonths" | "oneYear" | "unlimited";
|
|
9889
|
+
/** @description Whether the resource uses this booking window instead of the one its location sets for the resource type. */
|
|
9890
|
+
enabled: boolean;
|
|
9891
|
+
/** @description How many minutes before it starts a booking of the resource has to be made. */
|
|
9892
|
+
minNotice?: number;
|
|
9893
|
+
};
|
|
9891
9894
|
/** @description Brivo access group reference. */
|
|
9892
9895
|
brivoGroupRef?: number | null;
|
|
9893
9896
|
/**
|
|
@@ -10266,6 +10269,60 @@ interface components {
|
|
|
10266
10269
|
* @enum {string}
|
|
10267
10270
|
*/
|
|
10268
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
|
+
}[];
|
|
10269
10326
|
/**
|
|
10270
10327
|
* @description Refund threshold for cancellations.
|
|
10271
10328
|
* @enum {string}
|
|
@@ -10519,6 +10576,18 @@ interface components {
|
|
|
10519
10576
|
* @enum {string}
|
|
10520
10577
|
*/
|
|
10521
10578
|
bookingUnit: "hour" | "day";
|
|
10579
|
+
/** @description How soon and how far ahead users can book this resource. While enabled is false, the resource follows the booking window its location sets for the resource type. */
|
|
10580
|
+
bookingWindow: {
|
|
10581
|
+
/**
|
|
10582
|
+
* @description How far ahead users can book the resource.
|
|
10583
|
+
* @enum {string}
|
|
10584
|
+
*/
|
|
10585
|
+
bookAhead?: "oneDay" | "twoDays" | "oneWeek" | "twoWeeks" | "oneMonth" | "threeMonths" | "sixMonths" | "oneYear" | "unlimited";
|
|
10586
|
+
/** @description Whether the resource uses this booking window instead of the one its location sets for the resource type. */
|
|
10587
|
+
enabled: boolean;
|
|
10588
|
+
/** @description How many minutes before it starts a booking of the resource has to be made. */
|
|
10589
|
+
minNotice?: number;
|
|
10590
|
+
};
|
|
10522
10591
|
/** @description Brivo access group reference. */
|
|
10523
10592
|
brivoGroupRef?: number | null;
|
|
10524
10593
|
/**
|
|
@@ -10897,6 +10966,60 @@ interface components {
|
|
|
10897
10966
|
* @enum {string}
|
|
10898
10967
|
*/
|
|
10899
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
|
+
}[];
|
|
10900
11023
|
/**
|
|
10901
11024
|
* @description Refund threshold for cancellations.
|
|
10902
11025
|
* @enum {string}
|
|
@@ -11844,6 +11967,11 @@ interface components {
|
|
|
11844
11967
|
};
|
|
11845
11968
|
/** @description ID of the transaction the payment was recorded as. */
|
|
11846
11969
|
transactionRef?: string;
|
|
11970
|
+
/**
|
|
11971
|
+
* @description Whether the transaction took the `price` from the payer or gave it back, as when a booking paid with credits or day passes is shortened. `price` is always positive, so a `refund` subtracts from what the booking cost.
|
|
11972
|
+
* @enum {string}
|
|
11973
|
+
*/
|
|
11974
|
+
transactionType?: "charge" | "refund";
|
|
11847
11975
|
/** @description Shorthand for the payment method: the gateway slug for `paymentGateway` payments, otherwise `method.type`. */
|
|
11848
11976
|
type?: string;
|
|
11849
11977
|
};
|
|
@@ -12269,6 +12397,11 @@ interface components {
|
|
|
12269
12397
|
};
|
|
12270
12398
|
/** @description ID of the transaction the payment was recorded as. */
|
|
12271
12399
|
transactionRef?: string;
|
|
12400
|
+
/**
|
|
12401
|
+
* @description Whether the transaction took the `price` from the payer or gave it back, as when a booking paid with credits or day passes is shortened. `price` is always positive, so a `refund` subtracts from what the booking cost.
|
|
12402
|
+
* @enum {string}
|
|
12403
|
+
*/
|
|
12404
|
+
transactionType?: "charge" | "refund";
|
|
12272
12405
|
/** @description Shorthand for the payment method: the gateway slug for `paymentGateway` payments, otherwise `method.type`. */
|
|
12273
12406
|
type?: string;
|
|
12274
12407
|
}[];
|
|
@@ -12906,6 +13039,11 @@ interface components {
|
|
|
12906
13039
|
};
|
|
12907
13040
|
/** @description ID of the transaction the payment was recorded as. */
|
|
12908
13041
|
transactionRef?: string;
|
|
13042
|
+
/**
|
|
13043
|
+
* @description Whether the transaction took the `price` from the payer or gave it back, as when a booking paid with credits or day passes is shortened. `price` is always positive, so a `refund` subtracts from what the booking cost.
|
|
13044
|
+
* @enum {string}
|
|
13045
|
+
*/
|
|
13046
|
+
transactionType?: "charge" | "refund";
|
|
12909
13047
|
/** @description Shorthand for the payment method: the gateway slug for `paymentGateway` payments, otherwise `method.type`. */
|
|
12910
13048
|
type?: string;
|
|
12911
13049
|
};
|
|
@@ -13331,6 +13469,11 @@ interface components {
|
|
|
13331
13469
|
};
|
|
13332
13470
|
/** @description ID of the transaction the payment was recorded as. */
|
|
13333
13471
|
transactionRef?: string;
|
|
13472
|
+
/**
|
|
13473
|
+
* @description Whether the transaction took the `price` from the payer or gave it back, as when a booking paid with credits or day passes is shortened. `price` is always positive, so a `refund` subtracts from what the booking cost.
|
|
13474
|
+
* @enum {string}
|
|
13475
|
+
*/
|
|
13476
|
+
transactionType?: "charge" | "refund";
|
|
13334
13477
|
/** @description Shorthand for the payment method: the gateway slug for `paymentGateway` payments, otherwise `method.type`. */
|
|
13335
13478
|
type?: string;
|
|
13336
13479
|
}[];
|
|
@@ -24192,6 +24335,18 @@ interface components {
|
|
|
24192
24335
|
* @enum {string}
|
|
24193
24336
|
*/
|
|
24194
24337
|
bookingUnit?: "hour" | "day";
|
|
24338
|
+
/** @description How soon and how far ahead users can book this resource. While enabled is false, the resource follows the booking window its location sets for the resource type and keeps its own values for when it is enabled again. Administrators are not limited by either. */
|
|
24339
|
+
bookingWindow?: {
|
|
24340
|
+
/**
|
|
24341
|
+
* @description How far ahead users can book the resource, the same values the location takes. Required while enabled is true.
|
|
24342
|
+
* @enum {string}
|
|
24343
|
+
*/
|
|
24344
|
+
bookAhead?: "oneDay" | "twoDays" | "oneWeek" | "twoWeeks" | "oneMonth" | "threeMonths" | "sixMonths" | "oneYear" | "unlimited";
|
|
24345
|
+
/** @description Whether the resource uses this booking window instead of the one its location sets for the resource type. */
|
|
24346
|
+
enabled: boolean;
|
|
24347
|
+
/** @description How many minutes before it starts a booking of the resource has to be made, up to 30 days. 0 accepts bookings up to the start time. Required while enabled is true. */
|
|
24348
|
+
minNotice?: number;
|
|
24349
|
+
};
|
|
24195
24350
|
/** @description Brivo access group reference. */
|
|
24196
24351
|
brivoGroupRef?: number | null;
|
|
24197
24352
|
/**
|
|
@@ -24421,6 +24576,50 @@ interface components {
|
|
|
24421
24576
|
* @enum {string}
|
|
24422
24577
|
*/
|
|
24423
24578
|
preparationMinutes?: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
|
|
24579
|
+
/** @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. */
|
|
24580
|
+
pricingRules?: {
|
|
24581
|
+
/** @description Credit prices on the selected days, kept only while credits are enabled. Omit to keep the regular credit tiers on them. */
|
|
24582
|
+
credits?: {
|
|
24583
|
+
/** @description Stepped credit pricing tiers for the selected days. */
|
|
24584
|
+
tiers: {
|
|
24585
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
24586
|
+
flatAmount: number;
|
|
24587
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
24588
|
+
from: number;
|
|
24589
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
24590
|
+
unitAmount: number;
|
|
24591
|
+
}[];
|
|
24592
|
+
};
|
|
24593
|
+
/** @description Weekdays, in the location's time zone, on which a booking that starts gets these prices. Select at least one day. */
|
|
24594
|
+
days: {
|
|
24595
|
+
/** @description Whether the rule applies to bookings starting on a Friday. */
|
|
24596
|
+
friday: boolean;
|
|
24597
|
+
/** @description Whether the rule applies to bookings starting on a Monday. */
|
|
24598
|
+
monday: boolean;
|
|
24599
|
+
/** @description Whether the rule applies to bookings starting on a Saturday. */
|
|
24600
|
+
saturday: boolean;
|
|
24601
|
+
/** @description Whether the rule applies to bookings starting on a Sunday. */
|
|
24602
|
+
sunday: boolean;
|
|
24603
|
+
/** @description Whether the rule applies to bookings starting on a Thursday. */
|
|
24604
|
+
thursday: boolean;
|
|
24605
|
+
/** @description Whether the rule applies to bookings starting on a Tuesday. */
|
|
24606
|
+
tuesday: boolean;
|
|
24607
|
+
/** @description Whether the rule applies to bookings starting on a Wednesday. */
|
|
24608
|
+
wednesday: boolean;
|
|
24609
|
+
};
|
|
24610
|
+
/** @description Money prices on the selected days, kept only while money is enabled. Omit to keep the regular money tiers on them. */
|
|
24611
|
+
money?: {
|
|
24612
|
+
/** @description Stepped money pricing tiers for the selected days. */
|
|
24613
|
+
tiers: {
|
|
24614
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
24615
|
+
flatAmount: number;
|
|
24616
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
24617
|
+
from: number;
|
|
24618
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
24619
|
+
unitAmount: number;
|
|
24620
|
+
}[];
|
|
24621
|
+
};
|
|
24622
|
+
}[];
|
|
24424
24623
|
/**
|
|
24425
24624
|
* @description How long before start a booking remains refundable.
|
|
24426
24625
|
* @enum {string}
|
|
@@ -24629,6 +24828,18 @@ interface components {
|
|
|
24629
24828
|
* @enum {string}
|
|
24630
24829
|
*/
|
|
24631
24830
|
bookingUnit?: "hour" | "day";
|
|
24831
|
+
/** @description How soon and how far ahead users can book this resource. While enabled is false, the resource follows the booking window its location sets for the resource type and keeps its own values for when it is enabled again. Administrators are not limited by either. */
|
|
24832
|
+
bookingWindow?: {
|
|
24833
|
+
/**
|
|
24834
|
+
* @description How far ahead users can book the resource, the same values the location takes. Required while enabled is true.
|
|
24835
|
+
* @enum {string}
|
|
24836
|
+
*/
|
|
24837
|
+
bookAhead?: "oneDay" | "twoDays" | "oneWeek" | "twoWeeks" | "oneMonth" | "threeMonths" | "sixMonths" | "oneYear" | "unlimited";
|
|
24838
|
+
/** @description Whether the resource uses this booking window instead of the one its location sets for the resource type. */
|
|
24839
|
+
enabled: boolean;
|
|
24840
|
+
/** @description How many minutes before it starts a booking of the resource has to be made, up to 30 days. 0 accepts bookings up to the start time. Required while enabled is true. */
|
|
24841
|
+
minNotice?: number;
|
|
24842
|
+
};
|
|
24632
24843
|
/** @description Brivo access group reference. */
|
|
24633
24844
|
brivoGroupRef?: number | null;
|
|
24634
24845
|
/**
|
|
@@ -24848,6 +25059,50 @@ interface components {
|
|
|
24848
25059
|
* @enum {string}
|
|
24849
25060
|
*/
|
|
24850
25061
|
preparationMinutes?: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
|
|
25062
|
+
/** @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. */
|
|
25063
|
+
pricingRules?: {
|
|
25064
|
+
/** @description Credit prices on the selected days, kept only while credits are enabled. Omit to keep the regular credit tiers on them. */
|
|
25065
|
+
credits?: {
|
|
25066
|
+
/** @description Stepped credit pricing tiers for the selected days. */
|
|
25067
|
+
tiers: {
|
|
25068
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
25069
|
+
flatAmount: number;
|
|
25070
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
25071
|
+
from: number;
|
|
25072
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
25073
|
+
unitAmount: number;
|
|
25074
|
+
}[];
|
|
25075
|
+
};
|
|
25076
|
+
/** @description Weekdays, in the location's time zone, on which a booking that starts gets these prices. Select at least one day. */
|
|
25077
|
+
days: {
|
|
25078
|
+
/** @description Whether the rule applies to bookings starting on a Friday. */
|
|
25079
|
+
friday: boolean;
|
|
25080
|
+
/** @description Whether the rule applies to bookings starting on a Monday. */
|
|
25081
|
+
monday: boolean;
|
|
25082
|
+
/** @description Whether the rule applies to bookings starting on a Saturday. */
|
|
25083
|
+
saturday: boolean;
|
|
25084
|
+
/** @description Whether the rule applies to bookings starting on a Sunday. */
|
|
25085
|
+
sunday: boolean;
|
|
25086
|
+
/** @description Whether the rule applies to bookings starting on a Thursday. */
|
|
25087
|
+
thursday: boolean;
|
|
25088
|
+
/** @description Whether the rule applies to bookings starting on a Tuesday. */
|
|
25089
|
+
tuesday: boolean;
|
|
25090
|
+
/** @description Whether the rule applies to bookings starting on a Wednesday. */
|
|
25091
|
+
wednesday: boolean;
|
|
25092
|
+
};
|
|
25093
|
+
/** @description Money prices on the selected days, kept only while money is enabled. Omit to keep the regular money tiers on them. */
|
|
25094
|
+
money?: {
|
|
25095
|
+
/** @description Stepped money pricing tiers for the selected days. */
|
|
25096
|
+
tiers: {
|
|
25097
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
25098
|
+
flatAmount: number;
|
|
25099
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
25100
|
+
from: number;
|
|
25101
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
25102
|
+
unitAmount: number;
|
|
25103
|
+
}[];
|
|
25104
|
+
};
|
|
25105
|
+
}[];
|
|
24851
25106
|
/**
|
|
24852
25107
|
* @description How long before start a booking remains refundable.
|
|
24853
25108
|
* @enum {string}
|
|
@@ -27570,44 +27825,6 @@ interface operations {
|
|
|
27570
27825
|
};
|
|
27571
27826
|
};
|
|
27572
27827
|
};
|
|
27573
|
-
getInvoiceItems: {
|
|
27574
|
-
parameters: {
|
|
27575
|
-
query?: never;
|
|
27576
|
-
header?: {
|
|
27577
|
-
/** @description The id of the network. Required when using bearer token authentication */
|
|
27578
|
-
"spacebring-network-id"?: string;
|
|
27579
|
-
};
|
|
27580
|
-
path: {
|
|
27581
|
-
/** @description The id of an invoice. */
|
|
27582
|
-
invoiceId: string;
|
|
27583
|
-
};
|
|
27584
|
-
cookie?: never;
|
|
27585
|
-
};
|
|
27586
|
-
requestBody?: never;
|
|
27587
|
-
responses: {
|
|
27588
|
-
/** @description OK */
|
|
27589
|
-
200: {
|
|
27590
|
-
headers: {
|
|
27591
|
-
[name: string]: unknown;
|
|
27592
|
-
};
|
|
27593
|
-
content: {
|
|
27594
|
-
"application/json": {
|
|
27595
|
-
invoice?: components["schemas"]["invoice"];
|
|
27596
|
-
invoiceItems?: components["schemas"]["invoiceItem"][];
|
|
27597
|
-
};
|
|
27598
|
-
};
|
|
27599
|
-
};
|
|
27600
|
-
/** @description Bad Request */
|
|
27601
|
-
400: {
|
|
27602
|
-
headers: {
|
|
27603
|
-
[name: string]: unknown;
|
|
27604
|
-
};
|
|
27605
|
-
content: {
|
|
27606
|
-
"application/json": components["schemas"]["responseError"];
|
|
27607
|
-
};
|
|
27608
|
-
};
|
|
27609
|
-
};
|
|
27610
|
-
};
|
|
27611
27828
|
payInvoice: {
|
|
27612
27829
|
parameters: {
|
|
27613
27830
|
query?: never;
|
|
@@ -27715,24 +27932,24 @@ interface operations {
|
|
|
27715
27932
|
listInvoiceItems: {
|
|
27716
27933
|
parameters: {
|
|
27717
27934
|
query?: {
|
|
27718
|
-
/** @description Filter
|
|
27935
|
+
/** @description Filter invoice items created on or after this date (ISO 8601). Use with createDate[lte] for a range. */
|
|
27719
27936
|
"createDate[gte]"?: string;
|
|
27720
|
-
/** @description Filter
|
|
27937
|
+
/** @description Filter invoice items created on or before this date (ISO 8601). Use with createDate[gte] for a range. */
|
|
27721
27938
|
"createDate[lte]"?: string;
|
|
27722
|
-
/** @description UUID of the customer whose
|
|
27939
|
+
/** @description UUID of the customer whose invoice items to list. */
|
|
27723
27940
|
customerRef?: string;
|
|
27724
|
-
/** @description Filter invoices issued on or after this date (ISO 8601). Use with issueDate[lte] for a range. */
|
|
27941
|
+
/** @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. */
|
|
27725
27942
|
"issueDate[gte]"?: string;
|
|
27726
|
-
/** @description Filter invoices issued on or before this date (ISO 8601). Use with issueDate[gte] for a range. */
|
|
27943
|
+
/** @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. */
|
|
27727
27944
|
"issueDate[lte]"?: string;
|
|
27728
|
-
/** @description Maximum number of
|
|
27945
|
+
/** @description Maximum number of invoice items per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
|
|
27729
27946
|
limit?: number;
|
|
27730
|
-
/** @description UUID of the location whose
|
|
27947
|
+
/** @description UUID of the location whose invoice items to list. */
|
|
27731
27948
|
locationRef?: string;
|
|
27732
27949
|
/** @description Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
|
|
27733
27950
|
nextPageToken?: string;
|
|
27734
27951
|
/**
|
|
27735
|
-
* @description Filter by invoice
|
|
27952
|
+
* @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`.
|
|
27736
27953
|
*
|
|
27737
27954
|
* Supported values:
|
|
27738
27955
|
* - **draft** — created but not sent
|
|
@@ -27741,6 +27958,8 @@ interface operations {
|
|
|
27741
27958
|
* - **voided** — cancelled and no longer valid
|
|
27742
27959
|
*/
|
|
27743
27960
|
status?: string;
|
|
27961
|
+
/** @description Filter by whether the item is pending: not on an invoice and not part of a subscription. Pass true or false. */
|
|
27962
|
+
pending?: "true" | "false";
|
|
27744
27963
|
/** @description Filter by invoice item type. Comma-separated values, e.g. `custom,order`. */
|
|
27745
27964
|
type?: string;
|
|
27746
27965
|
};
|
|
@@ -35708,23 +35927,23 @@ interface GetUpcomingInvoiceQuery {
|
|
|
35708
35927
|
}
|
|
35709
35928
|
/** Query parameters for `sb.billing.invoices.items.list()`. */
|
|
35710
35929
|
interface ListInvoiceItemsQuery {
|
|
35711
|
-
/** Filter
|
|
35930
|
+
/** Filter invoice items created on or after this date (ISO 8601). Use with createDate[lte] for a range. */
|
|
35712
35931
|
"createDate[gte]"?: string;
|
|
35713
|
-
/** Filter
|
|
35932
|
+
/** Filter invoice items created on or before this date (ISO 8601). Use with createDate[gte] for a range. */
|
|
35714
35933
|
"createDate[lte]"?: string;
|
|
35715
|
-
/** UUID of the customer whose
|
|
35934
|
+
/** UUID of the customer whose invoice items to list. */
|
|
35716
35935
|
customerRef?: string;
|
|
35717
|
-
/** Filter invoices issued on or after this date (ISO 8601). Use with issueDate[lte] for a range. */
|
|
35936
|
+
/** 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. */
|
|
35718
35937
|
"issueDate[gte]"?: string;
|
|
35719
|
-
/** Filter invoices issued on or before this date (ISO 8601). Use with issueDate[gte] for a range. */
|
|
35938
|
+
/** 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. */
|
|
35720
35939
|
"issueDate[lte]"?: string;
|
|
35721
|
-
/** Maximum number of
|
|
35940
|
+
/** Maximum number of invoice items per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
|
|
35722
35941
|
limit?: number;
|
|
35723
|
-
/** UUID of the location whose
|
|
35942
|
+
/** UUID of the location whose invoice items to list. */
|
|
35724
35943
|
locationRef?: string;
|
|
35725
35944
|
/** Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. */
|
|
35726
35945
|
nextPageToken?: string;
|
|
35727
|
-
/** Filter by invoice
|
|
35946
|
+
/** 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`.
|
|
35728
35947
|
|
|
35729
35948
|
Supported values:
|
|
35730
35949
|
- **draft** — created but not sent
|
|
@@ -35732,6 +35951,8 @@ interface ListInvoiceItemsQuery {
|
|
|
35732
35951
|
- **paid** — fully paid
|
|
35733
35952
|
- **voided** — cancelled and no longer valid */
|
|
35734
35953
|
status?: string;
|
|
35954
|
+
/** Filter by whether the item is pending: not on an invoice and not part of a subscription. Pass true or false. */
|
|
35955
|
+
pending?: "true" | "false";
|
|
35735
35956
|
/** Filter by invoice item type. Comma-separated values, e.g. `custom,order`. */
|
|
35736
35957
|
type?: string;
|
|
35737
35958
|
}
|
|
@@ -35898,10 +36119,6 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
35898
36119
|
delete(invoiceId: string, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
35899
36120
|
cancelPayment(invoiceId: string, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
35900
36121
|
duplicate(invoiceId: string, options?: SpacebringRequestOptions): Promise<Invoice>;
|
|
35901
|
-
getItems(invoiceId: string, options?: SpacebringRequestOptions): Promise<{
|
|
35902
|
-
invoice?: Invoice;
|
|
35903
|
-
invoiceItems?: InvoiceItem[];
|
|
35904
|
-
}>;
|
|
35905
36122
|
getUpcoming(query?: GetUpcomingInvoiceQuery, options?: SpacebringRequestOptions): Promise<{
|
|
35906
36123
|
invoice?: Invoice;
|
|
35907
36124
|
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 customer, location, type, status, or date range.
|
|
956
|
+
* 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.
|
|
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 customer, location, type, status, or date range.
|
|
964
|
+
* 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.
|
|
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
|
}
|