@izak0s/spacebring-api 9.0.1 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1431,6 +1431,26 @@ interface paths {
1431
1431
  patch?: never;
1432
1432
  trace?: never;
1433
1433
  };
1434
+ "/events/v1/media": {
1435
+ parameters: {
1436
+ query?: never;
1437
+ header?: never;
1438
+ path?: never;
1439
+ cookie?: never;
1440
+ };
1441
+ get?: never;
1442
+ put?: never;
1443
+ /**
1444
+ * Create a media upload
1445
+ * @description Create a media upload for an event 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 an event within an hour; an image that is not attached by then is discarded. <h3>OAuth</h3>Required scopes: <code>events</code>
1446
+ */
1447
+ post: operations["createEventMedia"];
1448
+ delete?: never;
1449
+ options?: never;
1450
+ head?: never;
1451
+ patch?: never;
1452
+ trace?: never;
1453
+ };
1434
1454
  "/events/tickets/v1": {
1435
1455
  parameters: {
1436
1456
  query?: never;
@@ -7483,6 +7503,47 @@ interface components {
7483
7503
  surname?: string | null;
7484
7504
  };
7485
7505
  };
7506
+ createEventMedia: {
7507
+ /** @description The created media upload. */
7508
+ media: {
7509
+ /** @description Storage key of the media file. Pass it as media[0].key when creating or updating an event. */
7510
+ key: string;
7511
+ /**
7512
+ * @description MIME type of the image file.
7513
+ * @enum {string}
7514
+ */
7515
+ mimeType: "image/gif" | "image/jpeg" | "image/png" | "image/webp";
7516
+ /** @description Size of the image file in bytes. */
7517
+ size: number;
7518
+ /**
7519
+ * @description Upload status. pending: the file has not been received yet. uploaded: the file is stored and can be attached to an event. attached: an event references the file.
7520
+ * @enum {string}
7521
+ */
7522
+ status: "pending" | "uploaded" | "attached";
7523
+ /** @description How to upload the file. Send the raw bytes as the request body, not a multipart form. */
7524
+ upload: {
7525
+ /**
7526
+ * Format: date-time
7527
+ * @description ISO timestamp after which the upload URL is rejected.
7528
+ */
7529
+ expirationDate: string;
7530
+ /** @description Headers the PUT request must send exactly as given; the signature covers them. */
7531
+ headers: {
7532
+ /** @description Must equal the size declared when the upload was created. */
7533
+ "Content-Length": string;
7534
+ /** @description Must equal the mimeType declared when the upload was created. */
7535
+ "Content-Type": string;
7536
+ };
7537
+ /**
7538
+ * @description HTTP method of the upload request.
7539
+ * @enum {string}
7540
+ */
7541
+ method: "PUT";
7542
+ /** @description Presigned URL to send the raw file bytes to. */
7543
+ url: string;
7544
+ };
7545
+ };
7546
+ };
7486
7547
  post: {
7487
7548
  /** @description Number of comments on the post. */
7488
7549
  comments: number;
@@ -7935,6 +7996,15 @@ interface components {
7935
7996
  timezoneId: string;
7936
7997
  location: {
7937
7998
  address?: string;
7999
+ /** @description Returned only to client credentials and to users with an admin role in the location. */
8000
+ businessAddress?: {
8001
+ city?: string;
8002
+ countryCode?: string | null;
8003
+ line1?: string;
8004
+ line2?: string;
8005
+ postalCode?: string;
8006
+ state?: string;
8007
+ };
7938
8008
  createDate?: components["schemas"]["dateSchema"];
7939
8009
  currencyCode?: string;
7940
8010
  description?: string;
@@ -7942,10 +8012,66 @@ interface components {
7942
8012
  email?: string;
7943
8013
  /** Format: uuid */
7944
8014
  id?: string;
8015
+ /** @description Returned only to client credentials and to users with an admin role in the location. */
8016
+ legalName?: string;
7945
8017
  /** @enum {string} */
7946
8018
  locale?: "en" | "es" | "ko" | "uk" | "ru";
8019
+ /** @description Images of the location, newest first. */
8020
+ media?: {
8021
+ height?: number;
8022
+ /** @description Storage key of the image. */
8023
+ key?: string;
8024
+ mime?: string;
8025
+ /** @description Public URL of the image. */
8026
+ url?: string;
8027
+ width?: number;
8028
+ }[];
7947
8029
  /** Format: uuid */
7948
8030
  networkRef?: string;
8031
+ /** @description Opening hours of the location. */
8032
+ schedule?: {
8033
+ /** @description Opening hours for members. Always applies. */
8034
+ default?: {
8035
+ closedDays?: string[];
8036
+ items?: {
8037
+ days?: {
8038
+ friday?: boolean;
8039
+ monday?: boolean;
8040
+ saturday?: boolean;
8041
+ sunday?: boolean;
8042
+ thursday?: boolean;
8043
+ tuesday?: boolean;
8044
+ wednesday?: boolean;
8045
+ };
8046
+ hours?: {
8047
+ from?: string;
8048
+ to?: string;
8049
+ };
8050
+ }[];
8051
+ };
8052
+ /** @description Stricter opening hours for non-members. Applies only when enabled; otherwise non-members follow the default schedule. */
8053
+ public?: {
8054
+ closedDays?: string[];
8055
+ enabled?: boolean;
8056
+ items?: {
8057
+ days?: {
8058
+ friday?: boolean;
8059
+ monday?: boolean;
8060
+ saturday?: boolean;
8061
+ sunday?: boolean;
8062
+ thursday?: boolean;
8063
+ tuesday?: boolean;
8064
+ wednesday?: boolean;
8065
+ };
8066
+ hours?: {
8067
+ from?: string;
8068
+ to?: string;
8069
+ };
8070
+ }[];
8071
+ };
8072
+ };
8073
+ /** @description Returned only to client credentials and to users with an admin role in the location. */
8074
+ taxId?: string;
7949
8075
  timezoneId?: components["schemas"]["timezoneId"];
7950
8076
  title?: string;
7951
8077
  };
@@ -8847,6 +8973,11 @@ interface components {
8847
8973
  bookingPermission: "admins" | "exclusiveMembers" | "members" | "networkMembers" | "public";
8848
8974
  /** @description Booking step size in minutes. */
8849
8975
  bookingStepMinutes?: number;
8976
+ /**
8977
+ * @description Whether bookings are measured in hours or in whole days.
8978
+ * @enum {string}
8979
+ */
8980
+ bookingUnit: "hour" | "day";
8850
8981
  /** @description Brivo access group reference. */
8851
8982
  brivoGroupRef?: number | null;
8852
8983
  /**
@@ -8902,6 +9033,11 @@ interface components {
8902
9033
  flatAmount: number;
8903
9034
  /** @description Start of this price tier in booking minutes. */
8904
9035
  from: number;
9036
+ /**
9037
+ * @description Whether the tier is priced per hour or per day.
9038
+ * @enum {string}
9039
+ */
9040
+ unit: "hour" | "day";
8905
9041
  /** @description Variable price per unit within this tier. */
8906
9042
  unitAmount: number;
8907
9043
  }[];
@@ -8975,6 +9111,11 @@ interface components {
8975
9111
  flatAmount: number;
8976
9112
  /** @description Start of this price tier in booking minutes. */
8977
9113
  from: number;
9114
+ /**
9115
+ * @description Whether the tier is priced per hour or per day.
9116
+ * @enum {string}
9117
+ */
9118
+ unit: "hour" | "day";
8978
9119
  /** @description Variable price per unit within this tier. */
8979
9120
  unitAmount: number;
8980
9121
  }[];
@@ -9456,6 +9597,11 @@ interface components {
9456
9597
  bookingPermission: "admins" | "exclusiveMembers" | "members" | "networkMembers" | "public";
9457
9598
  /** @description Booking step size in minutes. */
9458
9599
  bookingStepMinutes?: number;
9600
+ /**
9601
+ * @description Whether bookings are measured in hours or in whole days.
9602
+ * @enum {string}
9603
+ */
9604
+ bookingUnit: "hour" | "day";
9459
9605
  /** @description Brivo access group reference. */
9460
9606
  brivoGroupRef?: number | null;
9461
9607
  /**
@@ -9511,6 +9657,11 @@ interface components {
9511
9657
  flatAmount: number;
9512
9658
  /** @description Start of this price tier in booking minutes. */
9513
9659
  from: number;
9660
+ /**
9661
+ * @description Whether the tier is priced per hour or per day.
9662
+ * @enum {string}
9663
+ */
9664
+ unit: "hour" | "day";
9514
9665
  /** @description Variable price per unit within this tier. */
9515
9666
  unitAmount: number;
9516
9667
  }[];
@@ -9584,6 +9735,11 @@ interface components {
9584
9735
  flatAmount: number;
9585
9736
  /** @description Start of this price tier in booking minutes. */
9586
9737
  from: number;
9738
+ /**
9739
+ * @description Whether the tier is priced per hour or per day.
9740
+ * @enum {string}
9741
+ */
9742
+ unit: "hour" | "day";
9587
9743
  /** @description Variable price per unit within this tier. */
9588
9744
  unitAmount: number;
9589
9745
  }[];
@@ -21837,7 +21993,7 @@ interface components {
21837
21993
  locationRef: string;
21838
21994
  /** @description Media files attached to the event. */
21839
21995
  media?: {
21840
- /** @description Storage key of the media file. */
21996
+ /** @description Storage key of the media file, as returned by the media upload endpoint. */
21841
21997
  key?: string;
21842
21998
  /** @description Public URL of the media file. */
21843
21999
  url?: string;
@@ -21932,7 +22088,7 @@ interface components {
21932
22088
  locationRef: string;
21933
22089
  /** @description Media files attached to the event. */
21934
22090
  media?: {
21935
- /** @description Storage key of the media file. */
22091
+ /** @description Storage key of the media file, as returned by the media upload endpoint. */
21936
22092
  key?: string;
21937
22093
  /** @description Public URL of the media file. */
21938
22094
  url?: string;
@@ -21979,6 +22135,22 @@ interface components {
21979
22135
  };
21980
22136
  };
21981
22137
  };
22138
+ createEventMedia: {
22139
+ content: {
22140
+ "application/json": {
22141
+ /** @description File to upload. */
22142
+ media: {
22143
+ /**
22144
+ * @description MIME type of the file to upload.
22145
+ * @enum {string}
22146
+ */
22147
+ mimeType: "image/gif" | "image/jpeg" | "image/png" | "image/webp";
22148
+ /** @description Size of the file in bytes. The upload is rejected when the body length differs. */
22149
+ size: number;
22150
+ };
22151
+ };
22152
+ };
22153
+ };
21982
22154
  createFeedPost: {
21983
22155
  content: {
21984
22156
  "application/json": {
@@ -22539,6 +22711,11 @@ interface components {
22539
22711
  bookingPermission?: "admins" | "exclusiveMembers" | "members" | "networkMembers" | "public";
22540
22712
  /** @description Booking step size in minutes. */
22541
22713
  bookingStepMinutes?: number;
22714
+ /**
22715
+ * @description Whether bookings are measured in hours or in whole days. With day, bookings always cover the whole schedule of the day and the duration bounds are set to 24 hours. Defaults to hour.
22716
+ * @enum {string}
22717
+ */
22718
+ bookingUnit?: "hour" | "day";
22542
22719
  /** @description Brivo access group reference. */
22543
22720
  brivoGroupRef?: number | null;
22544
22721
  /**
@@ -22948,6 +23125,11 @@ interface components {
22948
23125
  bookingPermission?: "admins" | "exclusiveMembers" | "members" | "networkMembers" | "public";
22949
23126
  /** @description Booking step size in minutes. */
22950
23127
  bookingStepMinutes?: number;
23128
+ /**
23129
+ * @description Whether bookings are measured in hours or in whole days. With day, bookings always cover the whole schedule of the day and the duration bounds are set to 24 hours. Defaults to hour.
23130
+ * @enum {string}
23131
+ */
23132
+ bookingUnit?: "hour" | "day";
22951
23133
  /** @description Brivo access group reference. */
22952
23134
  brivoGroupRef?: number | null;
22953
23135
  /**
@@ -23383,6 +23565,8 @@ interface components {
23383
23565
  metadata?: {
23384
23566
  [key: string]: unknown;
23385
23567
  };
23568
+ /** @description RRULE lines that replace how the booking repeats, e.g. `RRULE:FREQ=WEEKLY;COUNT=10`. The DTSTART line is derived from the booking start, and the occurrences already detached from the series stay excluded. Only supported for a repeating booking, and only with updateRepeatingScope set to `thisAndNext`. */
23569
+ recurrence?: string[];
23386
23570
  /**
23387
23571
  * Format: uuid
23388
23572
  * @description ID of the resource to move the booking to. The target must belong to the same location, be of an interchangeable type, and sell the booking's payment method at the same price. Not supported for repeating bookings.
@@ -27897,6 +28081,15 @@ interface operations {
27897
28081
  "application/json": components["schemas"]["responseError"];
27898
28082
  };
27899
28083
  };
28084
+ /** @description Conflict */
28085
+ 409: {
28086
+ headers: {
28087
+ [name: string]: unknown;
28088
+ };
28089
+ content: {
28090
+ "application/json": components["schemas"]["responseError"];
28091
+ };
28092
+ };
27900
28093
  };
27901
28094
  };
27902
28095
  getEvent: {
@@ -27969,6 +28162,15 @@ interface operations {
27969
28162
  "application/json": components["schemas"]["responseError"];
27970
28163
  };
27971
28164
  };
28165
+ /** @description Conflict */
28166
+ 409: {
28167
+ headers: {
28168
+ [name: string]: unknown;
28169
+ };
28170
+ content: {
28171
+ "application/json": components["schemas"]["responseError"];
28172
+ };
28173
+ };
27972
28174
  };
27973
28175
  };
27974
28176
  deleteEvent: {
@@ -28116,6 +28318,38 @@ interface operations {
28116
28318
  };
28117
28319
  };
28118
28320
  };
28321
+ createEventMedia: {
28322
+ parameters: {
28323
+ query?: never;
28324
+ header?: {
28325
+ /** @description The id of the network. Required when using bearer token authentication */
28326
+ "spacebring-network-id"?: string;
28327
+ };
28328
+ path?: never;
28329
+ cookie?: never;
28330
+ };
28331
+ requestBody: components["requestBodies"]["createEventMedia"];
28332
+ responses: {
28333
+ /** @description Created */
28334
+ 201: {
28335
+ headers: {
28336
+ [name: string]: unknown;
28337
+ };
28338
+ content: {
28339
+ "application/json": components["schemas"]["createEventMedia"];
28340
+ };
28341
+ };
28342
+ /** @description Bad Request */
28343
+ 400: {
28344
+ headers: {
28345
+ [name: string]: unknown;
28346
+ };
28347
+ content: {
28348
+ "application/json": components["schemas"]["responseError"];
28349
+ };
28350
+ };
28351
+ };
28352
+ };
28119
28353
  getEventTickets: {
28120
28354
  parameters: {
28121
28355
  query?: {
@@ -29907,7 +30141,7 @@ interface operations {
29907
30141
  "startDate[lt]"?: string;
29908
30142
  /** @description Matches bookings with startDate on or before this date (ISO 8601). */
29909
30143
  "startDate[lte]"?: string;
29910
- /** @description UUID of the company whose own bookings to list: bookings the company or its members made, not ones they were added to as attendees. Cannot be combined with customerRef or userRefOwner. */
30144
+ /** @description UUID of the company whose own bookings to list: bookings the company or its members made, not ones they were added to as attendees. Cannot be combined with customerRef, userRef, or userRefOwner. */
29911
30145
  companyRefOwner?: string;
29912
30146
  /** @description UUID of the customer whose bookings to list, both made and attended. */
29913
30147
  customerRef?: string;
@@ -29917,7 +30151,7 @@ interface operations {
29917
30151
  includeDeleted?: string;
29918
30152
  /** @description Maximum number of bookings per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
29919
30153
  limit?: number;
29920
- /** @description UUID of the location whose bookings to list. Required when resourceRef is omitted. */
30154
+ /** @description UUID of the location whose bookings to list. Required when both resourceRef and userRef are omitted. */
29921
30155
  locationRef?: string;
29922
30156
  /** @description Deprecated. Use customerRef instead. UUID of the customer whose bookings to list. */
29923
30157
  membershipRefOwner?: string;
@@ -29925,7 +30159,7 @@ interface operations {
29925
30159
  nextPageToken?: string;
29926
30160
  /** @description Sort order as `<field>:<direction>`, where field is startDate, endDate or createDate and direction is asc or desc. */
29927
30161
  order?: string;
29928
- /** @description UUID of the resource whose bookings to list. Required when locationRef is omitted. */
30162
+ /** @description UUID of the resource whose bookings to list. Required when both locationRef and userRef are omitted. */
29929
30163
  resourceRef?: string;
29930
30164
  /** @description Set to "true" to expand repeating bookings into single occurrences. */
29931
30165
  singleBookings?: string;
@@ -29935,7 +30169,9 @@ interface operations {
29935
30169
  status?: string;
29936
30170
  /** @description Comma-separated list of resource types to filter by, e.g. `room,hotDesk`. Valid values: hotDesk, dedicatedDesk, office, parkingLot, room, conferenceRoom, eventSpace, meetingRoom, phoneBooth, studio, equipment, station. Defaults to all bookable types. */
29937
30171
  type?: string;
29938
- /** @description UUID of the user whose own bookings to list: bookings the user made, not ones they were added to as an attendee. Cannot be combined with customerRef or companyRefOwner. */
30172
+ /** @description UUID of the user whose bookings to list, both made and attended. Can be given on its own, without locationRef or resourceRef, to list the user's bookings across every location of the network. Cannot be combined with customerRef, companyRefOwner, or userRefOwner. */
30173
+ userRef?: string;
30174
+ /** @description UUID of the user whose own bookings to list: bookings the user made, not ones they were added to as an attendee. Cannot be combined with customerRef, companyRefOwner, or userRef. */
29939
30175
  userRefOwner?: string;
29940
30176
  /** @description Deprecated. Use type instead. */
29941
30177
  types?: string;
@@ -32668,7 +32904,7 @@ interface GetBookingsQuery {
32668
32904
  "startDate[lt]"?: string;
32669
32905
  /** Matches bookings with startDate on or before this date (ISO 8601). */
32670
32906
  "startDate[lte]"?: string;
32671
- /** UUID of the company whose own bookings to list: bookings the company or its members made, not ones they were added to as attendees. Cannot be combined with customerRef or userRefOwner. */
32907
+ /** UUID of the company whose own bookings to list: bookings the company or its members made, not ones they were added to as attendees. Cannot be combined with customerRef, userRef, or userRefOwner. */
32672
32908
  companyRefOwner?: string;
32673
32909
  /** UUID of the customer whose bookings to list, both made and attended. */
32674
32910
  customerRef?: string;
@@ -32678,7 +32914,7 @@ interface GetBookingsQuery {
32678
32914
  includeDeleted?: string;
32679
32915
  /** Maximum number of bookings per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
32680
32916
  limit?: number;
32681
- /** UUID of the location whose bookings to list. Required when resourceRef is omitted. */
32917
+ /** UUID of the location whose bookings to list. Required when both resourceRef and userRef are omitted. */
32682
32918
  locationRef?: string;
32683
32919
  /** @deprecated Use customerRef instead. UUID of the customer whose bookings to list. */
32684
32920
  membershipRefOwner?: string;
@@ -32686,7 +32922,7 @@ interface GetBookingsQuery {
32686
32922
  nextPageToken?: string;
32687
32923
  /** Sort order as `:`, where field is startDate, endDate or createDate and direction is asc or desc. */
32688
32924
  order?: string;
32689
- /** UUID of the resource whose bookings to list. Required when locationRef is omitted. */
32925
+ /** UUID of the resource whose bookings to list. Required when both locationRef and userRef are omitted. */
32690
32926
  resourceRef?: string;
32691
32927
  /** Set to "true" to expand repeating bookings into single occurrences. */
32692
32928
  singleBookings?: string;
@@ -32696,7 +32932,9 @@ interface GetBookingsQuery {
32696
32932
  status?: string;
32697
32933
  /** Comma-separated list of resource types to filter by, e.g. `room,hotDesk`. Valid values: hotDesk, dedicatedDesk, office, parkingLot, room, conferenceRoom, eventSpace, meetingRoom, phoneBooth, studio, equipment, station. Defaults to all bookable types. */
32698
32934
  type?: string;
32699
- /** UUID of the user whose own bookings to list: bookings the user made, not ones they were added to as an attendee. Cannot be combined with customerRef or companyRefOwner. */
32935
+ /** UUID of the user whose bookings to list, both made and attended. Can be given on its own, without locationRef or resourceRef, to list the user's bookings across every location of the network. Cannot be combined with customerRef, companyRefOwner, or userRefOwner. */
32936
+ userRef?: string;
32937
+ /** UUID of the user whose own bookings to list: bookings the user made, not ones they were added to as an attendee. Cannot be combined with customerRef, companyRefOwner, or userRef. */
32700
32938
  userRefOwner?: string;
32701
32939
  /** @deprecated Use type instead. */
32702
32940
  types?: string;
@@ -32831,6 +33069,8 @@ type UpdateFeedPostBody = NonNullable<NonNullable<operations["updateFeedPost"]["
32831
33069
  type Event = NonNullable<components["schemas"]["event"]>;
32832
33070
  /** A EventTicket entity as returned by the Spacebring API. */
32833
33071
  type EventTicket = NonNullable<components["schemas"]["eventTicket"]>;
33072
+ /** A Media entity as returned by the Spacebring API. */
33073
+ type Media = NonNullable<operations["createEventMedia"]["responses"][201]["content"]["application/json"]["media"]>;
32834
33074
  /** Query parameters for `sb.events.list()`. */
32835
33075
  interface GetEventsByOrganizationQuery {
32836
33076
  /** The id of the location. */
@@ -32869,6 +33109,8 @@ interface GetEventTicketsQuery {
32869
33109
  type AddEventHostsBody = NonNullable<NonNullable<operations["addEventHosts"]["requestBody"]>["content"]["application/json"]["tickets"]>;
32870
33110
  /** Request body for `sb.events.create()`. */
32871
33111
  type CreateEventBody = NonNullable<NonNullable<operations["createEvent"]["requestBody"]>["content"]["application/json"]["event"]>;
33112
+ /** Request body for `sb.events.createMedia()`. */
33113
+ type CreateEventMediaBody = NonNullable<NonNullable<operations["createEventMedia"]["requestBody"]>["content"]["application/json"]["media"]>;
32872
33114
  /** Request body for `sb.events.update()`. */
32873
33115
  type UpdateEventBody = NonNullable<NonNullable<operations["updateEvent"]["requestBody"]>["content"]["application/json"]["event"]>;
32874
33116
  /** Request body for `sb.events.tickets.update()`. */
@@ -33417,6 +33659,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
33417
33659
  addEventHosts(id: string, tickets: AddEventHostsBody, options?: SpacebringRequestOptions): Promise<EventTicket[]>;
33418
33660
  cancel(id: string, options?: SpacebringRequestOptions): Promise<Event>;
33419
33661
  copy(id: string, options?: SpacebringRequestOptions): Promise<Event>;
33662
+ createMedia(media: CreateEventMediaBody, options?: SpacebringRequestOptions): Promise<Media>;
33420
33663
  tickets: {
33421
33664
  list(query?: GetEventTicketsQuery, options?: SpacebringRequestOptions): Promise<{
33422
33665
  tickets?: EventTicket[];
@@ -33769,4 +34012,4 @@ declare class SpacebringError extends Error {
33769
34012
  });
33770
34013
  }
33771
34014
 
33772
- 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 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 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 UpdateSupportTicketStatusBody, type UpdateSupportTicketTypeBody, type UpdateTemplateBody, type UpdateVisitBody, type Visit, type components, type operations, type paths };
34015
+ 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 UpdateSupportTicketStatusBody, type UpdateSupportTicketTypeBody, type UpdateTemplateBody, type UpdateVisitBody, type Visit, type components, type operations, type paths };
package/dist/index.js CHANGED
@@ -1498,6 +1498,14 @@ function createEvents(client, defaults) {
1498
1498
  async copy(id, options) {
1499
1499
  return unwrapProp(await client.POST("/events/v1/{id}/copy", { params: { path: { id } }, signal: options?.signal }), "event", "POST /events/v1/{id}/copy");
1500
1500
  },
1501
+ /**
1502
+ * Create a media upload
1503
+ *
1504
+ * Create a media upload for an event 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 `media[0].key` when creating or updating an event within an hour; an image that is not attached by then is discarded.
1505
+ */
1506
+ async createMedia(media, options) {
1507
+ return unwrapProp(await client.POST("/events/v1/media", { body: { media }, signal: options?.signal }), "media", "POST /events/v1/media");
1508
+ },
1501
1509
  tickets: {
1502
1510
  /**
1503
1511
  * Retrieve tickets