@izak0s/spacebring-api 15.0.0 → 16.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -358,7 +358,7 @@ interface paths {
358
358
  put?: never;
359
359
  /**
360
360
  * Create a category
361
- * @description Create a benefit category. <h3>OAuth</h3>Required scopes: <code>benefits</code>
361
+ * @description Create a benefit category. A user needs the Settings permission in the location. <h3>OAuth</h3>Required scopes: <code>benefits</code>
362
362
  */
363
363
  post: operations["createBenefitCategory"];
364
364
  delete?: never;
@@ -2129,6 +2129,26 @@ interface paths {
2129
2129
  patch?: never;
2130
2130
  trace?: never;
2131
2131
  };
2132
+ "/plans/v1/media": {
2133
+ parameters: {
2134
+ query?: never;
2135
+ header?: never;
2136
+ path?: never;
2137
+ cookie?: never;
2138
+ };
2139
+ get?: never;
2140
+ put?: never;
2141
+ /**
2142
+ * Create a media upload
2143
+ * @description Create a media upload for a plan 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 plan within an hour; an image that is not attached by then is discarded. <h3>OAuth</h3>Required scopes: <code>plans</code>
2144
+ */
2145
+ post: operations["createPlanMedia"];
2146
+ delete?: never;
2147
+ options?: never;
2148
+ head?: never;
2149
+ patch?: never;
2150
+ trace?: never;
2151
+ };
2132
2152
  "/plans/v1/{planId}": {
2133
2153
  parameters: {
2134
2154
  query?: never;
@@ -2388,7 +2408,7 @@ interface paths {
2388
2408
  put?: never;
2389
2409
  /**
2390
2410
  * Create a category
2391
- * @description Create a shop category. <h3>OAuth</h3>Required scopes: <code>shop</code>
2411
+ * @description Create a shop category. A user needs the Settings permission in the location. <h3>OAuth</h3>Required scopes: <code>shop</code>
2392
2412
  */
2393
2413
  post: operations["createShopCategory"];
2394
2414
  delete?: never;
@@ -7162,6 +7182,11 @@ interface components {
7162
7182
  * @enum {string}
7163
7183
  */
7164
7184
  status: "draft" | "issued" | "signed" | "declined" | "terminated";
7185
+ /**
7186
+ * Format: uuid
7187
+ * @description ID of the subscription created when the contract was issued, present when the action is subscription.
7188
+ */
7189
+ subscriptionRef?: string;
7165
7190
  /**
7166
7191
  * Format: uuid
7167
7192
  * @description ID of the template used to generate this contract.
@@ -7379,6 +7404,11 @@ interface components {
7379
7404
  * @enum {string}
7380
7405
  */
7381
7406
  status: "draft" | "issued" | "signed" | "declined" | "terminated";
7407
+ /**
7408
+ * Format: uuid
7409
+ * @description ID of the subscription created when the contract was issued, present when the action is subscription.
7410
+ */
7411
+ subscriptionRef?: string;
7382
7412
  /**
7383
7413
  * Format: uuid
7384
7414
  * @description ID of the template used to generate this contract.
@@ -7599,6 +7629,8 @@ interface components {
7599
7629
  percentOff?: number | null;
7600
7630
  /** @description Product types the coupon applies to. */
7601
7631
  productTypes: ("roomBookings" | "eventSpaceBookings" | "conferenceRoomBookings" | "meetingRoomBookings" | "phoneBoothBookings" | "stationBookings" | "studioBookings" | "hotDeskBookings" | "dedicatedDeskBookings" | "officeBookings" | "parkingBookings" | "equipmentBookings" | "eventTickets" | "shopProducts" | "packages" | "subscriptionItems")[];
7632
+ /** @description Name of the coupon. Absent when the coupon has none and is named after its discount and the products it applies to. */
7633
+ title?: string;
7602
7634
  /**
7603
7635
  * @description Deprecated coupon category.
7604
7636
  * @enum {string}
@@ -9370,6 +9402,13 @@ interface components {
9370
9402
  * @description ID of the location this plan belongs to.
9371
9403
  */
9372
9404
  locationRef: string;
9405
+ /** @description Media files attached to this plan. The first is its cover image. */
9406
+ media: {
9407
+ /** @description Storage key of the media file. */
9408
+ key: string;
9409
+ /** @description Public URL of the media file. */
9410
+ url: string;
9411
+ }[];
9373
9412
  /**
9374
9413
  * @description Billing period of the plan.
9375
9414
  * @enum {string}
@@ -9543,6 +9582,13 @@ interface components {
9543
9582
  * @description ID of the location this plan belongs to.
9544
9583
  */
9545
9584
  locationRef: string;
9585
+ /** @description Media files attached to this plan. The first is its cover image. */
9586
+ media: {
9587
+ /** @description Storage key of the media file. */
9588
+ key: string;
9589
+ /** @description Public URL of the media file. */
9590
+ url: string;
9591
+ }[];
9546
9592
  /**
9547
9593
  * @description Billing period of the plan.
9548
9594
  * @enum {string}
@@ -9573,6 +9619,47 @@ interface components {
9573
9619
  /** @description Display name of the plan. */
9574
9620
  title: string;
9575
9621
  };
9622
+ createPlanMedia: {
9623
+ /** @description The created media upload. */
9624
+ media: {
9625
+ /** @description Storage key of the media file. Pass it as media[0].key when creating or updating a plan. */
9626
+ key: string;
9627
+ /**
9628
+ * @description MIME type of the image file.
9629
+ * @enum {string}
9630
+ */
9631
+ mimeType: "image/gif" | "image/jpeg" | "image/png" | "image/webp";
9632
+ /** @description Size of the image file in bytes. */
9633
+ size: number;
9634
+ /**
9635
+ * @description Upload status. pending: the file has not been received yet. uploaded: the file is stored and can be attached to a plan. attached: a plan references the file.
9636
+ * @enum {string}
9637
+ */
9638
+ status: "pending" | "uploaded" | "attached";
9639
+ /** @description How to upload the file. Send the raw bytes as the request body, not a multipart form. */
9640
+ upload: {
9641
+ /**
9642
+ * Format: date-time
9643
+ * @description ISO timestamp after which the upload URL is rejected.
9644
+ */
9645
+ expirationDate: string;
9646
+ /** @description Headers the PUT request must send exactly as given; the signature covers them. */
9647
+ headers: {
9648
+ /** @description Must equal the size declared when the upload was created. */
9649
+ "Content-Length": string;
9650
+ /** @description Must equal the mimeType declared when the upload was created. */
9651
+ "Content-Type": string;
9652
+ };
9653
+ /**
9654
+ * @description HTTP method of the upload request.
9655
+ * @enum {string}
9656
+ */
9657
+ method: "PUT";
9658
+ /** @description Presigned URL to send the raw file bytes to. */
9659
+ url: string;
9660
+ };
9661
+ };
9662
+ };
9576
9663
  getPlan: {
9577
9664
  /** @description The plan. */
9578
9665
  plan: {
@@ -9715,6 +9802,13 @@ interface components {
9715
9802
  * @description ID of the location this plan belongs to.
9716
9803
  */
9717
9804
  locationRef: string;
9805
+ /** @description Media files attached to this plan. The first is its cover image. */
9806
+ media: {
9807
+ /** @description Storage key of the media file. */
9808
+ key: string;
9809
+ /** @description Public URL of the media file. */
9810
+ url: string;
9811
+ }[];
9718
9812
  /**
9719
9813
  * @description Billing period of the plan.
9720
9814
  * @enum {string}
@@ -10025,7 +10119,7 @@ interface components {
10025
10119
  /** @description Brivo access group reference. */
10026
10120
  brivoGroupRef?: number | null;
10027
10121
  /**
10028
- * @description Buffer time blocked before each booking.
10122
+ * @description Time kept free before and after each booking of a room or desk. Other resource types ignore it.
10029
10123
  * @enum {string}
10030
10124
  */
10031
10125
  bufferTime: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
@@ -10748,7 +10842,7 @@ interface components {
10748
10842
  /** @description Brivo access group reference. */
10749
10843
  brivoGroupRef?: number | null;
10750
10844
  /**
10751
- * @description Buffer time blocked before each booking.
10845
+ * @description Time kept free before and after each booking of a room or desk. Other resource types ignore it.
10752
10846
  * @enum {string}
10753
10847
  */
10754
10848
  bufferTime: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
@@ -17591,12 +17685,17 @@ interface components {
17591
17685
  * @description Unique identifier of the activity.
17592
17686
  */
17593
17687
  id: string;
17594
- /** @description Present when the activity was created by Lem AI. */
17688
+ /** @description Present when the activity was created by an agent. */
17595
17689
  lemAI?: {
17596
- /** @description Display name of the Lem AI assistant. */
17690
+ /**
17691
+ * Format: uuid
17692
+ * @description ID of the agent that created the activity. Absent for replies posted before agents.
17693
+ */
17694
+ agentRef?: string;
17695
+ /** @description Display name of the agent. */
17597
17696
  name: string;
17598
- /** @description Profile image URL of the Lem AI assistant. */
17599
- photoUrl: string;
17697
+ /** @description Profile image URL of the agent, or null when it has none. */
17698
+ photoUrl: string | null;
17600
17699
  };
17601
17700
  /** @description Membership of the user who performed the action. Holds only an empty user when no membership performed it, such as a Lem AI reply. */
17602
17701
  membership?: {
@@ -22672,16 +22771,14 @@ interface components {
22672
22771
  * @description ID of the location this alt currency belongs to.
22673
22772
  */
22674
22773
  locationRef: string;
22675
- } & ({
22774
+ /** @description Exchange rate relative to the location main currency. Pass either exchangeRate or provider, never both. */
22775
+ exchangeRate?: number;
22676
22776
  /**
22677
- * @description Exchange rate provider when auto-update is enabled.
22777
+ * @description Exchange rate provider when auto-update is enabled. Pass either provider or exchangeRate, never both.
22678
22778
  * @enum {string}
22679
22779
  */
22680
- provider: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22681
- } | {
22682
- /** @description Exchange rate relative to the location main currency. */
22683
- exchangeRate: number;
22684
- });
22780
+ provider?: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22781
+ };
22685
22782
  };
22686
22783
  };
22687
22784
  };
@@ -22689,16 +22786,15 @@ interface components {
22689
22786
  content: {
22690
22787
  "application/json": {
22691
22788
  /** @description Alt currency fields to update */
22692
- altCurrency: Record<string, never> & ({
22789
+ altCurrency: {
22790
+ /** @description Exchange rate relative to the location main currency. Pass either exchangeRate or provider, never both. */
22791
+ exchangeRate?: number;
22693
22792
  /**
22694
- * @description Exchange rate provider when auto-update is enabled.
22793
+ * @description Exchange rate provider when auto-update is enabled. Pass either provider or exchangeRate, never both.
22695
22794
  * @enum {string}
22696
22795
  */
22697
- provider: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22698
- } | {
22699
- /** @description Exchange rate relative to the location main currency. */
22700
- exchangeRate: number;
22701
- });
22796
+ provider?: "nbu" | "bcra" | "nbg" | "bcch" | "ecb";
22797
+ };
22702
22798
  };
22703
22799
  };
22704
22800
  };
@@ -23866,6 +23962,8 @@ interface components {
23866
23962
  percentOff?: number;
23867
23963
  /** @description Product types the coupon applies to. */
23868
23964
  productTypes: ("roomBookings" | "eventSpaceBookings" | "conferenceRoomBookings" | "meetingRoomBookings" | "phoneBoothBookings" | "stationBookings" | "studioBookings" | "hotDeskBookings" | "dedicatedDeskBookings" | "officeBookings" | "parkingBookings" | "equipmentBookings" | "eventTickets" | "shopProducts" | "packages" | "subscriptionItems")[];
23965
+ /** @description Name of the coupon. An empty title leaves the coupon named after its discount and the products it applies to. */
23966
+ title?: string;
23869
23967
  };
23870
23968
  };
23871
23969
  };
@@ -23873,10 +23971,10 @@ interface components {
23873
23971
  updateCoupon: {
23874
23972
  content: {
23875
23973
  "application/json": {
23876
- /** @description Coupon fields to update. */
23974
+ /** @description Coupon fields to update. Fields left out keep their current value. */
23877
23975
  coupon: {
23878
- /** @description Limited items to set on the coupon. */
23879
- limitedItems: {
23976
+ /** @description Limited items to set on the coupon. Only a coupon created with limited items enabled accepts them. */
23977
+ limitedItems?: {
23880
23978
  /** @description Replacement list of limited items for the coupon. */
23881
23979
  values: {
23882
23980
  /**
@@ -23891,6 +23989,8 @@ interface components {
23891
23989
  type: "roomBookings" | "eventSpaceBookings" | "conferenceRoomBookings" | "meetingRoomBookings" | "phoneBoothBookings" | "stationBookings" | "studioBookings" | "hotDeskBookings" | "dedicatedDeskBookings" | "officeBookings" | "parkingBookings" | "equipmentBookings" | "eventTickets" | "shopProducts" | "packages" | "subscriptionItems";
23892
23990
  }[];
23893
23991
  };
23992
+ /** @description Name of the coupon. An empty title leaves the coupon named after its discount and the products it applies to. */
23993
+ title?: string;
23894
23994
  };
23895
23995
  };
23896
23996
  };
@@ -24664,6 +24764,14 @@ interface components {
24664
24764
  * @description ID of the location this plan belongs to.
24665
24765
  */
24666
24766
  locationRef: string;
24767
+ /**
24768
+ * @description Media files to attach. The url is generated server-side.
24769
+ * @default []
24770
+ */
24771
+ media?: {
24772
+ /** @description Storage key of the media file, as returned by the media upload endpoint. */
24773
+ key: string;
24774
+ }[];
24667
24775
  /**
24668
24776
  * @description Billing period of the plan.
24669
24777
  * @enum {string}
@@ -24710,6 +24818,22 @@ interface components {
24710
24818
  };
24711
24819
  };
24712
24820
  };
24821
+ createPlanMedia: {
24822
+ content: {
24823
+ "application/json": {
24824
+ /** @description File to upload. */
24825
+ media: {
24826
+ /**
24827
+ * @description MIME type of the file to upload.
24828
+ * @enum {string}
24829
+ */
24830
+ mimeType: "image/gif" | "image/jpeg" | "image/png" | "image/webp";
24831
+ /** @description Size of the file in bytes. The upload is rejected when the body length differs. */
24832
+ size: number;
24833
+ };
24834
+ };
24835
+ };
24836
+ };
24713
24837
  updatePlan: {
24714
24838
  content: {
24715
24839
  "application/json": {
@@ -24800,6 +24924,11 @@ interface components {
24800
24924
  productTypes?: ("roomBookings" | "eventSpaceBookings" | "conferenceRoomBookings" | "meetingRoomBookings" | "phoneBoothBookings" | "stationBookings" | "studioBookings" | "hotDeskBookings" | "dedicatedDeskBookings" | "officeBookings" | "parkingBookings" | "equipmentBookings" | "eventTickets" | "shopProducts" | "packages" | "subscriptionItems")[];
24801
24925
  };
24802
24926
  }[];
24927
+ /** @description Media files to attach, replacing the current ones. Pass an empty array to remove them. The url is generated server-side. */
24928
+ media?: {
24929
+ /** @description Storage key of the media file, as returned by the media upload endpoint. */
24930
+ key: string;
24931
+ }[];
24803
24932
  /** @description Price of the plan. */
24804
24933
  price?: number;
24805
24934
  /** @description Printing integration settings. */
@@ -24872,7 +25001,7 @@ interface components {
24872
25001
  /** @description Brivo access group reference. */
24873
25002
  brivoGroupRef?: number | null;
24874
25003
  /**
24875
- * @description Buffer time blocked before each booking.
25004
+ * @description Time kept free before and after each booking of a room or desk. Other resource types ignore it.
24876
25005
  * @enum {string}
24877
25006
  */
24878
25007
  bufferTime?: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
@@ -25379,7 +25508,7 @@ interface components {
25379
25508
  /** @description Brivo access group reference. */
25380
25509
  brivoGroupRef?: number | null;
25381
25510
  /**
25382
- * @description Buffer time blocked before each booking.
25511
+ * @description Time kept free before and after each booking of a room or desk. Other resource types ignore it.
25383
25512
  * @enum {string}
25384
25513
  */
25385
25514
  bufferTime?: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
@@ -31559,9 +31688,9 @@ interface operations {
31559
31688
  };
31560
31689
  getFeedPosts: {
31561
31690
  parameters: {
31562
- query: {
31563
- /** @description The id of the location. */
31564
- locationRef: string;
31691
+ query?: {
31692
+ /** @description UUID of the location whose feed posts to list. Omit to list posts across every location of the network. */
31693
+ locationRef?: string;
31565
31694
  /** @description Token to retrieve the next page of results. */
31566
31695
  nextPageToken?: components["schemas"]["nextPageToken"];
31567
31696
  /** @description The number of items to return. */
@@ -32861,6 +32990,38 @@ interface operations {
32861
32990
  };
32862
32991
  };
32863
32992
  };
32993
+ createPlanMedia: {
32994
+ parameters: {
32995
+ query?: never;
32996
+ header?: {
32997
+ /** @description The id of the network. Required when using bearer token authentication */
32998
+ "spacebring-network-id"?: string;
32999
+ };
33000
+ path?: never;
33001
+ cookie?: never;
33002
+ };
33003
+ requestBody: components["requestBodies"]["createPlanMedia"];
33004
+ responses: {
33005
+ /** @description Created */
33006
+ 201: {
33007
+ headers: {
33008
+ [name: string]: unknown;
33009
+ };
33010
+ content: {
33011
+ "application/json": components["schemas"]["createPlanMedia"];
33012
+ };
33013
+ };
33014
+ /** @description Bad Request */
33015
+ 400: {
33016
+ headers: {
33017
+ [name: string]: unknown;
33018
+ };
33019
+ content: {
33020
+ "application/json": components["schemas"]["responseError"];
33021
+ };
33022
+ };
33023
+ };
33024
+ };
32864
33025
  getPlan: {
32865
33026
  parameters: {
32866
33027
  query?: never;
@@ -36581,6 +36742,8 @@ interface GetRegistrationsQuery {
36581
36742
 
36582
36743
  /** A Plan entity as returned by the Spacebring API. */
36583
36744
  type Plan = NonNullable<components["schemas"]["plan"]>;
36745
+ /** A PlanMedia entity as returned by the Spacebring API. */
36746
+ type PlanMedia = NonNullable<operations["createPlanMedia"]["responses"][201]["content"]["application/json"]["media"]>;
36584
36747
  /** Query parameters for `sb.plans.list()`. */
36585
36748
  interface GetPlansQuery {
36586
36749
  /** @deprecated Only applies together with resourceRef. Filter the plans.tiers of `GET /resources/v1/{resourceId}` by their entire field instead. When listing plans for a resource, filter by entire resource vs partial tiers. Pass true or false. */
@@ -36596,6 +36759,8 @@ interface GetPlansQuery {
36596
36759
  }
36597
36760
  /** Request body for `sb.plans.create()`. */
36598
36761
  type CreatePlanBody = NonNullable<NonNullable<operations["createPlan"]["requestBody"]>["content"]["application/json"]["plan"]>;
36762
+ /** Request body for `sb.plans.createMedia()`. */
36763
+ type CreatePlanMediaBody = NonNullable<NonNullable<operations["createPlanMedia"]["requestBody"]>["content"]["application/json"]["media"]>;
36599
36764
  /** Request body for `sb.plans.update()`. */
36600
36765
  type UpdatePlanBody = NonNullable<NonNullable<operations["updatePlan"]["requestBody"]>["content"]["application/json"]["plan"]>;
36601
36766
 
@@ -36665,8 +36830,8 @@ type Like = NonNullable<components["schemas"]["postLike"]>;
36665
36830
  type Post = NonNullable<components["schemas"]["post"]>;
36666
36831
  /** Query parameters for `sb.feed.posts.list()`. */
36667
36832
  interface GetFeedPostsQuery {
36668
- /** The id of the location. */
36669
- locationRef: string;
36833
+ /** UUID of the location whose feed posts to list. Omit to list posts across every location of the network. */
36834
+ locationRef?: string;
36670
36835
  /** Token to retrieve the next page of results. */
36671
36836
  nextPageToken?: string;
36672
36837
  /** The number of items to return. */
@@ -37353,12 +37518,12 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
37353
37518
  deleteLike(id: string, options?: SpacebringRequestOptions): Promise<undefined>;
37354
37519
  };
37355
37520
  posts: {
37356
- list(query: GetFeedPostsQuery, options?: SpacebringRequestOptions): Promise<{
37521
+ list(query?: GetFeedPostsQuery, options?: SpacebringRequestOptions): Promise<{
37357
37522
  nextPageToken?: string;
37358
37523
  posts?: Post[];
37359
37524
  searchQueryNext?: string;
37360
37525
  }>;
37361
- iterate(query: Omit<GetFeedPostsQuery, "nextPageToken">, options?: SpacebringRequestOptions): AsyncGenerator<Post, void, undefined>;
37526
+ iterate(query?: Omit<GetFeedPostsQuery, "nextPageToken">, options?: SpacebringRequestOptions): AsyncGenerator<Post, void, undefined>;
37362
37527
  get(id: string, options?: SpacebringRequestOptions): Promise<Post>;
37363
37528
  create(post: CreateFeedPostBody, options?: SpacebringRequestOptions): Promise<Post>;
37364
37529
  update(id: string, post: UpdateFeedPostBody, options?: SpacebringRequestOptions): Promise<Post>;
@@ -37418,6 +37583,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
37418
37583
  create(plan: CreatePlanBody, options?: SpacebringRequestOptions): Promise<Plan>;
37419
37584
  update(planId: string, plan: UpdatePlanBody, options?: SpacebringRequestOptions): Promise<undefined>;
37420
37585
  delete(planId: string, options?: SpacebringRequestOptions): Promise<undefined>;
37586
+ createMedia(media: CreatePlanMediaBody, options?: SpacebringRequestOptions): Promise<PlanMedia>;
37421
37587
  };
37422
37588
  registrations: {
37423
37589
  list(query?: GetRegistrationsQuery, options?: SpacebringRequestOptions): Promise<{
@@ -37698,4 +37864,4 @@ declare class SpacebringError extends Error {
37698
37864
  }
37699
37865
 
37700
37866
  export { Spacebring, SpacebringError };
37701
- export type { Activity, AddEventHostsBody, AltCurrency, Application, ApplyBenefitBody, Assignment, Attachment, Balance, Benefit, BenefitCategory, BenefitMedia, Booking, CheckIn, CheckInBody, CheckInVisitBody, CheckOutBody, CheckOutVisitBody, Comment, Company, CompanyMedia, Contact, Contract, Coupon, CreateAltCurrencyBody, CreateAssignmentBody, CreateBenefitBody, CreateBenefitCategoryBody, CreateBenefitMediaBody, CreateBookingBody, CreateCompanyBody, CreateCompanyMediaBody, CreateContactBody, CreateContractBody, CreateCouponBody, CreateCreditNoteBody, CreateCreditsTransactionBody, CreateDayPassesTransactionBody, CreateEventBody, CreateEventMediaBody, CreateFeedPostBody, CreateFeedPostCommentBody, CreateFeedPostMediaBody, CreateGuideAttachmentBody, CreateGuideBody, CreateGuideMediaBody, CreateInvoiceBody, CreateInvoiceItemBody, CreateMembershipBody, CreateMoneyTransactionBody, CreatePackageBody, CreatePlanBody, CreateProductBody, CreateProductMediaBody, CreatePromocodeBody, CreateRequestBody, CreateResourceBody, CreateResourceMediaBody, CreateShopCategoryBody, CreateSubscriptionBody, CreateSubscriptionItemBody, CreateSupportTicketBody, CreateSupportTicketCommentBody, CreateSupportTicketMediaBody, CreateTemplateBody, CreateTemplateMediaBody, CreateVisitBody, CreditNote, CreditScheduledTransaction, CreditTransaction, DayPassScheduledTransaction, DayPassTransaction, Event, EventMedia, EventTicket, FeedMedia, GetAltCurrenciesQuery, GetAssignmentsQuery, GetBenefitApplicationsQuery, GetBenefitCategoriesQuery, GetBenefitsQuery, GetBookingsQuery, GetCheckInsQuery, GetCompaniesQuery, GetContactsQuery, GetContractsQuery, GetCouponsQuery, GetCreditNotesQuery, GetCreditsTransactionsQuery, GetDayPassesTransactionsQuery, GetDiscountRedemptionsQuery, GetEventTicketsQuery, GetEventsByOrganizationQuery, GetFeedPostsQuery, GetFloorsQuery, GetGuidesQuery, GetInvoicesQuery, GetMembershipsDeletedQuery, GetMembershipsQuery, GetMoneyTransactionsQuery, GetOrdersQuery, GetPackagesQuery, GetPlansQuery, GetProductsQuery, GetPromocodesQuery, GetRegistrationsQuery, GetRequestsQuery, GetResourceAvailability, GetResourceAvailabilityBody, GetResourcesQuery, GetScheduledCreditsTransactionsQuery, GetScheduledDayPassesTransactionsQuery, GetShopCategoriesQuery, GetSubscriptionsQuery, GetSupportTicketsQuery, GetTemplatesQuery, GetUpcomingInvoiceItemsQuery, GetUpcomingInvoiceQuery, GetVisitsQuery, Guide, GuideMedia, Invoice, InvoiceItem, IssueContractBody, IssueInvoiceBody, Like, ListInvoiceItemsQuery, Location, Membership, MoneyTransaction, Network, Order, Package, PatchAssignmentBody, PatchBenefitBody, PatchBookingBody, PatchEventBody, PatchFeedPostBody, PatchGuideBody, PatchMoneyTransactionBody, PatchPackageBody, PatchProductBody, PatchResourceBody, PayInvoiceBody, Payment, Plan, Post, PreviewCreditNoteBody, Product, ProductMedia, Promocode, Redemption, Refund, RefundMoneyTransactionBody, Registration, Request$1 as Request, Resource, ResourceMedia, ShopCategory, SpacebringConfig, SpacebringErrorBody, SpacebringRequestOptions, SpacebringResources, Subscription, SupportTicket, Template, TemplateMedia, TerminateContractBody, TicketMedia, UpcomingItem, UpdateAltCurrencyBody, UpdateBenefitBody, UpdateBenefitCategoryBody, UpdateCompanyBody, UpdateContractBody, UpdateCouponBody, UpdateCreditNoteBody, UpdateEventBody, UpdateEventTicketBody, UpdateFeedPostBody, UpdateInvoiceBody, UpdateInvoiceItemBody, UpdateMembershipBody, UpdatePlanBody, UpdateProductBody, UpdateShopCategoryBody, UpdateSubscriptionBody, UpdateSubscriptionItemBody, UpdateSupportTicketAssigneeBody, UpdateSupportTicketCommentBody, UpdateSupportTicketStatusBody, UpdateSupportTicketTypeBody, UpdateTemplateBody, UpdateVisitBody, Visit, components, operations, paths };
37867
+ export type { Activity, AddEventHostsBody, AltCurrency, Application, ApplyBenefitBody, Assignment, Attachment, Balance, Benefit, BenefitCategory, BenefitMedia, Booking, CheckIn, CheckInBody, CheckInVisitBody, CheckOutBody, CheckOutVisitBody, Comment, Company, CompanyMedia, Contact, Contract, Coupon, CreateAltCurrencyBody, CreateAssignmentBody, CreateBenefitBody, CreateBenefitCategoryBody, CreateBenefitMediaBody, CreateBookingBody, CreateCompanyBody, CreateCompanyMediaBody, CreateContactBody, CreateContractBody, CreateCouponBody, CreateCreditNoteBody, CreateCreditsTransactionBody, CreateDayPassesTransactionBody, CreateEventBody, CreateEventMediaBody, CreateFeedPostBody, CreateFeedPostCommentBody, CreateFeedPostMediaBody, CreateGuideAttachmentBody, CreateGuideBody, CreateGuideMediaBody, CreateInvoiceBody, CreateInvoiceItemBody, CreateMembershipBody, CreateMoneyTransactionBody, CreatePackageBody, CreatePlanBody, CreatePlanMediaBody, CreateProductBody, CreateProductMediaBody, CreatePromocodeBody, CreateRequestBody, CreateResourceBody, CreateResourceMediaBody, CreateShopCategoryBody, CreateSubscriptionBody, CreateSubscriptionItemBody, CreateSupportTicketBody, CreateSupportTicketCommentBody, CreateSupportTicketMediaBody, CreateTemplateBody, CreateTemplateMediaBody, CreateVisitBody, CreditNote, CreditScheduledTransaction, CreditTransaction, DayPassScheduledTransaction, DayPassTransaction, Event, EventMedia, EventTicket, FeedMedia, GetAltCurrenciesQuery, GetAssignmentsQuery, GetBenefitApplicationsQuery, GetBenefitCategoriesQuery, GetBenefitsQuery, GetBookingsQuery, GetCheckInsQuery, GetCompaniesQuery, GetContactsQuery, GetContractsQuery, GetCouponsQuery, GetCreditNotesQuery, GetCreditsTransactionsQuery, GetDayPassesTransactionsQuery, GetDiscountRedemptionsQuery, GetEventTicketsQuery, GetEventsByOrganizationQuery, GetFeedPostsQuery, GetFloorsQuery, GetGuidesQuery, GetInvoicesQuery, GetMembershipsDeletedQuery, GetMembershipsQuery, GetMoneyTransactionsQuery, GetOrdersQuery, GetPackagesQuery, GetPlansQuery, GetProductsQuery, GetPromocodesQuery, GetRegistrationsQuery, GetRequestsQuery, GetResourceAvailability, GetResourceAvailabilityBody, GetResourcesQuery, GetScheduledCreditsTransactionsQuery, GetScheduledDayPassesTransactionsQuery, GetShopCategoriesQuery, GetSubscriptionsQuery, GetSupportTicketsQuery, GetTemplatesQuery, GetUpcomingInvoiceItemsQuery, GetUpcomingInvoiceQuery, GetVisitsQuery, Guide, GuideMedia, Invoice, InvoiceItem, IssueContractBody, IssueInvoiceBody, Like, ListInvoiceItemsQuery, Location, Membership, MoneyTransaction, Network, Order, Package, PatchAssignmentBody, PatchBenefitBody, PatchBookingBody, PatchEventBody, PatchFeedPostBody, PatchGuideBody, PatchMoneyTransactionBody, PatchPackageBody, PatchProductBody, PatchResourceBody, PayInvoiceBody, Payment, Plan, PlanMedia, Post, PreviewCreditNoteBody, Product, ProductMedia, Promocode, Redemption, Refund, RefundMoneyTransactionBody, Registration, Request$1 as Request, Resource, ResourceMedia, ShopCategory, SpacebringConfig, SpacebringErrorBody, SpacebringRequestOptions, SpacebringResources, Subscription, SupportTicket, Template, TemplateMedia, TerminateContractBody, TicketMedia, UpcomingItem, UpdateAltCurrencyBody, UpdateBenefitBody, UpdateBenefitCategoryBody, UpdateCompanyBody, UpdateContractBody, UpdateCouponBody, UpdateCreditNoteBody, UpdateEventBody, UpdateEventTicketBody, UpdateFeedPostBody, UpdateInvoiceBody, UpdateInvoiceItemBody, UpdateMembershipBody, UpdatePlanBody, UpdateProductBody, UpdateShopCategoryBody, UpdateSubscriptionBody, UpdateSubscriptionItemBody, UpdateSupportTicketAssigneeBody, UpdateSupportTicketCommentBody, UpdateSupportTicketStatusBody, UpdateSupportTicketTypeBody, UpdateTemplateBody, UpdateVisitBody, Visit, components, operations, paths };
package/dist/index.js CHANGED
@@ -739,7 +739,7 @@ function createBenefits(client, defaults) {
739
739
  /**
740
740
  * Create a category
741
741
  *
742
- * Create a benefit category.
742
+ * Create a benefit category. A user needs the Settings permission in the location.
743
743
  */
744
744
  async create(category, options) {
745
745
  return unwrapProp(await client.POST("/benefits/categories/v1", { body: { category }, signal: options?.signal }), "category", "POST /benefits/categories/v1");
@@ -2103,6 +2103,14 @@ function createPlans(client, defaults) {
2103
2103
  */
2104
2104
  async delete(planId, options) {
2105
2105
  return unwrap(await client.DELETE("/plans/v1/{planId}", { params: { path: { planId } }, signal: options?.signal }), "DELETE /plans/v1/{planId}");
2106
+ },
2107
+ /**
2108
+ * Create a media upload
2109
+ *
2110
+ * Create a media upload for a plan 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 a plan within an hour; an image that is not attached by then is discarded.
2111
+ */
2112
+ async createMedia(media, options) {
2113
+ return unwrapProp(await client.POST("/plans/v1/media", { body: { media }, signal: options?.signal }), "media", "POST /plans/v1/media");
2106
2114
  }
2107
2115
  };
2108
2116
  }
@@ -2359,7 +2367,7 @@ function createShop(client, defaults) {
2359
2367
  /**
2360
2368
  * Create a category
2361
2369
  *
2362
- * Create a shop category.
2370
+ * Create a shop category. A user needs the Settings permission in the location.
2363
2371
  */
2364
2372
  async create(category, options) {
2365
2373
  return unwrapProp(await client.POST("/shop/categories/v1", { body: { category }, signal: options?.signal }), "category", "POST /shop/categories/v1");