@izak0s/spacebring-api 3.2.0 → 3.3.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 +150 -1
- package/dist/index.d.ts +150 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1959,6 +1959,26 @@ interface paths {
|
|
|
1959
1959
|
patch?: never;
|
|
1960
1960
|
trace?: never;
|
|
1961
1961
|
};
|
|
1962
|
+
"/resources/v1/assignments": {
|
|
1963
|
+
parameters: {
|
|
1964
|
+
query?: never;
|
|
1965
|
+
header?: never;
|
|
1966
|
+
path?: never;
|
|
1967
|
+
cookie?: never;
|
|
1968
|
+
};
|
|
1969
|
+
/**
|
|
1970
|
+
* Retrieve resource assignments
|
|
1971
|
+
* @description Retrieve resource assignments in the location. An assignment links a resource, or a number of seats in it, to a company or a member for the duration of a subscription. <h3>OAuth</h3>Required scopes: <code>resources.readonly</code> or <code>resources</code>
|
|
1972
|
+
*/
|
|
1973
|
+
get: operations["getAssignments"];
|
|
1974
|
+
put?: never;
|
|
1975
|
+
post?: never;
|
|
1976
|
+
delete?: never;
|
|
1977
|
+
options?: never;
|
|
1978
|
+
head?: never;
|
|
1979
|
+
patch?: never;
|
|
1980
|
+
trace?: never;
|
|
1981
|
+
};
|
|
1962
1982
|
"/resources/v1/{id}": {
|
|
1963
1983
|
parameters: {
|
|
1964
1984
|
query?: never;
|
|
@@ -8395,6 +8415,11 @@ interface components {
|
|
|
8395
8415
|
};
|
|
8396
8416
|
/** @description Assigned quantity when the resource is partially assigned. */
|
|
8397
8417
|
quantity?: number;
|
|
8418
|
+
/**
|
|
8419
|
+
* Format: uuid
|
|
8420
|
+
* @description UUID of the resource the assignment belongs to.
|
|
8421
|
+
*/
|
|
8422
|
+
resourceRef: string;
|
|
8398
8423
|
/** @description Subscription backing this assignment. */
|
|
8399
8424
|
subscription: {
|
|
8400
8425
|
/** @description ISO timestamp when the assignment ends. */
|
|
@@ -8885,6 +8910,69 @@ interface components {
|
|
|
8885
8910
|
*/
|
|
8886
8911
|
visibility: "admins" | "exclusiveMembers" | "members" | "networkMembers" | "public";
|
|
8887
8912
|
};
|
|
8913
|
+
getAssignments: {
|
|
8914
|
+
/** @description List of resource assignments in the location. */
|
|
8915
|
+
assignments: {
|
|
8916
|
+
/** @description Company assigned to the resource. */
|
|
8917
|
+
company?: {
|
|
8918
|
+
/**
|
|
8919
|
+
* Format: uuid
|
|
8920
|
+
* @description Company id.
|
|
8921
|
+
*/
|
|
8922
|
+
id: string;
|
|
8923
|
+
/** @description Company name. */
|
|
8924
|
+
title: string;
|
|
8925
|
+
};
|
|
8926
|
+
/** @description Whether the assignment grants access to the entire resource. */
|
|
8927
|
+
entire: boolean;
|
|
8928
|
+
/**
|
|
8929
|
+
* Format: uuid
|
|
8930
|
+
* @description Assignment id.
|
|
8931
|
+
*/
|
|
8932
|
+
id?: string;
|
|
8933
|
+
/** @description Membership linked to the assignment. */
|
|
8934
|
+
membership?: {
|
|
8935
|
+
/**
|
|
8936
|
+
* Format: uuid
|
|
8937
|
+
* @description Membership id.
|
|
8938
|
+
*/
|
|
8939
|
+
id: string;
|
|
8940
|
+
};
|
|
8941
|
+
/** @description Assigned quantity when the resource is partially assigned. */
|
|
8942
|
+
quantity?: number;
|
|
8943
|
+
/**
|
|
8944
|
+
* Format: uuid
|
|
8945
|
+
* @description UUID of the resource the assignment belongs to.
|
|
8946
|
+
*/
|
|
8947
|
+
resourceRef: string;
|
|
8948
|
+
/** @description Subscription backing this assignment. */
|
|
8949
|
+
subscription: {
|
|
8950
|
+
/** @description ISO timestamp when the assignment ends. */
|
|
8951
|
+
endDate?: string;
|
|
8952
|
+
/**
|
|
8953
|
+
* Format: uuid
|
|
8954
|
+
* @description Subscription id.
|
|
8955
|
+
*/
|
|
8956
|
+
id: string;
|
|
8957
|
+
/** @description ISO timestamp when the assignment starts. */
|
|
8958
|
+
startDate: string;
|
|
8959
|
+
};
|
|
8960
|
+
/** @description User assigned to the resource. */
|
|
8961
|
+
user?: {
|
|
8962
|
+
/** @description User email. */
|
|
8963
|
+
email?: string | null;
|
|
8964
|
+
/**
|
|
8965
|
+
* Format: uuid
|
|
8966
|
+
* @description User id.
|
|
8967
|
+
*/
|
|
8968
|
+
id: string;
|
|
8969
|
+
/** @description User first name. */
|
|
8970
|
+
name?: string | null;
|
|
8971
|
+
/** @description User last name. */
|
|
8972
|
+
surname?: string | null;
|
|
8973
|
+
};
|
|
8974
|
+
}[];
|
|
8975
|
+
};
|
|
8888
8976
|
payment: {
|
|
8889
8977
|
/** @description The amount of the payment */
|
|
8890
8978
|
amount?: number;
|
|
@@ -22189,6 +22277,59 @@ interface operations {
|
|
|
22189
22277
|
};
|
|
22190
22278
|
};
|
|
22191
22279
|
};
|
|
22280
|
+
getAssignments: {
|
|
22281
|
+
parameters: {
|
|
22282
|
+
query: {
|
|
22283
|
+
/** @description UUID of the location whose resource assignments to list. */
|
|
22284
|
+
locationRef: string;
|
|
22285
|
+
};
|
|
22286
|
+
header?: {
|
|
22287
|
+
/** @description The id of the network. Required when using bearer token authentication */
|
|
22288
|
+
"spacebring-network-id"?: string;
|
|
22289
|
+
};
|
|
22290
|
+
path?: never;
|
|
22291
|
+
cookie?: never;
|
|
22292
|
+
};
|
|
22293
|
+
requestBody?: never;
|
|
22294
|
+
responses: {
|
|
22295
|
+
/** @description OK */
|
|
22296
|
+
200: {
|
|
22297
|
+
headers: {
|
|
22298
|
+
[name: string]: unknown;
|
|
22299
|
+
};
|
|
22300
|
+
content: {
|
|
22301
|
+
"application/json": components["schemas"]["getAssignments"];
|
|
22302
|
+
};
|
|
22303
|
+
};
|
|
22304
|
+
/** @description Bad Request */
|
|
22305
|
+
400: {
|
|
22306
|
+
headers: {
|
|
22307
|
+
[name: string]: unknown;
|
|
22308
|
+
};
|
|
22309
|
+
content: {
|
|
22310
|
+
"application/json": components["schemas"]["responseError"];
|
|
22311
|
+
};
|
|
22312
|
+
};
|
|
22313
|
+
/** @description Forbidden */
|
|
22314
|
+
403: {
|
|
22315
|
+
headers: {
|
|
22316
|
+
[name: string]: unknown;
|
|
22317
|
+
};
|
|
22318
|
+
content: {
|
|
22319
|
+
"application/json": components["schemas"]["responseError"];
|
|
22320
|
+
};
|
|
22321
|
+
};
|
|
22322
|
+
/** @description Not Found */
|
|
22323
|
+
404: {
|
|
22324
|
+
headers: {
|
|
22325
|
+
[name: string]: unknown;
|
|
22326
|
+
};
|
|
22327
|
+
content: {
|
|
22328
|
+
"application/json": components["schemas"]["responseError"];
|
|
22329
|
+
};
|
|
22330
|
+
};
|
|
22331
|
+
};
|
|
22332
|
+
};
|
|
22192
22333
|
getResource: {
|
|
22193
22334
|
parameters: {
|
|
22194
22335
|
query?: never;
|
|
@@ -24792,10 +24933,17 @@ type UpdateProductBody = NonNullable<NonNullable<operations["updateProduct"]["re
|
|
|
24792
24933
|
/** Request body for `sb.shop.categories.update()`. */
|
|
24793
24934
|
type UpdateShopCategoryBody = NonNullable<NonNullable<operations["updateShopCategory"]["requestBody"]>["content"]["application/json"]["category"]>;
|
|
24794
24935
|
|
|
24936
|
+
/** A Assignment entity as returned by the Spacebring API. */
|
|
24937
|
+
type Assignment = NonNullable<operations["getAssignments"]["responses"][200]["content"]["application/json"]["assignments"]>[number];
|
|
24795
24938
|
/** A Booking entity as returned by the Spacebring API. */
|
|
24796
24939
|
type Booking = NonNullable<components["schemas"]["booking"]>;
|
|
24797
24940
|
/** A Resource entity as returned by the Spacebring API. */
|
|
24798
24941
|
type Resource = NonNullable<components["schemas"]["resource"]>;
|
|
24942
|
+
/** Query parameters for `sb.resources.getAssignments()`. */
|
|
24943
|
+
interface GetAssignmentsQuery {
|
|
24944
|
+
/** UUID of the location whose resource assignments to list. */
|
|
24945
|
+
locationRef: string;
|
|
24946
|
+
}
|
|
24799
24947
|
/** Query parameters for `sb.resources.bookings.list()`. */
|
|
24800
24948
|
interface GetBookingsQuery {
|
|
24801
24949
|
/** The id of the resource. Required if `locationRef` is not passed. */
|
|
@@ -25620,6 +25768,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
25620
25768
|
get(id: string, options?: SpacebringRequestOptions): Promise<Resource>;
|
|
25621
25769
|
create(resource: CreateResourceBody, options?: SpacebringRequestOptions): Promise<Resource>;
|
|
25622
25770
|
update(id: string, resource: PatchResourceBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
25771
|
+
getAssignments(query: GetAssignmentsQuery, options?: SpacebringRequestOptions): Promise<Assignment[]>;
|
|
25623
25772
|
bookings: {
|
|
25624
25773
|
list(query?: GetBookingsQuery, options?: SpacebringRequestOptions): Promise<{
|
|
25625
25774
|
bookings?: Booking[];
|
|
@@ -25845,4 +25994,4 @@ declare class SpacebringError extends Error {
|
|
|
25845
25994
|
});
|
|
25846
25995
|
}
|
|
25847
25996
|
|
|
25848
|
-
export { type Activity, type AddEventHostsBody, type AltCurrency, type Application, type ApplyBenefitBody, 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 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 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 CreditTransaction, type DayPassTransaction, type Event, type EventTicket, type GetAltCurrenciesQuery, 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 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 PatchGuideBody, type PatchPackageBody, type PatchResourceBody, type PayInvoiceBody, type Payment, type Plan, type Post, type PreviewCreditNoteBody, type Product, type Promocode, type Redemption, type Registration, type Request$1 as Request, type Resource, type ScheduledTransaction, 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 };
|
|
25997
|
+
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 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 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 CreditTransaction, 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 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 PatchGuideBody, type PatchPackageBody, type PatchResourceBody, type PayInvoiceBody, type Payment, type Plan, type Post, type PreviewCreditNoteBody, type Product, type Promocode, type Redemption, type Registration, type Request$1 as Request, type Resource, type ScheduledTransaction, 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.d.ts
CHANGED
|
@@ -1959,6 +1959,26 @@ interface paths {
|
|
|
1959
1959
|
patch?: never;
|
|
1960
1960
|
trace?: never;
|
|
1961
1961
|
};
|
|
1962
|
+
"/resources/v1/assignments": {
|
|
1963
|
+
parameters: {
|
|
1964
|
+
query?: never;
|
|
1965
|
+
header?: never;
|
|
1966
|
+
path?: never;
|
|
1967
|
+
cookie?: never;
|
|
1968
|
+
};
|
|
1969
|
+
/**
|
|
1970
|
+
* Retrieve resource assignments
|
|
1971
|
+
* @description Retrieve resource assignments in the location. An assignment links a resource, or a number of seats in it, to a company or a member for the duration of a subscription. <h3>OAuth</h3>Required scopes: <code>resources.readonly</code> or <code>resources</code>
|
|
1972
|
+
*/
|
|
1973
|
+
get: operations["getAssignments"];
|
|
1974
|
+
put?: never;
|
|
1975
|
+
post?: never;
|
|
1976
|
+
delete?: never;
|
|
1977
|
+
options?: never;
|
|
1978
|
+
head?: never;
|
|
1979
|
+
patch?: never;
|
|
1980
|
+
trace?: never;
|
|
1981
|
+
};
|
|
1962
1982
|
"/resources/v1/{id}": {
|
|
1963
1983
|
parameters: {
|
|
1964
1984
|
query?: never;
|
|
@@ -8395,6 +8415,11 @@ interface components {
|
|
|
8395
8415
|
};
|
|
8396
8416
|
/** @description Assigned quantity when the resource is partially assigned. */
|
|
8397
8417
|
quantity?: number;
|
|
8418
|
+
/**
|
|
8419
|
+
* Format: uuid
|
|
8420
|
+
* @description UUID of the resource the assignment belongs to.
|
|
8421
|
+
*/
|
|
8422
|
+
resourceRef: string;
|
|
8398
8423
|
/** @description Subscription backing this assignment. */
|
|
8399
8424
|
subscription: {
|
|
8400
8425
|
/** @description ISO timestamp when the assignment ends. */
|
|
@@ -8885,6 +8910,69 @@ interface components {
|
|
|
8885
8910
|
*/
|
|
8886
8911
|
visibility: "admins" | "exclusiveMembers" | "members" | "networkMembers" | "public";
|
|
8887
8912
|
};
|
|
8913
|
+
getAssignments: {
|
|
8914
|
+
/** @description List of resource assignments in the location. */
|
|
8915
|
+
assignments: {
|
|
8916
|
+
/** @description Company assigned to the resource. */
|
|
8917
|
+
company?: {
|
|
8918
|
+
/**
|
|
8919
|
+
* Format: uuid
|
|
8920
|
+
* @description Company id.
|
|
8921
|
+
*/
|
|
8922
|
+
id: string;
|
|
8923
|
+
/** @description Company name. */
|
|
8924
|
+
title: string;
|
|
8925
|
+
};
|
|
8926
|
+
/** @description Whether the assignment grants access to the entire resource. */
|
|
8927
|
+
entire: boolean;
|
|
8928
|
+
/**
|
|
8929
|
+
* Format: uuid
|
|
8930
|
+
* @description Assignment id.
|
|
8931
|
+
*/
|
|
8932
|
+
id?: string;
|
|
8933
|
+
/** @description Membership linked to the assignment. */
|
|
8934
|
+
membership?: {
|
|
8935
|
+
/**
|
|
8936
|
+
* Format: uuid
|
|
8937
|
+
* @description Membership id.
|
|
8938
|
+
*/
|
|
8939
|
+
id: string;
|
|
8940
|
+
};
|
|
8941
|
+
/** @description Assigned quantity when the resource is partially assigned. */
|
|
8942
|
+
quantity?: number;
|
|
8943
|
+
/**
|
|
8944
|
+
* Format: uuid
|
|
8945
|
+
* @description UUID of the resource the assignment belongs to.
|
|
8946
|
+
*/
|
|
8947
|
+
resourceRef: string;
|
|
8948
|
+
/** @description Subscription backing this assignment. */
|
|
8949
|
+
subscription: {
|
|
8950
|
+
/** @description ISO timestamp when the assignment ends. */
|
|
8951
|
+
endDate?: string;
|
|
8952
|
+
/**
|
|
8953
|
+
* Format: uuid
|
|
8954
|
+
* @description Subscription id.
|
|
8955
|
+
*/
|
|
8956
|
+
id: string;
|
|
8957
|
+
/** @description ISO timestamp when the assignment starts. */
|
|
8958
|
+
startDate: string;
|
|
8959
|
+
};
|
|
8960
|
+
/** @description User assigned to the resource. */
|
|
8961
|
+
user?: {
|
|
8962
|
+
/** @description User email. */
|
|
8963
|
+
email?: string | null;
|
|
8964
|
+
/**
|
|
8965
|
+
* Format: uuid
|
|
8966
|
+
* @description User id.
|
|
8967
|
+
*/
|
|
8968
|
+
id: string;
|
|
8969
|
+
/** @description User first name. */
|
|
8970
|
+
name?: string | null;
|
|
8971
|
+
/** @description User last name. */
|
|
8972
|
+
surname?: string | null;
|
|
8973
|
+
};
|
|
8974
|
+
}[];
|
|
8975
|
+
};
|
|
8888
8976
|
payment: {
|
|
8889
8977
|
/** @description The amount of the payment */
|
|
8890
8978
|
amount?: number;
|
|
@@ -22189,6 +22277,59 @@ interface operations {
|
|
|
22189
22277
|
};
|
|
22190
22278
|
};
|
|
22191
22279
|
};
|
|
22280
|
+
getAssignments: {
|
|
22281
|
+
parameters: {
|
|
22282
|
+
query: {
|
|
22283
|
+
/** @description UUID of the location whose resource assignments to list. */
|
|
22284
|
+
locationRef: string;
|
|
22285
|
+
};
|
|
22286
|
+
header?: {
|
|
22287
|
+
/** @description The id of the network. Required when using bearer token authentication */
|
|
22288
|
+
"spacebring-network-id"?: string;
|
|
22289
|
+
};
|
|
22290
|
+
path?: never;
|
|
22291
|
+
cookie?: never;
|
|
22292
|
+
};
|
|
22293
|
+
requestBody?: never;
|
|
22294
|
+
responses: {
|
|
22295
|
+
/** @description OK */
|
|
22296
|
+
200: {
|
|
22297
|
+
headers: {
|
|
22298
|
+
[name: string]: unknown;
|
|
22299
|
+
};
|
|
22300
|
+
content: {
|
|
22301
|
+
"application/json": components["schemas"]["getAssignments"];
|
|
22302
|
+
};
|
|
22303
|
+
};
|
|
22304
|
+
/** @description Bad Request */
|
|
22305
|
+
400: {
|
|
22306
|
+
headers: {
|
|
22307
|
+
[name: string]: unknown;
|
|
22308
|
+
};
|
|
22309
|
+
content: {
|
|
22310
|
+
"application/json": components["schemas"]["responseError"];
|
|
22311
|
+
};
|
|
22312
|
+
};
|
|
22313
|
+
/** @description Forbidden */
|
|
22314
|
+
403: {
|
|
22315
|
+
headers: {
|
|
22316
|
+
[name: string]: unknown;
|
|
22317
|
+
};
|
|
22318
|
+
content: {
|
|
22319
|
+
"application/json": components["schemas"]["responseError"];
|
|
22320
|
+
};
|
|
22321
|
+
};
|
|
22322
|
+
/** @description Not Found */
|
|
22323
|
+
404: {
|
|
22324
|
+
headers: {
|
|
22325
|
+
[name: string]: unknown;
|
|
22326
|
+
};
|
|
22327
|
+
content: {
|
|
22328
|
+
"application/json": components["schemas"]["responseError"];
|
|
22329
|
+
};
|
|
22330
|
+
};
|
|
22331
|
+
};
|
|
22332
|
+
};
|
|
22192
22333
|
getResource: {
|
|
22193
22334
|
parameters: {
|
|
22194
22335
|
query?: never;
|
|
@@ -24792,10 +24933,17 @@ type UpdateProductBody = NonNullable<NonNullable<operations["updateProduct"]["re
|
|
|
24792
24933
|
/** Request body for `sb.shop.categories.update()`. */
|
|
24793
24934
|
type UpdateShopCategoryBody = NonNullable<NonNullable<operations["updateShopCategory"]["requestBody"]>["content"]["application/json"]["category"]>;
|
|
24794
24935
|
|
|
24936
|
+
/** A Assignment entity as returned by the Spacebring API. */
|
|
24937
|
+
type Assignment = NonNullable<operations["getAssignments"]["responses"][200]["content"]["application/json"]["assignments"]>[number];
|
|
24795
24938
|
/** A Booking entity as returned by the Spacebring API. */
|
|
24796
24939
|
type Booking = NonNullable<components["schemas"]["booking"]>;
|
|
24797
24940
|
/** A Resource entity as returned by the Spacebring API. */
|
|
24798
24941
|
type Resource = NonNullable<components["schemas"]["resource"]>;
|
|
24942
|
+
/** Query parameters for `sb.resources.getAssignments()`. */
|
|
24943
|
+
interface GetAssignmentsQuery {
|
|
24944
|
+
/** UUID of the location whose resource assignments to list. */
|
|
24945
|
+
locationRef: string;
|
|
24946
|
+
}
|
|
24799
24947
|
/** Query parameters for `sb.resources.bookings.list()`. */
|
|
24800
24948
|
interface GetBookingsQuery {
|
|
24801
24949
|
/** The id of the resource. Required if `locationRef` is not passed. */
|
|
@@ -25620,6 +25768,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
25620
25768
|
get(id: string, options?: SpacebringRequestOptions): Promise<Resource>;
|
|
25621
25769
|
create(resource: CreateResourceBody, options?: SpacebringRequestOptions): Promise<Resource>;
|
|
25622
25770
|
update(id: string, resource: PatchResourceBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
25771
|
+
getAssignments(query: GetAssignmentsQuery, options?: SpacebringRequestOptions): Promise<Assignment[]>;
|
|
25623
25772
|
bookings: {
|
|
25624
25773
|
list(query?: GetBookingsQuery, options?: SpacebringRequestOptions): Promise<{
|
|
25625
25774
|
bookings?: Booking[];
|
|
@@ -25845,4 +25994,4 @@ declare class SpacebringError extends Error {
|
|
|
25845
25994
|
});
|
|
25846
25995
|
}
|
|
25847
25996
|
|
|
25848
|
-
export { type Activity, type AddEventHostsBody, type AltCurrency, type Application, type ApplyBenefitBody, 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 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 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 CreditTransaction, type DayPassTransaction, type Event, type EventTicket, type GetAltCurrenciesQuery, 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 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 PatchGuideBody, type PatchPackageBody, type PatchResourceBody, type PayInvoiceBody, type Payment, type Plan, type Post, type PreviewCreditNoteBody, type Product, type Promocode, type Redemption, type Registration, type Request$1 as Request, type Resource, type ScheduledTransaction, 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 };
|
|
25997
|
+
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 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 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 CreditTransaction, 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 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 PatchGuideBody, type PatchPackageBody, type PatchResourceBody, type PayInvoiceBody, type Payment, type Plan, type Post, type PreviewCreditNoteBody, type Product, type Promocode, type Redemption, type Registration, type Request$1 as Request, type Resource, type ScheduledTransaction, 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
|
@@ -2015,6 +2015,14 @@ function createResources(client, defaults) {
|
|
|
2015
2015
|
async update(id, resource, options) {
|
|
2016
2016
|
return unwrap(await client.PATCH("/resources/v1/{id}", { params: { path: { id } }, body: { resource }, signal: options?.signal }), "PATCH /resources/v1/{id}");
|
|
2017
2017
|
},
|
|
2018
|
+
/**
|
|
2019
|
+
* Retrieve resource assignments
|
|
2020
|
+
*
|
|
2021
|
+
* Retrieve resource assignments in the location. An assignment links a resource, or a number of seats in it, to a company or a member for the duration of a subscription.
|
|
2022
|
+
*/
|
|
2023
|
+
async getAssignments(query, options) {
|
|
2024
|
+
return unwrapProp(await client.GET("/resources/v1/assignments", { params: { query }, signal: options?.signal }), "assignments", "GET /resources/v1/assignments");
|
|
2025
|
+
},
|
|
2018
2026
|
bookings: {
|
|
2019
2027
|
/**
|
|
2020
2028
|
* Retrieve bookings
|