@izak0s/spacebring-api 8.1.0 → 9.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/dist/index.cjs +15 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -2
- package/dist/index.d.ts +43 -2
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1490,7 +1490,8 @@ interface paths {
|
|
|
1490
1490
|
put?: never;
|
|
1491
1491
|
/**
|
|
1492
1492
|
* Check in a ticket
|
|
1493
|
-
* @
|
|
1493
|
+
* @deprecated
|
|
1494
|
+
* @description Check in an event ticket. Fails if the ticket is already checked in. Deprecated: this endpoint will be removed in a future release. <h3>OAuth</h3>Required scopes: <code>events</code>
|
|
1494
1495
|
*/
|
|
1495
1496
|
post: operations["checkInEventTicket"];
|
|
1496
1497
|
delete?: never;
|
|
@@ -8637,6 +8638,11 @@ interface components {
|
|
|
8637
8638
|
role?: "owner" | "admin" | "member";
|
|
8638
8639
|
/** @description ISO timestamp or date when terms consent was given. */
|
|
8639
8640
|
termsConsentDate?: string;
|
|
8641
|
+
/**
|
|
8642
|
+
* @description Whether the registration belongs to a person or to an AI agent.
|
|
8643
|
+
* @enum {string}
|
|
8644
|
+
*/
|
|
8645
|
+
type: "user" | "agent";
|
|
8640
8646
|
/** @description Profile details of the registered user. */
|
|
8641
8647
|
user: {
|
|
8642
8648
|
/** @description About text of the user. */
|
|
@@ -10004,6 +10010,10 @@ interface components {
|
|
|
10004
10010
|
surname?: string | null;
|
|
10005
10011
|
};
|
|
10006
10012
|
}[];
|
|
10013
|
+
/** @description Pagination token to fetch the next page of results. */
|
|
10014
|
+
nextPageToken?: string;
|
|
10015
|
+
/** @description Search query parameters for the next page of results. Includes all filters used to fetch the current page. */
|
|
10016
|
+
searchQueryNext?: string;
|
|
10007
10017
|
};
|
|
10008
10018
|
createAssignment: {
|
|
10009
10019
|
/** @description The created assignment. */
|
|
@@ -21117,6 +21127,16 @@ interface components {
|
|
|
21117
21127
|
content: {
|
|
21118
21128
|
"application/json": {
|
|
21119
21129
|
booking: {
|
|
21130
|
+
/** @description Attendees to invite to the booking. Supported for room resources. Users without a membership in the location are left out, and so is the owner. */
|
|
21131
|
+
attendees?: {
|
|
21132
|
+
user: {
|
|
21133
|
+
/**
|
|
21134
|
+
* Format: uuid
|
|
21135
|
+
* @description User id of the attendee.
|
|
21136
|
+
*/
|
|
21137
|
+
id: string;
|
|
21138
|
+
};
|
|
21139
|
+
}[];
|
|
21120
21140
|
/**
|
|
21121
21141
|
* Format: date-time
|
|
21122
21142
|
* @description ISO timestamp when the booking ends.
|
|
@@ -21132,6 +21152,8 @@ interface components {
|
|
|
21132
21152
|
membershipRefOwner?: string;
|
|
21133
21153
|
/** @description Internal note attached to the booking. */
|
|
21134
21154
|
memo?: string;
|
|
21155
|
+
/** @description RRULE lines that make the booking repeat, e.g. `RRULE:FREQ=WEEKLY;COUNT=10`. The DTSTART line is derived from startDate. Only a free booking can repeat. */
|
|
21156
|
+
recurrence?: string[];
|
|
21135
21157
|
/**
|
|
21136
21158
|
* Format: uuid
|
|
21137
21159
|
* @description ID of the resource to book.
|
|
@@ -21139,6 +21161,12 @@ interface components {
|
|
|
21139
21161
|
resourceRef: string;
|
|
21140
21162
|
/** @description Number of seats to reserve. Required for desk and office resources. */
|
|
21141
21163
|
seats?: number;
|
|
21164
|
+
/**
|
|
21165
|
+
* @description Whether to notify the owner and the attendees about the booking. Defaults to `all`.
|
|
21166
|
+
* @default all
|
|
21167
|
+
* @enum {string}
|
|
21168
|
+
*/
|
|
21169
|
+
sendUpdates?: "none" | "all";
|
|
21142
21170
|
/**
|
|
21143
21171
|
* Format: date-time
|
|
21144
21172
|
* @description ISO timestamp when the booking starts.
|
|
@@ -27355,8 +27383,12 @@ interface operations {
|
|
|
27355
27383
|
getAssignments: {
|
|
27356
27384
|
parameters: {
|
|
27357
27385
|
query?: {
|
|
27386
|
+
/** @description Maximum number of assignments per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. Ignored when registrationRef is used. */
|
|
27387
|
+
limit?: number;
|
|
27358
27388
|
/** @description UUID of the location whose resource assignments to list. */
|
|
27359
27389
|
locationRef?: string;
|
|
27390
|
+
/** @description Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. Ignored when registrationRef is used. */
|
|
27391
|
+
nextPageToken?: string;
|
|
27360
27392
|
};
|
|
27361
27393
|
header?: {
|
|
27362
27394
|
/** @description The id of the network. Required when using bearer token authentication */
|
|
@@ -30228,8 +30260,12 @@ type Booking = NonNullable<operations["getBooking"]["responses"][200]["content"]
|
|
|
30228
30260
|
type Resource = NonNullable<operations["getResource"]["responses"][200]["content"]["application/json"]["resource"]>;
|
|
30229
30261
|
/** Query parameters for `sb.resources.assignments.list()`. */
|
|
30230
30262
|
interface GetAssignmentsQuery {
|
|
30263
|
+
/** Maximum number of assignments per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. Ignored when registrationRef is used. */
|
|
30264
|
+
limit?: number;
|
|
30231
30265
|
/** UUID of the location whose resource assignments to list. */
|
|
30232
30266
|
locationRef?: string;
|
|
30267
|
+
/** Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. Ignored when registrationRef is used. */
|
|
30268
|
+
nextPageToken?: string;
|
|
30233
30269
|
}
|
|
30234
30270
|
/** Query parameters for `sb.resources.bookings.list()`. */
|
|
30235
30271
|
interface GetBookingsQuery {
|
|
@@ -31092,7 +31128,12 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
31092
31128
|
create(resource: CreateResourceBody, options?: SpacebringRequestOptions): Promise<Resource>;
|
|
31093
31129
|
update(resourceId: string, resource: PatchResourceBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
31094
31130
|
assignments: {
|
|
31095
|
-
list(query?: GetAssignmentsQuery, options?: SpacebringRequestOptions): Promise<
|
|
31131
|
+
list(query?: GetAssignmentsQuery, options?: SpacebringRequestOptions): Promise<{
|
|
31132
|
+
assignments: Assignment[];
|
|
31133
|
+
nextPageToken?: string;
|
|
31134
|
+
searchQueryNext?: string;
|
|
31135
|
+
}>;
|
|
31136
|
+
iterate(query?: Omit<GetAssignmentsQuery, "nextPageToken">, options?: SpacebringRequestOptions): AsyncGenerator<Assignment, void, undefined>;
|
|
31096
31137
|
create(assignment: CreateAssignmentBody, options?: SpacebringRequestOptions): Promise<Assignment>;
|
|
31097
31138
|
update(assignmentId: string, assignment: PatchAssignmentBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
31098
31139
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1490,7 +1490,8 @@ interface paths {
|
|
|
1490
1490
|
put?: never;
|
|
1491
1491
|
/**
|
|
1492
1492
|
* Check in a ticket
|
|
1493
|
-
* @
|
|
1493
|
+
* @deprecated
|
|
1494
|
+
* @description Check in an event ticket. Fails if the ticket is already checked in. Deprecated: this endpoint will be removed in a future release. <h3>OAuth</h3>Required scopes: <code>events</code>
|
|
1494
1495
|
*/
|
|
1495
1496
|
post: operations["checkInEventTicket"];
|
|
1496
1497
|
delete?: never;
|
|
@@ -8637,6 +8638,11 @@ interface components {
|
|
|
8637
8638
|
role?: "owner" | "admin" | "member";
|
|
8638
8639
|
/** @description ISO timestamp or date when terms consent was given. */
|
|
8639
8640
|
termsConsentDate?: string;
|
|
8641
|
+
/**
|
|
8642
|
+
* @description Whether the registration belongs to a person or to an AI agent.
|
|
8643
|
+
* @enum {string}
|
|
8644
|
+
*/
|
|
8645
|
+
type: "user" | "agent";
|
|
8640
8646
|
/** @description Profile details of the registered user. */
|
|
8641
8647
|
user: {
|
|
8642
8648
|
/** @description About text of the user. */
|
|
@@ -10004,6 +10010,10 @@ interface components {
|
|
|
10004
10010
|
surname?: string | null;
|
|
10005
10011
|
};
|
|
10006
10012
|
}[];
|
|
10013
|
+
/** @description Pagination token to fetch the next page of results. */
|
|
10014
|
+
nextPageToken?: string;
|
|
10015
|
+
/** @description Search query parameters for the next page of results. Includes all filters used to fetch the current page. */
|
|
10016
|
+
searchQueryNext?: string;
|
|
10007
10017
|
};
|
|
10008
10018
|
createAssignment: {
|
|
10009
10019
|
/** @description The created assignment. */
|
|
@@ -21117,6 +21127,16 @@ interface components {
|
|
|
21117
21127
|
content: {
|
|
21118
21128
|
"application/json": {
|
|
21119
21129
|
booking: {
|
|
21130
|
+
/** @description Attendees to invite to the booking. Supported for room resources. Users without a membership in the location are left out, and so is the owner. */
|
|
21131
|
+
attendees?: {
|
|
21132
|
+
user: {
|
|
21133
|
+
/**
|
|
21134
|
+
* Format: uuid
|
|
21135
|
+
* @description User id of the attendee.
|
|
21136
|
+
*/
|
|
21137
|
+
id: string;
|
|
21138
|
+
};
|
|
21139
|
+
}[];
|
|
21120
21140
|
/**
|
|
21121
21141
|
* Format: date-time
|
|
21122
21142
|
* @description ISO timestamp when the booking ends.
|
|
@@ -21132,6 +21152,8 @@ interface components {
|
|
|
21132
21152
|
membershipRefOwner?: string;
|
|
21133
21153
|
/** @description Internal note attached to the booking. */
|
|
21134
21154
|
memo?: string;
|
|
21155
|
+
/** @description RRULE lines that make the booking repeat, e.g. `RRULE:FREQ=WEEKLY;COUNT=10`. The DTSTART line is derived from startDate. Only a free booking can repeat. */
|
|
21156
|
+
recurrence?: string[];
|
|
21135
21157
|
/**
|
|
21136
21158
|
* Format: uuid
|
|
21137
21159
|
* @description ID of the resource to book.
|
|
@@ -21139,6 +21161,12 @@ interface components {
|
|
|
21139
21161
|
resourceRef: string;
|
|
21140
21162
|
/** @description Number of seats to reserve. Required for desk and office resources. */
|
|
21141
21163
|
seats?: number;
|
|
21164
|
+
/**
|
|
21165
|
+
* @description Whether to notify the owner and the attendees about the booking. Defaults to `all`.
|
|
21166
|
+
* @default all
|
|
21167
|
+
* @enum {string}
|
|
21168
|
+
*/
|
|
21169
|
+
sendUpdates?: "none" | "all";
|
|
21142
21170
|
/**
|
|
21143
21171
|
* Format: date-time
|
|
21144
21172
|
* @description ISO timestamp when the booking starts.
|
|
@@ -27355,8 +27383,12 @@ interface operations {
|
|
|
27355
27383
|
getAssignments: {
|
|
27356
27384
|
parameters: {
|
|
27357
27385
|
query?: {
|
|
27386
|
+
/** @description Maximum number of assignments per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. Ignored when registrationRef is used. */
|
|
27387
|
+
limit?: number;
|
|
27358
27388
|
/** @description UUID of the location whose resource assignments to list. */
|
|
27359
27389
|
locationRef?: string;
|
|
27390
|
+
/** @description Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. Ignored when registrationRef is used. */
|
|
27391
|
+
nextPageToken?: string;
|
|
27360
27392
|
};
|
|
27361
27393
|
header?: {
|
|
27362
27394
|
/** @description The id of the network. Required when using bearer token authentication */
|
|
@@ -30228,8 +30260,12 @@ type Booking = NonNullable<operations["getBooking"]["responses"][200]["content"]
|
|
|
30228
30260
|
type Resource = NonNullable<operations["getResource"]["responses"][200]["content"]["application/json"]["resource"]>;
|
|
30229
30261
|
/** Query parameters for `sb.resources.assignments.list()`. */
|
|
30230
30262
|
interface GetAssignmentsQuery {
|
|
30263
|
+
/** Maximum number of assignments per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. Ignored when registrationRef is used. */
|
|
30264
|
+
limit?: number;
|
|
30231
30265
|
/** UUID of the location whose resource assignments to list. */
|
|
30232
30266
|
locationRef?: string;
|
|
30267
|
+
/** Pagination token from nextPageToken in a previous response. Keep the same filters when fetching the next page. Ignored when registrationRef is used. */
|
|
30268
|
+
nextPageToken?: string;
|
|
30233
30269
|
}
|
|
30234
30270
|
/** Query parameters for `sb.resources.bookings.list()`. */
|
|
30235
30271
|
interface GetBookingsQuery {
|
|
@@ -31092,7 +31128,12 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
31092
31128
|
create(resource: CreateResourceBody, options?: SpacebringRequestOptions): Promise<Resource>;
|
|
31093
31129
|
update(resourceId: string, resource: PatchResourceBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
31094
31130
|
assignments: {
|
|
31095
|
-
list(query?: GetAssignmentsQuery, options?: SpacebringRequestOptions): Promise<
|
|
31131
|
+
list(query?: GetAssignmentsQuery, options?: SpacebringRequestOptions): Promise<{
|
|
31132
|
+
assignments: Assignment[];
|
|
31133
|
+
nextPageToken?: string;
|
|
31134
|
+
searchQueryNext?: string;
|
|
31135
|
+
}>;
|
|
31136
|
+
iterate(query?: Omit<GetAssignmentsQuery, "nextPageToken">, options?: SpacebringRequestOptions): AsyncGenerator<Assignment, void, undefined>;
|
|
31096
31137
|
create(assignment: CreateAssignmentBody, options?: SpacebringRequestOptions): Promise<Assignment>;
|
|
31097
31138
|
update(assignmentId: string, assignment: PatchAssignmentBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
31098
31139
|
};
|
package/dist/index.js
CHANGED
|
@@ -1555,10 +1555,12 @@ function createEvents(client, defaults) {
|
|
|
1555
1555
|
/**
|
|
1556
1556
|
* Check in a ticket
|
|
1557
1557
|
*
|
|
1558
|
-
* Check in an event ticket. Fails if the ticket is already checked in.
|
|
1558
|
+
* Check in an event ticket. Fails if the ticket is already checked in. Deprecated: this endpoint will be removed in a future release.
|
|
1559
1559
|
*
|
|
1560
1560
|
* @param id The id of the event ticket.
|
|
1561
1561
|
* @param options Request options (abort signal).
|
|
1562
|
+
*
|
|
1563
|
+
* @deprecated Marked as deprecated in the OpenAPI spec.
|
|
1562
1564
|
*/
|
|
1563
1565
|
async checkIn(id, options) {
|
|
1564
1566
|
return unwrapProp(await client.POST("/events/tickets/v1/{id}/checkin", { params: { path: { id } }, signal: options?.signal }), "ticket", "POST /events/tickets/v1/{id}/checkin");
|
|
@@ -2022,7 +2024,18 @@ function createResources(client, defaults) {
|
|
|
2022
2024
|
* 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
2025
|
*/
|
|
2024
2026
|
async list(query, options) {
|
|
2025
|
-
return
|
|
2027
|
+
return unwrap(await client.GET("/resources/v1/assignments", { params: { query }, signal: options?.signal }), "GET /resources/v1/assignments");
|
|
2028
|
+
},
|
|
2029
|
+
/**
|
|
2030
|
+
* Retrieve resource assignments — iterates every item across all pages.
|
|
2031
|
+
*
|
|
2032
|
+
* 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.
|
|
2033
|
+
*/
|
|
2034
|
+
iterate(query, options) {
|
|
2035
|
+
return paginate(
|
|
2036
|
+
async (nextPageToken) => unwrap(await client.GET("/resources/v1/assignments", { params: { query: { ...query, nextPageToken } }, signal: options?.signal }), "GET /resources/v1/assignments"),
|
|
2037
|
+
"assignments"
|
|
2038
|
+
);
|
|
2026
2039
|
},
|
|
2027
2040
|
/**
|
|
2028
2041
|
* Create a resource assignment
|