@izak0s/spacebring-api 9.4.0 → 9.6.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 +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +225 -18
- package/dist/index.d.ts +225 -18
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2048,6 +2048,26 @@ interface paths {
|
|
|
2048
2048
|
patch: operations["patchResource"];
|
|
2049
2049
|
trace?: never;
|
|
2050
2050
|
};
|
|
2051
|
+
"/resources/v1/{resourceId}/availability": {
|
|
2052
|
+
parameters: {
|
|
2053
|
+
query?: never;
|
|
2054
|
+
header?: never;
|
|
2055
|
+
path?: never;
|
|
2056
|
+
cookie?: never;
|
|
2057
|
+
};
|
|
2058
|
+
get?: never;
|
|
2059
|
+
put?: never;
|
|
2060
|
+
/**
|
|
2061
|
+
* Check resource availability
|
|
2062
|
+
* @description Check whether a resource can be booked for a slot before creating the booking. The same rules as booking creation apply: capacity, the location and resource schedule, duration limits and the booking window. When the slot is unavailable, the response carries the code the booking would fail with. <h3>OAuth</h3>Required scopes: <code>resources.readonly</code> or <code>resources</code>
|
|
2063
|
+
*/
|
|
2064
|
+
post: operations["getResourceAvailability"];
|
|
2065
|
+
delete?: never;
|
|
2066
|
+
options?: never;
|
|
2067
|
+
head?: never;
|
|
2068
|
+
patch?: never;
|
|
2069
|
+
trace?: never;
|
|
2070
|
+
};
|
|
2051
2071
|
"/resources/bookings/v1": {
|
|
2052
2072
|
parameters: {
|
|
2053
2073
|
query?: never;
|
|
@@ -3315,7 +3335,8 @@ interface components {
|
|
|
3315
3335
|
}[];
|
|
3316
3336
|
/**
|
|
3317
3337
|
* Format: uri
|
|
3318
|
-
* @
|
|
3338
|
+
* @deprecated
|
|
3339
|
+
* @description Deprecated: use media[0].url instead.
|
|
3319
3340
|
*/
|
|
3320
3341
|
mediaUrl?: string | null;
|
|
3321
3342
|
/** @description Short tagline of the benefit. */
|
|
@@ -3412,7 +3433,8 @@ interface components {
|
|
|
3412
3433
|
}[];
|
|
3413
3434
|
/**
|
|
3414
3435
|
* Format: uri
|
|
3415
|
-
* @
|
|
3436
|
+
* @deprecated
|
|
3437
|
+
* @description Deprecated: use media[0].url instead.
|
|
3416
3438
|
*/
|
|
3417
3439
|
mediaUrl?: string | null;
|
|
3418
3440
|
/** @description Short tagline of the benefit. */
|
|
@@ -3506,7 +3528,8 @@ interface components {
|
|
|
3506
3528
|
}[];
|
|
3507
3529
|
/**
|
|
3508
3530
|
* Format: uri
|
|
3509
|
-
* @
|
|
3531
|
+
* @deprecated
|
|
3532
|
+
* @description Deprecated: use media[0].url instead.
|
|
3510
3533
|
*/
|
|
3511
3534
|
mediaUrl?: string | null;
|
|
3512
3535
|
/** @description Short tagline of the benefit. */
|
|
@@ -3789,7 +3812,7 @@ interface components {
|
|
|
3789
3812
|
payments: {
|
|
3790
3813
|
/**
|
|
3791
3814
|
* Format: date-time
|
|
3792
|
-
* @description ISO timestamp of the payment.
|
|
3815
|
+
* @description ISO timestamp of when the payment was recorded.
|
|
3793
3816
|
*/
|
|
3794
3817
|
createDate: string;
|
|
3795
3818
|
/** @description Payment dispute details. */
|
|
@@ -3821,6 +3844,11 @@ interface components {
|
|
|
3821
3844
|
*/
|
|
3822
3845
|
type: "external" | "paymentGateway";
|
|
3823
3846
|
};
|
|
3847
|
+
/**
|
|
3848
|
+
* Format: date-time
|
|
3849
|
+
* @description ISO timestamp of when the money was received. Absent until the payment succeeds. A payment gateway sets it when it approves the payment; an external payment takes the date the administrator recorded, defaulting to when they recorded it.
|
|
3850
|
+
*/
|
|
3851
|
+
paymentDate?: string;
|
|
3824
3852
|
/** @description Payment price details. */
|
|
3825
3853
|
price: {
|
|
3826
3854
|
money: {
|
|
@@ -3873,7 +3901,7 @@ interface components {
|
|
|
3873
3901
|
*/
|
|
3874
3902
|
transactionRef: string;
|
|
3875
3903
|
}[];
|
|
3876
|
-
/** @description URL to download the invoice PDF (issued invoices only). */
|
|
3904
|
+
/** @description URL to download the invoice PDF (issued invoices only). The link is replaced by a new one 180 days after the invoice was issued and every 180 days after that; the one it replaced keeps working for 10 more days and then stops. Fetch the invoice again for the current link. */
|
|
3877
3905
|
pdfUrl?: string;
|
|
3878
3906
|
/** @description Whether this invoice was created post-payment. */
|
|
3879
3907
|
postPaymentCreation: boolean;
|
|
@@ -3891,7 +3919,7 @@ interface components {
|
|
|
3891
3919
|
prePaymentCreditAmount?: number;
|
|
3892
3920
|
/** @description Pre-payment credit notes amount in major units. */
|
|
3893
3921
|
prePaymentCreditNotesAmount: number;
|
|
3894
|
-
/** @description URL to download the receipt PDF (paid invoices only). */
|
|
3922
|
+
/** @description URL to download the receipt PDF (paid invoices only). The link is replaced by a new one 180 days after the invoice was issued and every 180 days after that; the one it replaced keeps working for 10 more days and then stops. Fetch the invoice again for the current link. */
|
|
3895
3923
|
receiptPdfUrl?: string;
|
|
3896
3924
|
/** @description Customer balance at draft creation. */
|
|
3897
3925
|
startingBalance?: number;
|
|
@@ -4186,7 +4214,7 @@ interface components {
|
|
|
4186
4214
|
payments: {
|
|
4187
4215
|
/**
|
|
4188
4216
|
* Format: date-time
|
|
4189
|
-
* @description ISO timestamp of the payment.
|
|
4217
|
+
* @description ISO timestamp of when the payment was recorded.
|
|
4190
4218
|
*/
|
|
4191
4219
|
createDate: string;
|
|
4192
4220
|
/** @description Payment dispute details. */
|
|
@@ -4218,6 +4246,11 @@ interface components {
|
|
|
4218
4246
|
*/
|
|
4219
4247
|
type: "external" | "paymentGateway";
|
|
4220
4248
|
};
|
|
4249
|
+
/**
|
|
4250
|
+
* Format: date-time
|
|
4251
|
+
* @description ISO timestamp of when the money was received. Absent until the payment succeeds. A payment gateway sets it when it approves the payment; an external payment takes the date the administrator recorded, defaulting to when they recorded it.
|
|
4252
|
+
*/
|
|
4253
|
+
paymentDate?: string;
|
|
4221
4254
|
/** @description Payment price details. */
|
|
4222
4255
|
price: {
|
|
4223
4256
|
money: {
|
|
@@ -4270,7 +4303,7 @@ interface components {
|
|
|
4270
4303
|
*/
|
|
4271
4304
|
transactionRef: string;
|
|
4272
4305
|
}[];
|
|
4273
|
-
/** @description URL to download the invoice PDF (issued invoices only). */
|
|
4306
|
+
/** @description URL to download the invoice PDF (issued invoices only). The link is replaced by a new one 180 days after the invoice was issued and every 180 days after that; the one it replaced keeps working for 10 more days and then stops. Fetch the invoice again for the current link. */
|
|
4274
4307
|
pdfUrl?: string;
|
|
4275
4308
|
/** @description Whether this invoice was created post-payment. */
|
|
4276
4309
|
postPaymentCreation: boolean;
|
|
@@ -4288,7 +4321,7 @@ interface components {
|
|
|
4288
4321
|
prePaymentCreditAmount?: number;
|
|
4289
4322
|
/** @description Pre-payment credit notes amount in major units. */
|
|
4290
4323
|
prePaymentCreditNotesAmount: number;
|
|
4291
|
-
/** @description URL to download the receipt PDF (paid invoices only). */
|
|
4324
|
+
/** @description URL to download the receipt PDF (paid invoices only). The link is replaced by a new one 180 days after the invoice was issued and every 180 days after that; the one it replaced keeps working for 10 more days and then stops. Fetch the invoice again for the current link. */
|
|
4292
4325
|
receiptPdfUrl?: string;
|
|
4293
4326
|
/** @description Customer balance at draft creation. */
|
|
4294
4327
|
startingBalance?: number;
|
|
@@ -4580,7 +4613,7 @@ interface components {
|
|
|
4580
4613
|
payments: {
|
|
4581
4614
|
/**
|
|
4582
4615
|
* Format: date-time
|
|
4583
|
-
* @description ISO timestamp of the payment.
|
|
4616
|
+
* @description ISO timestamp of when the payment was recorded.
|
|
4584
4617
|
*/
|
|
4585
4618
|
createDate: string;
|
|
4586
4619
|
/** @description Payment dispute details. */
|
|
@@ -4612,6 +4645,11 @@ interface components {
|
|
|
4612
4645
|
*/
|
|
4613
4646
|
type: "external" | "paymentGateway";
|
|
4614
4647
|
};
|
|
4648
|
+
/**
|
|
4649
|
+
* Format: date-time
|
|
4650
|
+
* @description ISO timestamp of when the money was received. Absent until the payment succeeds. A payment gateway sets it when it approves the payment; an external payment takes the date the administrator recorded, defaulting to when they recorded it.
|
|
4651
|
+
*/
|
|
4652
|
+
paymentDate?: string;
|
|
4615
4653
|
/** @description Payment price details. */
|
|
4616
4654
|
price: {
|
|
4617
4655
|
money: {
|
|
@@ -4664,7 +4702,7 @@ interface components {
|
|
|
4664
4702
|
*/
|
|
4665
4703
|
transactionRef: string;
|
|
4666
4704
|
}[];
|
|
4667
|
-
/** @description URL to download the invoice PDF (issued invoices only). */
|
|
4705
|
+
/** @description URL to download the invoice PDF (issued invoices only). The link is replaced by a new one 180 days after the invoice was issued and every 180 days after that; the one it replaced keeps working for 10 more days and then stops. Fetch the invoice again for the current link. */
|
|
4668
4706
|
pdfUrl?: string;
|
|
4669
4707
|
/** @description Whether this invoice was created post-payment. */
|
|
4670
4708
|
postPaymentCreation: boolean;
|
|
@@ -4682,7 +4720,7 @@ interface components {
|
|
|
4682
4720
|
prePaymentCreditAmount?: number;
|
|
4683
4721
|
/** @description Pre-payment credit notes amount in major units. */
|
|
4684
4722
|
prePaymentCreditNotesAmount: number;
|
|
4685
|
-
/** @description URL to download the receipt PDF (paid invoices only). */
|
|
4723
|
+
/** @description URL to download the receipt PDF (paid invoices only). The link is replaced by a new one 180 days after the invoice was issued and every 180 days after that; the one it replaced keeps working for 10 more days and then stops. Fetch the invoice again for the current link. */
|
|
4686
4724
|
receiptPdfUrl?: string;
|
|
4687
4725
|
/** @description Customer balance at draft creation. */
|
|
4688
4726
|
startingBalance?: number;
|
|
@@ -5031,7 +5069,7 @@ interface components {
|
|
|
5031
5069
|
invoicePayment: {
|
|
5032
5070
|
/**
|
|
5033
5071
|
* Format: date-time
|
|
5034
|
-
* @description ISO timestamp of the payment.
|
|
5072
|
+
* @description ISO timestamp of when the payment was recorded.
|
|
5035
5073
|
*/
|
|
5036
5074
|
createDate: string;
|
|
5037
5075
|
/** @description Payment dispute details. */
|
|
@@ -5063,6 +5101,11 @@ interface components {
|
|
|
5063
5101
|
*/
|
|
5064
5102
|
type: "external" | "paymentGateway";
|
|
5065
5103
|
};
|
|
5104
|
+
/**
|
|
5105
|
+
* Format: date-time
|
|
5106
|
+
* @description ISO timestamp of when the money was received. Absent until the payment succeeds. A payment gateway sets it when it approves the payment; an external payment takes the date the administrator recorded, defaulting to when they recorded it.
|
|
5107
|
+
*/
|
|
5108
|
+
paymentDate?: string;
|
|
5066
5109
|
/** @description Payment price details. */
|
|
5067
5110
|
price: {
|
|
5068
5111
|
money: {
|
|
@@ -5628,7 +5671,7 @@ interface components {
|
|
|
5628
5671
|
number?: number;
|
|
5629
5672
|
/** @description Out-of-band refund amount in major units. */
|
|
5630
5673
|
outOfBandAmount?: number;
|
|
5631
|
-
/** @description URL to download the credit note PDF. */
|
|
5674
|
+
/** @description URL to download the credit note PDF. The link is replaced by a new one 180 days after the credit note was created and every 180 days after that; the one it replaced keeps working for 10 more days and then stops. Fetch the credit note again for the current link. */
|
|
5632
5675
|
pdfUrl: string;
|
|
5633
5676
|
/** @description Post-payment credit amount in major units. */
|
|
5634
5677
|
postPaymentAmount: number;
|
|
@@ -5955,7 +5998,7 @@ interface components {
|
|
|
5955
5998
|
number?: number;
|
|
5956
5999
|
/** @description Out-of-band refund amount in major units. */
|
|
5957
6000
|
outOfBandAmount?: number;
|
|
5958
|
-
/** @description URL to download the credit note PDF. */
|
|
6001
|
+
/** @description URL to download the credit note PDF. The link is replaced by a new one 180 days after the credit note was created and every 180 days after that; the one it replaced keeps working for 10 more days and then stops. Fetch the credit note again for the current link. */
|
|
5959
6002
|
pdfUrl: string;
|
|
5960
6003
|
/** @description Post-payment credit amount in major units. */
|
|
5961
6004
|
postPaymentAmount: number;
|
|
@@ -7096,6 +7139,8 @@ interface components {
|
|
|
7096
7139
|
checkInRef?: string;
|
|
7097
7140
|
/** @description Six-digit code the attendee enters on the Reception app to check in. Visible to the ticket owner and admins when check-in is enabled for the event. */
|
|
7098
7141
|
code?: string;
|
|
7142
|
+
/** @description Note the attendee left when purchasing the ticket. Visible to the ticket owner and location admins only. */
|
|
7143
|
+
comment?: string;
|
|
7099
7144
|
/**
|
|
7100
7145
|
* Format: date-time
|
|
7101
7146
|
* @description ISO timestamp of when the ticket was created.
|
|
@@ -10335,6 +10380,17 @@ interface components {
|
|
|
10335
10380
|
};
|
|
10336
10381
|
};
|
|
10337
10382
|
};
|
|
10383
|
+
getResourceAvailability: {
|
|
10384
|
+
/** @description Whether the resource can be booked for the requested slot. */
|
|
10385
|
+
available: boolean;
|
|
10386
|
+
/** @description The first rule the slot breaks. Present only when available is false. */
|
|
10387
|
+
reason?: {
|
|
10388
|
+
/** @description The error code the booking would fail with, e.g. `bookingConflict` or `bookingScheduleConflict`. */
|
|
10389
|
+
code: string;
|
|
10390
|
+
/** @description The human-readable explanation of why the slot is unavailable. */
|
|
10391
|
+
message: string;
|
|
10392
|
+
};
|
|
10393
|
+
};
|
|
10338
10394
|
getBookings: {
|
|
10339
10395
|
/** @description List of bookings. */
|
|
10340
10396
|
bookings: {
|
|
@@ -11311,6 +11367,37 @@ interface components {
|
|
|
11311
11367
|
resourceRef: string;
|
|
11312
11368
|
/** @description Number of seats reserved. */
|
|
11313
11369
|
seats?: number;
|
|
11370
|
+
/** @description Where the booking was created. Visible to admins only. Absent on bookings made before it was recorded. */
|
|
11371
|
+
source?: {
|
|
11372
|
+
/** @description Set when `type` is `api`. */
|
|
11373
|
+
api?: {
|
|
11374
|
+
/** @description ID of the OAuth client the integration authenticated with. */
|
|
11375
|
+
clientId: string;
|
|
11376
|
+
};
|
|
11377
|
+
/** @description Set when `type` is `app`. */
|
|
11378
|
+
app?: Record<string, never>;
|
|
11379
|
+
/** @description Set when `type` is `googleCalendar`. */
|
|
11380
|
+
googleCalendar?: {
|
|
11381
|
+
/** @description ID of the Google Calendar the event was imported from. */
|
|
11382
|
+
calendarId?: string;
|
|
11383
|
+
/** @description ID of the Google Calendar event the booking mirrors. */
|
|
11384
|
+
eventId?: string;
|
|
11385
|
+
/** @description Link to the Google Calendar event. */
|
|
11386
|
+
eventLink?: string;
|
|
11387
|
+
};
|
|
11388
|
+
/** @description Set when `type` is `mcp`. */
|
|
11389
|
+
mcp?: {
|
|
11390
|
+
/** @description ID of the OAuth client the MCP client authenticated with. */
|
|
11391
|
+
clientId: string;
|
|
11392
|
+
};
|
|
11393
|
+
/** @description Set when `type` is `member`. */
|
|
11394
|
+
member?: Record<string, never>;
|
|
11395
|
+
/**
|
|
11396
|
+
* @description Where the booking was created: the admin app, the member app, an MCP client, a Google Calendar import, or a direct API integration. The matching property below carries the details.
|
|
11397
|
+
* @enum {string}
|
|
11398
|
+
*/
|
|
11399
|
+
type: "api" | "app" | "googleCalendar" | "mcp" | "member";
|
|
11400
|
+
};
|
|
11314
11401
|
/**
|
|
11315
11402
|
* Format: date-time
|
|
11316
11403
|
* @description ISO timestamp when the booking starts.
|
|
@@ -12333,6 +12420,37 @@ interface components {
|
|
|
12333
12420
|
resourceRef: string;
|
|
12334
12421
|
/** @description Number of seats reserved. */
|
|
12335
12422
|
seats?: number;
|
|
12423
|
+
/** @description Where the booking was created. Visible to admins only. Absent on bookings made before it was recorded. */
|
|
12424
|
+
source?: {
|
|
12425
|
+
/** @description Set when `type` is `api`. */
|
|
12426
|
+
api?: {
|
|
12427
|
+
/** @description ID of the OAuth client the integration authenticated with. */
|
|
12428
|
+
clientId: string;
|
|
12429
|
+
};
|
|
12430
|
+
/** @description Set when `type` is `app`. */
|
|
12431
|
+
app?: Record<string, never>;
|
|
12432
|
+
/** @description Set when `type` is `googleCalendar`. */
|
|
12433
|
+
googleCalendar?: {
|
|
12434
|
+
/** @description ID of the Google Calendar the event was imported from. */
|
|
12435
|
+
calendarId?: string;
|
|
12436
|
+
/** @description ID of the Google Calendar event the booking mirrors. */
|
|
12437
|
+
eventId?: string;
|
|
12438
|
+
/** @description Link to the Google Calendar event. */
|
|
12439
|
+
eventLink?: string;
|
|
12440
|
+
};
|
|
12441
|
+
/** @description Set when `type` is `mcp`. */
|
|
12442
|
+
mcp?: {
|
|
12443
|
+
/** @description ID of the OAuth client the MCP client authenticated with. */
|
|
12444
|
+
clientId: string;
|
|
12445
|
+
};
|
|
12446
|
+
/** @description Set when `type` is `member`. */
|
|
12447
|
+
member?: Record<string, never>;
|
|
12448
|
+
/**
|
|
12449
|
+
* @description Where the booking was created: the admin app, the member app, an MCP client, a Google Calendar import, or a direct API integration. The matching property below carries the details.
|
|
12450
|
+
* @enum {string}
|
|
12451
|
+
*/
|
|
12452
|
+
type: "api" | "app" | "googleCalendar" | "mcp" | "member";
|
|
12453
|
+
};
|
|
12336
12454
|
/**
|
|
12337
12455
|
* Format: date-time
|
|
12338
12456
|
* @description ISO timestamp when the booking starts.
|
|
@@ -18926,6 +19044,11 @@ interface components {
|
|
|
18926
19044
|
/** @description Payment gateway identifier, or external. */
|
|
18927
19045
|
type: string;
|
|
18928
19046
|
};
|
|
19047
|
+
/**
|
|
19048
|
+
* Format: date-time
|
|
19049
|
+
* @description ISO timestamp of when the money was received. Absent until the transaction succeeds. A payment gateway sets it when it approves the payment; an external payment takes the date the administrator recorded, defaulting to when they recorded it. Ordering and the createDate filters always follow createDate, not this field.
|
|
19050
|
+
*/
|
|
19051
|
+
paymentDate?: string;
|
|
18929
19052
|
/**
|
|
18930
19053
|
* @deprecated
|
|
18931
19054
|
* @description Deprecated. Use product instead.
|
|
@@ -19633,6 +19756,11 @@ interface components {
|
|
|
19633
19756
|
/** @description Payment gateway identifier, or external. */
|
|
19634
19757
|
type: string;
|
|
19635
19758
|
};
|
|
19759
|
+
/**
|
|
19760
|
+
* Format: date-time
|
|
19761
|
+
* @description ISO timestamp of when the money was received. Absent until the transaction succeeds. A payment gateway sets it when it approves the payment; an external payment takes the date the administrator recorded, defaulting to when they recorded it. Ordering and the createDate filters always follow createDate, not this field.
|
|
19762
|
+
*/
|
|
19763
|
+
paymentDate?: string;
|
|
19636
19764
|
/**
|
|
19637
19765
|
* @deprecated
|
|
19638
19766
|
* @description Deprecated. Use product instead.
|
|
@@ -20340,6 +20468,11 @@ interface components {
|
|
|
20340
20468
|
/** @description Payment gateway identifier, or external. */
|
|
20341
20469
|
type: string;
|
|
20342
20470
|
};
|
|
20471
|
+
/**
|
|
20472
|
+
* Format: date-time
|
|
20473
|
+
* @description ISO timestamp of when the money was received. Absent until the transaction succeeds. A payment gateway sets it when it approves the payment; an external payment takes the date the administrator recorded, defaulting to when they recorded it. Ordering and the createDate filters always follow createDate, not this field.
|
|
20474
|
+
*/
|
|
20475
|
+
paymentDate?: string;
|
|
20343
20476
|
/**
|
|
20344
20477
|
* @deprecated
|
|
20345
20478
|
* @description Deprecated. Use product instead.
|
|
@@ -21251,7 +21384,13 @@ interface components {
|
|
|
21251
21384
|
/** @description Payment method details. */
|
|
21252
21385
|
method: {
|
|
21253
21386
|
/** @description External payment method, recorded outside the platform. */
|
|
21254
|
-
external?:
|
|
21387
|
+
external?: {
|
|
21388
|
+
/**
|
|
21389
|
+
* Format: date-time
|
|
21390
|
+
* @description ISO timestamp of when the money was received. Defaults to now. Must not be in the future.
|
|
21391
|
+
*/
|
|
21392
|
+
paymentDate?: string;
|
|
21393
|
+
};
|
|
21255
21394
|
/** @description Payment gateway (card) payment method. */
|
|
21256
21395
|
paymentGateway?: {
|
|
21257
21396
|
/**
|
|
@@ -23459,6 +23598,28 @@ interface components {
|
|
|
23459
23598
|
};
|
|
23460
23599
|
};
|
|
23461
23600
|
};
|
|
23601
|
+
getResourceAvailability: {
|
|
23602
|
+
content: {
|
|
23603
|
+
"application/json": {
|
|
23604
|
+
/**
|
|
23605
|
+
* Format: date-time
|
|
23606
|
+
* @description The end of the slot to check, in ISO 8601.
|
|
23607
|
+
*/
|
|
23608
|
+
endDate: string;
|
|
23609
|
+
/** @description Set to true to check the entire resource instead of individual seats. Supported for office resources. */
|
|
23610
|
+
entire?: boolean;
|
|
23611
|
+
/** @description The number of seats to check. Required for seat-based resources such as hot desks, unless entire is true. */
|
|
23612
|
+
quantity?: number;
|
|
23613
|
+
/** @description RRULE lines describing a repeating slot, e.g. `RRULE:FREQ=WEEKLY;COUNT=10`. The DTSTART line is derived from startDate. The slot is unavailable as soon as any occurrence is. */
|
|
23614
|
+
recurrence?: string[];
|
|
23615
|
+
/**
|
|
23616
|
+
* Format: date-time
|
|
23617
|
+
* @description The start of the slot to check, in ISO 8601.
|
|
23618
|
+
*/
|
|
23619
|
+
startDate: string;
|
|
23620
|
+
};
|
|
23621
|
+
};
|
|
23622
|
+
};
|
|
23462
23623
|
createBooking: {
|
|
23463
23624
|
content: {
|
|
23464
23625
|
"application/json": {
|
|
@@ -24878,7 +25039,13 @@ interface components {
|
|
|
24878
25039
|
/** @description Payment method details. */
|
|
24879
25040
|
method: {
|
|
24880
25041
|
/** @description External payment method, recorded outside the platform. */
|
|
24881
|
-
external?:
|
|
25042
|
+
external?: {
|
|
25043
|
+
/**
|
|
25044
|
+
* Format: date-time
|
|
25045
|
+
* @description ISO timestamp of when the money was received. Defaults to now. Must not be in the future.
|
|
25046
|
+
*/
|
|
25047
|
+
paymentDate?: string;
|
|
25048
|
+
};
|
|
24882
25049
|
/** @description Payment gateway (card) payment method. */
|
|
24883
25050
|
paymentGateway?: {
|
|
24884
25051
|
/**
|
|
@@ -30146,6 +30313,41 @@ interface operations {
|
|
|
30146
30313
|
};
|
|
30147
30314
|
};
|
|
30148
30315
|
};
|
|
30316
|
+
getResourceAvailability: {
|
|
30317
|
+
parameters: {
|
|
30318
|
+
query?: never;
|
|
30319
|
+
header?: {
|
|
30320
|
+
/** @description The id of the network. Required when using bearer token authentication */
|
|
30321
|
+
"spacebring-network-id"?: string;
|
|
30322
|
+
};
|
|
30323
|
+
path: {
|
|
30324
|
+
/** @description The id of the resource. */
|
|
30325
|
+
resourceId: string;
|
|
30326
|
+
};
|
|
30327
|
+
cookie?: never;
|
|
30328
|
+
};
|
|
30329
|
+
requestBody: components["requestBodies"]["getResourceAvailability"];
|
|
30330
|
+
responses: {
|
|
30331
|
+
/** @description OK */
|
|
30332
|
+
200: {
|
|
30333
|
+
headers: {
|
|
30334
|
+
[name: string]: unknown;
|
|
30335
|
+
};
|
|
30336
|
+
content: {
|
|
30337
|
+
"application/json": components["schemas"]["getResourceAvailability"];
|
|
30338
|
+
};
|
|
30339
|
+
};
|
|
30340
|
+
/** @description Bad Request */
|
|
30341
|
+
400: {
|
|
30342
|
+
headers: {
|
|
30343
|
+
[name: string]: unknown;
|
|
30344
|
+
};
|
|
30345
|
+
content: {
|
|
30346
|
+
"application/json": components["schemas"]["responseError"];
|
|
30347
|
+
};
|
|
30348
|
+
};
|
|
30349
|
+
};
|
|
30350
|
+
};
|
|
30149
30351
|
getBookings: {
|
|
30150
30352
|
parameters: {
|
|
30151
30353
|
query?: {
|
|
@@ -32938,6 +33140,8 @@ type UpdateShopCategoryBody = NonNullable<NonNullable<operations["updateShopCate
|
|
|
32938
33140
|
type Assignment = NonNullable<operations["getAssignments"]["responses"][200]["content"]["application/json"]["assignments"]>[number];
|
|
32939
33141
|
/** A Booking entity as returned by the Spacebring API. */
|
|
32940
33142
|
type Booking = NonNullable<operations["getBooking"]["responses"][200]["content"]["application/json"]["booking"]>;
|
|
33143
|
+
/** A GetResourceAvailability entity as returned by the Spacebring API. */
|
|
33144
|
+
type GetResourceAvailability = NonNullable<components["schemas"]["getResourceAvailability"]>;
|
|
32941
33145
|
/** A Resource entity as returned by the Spacebring API. */
|
|
32942
33146
|
type Resource = NonNullable<operations["getResource"]["responses"][200]["content"]["application/json"]["resource"]>;
|
|
32943
33147
|
/** Query parameters for `sb.resources.assignments.list()`. */
|
|
@@ -33021,6 +33225,8 @@ type CreateAssignmentBody = NonNullable<NonNullable<operations["createAssignment
|
|
|
33021
33225
|
type CreateBookingBody = NonNullable<operations["createBooking"]["requestBody"]>["content"]["application/json"];
|
|
33022
33226
|
/** Request body for `sb.resources.create()`. */
|
|
33023
33227
|
type CreateResourceBody = NonNullable<NonNullable<operations["createResource"]["requestBody"]>["content"]["application/json"]["resource"]>;
|
|
33228
|
+
/** Request body for `sb.resources.getResourceAvailability()`. */
|
|
33229
|
+
type GetResourceAvailabilityBody = NonNullable<operations["getResourceAvailability"]["requestBody"]>["content"]["application/json"];
|
|
33024
33230
|
/** Request body for `sb.resources.assignments.update()`. */
|
|
33025
33231
|
type PatchAssignmentBody = NonNullable<NonNullable<operations["patchAssignment"]["requestBody"]>["content"]["application/json"]["assignment"]>;
|
|
33026
33232
|
/** Request body for `sb.resources.bookings.update()`. */
|
|
@@ -33824,6 +34030,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
33824
34030
|
get(resourceId: string, options?: SpacebringRequestOptions): Promise<Resource>;
|
|
33825
34031
|
create(resource: CreateResourceBody, options?: SpacebringRequestOptions): Promise<Resource>;
|
|
33826
34032
|
update(resourceId: string, resource: PatchResourceBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
34033
|
+
getResourceAvailability(resourceId: string, body: GetResourceAvailabilityBody, options?: SpacebringRequestOptions): Promise<GetResourceAvailability>;
|
|
33827
34034
|
assignments: {
|
|
33828
34035
|
list(query?: GetAssignmentsQuery, options?: SpacebringRequestOptions): Promise<{
|
|
33829
34036
|
assignments: Assignment[];
|
|
@@ -34076,4 +34283,4 @@ declare class SpacebringError extends Error {
|
|
|
34076
34283
|
});
|
|
34077
34284
|
}
|
|
34078
34285
|
|
|
34079
|
-
export { type Activity, type AddEventHostsBody, type AltCurrency, type Application, type ApplyBenefitBody, type Assignment, type Balance, type Benefit, type BenefitCategory, type Booking, type CheckInVisitBody, type CheckOutVisitBody, type Comment, type Company, type Contact, type Contract, type Coupon, type CreateAltCurrencyBody, type CreateAssignmentBody, type CreateBenefitBody, type CreateBenefitCategoryBody, type CreateBookingBody, type CreateCompanyBody, type CreateContactBody, type CreateContractBody, type CreateCouponBody, type CreateCreditNoteBody, type CreateCreditsTransactionBody, type CreateDayPassesTransactionBody, type CreateEventBody, type CreateEventMediaBody, type CreateFeedPostBody, type CreateFeedPostCommentBody, type CreateGuideBody, type CreateInvoiceBody, type CreateInvoiceItemBody, type CreateMembershipBody, type CreateMoneyTransactionBody, type CreatePackageBody, type CreatePlanBody, type CreateProductBody, type CreatePromocodeBody, type CreateRequestBody, type CreateResourceBody, type CreateShopCategoryBody, type CreateSubscriptionBody, type CreateSubscriptionItemBody, type CreateSupportTicketBody, type CreateSupportTicketCommentBody, type CreateTemplateBody, type CreateVisitBody, type CreditNote, type CreditScheduledTransaction, type CreditTransaction, type DayPassScheduledTransaction, type DayPassTransaction, type Event, type EventTicket, type GetAltCurrenciesQuery, type GetAssignmentsQuery, type GetBenefitApplicationsQuery, type GetBenefitCategoriesQuery, type GetBenefitsQuery, type GetBookingsQuery, type GetCompaniesQuery, type GetContactsQuery, type GetContractsQuery, type GetCouponsQuery, type GetCreditNotesQuery, type GetCreditsTransactionsQuery, type GetDayPassesTransactionsQuery, type GetDiscountRedemptionsQuery, type GetEventTicketsQuery, type GetEventsByOrganizationQuery, type GetFeedPostsQuery, type GetFloorsQuery, type GetGuidesQuery, type GetInvoicesQuery, type GetMembershipsDeletedQuery, type GetMembershipsQuery, type GetMoneyTransactionsQuery, type GetOrdersQuery, type GetPackagesQuery, type GetPlansQuery, type GetProductsQuery, type GetPromocodesQuery, type GetRegistrationsQuery, type GetRequestsQuery, type GetResourcesQuery, type GetScheduledCreditsTransactionsQuery, type GetScheduledDayPassesTransactionsQuery, type GetShopCategoriesQuery, type GetSubscriptionsQuery, type GetSupportTicketsQuery, type GetTemplatesQuery, type GetUpcomingInvoiceItemsQuery, type GetUpcomingInvoiceQuery, type GetVisitsQuery, type Guide, type Invoice, type InvoiceItem, type IssueContractBody, type IssueInvoiceBody, type Like, type ListInvoiceItemsQuery, type Location, type Media, type Membership, type MoneyTransaction, type Network, type Order, type Package, type PatchAssignmentBody, type PatchBookingBody, type PatchGuideBody, type PatchMoneyTransactionBody, type PatchPackageBody, type PatchResourceBody, type PayInvoiceBody, type Payment, type Plan, type Post, type PreviewCreditNoteBody, type Product, type Promocode, type Redemption, type Refund, type RefundMoneyTransactionBody, type Registration, type Request$1 as Request, type Resource, type ShopCategory, Spacebring, type SpacebringConfig, SpacebringError, type SpacebringErrorBody, type SpacebringRequestOptions, type SpacebringResources, type Subscription, type SupportTicket, type Template, type TerminateContractBody, type UpcomingItem, type UpdateAltCurrencyBody, type UpdateBenefitBody, type UpdateBenefitCategoryBody, type UpdateCompanyBody, type UpdateContractBody, type UpdateCouponBody, type UpdateCreditNoteBody, type UpdateEventBody, type UpdateEventTicketBody, type UpdateFeedPostBody, type UpdateInvoiceBody, type UpdateInvoiceItemBody, type UpdateMembershipBody, type UpdatePlanBody, type UpdateProductBody, type UpdateShopCategoryBody, type UpdateSubscriptionBody, type UpdateSubscriptionItemBody, type UpdateSupportTicketAssigneeBody, type UpdateSupportTicketCommentBody, type UpdateSupportTicketStatusBody, type UpdateSupportTicketTypeBody, type UpdateTemplateBody, type UpdateVisitBody, type Visit, type components, type operations, type paths };
|
|
34286
|
+
export { type Activity, type AddEventHostsBody, type AltCurrency, type Application, type ApplyBenefitBody, type Assignment, type Balance, type Benefit, type BenefitCategory, type Booking, type CheckInVisitBody, type CheckOutVisitBody, type Comment, type Company, type Contact, type Contract, type Coupon, type CreateAltCurrencyBody, type CreateAssignmentBody, type CreateBenefitBody, type CreateBenefitCategoryBody, type CreateBookingBody, type CreateCompanyBody, type CreateContactBody, type CreateContractBody, type CreateCouponBody, type CreateCreditNoteBody, type CreateCreditsTransactionBody, type CreateDayPassesTransactionBody, type CreateEventBody, type CreateEventMediaBody, type CreateFeedPostBody, type CreateFeedPostCommentBody, type CreateGuideBody, type CreateInvoiceBody, type CreateInvoiceItemBody, type CreateMembershipBody, type CreateMoneyTransactionBody, type CreatePackageBody, type CreatePlanBody, type CreateProductBody, type CreatePromocodeBody, type CreateRequestBody, type CreateResourceBody, type CreateShopCategoryBody, type CreateSubscriptionBody, type CreateSubscriptionItemBody, type CreateSupportTicketBody, type CreateSupportTicketCommentBody, type CreateTemplateBody, type CreateVisitBody, type CreditNote, type CreditScheduledTransaction, type CreditTransaction, type DayPassScheduledTransaction, type DayPassTransaction, type Event, type EventTicket, type GetAltCurrenciesQuery, type GetAssignmentsQuery, type GetBenefitApplicationsQuery, type GetBenefitCategoriesQuery, type GetBenefitsQuery, type GetBookingsQuery, type GetCompaniesQuery, type GetContactsQuery, type GetContractsQuery, type GetCouponsQuery, type GetCreditNotesQuery, type GetCreditsTransactionsQuery, type GetDayPassesTransactionsQuery, type GetDiscountRedemptionsQuery, type GetEventTicketsQuery, type GetEventsByOrganizationQuery, type GetFeedPostsQuery, type GetFloorsQuery, type GetGuidesQuery, type GetInvoicesQuery, type GetMembershipsDeletedQuery, type GetMembershipsQuery, type GetMoneyTransactionsQuery, type GetOrdersQuery, type GetPackagesQuery, type GetPlansQuery, type GetProductsQuery, type GetPromocodesQuery, type GetRegistrationsQuery, type GetRequestsQuery, type GetResourceAvailability, type GetResourceAvailabilityBody, type GetResourcesQuery, type GetScheduledCreditsTransactionsQuery, type GetScheduledDayPassesTransactionsQuery, type GetShopCategoriesQuery, type GetSubscriptionsQuery, type GetSupportTicketsQuery, type GetTemplatesQuery, type GetUpcomingInvoiceItemsQuery, type GetUpcomingInvoiceQuery, type GetVisitsQuery, type Guide, type Invoice, type InvoiceItem, type IssueContractBody, type IssueInvoiceBody, type Like, type ListInvoiceItemsQuery, type Location, type Media, type Membership, type MoneyTransaction, type Network, type Order, type Package, type PatchAssignmentBody, type PatchBookingBody, type PatchGuideBody, type PatchMoneyTransactionBody, type PatchPackageBody, type PatchResourceBody, type PayInvoiceBody, type Payment, type Plan, type Post, type PreviewCreditNoteBody, type Product, type Promocode, type Redemption, type Refund, type RefundMoneyTransactionBody, type Registration, type Request$1 as Request, type Resource, type ShopCategory, Spacebring, type SpacebringConfig, SpacebringError, type SpacebringErrorBody, type SpacebringRequestOptions, type SpacebringResources, type Subscription, type SupportTicket, type Template, type TerminateContractBody, type UpcomingItem, type UpdateAltCurrencyBody, type UpdateBenefitBody, type UpdateBenefitCategoryBody, type UpdateCompanyBody, type UpdateContractBody, type UpdateCouponBody, type UpdateCreditNoteBody, type UpdateEventBody, type UpdateEventTicketBody, type UpdateFeedPostBody, type UpdateInvoiceBody, type UpdateInvoiceItemBody, type UpdateMembershipBody, type UpdatePlanBody, type UpdateProductBody, type UpdateShopCategoryBody, type UpdateSubscriptionBody, type UpdateSubscriptionItemBody, type UpdateSupportTicketAssigneeBody, type UpdateSupportTicketCommentBody, type UpdateSupportTicketStatusBody, type UpdateSupportTicketTypeBody, type UpdateTemplateBody, type UpdateVisitBody, type Visit, type components, type operations, type paths };
|
package/dist/index.js
CHANGED
|
@@ -2025,6 +2025,18 @@ function createResources(client, defaults) {
|
|
|
2025
2025
|
async update(resourceId, resource, options) {
|
|
2026
2026
|
return unwrap(await client.PATCH("/resources/v1/{resourceId}", { params: { path: { resourceId } }, body: { resource }, signal: options?.signal }), "PATCH /resources/v1/{resourceId}");
|
|
2027
2027
|
},
|
|
2028
|
+
/**
|
|
2029
|
+
* Check resource availability
|
|
2030
|
+
*
|
|
2031
|
+
* Check whether a resource can be booked for a slot before creating the booking. The same rules as booking creation apply: capacity, the location and resource schedule, duration limits and the booking window. When the slot is unavailable, the response carries the code the booking would fail with.
|
|
2032
|
+
*
|
|
2033
|
+
* @param resourceId The id of the resource.
|
|
2034
|
+
* @param body Request body.
|
|
2035
|
+
* @param options Request options (abort signal).
|
|
2036
|
+
*/
|
|
2037
|
+
async getResourceAvailability(resourceId, body, options) {
|
|
2038
|
+
return unwrap(await client.POST("/resources/v1/{resourceId}/availability", { params: { path: { resourceId } }, body, signal: options?.signal }), "POST /resources/v1/{resourceId}/availability");
|
|
2039
|
+
},
|
|
2028
2040
|
assignments: {
|
|
2029
2041
|
/**
|
|
2030
2042
|
* Retrieve resource assignments
|