@izak0s/spacebring-api 9.8.0 → 10.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 +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +338 -40
- package/dist/index.d.ts +338 -40
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -443,6 +443,26 @@ interface paths {
|
|
|
443
443
|
patch?: never;
|
|
444
444
|
trace?: never;
|
|
445
445
|
};
|
|
446
|
+
"/benefits/v1/media": {
|
|
447
|
+
parameters: {
|
|
448
|
+
query?: never;
|
|
449
|
+
header?: never;
|
|
450
|
+
path?: never;
|
|
451
|
+
cookie?: never;
|
|
452
|
+
};
|
|
453
|
+
get?: never;
|
|
454
|
+
put?: never;
|
|
455
|
+
/**
|
|
456
|
+
* Create a media upload
|
|
457
|
+
* @description Create a media upload for a benefit cover image. The response carries a presigned URL: send the raw file bytes with a PUT request within a minute, using exactly the headers returned. Once the file is stored, pass the returned key as <code>media[0].key</code> when creating or updating a benefit within an hour; an image that is not attached by then is discarded. <h3>OAuth</h3>Required scopes: <code>benefits</code>
|
|
458
|
+
*/
|
|
459
|
+
post: operations["createBenefitMedia"];
|
|
460
|
+
delete?: never;
|
|
461
|
+
options?: never;
|
|
462
|
+
head?: never;
|
|
463
|
+
patch?: never;
|
|
464
|
+
trace?: never;
|
|
465
|
+
};
|
|
446
466
|
"/benefits/applications/v1": {
|
|
447
467
|
parameters: {
|
|
448
468
|
query?: never;
|
|
@@ -3314,6 +3334,47 @@ interface components {
|
|
|
3314
3334
|
visibility: "public" | "admins" | "exclusiveMembers" | "members" | "networkMembers";
|
|
3315
3335
|
};
|
|
3316
3336
|
};
|
|
3337
|
+
createBenefitMedia: {
|
|
3338
|
+
/** @description The created media upload. */
|
|
3339
|
+
media: {
|
|
3340
|
+
/** @description Storage key of the media file. Pass it as media[0].key when creating or updating a benefit. */
|
|
3341
|
+
key: string;
|
|
3342
|
+
/**
|
|
3343
|
+
* @description MIME type of the image file.
|
|
3344
|
+
* @enum {string}
|
|
3345
|
+
*/
|
|
3346
|
+
mimeType: "image/gif" | "image/jpeg" | "image/png" | "image/webp";
|
|
3347
|
+
/** @description Size of the image file in bytes. */
|
|
3348
|
+
size: number;
|
|
3349
|
+
/**
|
|
3350
|
+
* @description Upload status. pending: the file has not been received yet. uploaded: the file is stored and can be attached to a benefit. attached: a benefit references the file.
|
|
3351
|
+
* @enum {string}
|
|
3352
|
+
*/
|
|
3353
|
+
status: "pending" | "uploaded" | "attached";
|
|
3354
|
+
/** @description How to upload the file. Send the raw bytes as the request body, not a multipart form. */
|
|
3355
|
+
upload: {
|
|
3356
|
+
/**
|
|
3357
|
+
* Format: date-time
|
|
3358
|
+
* @description ISO timestamp after which the upload URL is rejected.
|
|
3359
|
+
*/
|
|
3360
|
+
expirationDate: string;
|
|
3361
|
+
/** @description Headers the PUT request must send exactly as given; the signature covers them. */
|
|
3362
|
+
headers: {
|
|
3363
|
+
/** @description Must equal the size declared when the upload was created. */
|
|
3364
|
+
"Content-Length": string;
|
|
3365
|
+
/** @description Must equal the mimeType declared when the upload was created. */
|
|
3366
|
+
"Content-Type": string;
|
|
3367
|
+
};
|
|
3368
|
+
/**
|
|
3369
|
+
* @description HTTP method of the upload request.
|
|
3370
|
+
* @enum {string}
|
|
3371
|
+
*/
|
|
3372
|
+
method: "PUT";
|
|
3373
|
+
/** @description Presigned URL to send the raw file bytes to. */
|
|
3374
|
+
url: string;
|
|
3375
|
+
};
|
|
3376
|
+
};
|
|
3377
|
+
};
|
|
3317
3378
|
getBenefitApplications: {
|
|
3318
3379
|
/** @description List of benefit applications. */
|
|
3319
3380
|
applications: {
|
|
@@ -8097,7 +8158,9 @@ interface components {
|
|
|
8097
8158
|
wednesday?: boolean;
|
|
8098
8159
|
};
|
|
8099
8160
|
hours?: {
|
|
8161
|
+
/** @description Opening time in 24-hour format. */
|
|
8100
8162
|
from?: string;
|
|
8163
|
+
/** @description Closing time in 24-hour format, counted from the start of the weekday. A day that stays open past midnight closes after 24:00, for example at 26:00 for 2:00 AM the next day, and at most 24 hours after the opening time. */
|
|
8101
8164
|
to?: string;
|
|
8102
8165
|
};
|
|
8103
8166
|
}[];
|
|
@@ -8117,7 +8180,9 @@ interface components {
|
|
|
8117
8180
|
wednesday?: boolean;
|
|
8118
8181
|
};
|
|
8119
8182
|
hours?: {
|
|
8183
|
+
/** @description Opening time in 24-hour format. */
|
|
8120
8184
|
from?: string;
|
|
8185
|
+
/** @description Closing time in 24-hour format, counted from the start of the weekday. A day that stays open past midnight closes after 24:00, for example at 26:00 for 2:00 AM the next day, and at most 24 hours after the opening time. */
|
|
8121
8186
|
to?: string;
|
|
8122
8187
|
};
|
|
8123
8188
|
}[];
|
|
@@ -9082,16 +9147,16 @@ interface components {
|
|
|
9082
9147
|
enabled: boolean;
|
|
9083
9148
|
/** @description Stepped credit pricing tiers. */
|
|
9084
9149
|
tiers: {
|
|
9085
|
-
/** @description Fixed fee added
|
|
9150
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
9086
9151
|
flatAmount: number;
|
|
9087
|
-
/** @description
|
|
9152
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
9088
9153
|
from: number;
|
|
9089
9154
|
/**
|
|
9090
9155
|
* @description Whether the tier is priced per hour or per day.
|
|
9091
9156
|
* @enum {string}
|
|
9092
9157
|
*/
|
|
9093
9158
|
unit: "hour" | "day";
|
|
9094
|
-
/** @description
|
|
9159
|
+
/** @description Price per unit of booking time within this tier, never per minute. */
|
|
9095
9160
|
unitAmount: number;
|
|
9096
9161
|
}[];
|
|
9097
9162
|
};
|
|
@@ -9160,16 +9225,16 @@ interface components {
|
|
|
9160
9225
|
enabled: boolean;
|
|
9161
9226
|
/** @description Stepped money pricing tiers. */
|
|
9162
9227
|
tiers: {
|
|
9163
|
-
/** @description Fixed fee added
|
|
9228
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
9164
9229
|
flatAmount: number;
|
|
9165
|
-
/** @description
|
|
9230
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
9166
9231
|
from: number;
|
|
9167
9232
|
/**
|
|
9168
9233
|
* @description Whether the tier is priced per hour or per day.
|
|
9169
9234
|
* @enum {string}
|
|
9170
9235
|
*/
|
|
9171
9236
|
unit: "hour" | "day";
|
|
9172
|
-
/** @description
|
|
9237
|
+
/** @description Price per unit of booking time within this tier, never per minute. */
|
|
9173
9238
|
unitAmount: number;
|
|
9174
9239
|
}[];
|
|
9175
9240
|
};
|
|
@@ -9448,7 +9513,7 @@ interface components {
|
|
|
9448
9513
|
hours: {
|
|
9449
9514
|
/** @description Opening time in 24-hour "HH:mm" format. */
|
|
9450
9515
|
from: string;
|
|
9451
|
-
/** @description Closing time in 24-hour
|
|
9516
|
+
/** @description Closing time in 24-hour format, counted from the start of the weekday. A day that stays open past midnight closes after 24:00, for example at 26:00 for 2:00 AM the next day, and at most 24 hours after the opening time. */
|
|
9452
9517
|
to: string;
|
|
9453
9518
|
};
|
|
9454
9519
|
}[];
|
|
@@ -9484,7 +9549,7 @@ interface components {
|
|
|
9484
9549
|
hours: {
|
|
9485
9550
|
/** @description Opening time in 24-hour "HH:mm" format. */
|
|
9486
9551
|
from: string;
|
|
9487
|
-
/** @description Closing time in 24-hour
|
|
9552
|
+
/** @description Closing time in 24-hour format, counted from the start of the weekday. A day that stays open past midnight closes after 24:00, for example at 26:00 for 2:00 AM the next day, and at most 24 hours after the opening time. */
|
|
9488
9553
|
to: string;
|
|
9489
9554
|
};
|
|
9490
9555
|
}[];
|
|
@@ -9713,16 +9778,16 @@ interface components {
|
|
|
9713
9778
|
enabled: boolean;
|
|
9714
9779
|
/** @description Stepped credit pricing tiers. */
|
|
9715
9780
|
tiers: {
|
|
9716
|
-
/** @description Fixed fee added
|
|
9781
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
9717
9782
|
flatAmount: number;
|
|
9718
|
-
/** @description
|
|
9783
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
9719
9784
|
from: number;
|
|
9720
9785
|
/**
|
|
9721
9786
|
* @description Whether the tier is priced per hour or per day.
|
|
9722
9787
|
* @enum {string}
|
|
9723
9788
|
*/
|
|
9724
9789
|
unit: "hour" | "day";
|
|
9725
|
-
/** @description
|
|
9790
|
+
/** @description Price per unit of booking time within this tier, never per minute. */
|
|
9726
9791
|
unitAmount: number;
|
|
9727
9792
|
}[];
|
|
9728
9793
|
};
|
|
@@ -9791,16 +9856,16 @@ interface components {
|
|
|
9791
9856
|
enabled: boolean;
|
|
9792
9857
|
/** @description Stepped money pricing tiers. */
|
|
9793
9858
|
tiers: {
|
|
9794
|
-
/** @description Fixed fee added
|
|
9859
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
9795
9860
|
flatAmount: number;
|
|
9796
|
-
/** @description
|
|
9861
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
9797
9862
|
from: number;
|
|
9798
9863
|
/**
|
|
9799
9864
|
* @description Whether the tier is priced per hour or per day.
|
|
9800
9865
|
* @enum {string}
|
|
9801
9866
|
*/
|
|
9802
9867
|
unit: "hour" | "day";
|
|
9803
|
-
/** @description
|
|
9868
|
+
/** @description Price per unit of booking time within this tier, never per minute. */
|
|
9804
9869
|
unitAmount: number;
|
|
9805
9870
|
}[];
|
|
9806
9871
|
};
|
|
@@ -10079,7 +10144,7 @@ interface components {
|
|
|
10079
10144
|
hours: {
|
|
10080
10145
|
/** @description Opening time in 24-hour "HH:mm" format. */
|
|
10081
10146
|
from: string;
|
|
10082
|
-
/** @description Closing time in 24-hour
|
|
10147
|
+
/** @description Closing time in 24-hour format, counted from the start of the weekday. A day that stays open past midnight closes after 24:00, for example at 26:00 for 2:00 AM the next day, and at most 24 hours after the opening time. */
|
|
10083
10148
|
to: string;
|
|
10084
10149
|
};
|
|
10085
10150
|
}[];
|
|
@@ -10115,7 +10180,7 @@ interface components {
|
|
|
10115
10180
|
hours: {
|
|
10116
10181
|
/** @description Opening time in 24-hour "HH:mm" format. */
|
|
10117
10182
|
from: string;
|
|
10118
|
-
/** @description Closing time in 24-hour
|
|
10183
|
+
/** @description Closing time in 24-hour format, counted from the start of the weekday. A day that stays open past midnight closes after 24:00, for example at 26:00 for 2:00 AM the next day, and at most 24 hours after the opening time. */
|
|
10119
10184
|
to: string;
|
|
10120
10185
|
};
|
|
10121
10186
|
}[];
|
|
@@ -13012,6 +13077,46 @@ interface components {
|
|
|
13012
13077
|
* @description ISO timestamp of when the order was created.
|
|
13013
13078
|
*/
|
|
13014
13079
|
createDate: string;
|
|
13080
|
+
/** @description Customer who owns the order: the company or user it is paid by, or the buyer when the order is free. */
|
|
13081
|
+
customer: {
|
|
13082
|
+
/**
|
|
13083
|
+
* Format: uuid
|
|
13084
|
+
* @description Unique identifier of the customer.
|
|
13085
|
+
*/
|
|
13086
|
+
id: string;
|
|
13087
|
+
/** @description Name of the company. Present when the customer is a company. */
|
|
13088
|
+
title?: string;
|
|
13089
|
+
/**
|
|
13090
|
+
* @description Customer type.
|
|
13091
|
+
* @enum {string}
|
|
13092
|
+
*/
|
|
13093
|
+
type: "company" | "user";
|
|
13094
|
+
/** @description User who owns the order. Present when the customer is a user. */
|
|
13095
|
+
user?: {
|
|
13096
|
+
/** @description Short bio of the user. */
|
|
13097
|
+
about?: string | null;
|
|
13098
|
+
/** @description Email address of the user. */
|
|
13099
|
+
email?: string | null;
|
|
13100
|
+
/**
|
|
13101
|
+
* Format: uuid
|
|
13102
|
+
* @description Unique identifier of the user.
|
|
13103
|
+
*/
|
|
13104
|
+
id: string;
|
|
13105
|
+
/** @description First name of the user. */
|
|
13106
|
+
name?: string | null;
|
|
13107
|
+
/** @description Phone number of the user. */
|
|
13108
|
+
phoneNumber?: string | null;
|
|
13109
|
+
/** @description Profile photo URL of the user. */
|
|
13110
|
+
photoUrl?: string | null;
|
|
13111
|
+
/** @description Last name of the user. */
|
|
13112
|
+
surname?: string | null;
|
|
13113
|
+
};
|
|
13114
|
+
};
|
|
13115
|
+
/**
|
|
13116
|
+
* Format: uuid
|
|
13117
|
+
* @description ID of the customer who created the order in its location. Absent when the creator has no membership in that location.
|
|
13118
|
+
*/
|
|
13119
|
+
customerRefCreatedBy?: string;
|
|
13015
13120
|
/**
|
|
13016
13121
|
* Format: date-time
|
|
13017
13122
|
* @description ISO timestamp of when the order was deleted.
|
|
@@ -13206,6 +13311,35 @@ interface components {
|
|
|
13206
13311
|
type?: "company" | "user";
|
|
13207
13312
|
};
|
|
13208
13313
|
};
|
|
13314
|
+
/** @description External payment method details: the payment is collected outside Spacebring, in cash or by bank transfer. */
|
|
13315
|
+
external?: {
|
|
13316
|
+
/** @description Customer who paid outside Spacebring. */
|
|
13317
|
+
customer: {
|
|
13318
|
+
/** @description Customer identifier. */
|
|
13319
|
+
id?: string;
|
|
13320
|
+
/** @description Location the customer belongs to. */
|
|
13321
|
+
location?: {
|
|
13322
|
+
/**
|
|
13323
|
+
* Format: uuid
|
|
13324
|
+
* @description Unique identifier of the location.
|
|
13325
|
+
*/
|
|
13326
|
+
id: string;
|
|
13327
|
+
/** @description Display name of the location. */
|
|
13328
|
+
title: string;
|
|
13329
|
+
};
|
|
13330
|
+
/** @description First name of the customer. */
|
|
13331
|
+
name?: string | null;
|
|
13332
|
+
/** @description Last name of the customer. */
|
|
13333
|
+
surname?: string | null;
|
|
13334
|
+
/** @description Company title. */
|
|
13335
|
+
title?: string;
|
|
13336
|
+
/**
|
|
13337
|
+
* @description Customer type.
|
|
13338
|
+
* @enum {string}
|
|
13339
|
+
*/
|
|
13340
|
+
type?: "company" | "user";
|
|
13341
|
+
};
|
|
13342
|
+
};
|
|
13209
13343
|
/** @description Invoice payment method details. */
|
|
13210
13344
|
invoice?: {
|
|
13211
13345
|
/** @description Customer who paid by invoice. */
|
|
@@ -13299,7 +13433,7 @@ interface components {
|
|
|
13299
13433
|
* @description Payment method type.
|
|
13300
13434
|
* @enum {string}
|
|
13301
13435
|
*/
|
|
13302
|
-
type: "credits" | "invoice" | "paymentGateway";
|
|
13436
|
+
type: "credits" | "external" | "invoice" | "paymentGateway";
|
|
13303
13437
|
};
|
|
13304
13438
|
/** @description Price breakdown for this payment. */
|
|
13305
13439
|
price: {
|
|
@@ -13454,6 +13588,18 @@ interface components {
|
|
|
13454
13588
|
/** @description Last name of the user. */
|
|
13455
13589
|
surname?: string | null;
|
|
13456
13590
|
};
|
|
13591
|
+
/** @description User who created the order: the buyer, or an admin who created it on the buyer's behalf. Absent for orders created before this was recorded. */
|
|
13592
|
+
userCreatedBy?: {
|
|
13593
|
+
/**
|
|
13594
|
+
* Format: uuid
|
|
13595
|
+
* @description Unique identifier of the user who created the order.
|
|
13596
|
+
*/
|
|
13597
|
+
id: string;
|
|
13598
|
+
/** @description First name of the user who created the order. */
|
|
13599
|
+
name?: string | null;
|
|
13600
|
+
/** @description Last name of the user who created the order. */
|
|
13601
|
+
surname?: string | null;
|
|
13602
|
+
};
|
|
13457
13603
|
/** @description User who deleted this order, if applicable. */
|
|
13458
13604
|
userDeletedBy?: {
|
|
13459
13605
|
/**
|
|
@@ -13480,6 +13626,46 @@ interface components {
|
|
|
13480
13626
|
* @description ISO timestamp of when the order was created.
|
|
13481
13627
|
*/
|
|
13482
13628
|
createDate: string;
|
|
13629
|
+
/** @description Customer who owns the order: the company or user it is paid by, or the buyer when the order is free. */
|
|
13630
|
+
customer: {
|
|
13631
|
+
/**
|
|
13632
|
+
* Format: uuid
|
|
13633
|
+
* @description Unique identifier of the customer.
|
|
13634
|
+
*/
|
|
13635
|
+
id: string;
|
|
13636
|
+
/** @description Name of the company. Present when the customer is a company. */
|
|
13637
|
+
title?: string;
|
|
13638
|
+
/**
|
|
13639
|
+
* @description Customer type.
|
|
13640
|
+
* @enum {string}
|
|
13641
|
+
*/
|
|
13642
|
+
type: "company" | "user";
|
|
13643
|
+
/** @description User who owns the order. Present when the customer is a user. */
|
|
13644
|
+
user?: {
|
|
13645
|
+
/** @description Short bio of the user. */
|
|
13646
|
+
about?: string | null;
|
|
13647
|
+
/** @description Email address of the user. */
|
|
13648
|
+
email?: string | null;
|
|
13649
|
+
/**
|
|
13650
|
+
* Format: uuid
|
|
13651
|
+
* @description Unique identifier of the user.
|
|
13652
|
+
*/
|
|
13653
|
+
id: string;
|
|
13654
|
+
/** @description First name of the user. */
|
|
13655
|
+
name?: string | null;
|
|
13656
|
+
/** @description Phone number of the user. */
|
|
13657
|
+
phoneNumber?: string | null;
|
|
13658
|
+
/** @description Profile photo URL of the user. */
|
|
13659
|
+
photoUrl?: string | null;
|
|
13660
|
+
/** @description Last name of the user. */
|
|
13661
|
+
surname?: string | null;
|
|
13662
|
+
};
|
|
13663
|
+
};
|
|
13664
|
+
/**
|
|
13665
|
+
* Format: uuid
|
|
13666
|
+
* @description ID of the customer who created the order in its location. Absent when the creator has no membership in that location.
|
|
13667
|
+
*/
|
|
13668
|
+
customerRefCreatedBy?: string;
|
|
13483
13669
|
/**
|
|
13484
13670
|
* Format: date-time
|
|
13485
13671
|
* @description ISO timestamp of when the order was deleted.
|
|
@@ -13674,6 +13860,35 @@ interface components {
|
|
|
13674
13860
|
type?: "company" | "user";
|
|
13675
13861
|
};
|
|
13676
13862
|
};
|
|
13863
|
+
/** @description External payment method details: the payment is collected outside Spacebring, in cash or by bank transfer. */
|
|
13864
|
+
external?: {
|
|
13865
|
+
/** @description Customer who paid outside Spacebring. */
|
|
13866
|
+
customer: {
|
|
13867
|
+
/** @description Customer identifier. */
|
|
13868
|
+
id?: string;
|
|
13869
|
+
/** @description Location the customer belongs to. */
|
|
13870
|
+
location?: {
|
|
13871
|
+
/**
|
|
13872
|
+
* Format: uuid
|
|
13873
|
+
* @description Unique identifier of the location.
|
|
13874
|
+
*/
|
|
13875
|
+
id: string;
|
|
13876
|
+
/** @description Display name of the location. */
|
|
13877
|
+
title: string;
|
|
13878
|
+
};
|
|
13879
|
+
/** @description First name of the customer. */
|
|
13880
|
+
name?: string | null;
|
|
13881
|
+
/** @description Last name of the customer. */
|
|
13882
|
+
surname?: string | null;
|
|
13883
|
+
/** @description Company title. */
|
|
13884
|
+
title?: string;
|
|
13885
|
+
/**
|
|
13886
|
+
* @description Customer type.
|
|
13887
|
+
* @enum {string}
|
|
13888
|
+
*/
|
|
13889
|
+
type?: "company" | "user";
|
|
13890
|
+
};
|
|
13891
|
+
};
|
|
13677
13892
|
/** @description Invoice payment method details. */
|
|
13678
13893
|
invoice?: {
|
|
13679
13894
|
/** @description Customer who paid by invoice. */
|
|
@@ -13767,7 +13982,7 @@ interface components {
|
|
|
13767
13982
|
* @description Payment method type.
|
|
13768
13983
|
* @enum {string}
|
|
13769
13984
|
*/
|
|
13770
|
-
type: "credits" | "invoice" | "paymentGateway";
|
|
13985
|
+
type: "credits" | "external" | "invoice" | "paymentGateway";
|
|
13771
13986
|
};
|
|
13772
13987
|
/** @description Price breakdown for this payment. */
|
|
13773
13988
|
price: {
|
|
@@ -13922,6 +14137,18 @@ interface components {
|
|
|
13922
14137
|
/** @description Last name of the user. */
|
|
13923
14138
|
surname?: string | null;
|
|
13924
14139
|
};
|
|
14140
|
+
/** @description User who created the order: the buyer, or an admin who created it on the buyer's behalf. Absent for orders created before this was recorded. */
|
|
14141
|
+
userCreatedBy?: {
|
|
14142
|
+
/**
|
|
14143
|
+
* Format: uuid
|
|
14144
|
+
* @description Unique identifier of the user who created the order.
|
|
14145
|
+
*/
|
|
14146
|
+
id: string;
|
|
14147
|
+
/** @description First name of the user who created the order. */
|
|
14148
|
+
name?: string | null;
|
|
14149
|
+
/** @description Last name of the user who created the order. */
|
|
14150
|
+
surname?: string | null;
|
|
14151
|
+
};
|
|
13925
14152
|
/** @description User who deleted this order, if applicable. */
|
|
13926
14153
|
userDeletedBy?: {
|
|
13927
14154
|
/**
|
|
@@ -21152,7 +21379,7 @@ interface components {
|
|
|
21152
21379
|
locationRef: string;
|
|
21153
21380
|
/** @description Media files to attach. The url is generated server-side. */
|
|
21154
21381
|
media?: {
|
|
21155
|
-
/** @description Storage key of the media file. */
|
|
21382
|
+
/** @description Storage key of the media file, as returned by the media upload endpoint. */
|
|
21156
21383
|
key: string;
|
|
21157
21384
|
}[];
|
|
21158
21385
|
/**
|
|
@@ -21237,7 +21464,7 @@ interface components {
|
|
|
21237
21464
|
featured?: boolean;
|
|
21238
21465
|
/** @description Media files to attach. The url is generated server-side. */
|
|
21239
21466
|
media?: {
|
|
21240
|
-
/** @description Storage key of the media file. */
|
|
21467
|
+
/** @description Storage key of the media file, as returned by the media upload endpoint. */
|
|
21241
21468
|
key: string;
|
|
21242
21469
|
}[];
|
|
21243
21470
|
/**
|
|
@@ -21257,6 +21484,22 @@ interface components {
|
|
|
21257
21484
|
};
|
|
21258
21485
|
};
|
|
21259
21486
|
};
|
|
21487
|
+
createBenefitMedia: {
|
|
21488
|
+
content: {
|
|
21489
|
+
"application/json": {
|
|
21490
|
+
/** @description File to upload. */
|
|
21491
|
+
media: {
|
|
21492
|
+
/**
|
|
21493
|
+
* @description MIME type of the file to upload.
|
|
21494
|
+
* @enum {string}
|
|
21495
|
+
*/
|
|
21496
|
+
mimeType: "image/gif" | "image/jpeg" | "image/png" | "image/webp";
|
|
21497
|
+
/** @description Size of the file in bytes. The upload is rejected when the body length differs. */
|
|
21498
|
+
size: number;
|
|
21499
|
+
};
|
|
21500
|
+
};
|
|
21501
|
+
};
|
|
21502
|
+
};
|
|
21260
21503
|
createBenefitApplication: {
|
|
21261
21504
|
content: {
|
|
21262
21505
|
"application/json": {
|
|
@@ -22940,11 +23183,11 @@ interface components {
|
|
|
22940
23183
|
price?: number;
|
|
22941
23184
|
/** @description Stepped credit pricing tiers. */
|
|
22942
23185
|
tiers: {
|
|
22943
|
-
/** @description Fixed fee added
|
|
23186
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
22944
23187
|
flatAmount: number;
|
|
22945
|
-
/** @description
|
|
23188
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
22946
23189
|
from: number;
|
|
22947
|
-
/** @description
|
|
23190
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
22948
23191
|
unitAmount: number;
|
|
22949
23192
|
}[];
|
|
22950
23193
|
};
|
|
@@ -23009,11 +23252,11 @@ interface components {
|
|
|
23009
23252
|
price?: number;
|
|
23010
23253
|
/** @description Stepped money pricing tiers. */
|
|
23011
23254
|
tiers: {
|
|
23012
|
-
/** @description Fixed fee added
|
|
23255
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
23013
23256
|
flatAmount: number;
|
|
23014
|
-
/** @description
|
|
23257
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
23015
23258
|
from: number;
|
|
23016
|
-
/** @description
|
|
23259
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
23017
23260
|
unitAmount: number;
|
|
23018
23261
|
}[];
|
|
23019
23262
|
};
|
|
@@ -23170,7 +23413,7 @@ interface components {
|
|
|
23170
23413
|
hours: {
|
|
23171
23414
|
/** @description Opening time in 24-hour "HH:mm" format. */
|
|
23172
23415
|
from: string;
|
|
23173
|
-
/** @description Closing time in 24-hour
|
|
23416
|
+
/** @description Closing time in 24-hour format, counted from the start of the weekday. A day that stays open past midnight closes after 24:00, for example at 26:00 for 2:00 AM the next day, and at most 24 hours after the opening time. */
|
|
23174
23417
|
to: string;
|
|
23175
23418
|
};
|
|
23176
23419
|
}[];
|
|
@@ -23206,7 +23449,7 @@ interface components {
|
|
|
23206
23449
|
hours: {
|
|
23207
23450
|
/** @description Opening time in 24-hour "HH:mm" format. */
|
|
23208
23451
|
from: string;
|
|
23209
|
-
/** @description Closing time in 24-hour
|
|
23452
|
+
/** @description Closing time in 24-hour format, counted from the start of the weekday. A day that stays open past midnight closes after 24:00, for example at 26:00 for 2:00 AM the next day, and at most 24 hours after the opening time. */
|
|
23210
23453
|
to: string;
|
|
23211
23454
|
};
|
|
23212
23455
|
}[];
|
|
@@ -23361,11 +23604,11 @@ interface components {
|
|
|
23361
23604
|
price?: number;
|
|
23362
23605
|
/** @description Stepped credit pricing tiers. */
|
|
23363
23606
|
tiers: {
|
|
23364
|
-
/** @description Fixed fee added
|
|
23607
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
23365
23608
|
flatAmount: number;
|
|
23366
|
-
/** @description
|
|
23609
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
23367
23610
|
from: number;
|
|
23368
|
-
/** @description
|
|
23611
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
23369
23612
|
unitAmount: number;
|
|
23370
23613
|
}[];
|
|
23371
23614
|
};
|
|
@@ -23420,11 +23663,11 @@ interface components {
|
|
|
23420
23663
|
price?: number;
|
|
23421
23664
|
/** @description Stepped money pricing tiers. */
|
|
23422
23665
|
tiers: {
|
|
23423
|
-
/** @description Fixed fee added
|
|
23666
|
+
/** @description Fixed fee added once to bookings in this tier. */
|
|
23424
23667
|
flatAmount: number;
|
|
23425
|
-
/** @description
|
|
23668
|
+
/** @description Booking length in minutes at which this tier starts, for example 480 for 8 hours. */
|
|
23426
23669
|
from: number;
|
|
23427
|
-
/** @description
|
|
23670
|
+
/** @description Price per hour of booking within this tier, not per minute, for example 40 for 40 per hour. */
|
|
23428
23671
|
unitAmount: number;
|
|
23429
23672
|
}[];
|
|
23430
23673
|
};
|
|
@@ -23581,7 +23824,7 @@ interface components {
|
|
|
23581
23824
|
hours: {
|
|
23582
23825
|
/** @description Opening time in 24-hour "HH:mm" format. */
|
|
23583
23826
|
from: string;
|
|
23584
|
-
/** @description Closing time in 24-hour
|
|
23827
|
+
/** @description Closing time in 24-hour format, counted from the start of the weekday. A day that stays open past midnight closes after 24:00, for example at 26:00 for 2:00 AM the next day, and at most 24 hours after the opening time. */
|
|
23585
23828
|
to: string;
|
|
23586
23829
|
};
|
|
23587
23830
|
}[];
|
|
@@ -23617,7 +23860,7 @@ interface components {
|
|
|
23617
23860
|
hours: {
|
|
23618
23861
|
/** @description Opening time in 24-hour "HH:mm" format. */
|
|
23619
23862
|
from: string;
|
|
23620
|
-
/** @description Closing time in 24-hour
|
|
23863
|
+
/** @description Closing time in 24-hour format, counted from the start of the weekday. A day that stays open past midnight closes after 24:00, for example at 26:00 for 2:00 AM the next day, and at most 24 hours after the opening time. */
|
|
23621
23864
|
to: string;
|
|
23622
23865
|
};
|
|
23623
23866
|
}[];
|
|
@@ -25653,6 +25896,15 @@ interface operations {
|
|
|
25653
25896
|
"application/json": components["schemas"]["responseError"];
|
|
25654
25897
|
};
|
|
25655
25898
|
};
|
|
25899
|
+
/** @description Conflict */
|
|
25900
|
+
409: {
|
|
25901
|
+
headers: {
|
|
25902
|
+
[name: string]: unknown;
|
|
25903
|
+
};
|
|
25904
|
+
content: {
|
|
25905
|
+
"application/json": components["schemas"]["responseError"];
|
|
25906
|
+
};
|
|
25907
|
+
};
|
|
25656
25908
|
};
|
|
25657
25909
|
};
|
|
25658
25910
|
getBenefit: {
|
|
@@ -25719,6 +25971,15 @@ interface operations {
|
|
|
25719
25971
|
"application/json": components["schemas"]["responseError"];
|
|
25720
25972
|
};
|
|
25721
25973
|
};
|
|
25974
|
+
/** @description Conflict */
|
|
25975
|
+
409: {
|
|
25976
|
+
headers: {
|
|
25977
|
+
[name: string]: unknown;
|
|
25978
|
+
};
|
|
25979
|
+
content: {
|
|
25980
|
+
"application/json": components["schemas"]["responseError"];
|
|
25981
|
+
};
|
|
25982
|
+
};
|
|
25722
25983
|
};
|
|
25723
25984
|
};
|
|
25724
25985
|
deleteBenefit: {
|
|
@@ -25751,6 +26012,38 @@ interface operations {
|
|
|
25751
26012
|
};
|
|
25752
26013
|
};
|
|
25753
26014
|
};
|
|
26015
|
+
createBenefitMedia: {
|
|
26016
|
+
parameters: {
|
|
26017
|
+
query?: never;
|
|
26018
|
+
header?: {
|
|
26019
|
+
/** @description The id of the network. Required when using bearer token authentication */
|
|
26020
|
+
"spacebring-network-id"?: string;
|
|
26021
|
+
};
|
|
26022
|
+
path?: never;
|
|
26023
|
+
cookie?: never;
|
|
26024
|
+
};
|
|
26025
|
+
requestBody: components["requestBodies"]["createBenefitMedia"];
|
|
26026
|
+
responses: {
|
|
26027
|
+
/** @description Created */
|
|
26028
|
+
201: {
|
|
26029
|
+
headers: {
|
|
26030
|
+
[name: string]: unknown;
|
|
26031
|
+
};
|
|
26032
|
+
content: {
|
|
26033
|
+
"application/json": components["schemas"]["createBenefitMedia"];
|
|
26034
|
+
};
|
|
26035
|
+
};
|
|
26036
|
+
/** @description Bad Request */
|
|
26037
|
+
400: {
|
|
26038
|
+
headers: {
|
|
26039
|
+
[name: string]: unknown;
|
|
26040
|
+
};
|
|
26041
|
+
content: {
|
|
26042
|
+
"application/json": components["schemas"]["responseError"];
|
|
26043
|
+
};
|
|
26044
|
+
};
|
|
26045
|
+
};
|
|
26046
|
+
};
|
|
25754
26047
|
getBenefitApplications: {
|
|
25755
26048
|
parameters: {
|
|
25756
26049
|
query?: {
|
|
@@ -33384,10 +33677,10 @@ type UpdateFeedPostBody = NonNullable<NonNullable<operations["updateFeedPost"]["
|
|
|
33384
33677
|
|
|
33385
33678
|
/** A Event entity as returned by the Spacebring API. */
|
|
33386
33679
|
type Event = NonNullable<components["schemas"]["event"]>;
|
|
33680
|
+
/** A EventMedia entity as returned by the Spacebring API. */
|
|
33681
|
+
type EventMedia = NonNullable<operations["createEventMedia"]["responses"][201]["content"]["application/json"]["media"]>;
|
|
33387
33682
|
/** A EventTicket entity as returned by the Spacebring API. */
|
|
33388
33683
|
type EventTicket = NonNullable<components["schemas"]["eventTicket"]>;
|
|
33389
|
-
/** A Media entity as returned by the Spacebring API. */
|
|
33390
|
-
type Media = NonNullable<operations["createEventMedia"]["responses"][201]["content"]["application/json"]["media"]>;
|
|
33391
33684
|
/** Query parameters for `sb.events.list()`. */
|
|
33392
33685
|
interface GetEventsByOrganizationQuery {
|
|
33393
33686
|
/** The id of the location. */
|
|
@@ -33715,6 +34008,8 @@ type Application = NonNullable<components["schemas"]["benefitApplication"]>;
|
|
|
33715
34008
|
type Benefit = NonNullable<components["schemas"]["benefit"]>;
|
|
33716
34009
|
/** A BenefitCategory entity as returned by the Spacebring API. */
|
|
33717
34010
|
type BenefitCategory = NonNullable<components["schemas"]["benefitCategory"]>;
|
|
34011
|
+
/** A BenefitMedia entity as returned by the Spacebring API. */
|
|
34012
|
+
type BenefitMedia = NonNullable<operations["createBenefitMedia"]["responses"][201]["content"]["application/json"]["media"]>;
|
|
33718
34013
|
/** Query parameters for `sb.benefits.applications.list()`. */
|
|
33719
34014
|
interface GetBenefitApplicationsQuery {
|
|
33720
34015
|
/** UUID of the benefit. */
|
|
@@ -33760,6 +34055,8 @@ type ApplyBenefitBody = NonNullable<NonNullable<operations["applyBenefit"]["requ
|
|
|
33760
34055
|
type CreateBenefitBody = NonNullable<NonNullable<operations["createBenefit"]["requestBody"]>["content"]["application/json"]["benefit"]>;
|
|
33761
34056
|
/** Request body for `sb.benefits.categories.create()`. */
|
|
33762
34057
|
type CreateBenefitCategoryBody = NonNullable<NonNullable<operations["createBenefitCategory"]["requestBody"]>["content"]["application/json"]["category"]>;
|
|
34058
|
+
/** Request body for `sb.benefits.createMedia()`. */
|
|
34059
|
+
type CreateBenefitMediaBody = NonNullable<NonNullable<operations["createBenefitMedia"]["requestBody"]>["content"]["application/json"]["media"]>;
|
|
33763
34060
|
/** Request body for `sb.benefits.update()`. */
|
|
33764
34061
|
type UpdateBenefitBody = NonNullable<NonNullable<operations["updateBenefit"]["requestBody"]>["content"]["application/json"]["benefit"]>;
|
|
33765
34062
|
/** Request body for `sb.benefits.categories.update()`. */
|
|
@@ -33804,6 +34101,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
33804
34101
|
create(benefit: CreateBenefitBody, options?: SpacebringRequestOptions): Promise<Benefit>;
|
|
33805
34102
|
update(benefitId: string, benefit: UpdateBenefitBody, options?: SpacebringRequestOptions): Promise<Benefit>;
|
|
33806
34103
|
delete(benefitId: string, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
34104
|
+
createMedia(media: CreateBenefitMediaBody, options?: SpacebringRequestOptions): Promise<BenefitMedia>;
|
|
33807
34105
|
applications: {
|
|
33808
34106
|
list(query?: GetBenefitApplicationsQuery, options?: SpacebringRequestOptions): Promise<{
|
|
33809
34107
|
applications: Application[];
|
|
@@ -33976,7 +34274,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
33976
34274
|
addEventHosts(id: string, tickets: AddEventHostsBody, options?: SpacebringRequestOptions): Promise<EventTicket[]>;
|
|
33977
34275
|
cancel(id: string, options?: SpacebringRequestOptions): Promise<Event>;
|
|
33978
34276
|
copy(id: string, options?: SpacebringRequestOptions): Promise<Event>;
|
|
33979
|
-
createMedia(media: CreateEventMediaBody, options?: SpacebringRequestOptions): Promise<
|
|
34277
|
+
createMedia(media: CreateEventMediaBody, options?: SpacebringRequestOptions): Promise<EventMedia>;
|
|
33980
34278
|
tickets: {
|
|
33981
34279
|
list(query?: GetEventTicketsQuery, options?: SpacebringRequestOptions): Promise<{
|
|
33982
34280
|
tickets?: EventTicket[];
|
|
@@ -34331,4 +34629,4 @@ declare class SpacebringError extends Error {
|
|
|
34331
34629
|
});
|
|
34332
34630
|
}
|
|
34333
34631
|
|
|
34334
|
-
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
|
|
34632
|
+
export { type Activity, type AddEventHostsBody, type AltCurrency, type Application, type ApplyBenefitBody, type Assignment, type Balance, type Benefit, type BenefitCategory, type BenefitMedia, 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 CreateBenefitMediaBody, 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 EventMedia, 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 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 };
|