@izak0s/spacebring-api 7.1.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +29 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +324 -8
- package/dist/index.d.ts +324 -8
- package/dist/index.js +29 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1972,13 +1972,37 @@ interface paths {
|
|
|
1972
1972
|
*/
|
|
1973
1973
|
get: operations["getAssignments"];
|
|
1974
1974
|
put?: never;
|
|
1975
|
-
|
|
1975
|
+
/**
|
|
1976
|
+
* Create a resource assignment
|
|
1977
|
+
* @description Create a resource assignment. An assignment links a resource, or a number of seats in it, to a company or a member. <h3>OAuth</h3>Required scopes: <code>resources</code>
|
|
1978
|
+
*/
|
|
1979
|
+
post: operations["createAssignment"];
|
|
1976
1980
|
delete?: never;
|
|
1977
1981
|
options?: never;
|
|
1978
1982
|
head?: never;
|
|
1979
1983
|
patch?: never;
|
|
1980
1984
|
trace?: never;
|
|
1981
1985
|
};
|
|
1986
|
+
"/resources/v1/assignments/{assignmentId}": {
|
|
1987
|
+
parameters: {
|
|
1988
|
+
query?: never;
|
|
1989
|
+
header?: never;
|
|
1990
|
+
path?: never;
|
|
1991
|
+
cookie?: never;
|
|
1992
|
+
};
|
|
1993
|
+
get?: never;
|
|
1994
|
+
put?: never;
|
|
1995
|
+
post?: never;
|
|
1996
|
+
delete?: never;
|
|
1997
|
+
options?: never;
|
|
1998
|
+
head?: never;
|
|
1999
|
+
/**
|
|
2000
|
+
* Update a resource assignment
|
|
2001
|
+
* @description Update a resource assignment. Fields left out of the request keep their current value. <h3>OAuth</h3>Required scopes: <code>resources</code>
|
|
2002
|
+
*/
|
|
2003
|
+
patch: operations["patchAssignment"];
|
|
2004
|
+
trace?: never;
|
|
2005
|
+
};
|
|
1982
2006
|
"/resources/v1/{resourceId}": {
|
|
1983
2007
|
parameters: {
|
|
1984
2008
|
query?: never;
|
|
@@ -9955,6 +9979,130 @@ interface components {
|
|
|
9955
9979
|
};
|
|
9956
9980
|
}[];
|
|
9957
9981
|
};
|
|
9982
|
+
createAssignment: {
|
|
9983
|
+
/** @description The created assignment. */
|
|
9984
|
+
assignment: {
|
|
9985
|
+
/**
|
|
9986
|
+
* @deprecated
|
|
9987
|
+
* @description Deprecated. Use customer instead. Company assigned to the resource.
|
|
9988
|
+
*/
|
|
9989
|
+
company?: {
|
|
9990
|
+
/**
|
|
9991
|
+
* Format: uuid
|
|
9992
|
+
* @description Company id.
|
|
9993
|
+
*/
|
|
9994
|
+
id: string;
|
|
9995
|
+
/** @description Company name. */
|
|
9996
|
+
title: string;
|
|
9997
|
+
};
|
|
9998
|
+
/** @description Customer the resource is assigned to. */
|
|
9999
|
+
customer?: {
|
|
10000
|
+
/**
|
|
10001
|
+
* Format: uuid
|
|
10002
|
+
* @description Customer id.
|
|
10003
|
+
*/
|
|
10004
|
+
id: string;
|
|
10005
|
+
/** @description Company name when the customer is a company. */
|
|
10006
|
+
title?: string;
|
|
10007
|
+
/**
|
|
10008
|
+
* @description Whether the customer is a user or company.
|
|
10009
|
+
* @enum {string}
|
|
10010
|
+
*/
|
|
10011
|
+
type: "user" | "company";
|
|
10012
|
+
/** @description User details when the customer is a user. */
|
|
10013
|
+
user?: {
|
|
10014
|
+
/** @description User email. */
|
|
10015
|
+
email?: string | null;
|
|
10016
|
+
/**
|
|
10017
|
+
* Format: uuid
|
|
10018
|
+
* @description User id.
|
|
10019
|
+
*/
|
|
10020
|
+
id: string;
|
|
10021
|
+
/** @description User first name. */
|
|
10022
|
+
name?: string | null;
|
|
10023
|
+
/** @description User last name. */
|
|
10024
|
+
surname?: string | null;
|
|
10025
|
+
};
|
|
10026
|
+
};
|
|
10027
|
+
/** @description ISO timestamp when the assignment ends. */
|
|
10028
|
+
endDate?: string;
|
|
10029
|
+
/** @description Whether the assignment grants access to the entire resource. */
|
|
10030
|
+
entire: boolean;
|
|
10031
|
+
/**
|
|
10032
|
+
* Format: uuid
|
|
10033
|
+
* @description Assignment id.
|
|
10034
|
+
*/
|
|
10035
|
+
id?: string;
|
|
10036
|
+
/**
|
|
10037
|
+
* @deprecated
|
|
10038
|
+
* @description Deprecated. Use customer instead. Membership linked to the assignment.
|
|
10039
|
+
*/
|
|
10040
|
+
membership?: {
|
|
10041
|
+
/**
|
|
10042
|
+
* Format: uuid
|
|
10043
|
+
* @description Membership id.
|
|
10044
|
+
*/
|
|
10045
|
+
id: string;
|
|
10046
|
+
};
|
|
10047
|
+
/** @description Assigned quantity when the resource is partially assigned. */
|
|
10048
|
+
quantity?: number;
|
|
10049
|
+
/** @description Resource the assignment belongs to. Present when assignments are listed on their own. */
|
|
10050
|
+
resource?: {
|
|
10051
|
+
/**
|
|
10052
|
+
* Format: uuid
|
|
10053
|
+
* @description Resource id.
|
|
10054
|
+
*/
|
|
10055
|
+
id: string;
|
|
10056
|
+
/** @description Resource image URL. */
|
|
10057
|
+
imageUrl?: string;
|
|
10058
|
+
/**
|
|
10059
|
+
* Format: uuid
|
|
10060
|
+
* @description UUID of the location the resource belongs to.
|
|
10061
|
+
*/
|
|
10062
|
+
locationRef: string;
|
|
10063
|
+
/** @description Resource title. */
|
|
10064
|
+
title: string;
|
|
10065
|
+
/** @description Resource type. */
|
|
10066
|
+
type: string;
|
|
10067
|
+
};
|
|
10068
|
+
/**
|
|
10069
|
+
* Format: uuid
|
|
10070
|
+
* @description UUID of the resource the assignment belongs to.
|
|
10071
|
+
*/
|
|
10072
|
+
resourceRef: string;
|
|
10073
|
+
/** @description ISO timestamp when the assignment starts. */
|
|
10074
|
+
startDate: string;
|
|
10075
|
+
/** @description Deprecated. Use startDate and endDate instead. Subscription backing this assignment. */
|
|
10076
|
+
subscription: {
|
|
10077
|
+
/** @description ISO timestamp when the assignment ends. */
|
|
10078
|
+
endDate?: string;
|
|
10079
|
+
/**
|
|
10080
|
+
* Format: uuid
|
|
10081
|
+
* @description Subscription id. Absent for assignments created directly by an admin.
|
|
10082
|
+
*/
|
|
10083
|
+
id?: string;
|
|
10084
|
+
/** @description ISO timestamp when the assignment starts. */
|
|
10085
|
+
startDate: string;
|
|
10086
|
+
};
|
|
10087
|
+
/**
|
|
10088
|
+
* @deprecated
|
|
10089
|
+
* @description Deprecated. Use customer instead. User assigned to the resource.
|
|
10090
|
+
*/
|
|
10091
|
+
user?: {
|
|
10092
|
+
/** @description User email. */
|
|
10093
|
+
email?: string | null;
|
|
10094
|
+
/**
|
|
10095
|
+
* Format: uuid
|
|
10096
|
+
* @description User id.
|
|
10097
|
+
*/
|
|
10098
|
+
id: string;
|
|
10099
|
+
/** @description User first name. */
|
|
10100
|
+
name?: string | null;
|
|
10101
|
+
/** @description User last name. */
|
|
10102
|
+
surname?: string | null;
|
|
10103
|
+
};
|
|
10104
|
+
};
|
|
10105
|
+
};
|
|
9958
10106
|
getBookings: {
|
|
9959
10107
|
/** @description List of bookings. */
|
|
9960
10108
|
bookings: {
|
|
@@ -10019,7 +10167,7 @@ interface components {
|
|
|
10019
10167
|
* @description Deprecated. Customer id of the booking owner. Omitted when the caller has no access.
|
|
10020
10168
|
*/
|
|
10021
10169
|
membershipRefOwner?: string;
|
|
10022
|
-
/** @description
|
|
10170
|
+
/** @description Note attached to the booking. Visible to the booking owner and to admins. */
|
|
10023
10171
|
memo?: string;
|
|
10024
10172
|
/**
|
|
10025
10173
|
* @deprecated
|
|
@@ -10991,7 +11139,7 @@ interface components {
|
|
|
10991
11139
|
* @description Deprecated. Customer id of the booking owner. Omitted when the caller has no access.
|
|
10992
11140
|
*/
|
|
10993
11141
|
membershipRefOwner?: string;
|
|
10994
|
-
/** @description
|
|
11142
|
+
/** @description Note attached to the booking. Visible to the booking owner and to admins. */
|
|
10995
11143
|
memo?: string;
|
|
10996
11144
|
/**
|
|
10997
11145
|
* @deprecated
|
|
@@ -15623,7 +15771,7 @@ interface components {
|
|
|
15623
15771
|
resolveDate?: string;
|
|
15624
15772
|
/**
|
|
15625
15773
|
* Format: date-time
|
|
15626
|
-
* @description Date when the transaction is scheduled to resolve, anchored to the subscription interval the booking falls into.
|
|
15774
|
+
* @description Date when the transaction is scheduled to resolve, anchored to the subscription interval the booking falls into. Once a charge has been deferred it is the latest date the transaction can still be charged before the booking is canceled.
|
|
15627
15775
|
*/
|
|
15628
15776
|
scheduleDate: string;
|
|
15629
15777
|
/** @description Transaction status. */
|
|
@@ -17049,7 +17197,7 @@ interface components {
|
|
|
17049
17197
|
resolveDate?: string;
|
|
17050
17198
|
/**
|
|
17051
17199
|
* Format: date-time
|
|
17052
|
-
* @description Date when the transaction is scheduled to resolve, anchored to the subscription interval the booking falls into.
|
|
17200
|
+
* @description Date when the transaction is scheduled to resolve, anchored to the subscription interval the booking falls into. Once a charge has been deferred it is the latest date the transaction can still be charged before the booking is canceled.
|
|
17053
17201
|
*/
|
|
17054
17202
|
scheduleDate: string;
|
|
17055
17203
|
/** @description Transaction status. */
|
|
@@ -20448,6 +20596,65 @@ interface components {
|
|
|
20448
20596
|
};
|
|
20449
20597
|
};
|
|
20450
20598
|
};
|
|
20599
|
+
createAssignment: {
|
|
20600
|
+
content: {
|
|
20601
|
+
"application/json": {
|
|
20602
|
+
assignment: {
|
|
20603
|
+
/**
|
|
20604
|
+
* Format: uuid
|
|
20605
|
+
* @description UUID of the company or user membership the resource is assigned to. Omit to hold the resource without a customer.
|
|
20606
|
+
*/
|
|
20607
|
+
customerRef?: string;
|
|
20608
|
+
/**
|
|
20609
|
+
* Format: date-time
|
|
20610
|
+
* @description ISO timestamp when the assignment ends. Omit for an open-ended assignment.
|
|
20611
|
+
*/
|
|
20612
|
+
endDate?: string;
|
|
20613
|
+
/** @description Whether the assignment grants access to the entire resource. */
|
|
20614
|
+
entire: boolean;
|
|
20615
|
+
/** @description Assigned quantity when the resource is partially assigned. Required when entire is false, not allowed otherwise. */
|
|
20616
|
+
quantity?: number;
|
|
20617
|
+
/**
|
|
20618
|
+
* Format: uuid
|
|
20619
|
+
* @description UUID of the resource to assign.
|
|
20620
|
+
*/
|
|
20621
|
+
resourceRef: string;
|
|
20622
|
+
/**
|
|
20623
|
+
* Format: date-time
|
|
20624
|
+
* @description ISO timestamp when the assignment starts.
|
|
20625
|
+
*/
|
|
20626
|
+
startDate: string;
|
|
20627
|
+
};
|
|
20628
|
+
};
|
|
20629
|
+
};
|
|
20630
|
+
};
|
|
20631
|
+
patchAssignment: {
|
|
20632
|
+
content: {
|
|
20633
|
+
"application/json": {
|
|
20634
|
+
assignment: {
|
|
20635
|
+
/**
|
|
20636
|
+
* Format: date-time
|
|
20637
|
+
* @description ISO timestamp when the assignment ends. Send null to make the assignment open-ended.
|
|
20638
|
+
*/
|
|
20639
|
+
endDate?: string | null;
|
|
20640
|
+
/** @description Whether the assignment grants access to the entire resource. */
|
|
20641
|
+
entire?: boolean;
|
|
20642
|
+
/** @description Assigned quantity when the resource is partially assigned. Required when entire is false, not allowed otherwise. */
|
|
20643
|
+
quantity?: number;
|
|
20644
|
+
/**
|
|
20645
|
+
* Format: uuid
|
|
20646
|
+
* @description UUID of the resource to assign.
|
|
20647
|
+
*/
|
|
20648
|
+
resourceRef?: string;
|
|
20649
|
+
/**
|
|
20650
|
+
* Format: date-time
|
|
20651
|
+
* @description ISO timestamp when the assignment starts.
|
|
20652
|
+
*/
|
|
20653
|
+
startDate?: string;
|
|
20654
|
+
};
|
|
20655
|
+
};
|
|
20656
|
+
};
|
|
20657
|
+
};
|
|
20451
20658
|
patchResource: {
|
|
20452
20659
|
content: {
|
|
20453
20660
|
"application/json": {
|
|
@@ -27080,6 +27287,107 @@ interface operations {
|
|
|
27080
27287
|
};
|
|
27081
27288
|
};
|
|
27082
27289
|
};
|
|
27290
|
+
createAssignment: {
|
|
27291
|
+
parameters: {
|
|
27292
|
+
query?: never;
|
|
27293
|
+
header?: {
|
|
27294
|
+
/** @description The id of the network. Required when using bearer token authentication */
|
|
27295
|
+
"spacebring-network-id"?: string;
|
|
27296
|
+
};
|
|
27297
|
+
path?: never;
|
|
27298
|
+
cookie?: never;
|
|
27299
|
+
};
|
|
27300
|
+
requestBody: components["requestBodies"]["createAssignment"];
|
|
27301
|
+
responses: {
|
|
27302
|
+
/** @description Created */
|
|
27303
|
+
201: {
|
|
27304
|
+
headers: {
|
|
27305
|
+
[name: string]: unknown;
|
|
27306
|
+
};
|
|
27307
|
+
content: {
|
|
27308
|
+
"application/json": components["schemas"]["createAssignment"];
|
|
27309
|
+
};
|
|
27310
|
+
};
|
|
27311
|
+
/** @description Bad Request */
|
|
27312
|
+
400: {
|
|
27313
|
+
headers: {
|
|
27314
|
+
[name: string]: unknown;
|
|
27315
|
+
};
|
|
27316
|
+
content: {
|
|
27317
|
+
"application/json": components["schemas"]["responseError"];
|
|
27318
|
+
};
|
|
27319
|
+
};
|
|
27320
|
+
/** @description Forbidden */
|
|
27321
|
+
403: {
|
|
27322
|
+
headers: {
|
|
27323
|
+
[name: string]: unknown;
|
|
27324
|
+
};
|
|
27325
|
+
content: {
|
|
27326
|
+
"application/json": components["schemas"]["responseError"];
|
|
27327
|
+
};
|
|
27328
|
+
};
|
|
27329
|
+
/** @description Not Found */
|
|
27330
|
+
404: {
|
|
27331
|
+
headers: {
|
|
27332
|
+
[name: string]: unknown;
|
|
27333
|
+
};
|
|
27334
|
+
content: {
|
|
27335
|
+
"application/json": components["schemas"]["responseError"];
|
|
27336
|
+
};
|
|
27337
|
+
};
|
|
27338
|
+
};
|
|
27339
|
+
};
|
|
27340
|
+
patchAssignment: {
|
|
27341
|
+
parameters: {
|
|
27342
|
+
query?: never;
|
|
27343
|
+
header?: {
|
|
27344
|
+
/** @description The id of the network. Required when using bearer token authentication */
|
|
27345
|
+
"spacebring-network-id"?: string;
|
|
27346
|
+
};
|
|
27347
|
+
path: {
|
|
27348
|
+
/** @description The id of the assignment. */
|
|
27349
|
+
assignmentId: string;
|
|
27350
|
+
};
|
|
27351
|
+
cookie?: never;
|
|
27352
|
+
};
|
|
27353
|
+
requestBody: components["requestBodies"]["patchAssignment"];
|
|
27354
|
+
responses: {
|
|
27355
|
+
/** @description No Content */
|
|
27356
|
+
204: {
|
|
27357
|
+
headers: {
|
|
27358
|
+
[name: string]: unknown;
|
|
27359
|
+
};
|
|
27360
|
+
content?: never;
|
|
27361
|
+
};
|
|
27362
|
+
/** @description Bad Request */
|
|
27363
|
+
400: {
|
|
27364
|
+
headers: {
|
|
27365
|
+
[name: string]: unknown;
|
|
27366
|
+
};
|
|
27367
|
+
content: {
|
|
27368
|
+
"application/json": components["schemas"]["responseError"];
|
|
27369
|
+
};
|
|
27370
|
+
};
|
|
27371
|
+
/** @description Forbidden */
|
|
27372
|
+
403: {
|
|
27373
|
+
headers: {
|
|
27374
|
+
[name: string]: unknown;
|
|
27375
|
+
};
|
|
27376
|
+
content: {
|
|
27377
|
+
"application/json": components["schemas"]["responseError"];
|
|
27378
|
+
};
|
|
27379
|
+
};
|
|
27380
|
+
/** @description Not Found */
|
|
27381
|
+
404: {
|
|
27382
|
+
headers: {
|
|
27383
|
+
[name: string]: unknown;
|
|
27384
|
+
};
|
|
27385
|
+
content: {
|
|
27386
|
+
"application/json": components["schemas"]["responseError"];
|
|
27387
|
+
};
|
|
27388
|
+
};
|
|
27389
|
+
};
|
|
27390
|
+
};
|
|
27083
27391
|
getResource: {
|
|
27084
27392
|
parameters: {
|
|
27085
27393
|
query?: never;
|
|
@@ -29800,7 +30108,7 @@ type Assignment = NonNullable<operations["getAssignments"]["responses"][200]["co
|
|
|
29800
30108
|
type Booking = NonNullable<operations["getBooking"]["responses"][200]["content"]["application/json"]["booking"]>;
|
|
29801
30109
|
/** A Resource entity as returned by the Spacebring API. */
|
|
29802
30110
|
type Resource = NonNullable<operations["getResource"]["responses"][200]["content"]["application/json"]["resource"]>;
|
|
29803
|
-
/** Query parameters for `sb.resources.
|
|
30111
|
+
/** Query parameters for `sb.resources.assignments.list()`. */
|
|
29804
30112
|
interface GetAssignmentsQuery {
|
|
29805
30113
|
/** UUID of the location whose resource assignments to list. */
|
|
29806
30114
|
locationRef?: string;
|
|
@@ -29863,10 +30171,14 @@ interface GetResourcesQuery {
|
|
|
29863
30171
|
/** Comma-separated list of resource types to filter by, e.g. `room,hotDesk`. Valid values: dedicatedDesk, equipment, hotDesk, office, parkingLot, room, station, conferenceRoom, eventSpace, meetingRoom, phoneBooth, studio. Defaults to all bookable types. */
|
|
29864
30172
|
types?: string;
|
|
29865
30173
|
}
|
|
30174
|
+
/** Request body for `sb.resources.assignments.create()`. */
|
|
30175
|
+
type CreateAssignmentBody = NonNullable<NonNullable<operations["createAssignment"]["requestBody"]>["content"]["application/json"]["assignment"]>;
|
|
29866
30176
|
/** Request body for `sb.resources.bookings.create()`. */
|
|
29867
30177
|
type CreateBookingBody = NonNullable<NonNullable<operations["createBooking"]["requestBody"]>["content"]["application/json"]["booking"]>;
|
|
29868
30178
|
/** Request body for `sb.resources.create()`. */
|
|
29869
30179
|
type CreateResourceBody = NonNullable<NonNullable<operations["createResource"]["requestBody"]>["content"]["application/json"]["resource"]>;
|
|
30180
|
+
/** Request body for `sb.resources.assignments.update()`. */
|
|
30181
|
+
type PatchAssignmentBody = NonNullable<NonNullable<operations["patchAssignment"]["requestBody"]>["content"]["application/json"]["assignment"]>;
|
|
29870
30182
|
/** Request body for `sb.resources.bookings.update()`. */
|
|
29871
30183
|
type PatchBookingBody = NonNullable<operations["patchBooking"]["requestBody"]>["content"]["application/json"];
|
|
29872
30184
|
/** Request body for `sb.resources.update()`. */
|
|
@@ -30661,7 +30973,11 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
30661
30973
|
get(resourceId: string, options?: SpacebringRequestOptions): Promise<Resource>;
|
|
30662
30974
|
create(resource: CreateResourceBody, options?: SpacebringRequestOptions): Promise<Resource>;
|
|
30663
30975
|
update(resourceId: string, resource: PatchResourceBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
30664
|
-
|
|
30976
|
+
assignments: {
|
|
30977
|
+
list(query?: GetAssignmentsQuery, options?: SpacebringRequestOptions): Promise<Assignment[]>;
|
|
30978
|
+
create(assignment: CreateAssignmentBody, options?: SpacebringRequestOptions): Promise<Assignment>;
|
|
30979
|
+
update(assignmentId: string, assignment: PatchAssignmentBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
30980
|
+
};
|
|
30665
30981
|
bookings: {
|
|
30666
30982
|
list(query?: GetBookingsQuery, options?: SpacebringRequestOptions): Promise<{
|
|
30667
30983
|
bookings: Booking[];
|
|
@@ -30899,4 +31215,4 @@ declare class SpacebringError extends Error {
|
|
|
30899
31215
|
});
|
|
30900
31216
|
}
|
|
30901
31217
|
|
|
30902
|
-
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 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 PatchBookingBody, 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 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 };
|
|
31218
|
+
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 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 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 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,13 +2015,35 @@ function createResources(client, defaults) {
|
|
|
2015
2015
|
async update(resourceId, resource, options) {
|
|
2016
2016
|
return unwrap(await client.PATCH("/resources/v1/{resourceId}", { params: { path: { resourceId } }, body: { resource }, signal: options?.signal }), "PATCH /resources/v1/{resourceId}");
|
|
2017
2017
|
},
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2018
|
+
assignments: {
|
|
2019
|
+
/**
|
|
2020
|
+
* Retrieve resource assignments
|
|
2021
|
+
*
|
|
2022
|
+
* 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.
|
|
2023
|
+
*/
|
|
2024
|
+
async list(query, options) {
|
|
2025
|
+
return unwrapProp(await client.GET("/resources/v1/assignments", { params: { query }, signal: options?.signal }), "assignments", "GET /resources/v1/assignments");
|
|
2026
|
+
},
|
|
2027
|
+
/**
|
|
2028
|
+
* Create a resource assignment
|
|
2029
|
+
*
|
|
2030
|
+
* Create a resource assignment. An assignment links a resource, or a number of seats in it, to a company or a member.
|
|
2031
|
+
*/
|
|
2032
|
+
async create(assignment, options) {
|
|
2033
|
+
return unwrapProp(await client.POST("/resources/v1/assignments", { body: { assignment }, signal: options?.signal }), "assignment", "POST /resources/v1/assignments");
|
|
2034
|
+
},
|
|
2035
|
+
/**
|
|
2036
|
+
* Update a resource assignment
|
|
2037
|
+
*
|
|
2038
|
+
* Update a resource assignment. Fields left out of the request keep their current value.
|
|
2039
|
+
*
|
|
2040
|
+
* @param assignmentId The id of the assignment.
|
|
2041
|
+
* @param assignment The `assignment` payload.
|
|
2042
|
+
* @param options Request options (abort signal).
|
|
2043
|
+
*/
|
|
2044
|
+
async update(assignmentId, assignment, options) {
|
|
2045
|
+
return unwrap(await client.PATCH("/resources/v1/assignments/{assignmentId}", { params: { path: { assignmentId } }, body: { assignment }, signal: options?.signal }), "PATCH /resources/v1/assignments/{assignmentId}");
|
|
2046
|
+
}
|
|
2025
2047
|
},
|
|
2026
2048
|
bookings: {
|
|
2027
2049
|
/**
|