@izak0s/spacebring-api 16.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/README.md +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +172 -8
- package/dist/index.d.ts +172 -8
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -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
|
|
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
|
|
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";
|
|
@@ -23868,6 +23962,8 @@ interface components {
|
|
|
23868
23962
|
percentOff?: number;
|
|
23869
23963
|
/** @description Product types the coupon applies to. */
|
|
23870
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;
|
|
23871
23967
|
};
|
|
23872
23968
|
};
|
|
23873
23969
|
};
|
|
@@ -23875,10 +23971,10 @@ interface components {
|
|
|
23875
23971
|
updateCoupon: {
|
|
23876
23972
|
content: {
|
|
23877
23973
|
"application/json": {
|
|
23878
|
-
/** @description Coupon fields to update. */
|
|
23974
|
+
/** @description Coupon fields to update. Fields left out keep their current value. */
|
|
23879
23975
|
coupon: {
|
|
23880
|
-
/** @description Limited items to set on the coupon. */
|
|
23881
|
-
limitedItems
|
|
23976
|
+
/** @description Limited items to set on the coupon. Only a coupon created with limited items enabled accepts them. */
|
|
23977
|
+
limitedItems?: {
|
|
23882
23978
|
/** @description Replacement list of limited items for the coupon. */
|
|
23883
23979
|
values: {
|
|
23884
23980
|
/**
|
|
@@ -23893,6 +23989,8 @@ interface components {
|
|
|
23893
23989
|
type: "roomBookings" | "eventSpaceBookings" | "conferenceRoomBookings" | "meetingRoomBookings" | "phoneBoothBookings" | "stationBookings" | "studioBookings" | "hotDeskBookings" | "dedicatedDeskBookings" | "officeBookings" | "parkingBookings" | "equipmentBookings" | "eventTickets" | "shopProducts" | "packages" | "subscriptionItems";
|
|
23894
23990
|
}[];
|
|
23895
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;
|
|
23896
23994
|
};
|
|
23897
23995
|
};
|
|
23898
23996
|
};
|
|
@@ -24666,6 +24764,14 @@ interface components {
|
|
|
24666
24764
|
* @description ID of the location this plan belongs to.
|
|
24667
24765
|
*/
|
|
24668
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
|
+
}[];
|
|
24669
24775
|
/**
|
|
24670
24776
|
* @description Billing period of the plan.
|
|
24671
24777
|
* @enum {string}
|
|
@@ -24712,6 +24818,22 @@ interface components {
|
|
|
24712
24818
|
};
|
|
24713
24819
|
};
|
|
24714
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
|
+
};
|
|
24715
24837
|
updatePlan: {
|
|
24716
24838
|
content: {
|
|
24717
24839
|
"application/json": {
|
|
@@ -24802,6 +24924,11 @@ interface components {
|
|
|
24802
24924
|
productTypes?: ("roomBookings" | "eventSpaceBookings" | "conferenceRoomBookings" | "meetingRoomBookings" | "phoneBoothBookings" | "stationBookings" | "studioBookings" | "hotDeskBookings" | "dedicatedDeskBookings" | "officeBookings" | "parkingBookings" | "equipmentBookings" | "eventTickets" | "shopProducts" | "packages" | "subscriptionItems")[];
|
|
24803
24925
|
};
|
|
24804
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
|
+
}[];
|
|
24805
24932
|
/** @description Price of the plan. */
|
|
24806
24933
|
price?: number;
|
|
24807
24934
|
/** @description Printing integration settings. */
|
|
@@ -24874,7 +25001,7 @@ interface components {
|
|
|
24874
25001
|
/** @description Brivo access group reference. */
|
|
24875
25002
|
brivoGroupRef?: number | null;
|
|
24876
25003
|
/**
|
|
24877
|
-
* @description
|
|
25004
|
+
* @description Time kept free before and after each booking of a room or desk. Other resource types ignore it.
|
|
24878
25005
|
* @enum {string}
|
|
24879
25006
|
*/
|
|
24880
25007
|
bufferTime?: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
|
|
@@ -25381,7 +25508,7 @@ interface components {
|
|
|
25381
25508
|
/** @description Brivo access group reference. */
|
|
25382
25509
|
brivoGroupRef?: number | null;
|
|
25383
25510
|
/**
|
|
25384
|
-
* @description
|
|
25511
|
+
* @description Time kept free before and after each booking of a room or desk. Other resource types ignore it.
|
|
25385
25512
|
* @enum {string}
|
|
25386
25513
|
*/
|
|
25387
25514
|
bufferTime?: "zeroMinutes" | "fiveMinutes" | "tenMinutes" | "fifteenMinutes" | "thirtyMinutes" | "sixtyMinutes";
|
|
@@ -32863,6 +32990,38 @@ interface operations {
|
|
|
32863
32990
|
};
|
|
32864
32991
|
};
|
|
32865
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
|
+
};
|
|
32866
33025
|
getPlan: {
|
|
32867
33026
|
parameters: {
|
|
32868
33027
|
query?: never;
|
|
@@ -36583,6 +36742,8 @@ interface GetRegistrationsQuery {
|
|
|
36583
36742
|
|
|
36584
36743
|
/** A Plan entity as returned by the Spacebring API. */
|
|
36585
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"]>;
|
|
36586
36747
|
/** Query parameters for `sb.plans.list()`. */
|
|
36587
36748
|
interface GetPlansQuery {
|
|
36588
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. */
|
|
@@ -36598,6 +36759,8 @@ interface GetPlansQuery {
|
|
|
36598
36759
|
}
|
|
36599
36760
|
/** Request body for `sb.plans.create()`. */
|
|
36600
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"]>;
|
|
36601
36764
|
/** Request body for `sb.plans.update()`. */
|
|
36602
36765
|
type UpdatePlanBody = NonNullable<NonNullable<operations["updatePlan"]["requestBody"]>["content"]["application/json"]["plan"]>;
|
|
36603
36766
|
|
|
@@ -37420,6 +37583,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
37420
37583
|
create(plan: CreatePlanBody, options?: SpacebringRequestOptions): Promise<Plan>;
|
|
37421
37584
|
update(planId: string, plan: UpdatePlanBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
37422
37585
|
delete(planId: string, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
37586
|
+
createMedia(media: CreatePlanMediaBody, options?: SpacebringRequestOptions): Promise<PlanMedia>;
|
|
37423
37587
|
};
|
|
37424
37588
|
registrations: {
|
|
37425
37589
|
list(query?: GetRegistrationsQuery, options?: SpacebringRequestOptions): Promise<{
|
|
@@ -37700,4 +37864,4 @@ declare class SpacebringError extends Error {
|
|
|
37700
37864
|
}
|
|
37701
37865
|
|
|
37702
37866
|
export { Spacebring, SpacebringError };
|
|
37703
|
-
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
|
@@ -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
|
}
|