@izak0s/spacebring-api 13.0.0 → 14.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 +9 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -11
- package/dist/index.d.ts +47 -11
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2052,7 +2052,11 @@ interface paths {
|
|
|
2052
2052
|
path?: never;
|
|
2053
2053
|
cookie?: never;
|
|
2054
2054
|
};
|
|
2055
|
-
|
|
2055
|
+
/**
|
|
2056
|
+
* Retrieve a package
|
|
2057
|
+
* @description Retrieve a package. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
|
|
2058
|
+
*/
|
|
2059
|
+
get: operations["getPackage"];
|
|
2056
2060
|
put?: never;
|
|
2057
2061
|
post?: never;
|
|
2058
2062
|
/**
|
|
@@ -9712,8 +9716,6 @@ interface components {
|
|
|
9712
9716
|
lastSeenDate?: string;
|
|
9713
9717
|
/** @description Location-scoped admin permissions. Included only for owners and super admins or when viewing the current user's registration. */
|
|
9714
9718
|
locationPermissions?: {
|
|
9715
|
-
/** @description Whether the admin can manage other admins. */
|
|
9716
|
-
admins: boolean;
|
|
9717
9719
|
/** @description Whether permissions apply to all locations. */
|
|
9718
9720
|
allLocations: boolean;
|
|
9719
9721
|
/** @description Whether the admin can access analytics. */
|
|
@@ -9722,8 +9724,11 @@ interface components {
|
|
|
9722
9724
|
benefits: boolean;
|
|
9723
9725
|
/** @description Whether the admin can manage billing. */
|
|
9724
9726
|
billing: boolean;
|
|
9725
|
-
/**
|
|
9726
|
-
|
|
9727
|
+
/**
|
|
9728
|
+
* @deprecated
|
|
9729
|
+
* @description Deprecated. Use resources instead.
|
|
9730
|
+
*/
|
|
9731
|
+
bookings?: boolean;
|
|
9727
9732
|
/** @description Whether the admin can manage customers. */
|
|
9728
9733
|
customers: boolean;
|
|
9729
9734
|
/** @description Whether the admin can manage events. */
|
|
@@ -24532,11 +24537,6 @@ interface components {
|
|
|
24532
24537
|
/** @description Whether two-way sync is enabled. */
|
|
24533
24538
|
twoWaySyncEnabled: boolean;
|
|
24534
24539
|
} | null;
|
|
24535
|
-
/**
|
|
24536
|
-
* Format: uuid
|
|
24537
|
-
* @description Optional client-provided resource id.
|
|
24538
|
-
*/
|
|
24539
|
-
id?: string;
|
|
24540
24540
|
/** @description Kisi access group reference. */
|
|
24541
24541
|
kisiGroupRef?: number | null;
|
|
24542
24542
|
/**
|
|
@@ -31962,6 +31962,41 @@ interface operations {
|
|
|
31962
31962
|
};
|
|
31963
31963
|
};
|
|
31964
31964
|
};
|
|
31965
|
+
getPackage: {
|
|
31966
|
+
parameters: {
|
|
31967
|
+
query?: never;
|
|
31968
|
+
header?: {
|
|
31969
|
+
/** @description The id of the network. Required when using bearer token authentication */
|
|
31970
|
+
"spacebring-network-id"?: string;
|
|
31971
|
+
};
|
|
31972
|
+
path: {
|
|
31973
|
+
/** @description The id of the package. */
|
|
31974
|
+
packageId: string;
|
|
31975
|
+
};
|
|
31976
|
+
cookie?: never;
|
|
31977
|
+
};
|
|
31978
|
+
requestBody?: never;
|
|
31979
|
+
responses: {
|
|
31980
|
+
/** @description OK */
|
|
31981
|
+
200: {
|
|
31982
|
+
headers: {
|
|
31983
|
+
[name: string]: unknown;
|
|
31984
|
+
};
|
|
31985
|
+
content: {
|
|
31986
|
+
"application/json": components["schemas"]["getPackage"];
|
|
31987
|
+
};
|
|
31988
|
+
};
|
|
31989
|
+
/** @description Bad Request */
|
|
31990
|
+
400: {
|
|
31991
|
+
headers: {
|
|
31992
|
+
[name: string]: unknown;
|
|
31993
|
+
};
|
|
31994
|
+
content: {
|
|
31995
|
+
"application/json": components["schemas"]["responseError"];
|
|
31996
|
+
};
|
|
31997
|
+
};
|
|
31998
|
+
};
|
|
31999
|
+
};
|
|
31965
32000
|
deletePackage: {
|
|
31966
32001
|
parameters: {
|
|
31967
32002
|
query?: never;
|
|
@@ -35642,7 +35677,7 @@ type CreatePlanBody = NonNullable<NonNullable<operations["createPlan"]["requestB
|
|
|
35642
35677
|
type UpdatePlanBody = NonNullable<NonNullable<operations["updatePlan"]["requestBody"]>["content"]["application/json"]["plan"]>;
|
|
35643
35678
|
|
|
35644
35679
|
/** A Package entity as returned by the Spacebring API. */
|
|
35645
|
-
type Package = NonNullable<operations["
|
|
35680
|
+
type Package = NonNullable<operations["getPackage"]["responses"][200]["content"]["application/json"]["package"]>;
|
|
35646
35681
|
/** Query parameters for `sb.packages.list()`. */
|
|
35647
35682
|
interface GetPackagesQuery {
|
|
35648
35683
|
/** Maximum number of packages per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
|
|
@@ -36434,6 +36469,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
36434
36469
|
searchQueryNext?: string;
|
|
36435
36470
|
}>;
|
|
36436
36471
|
iterate(query?: Omit<GetPackagesQuery, "nextPageToken">, options?: SpacebringRequestOptions): AsyncGenerator<Package, void, undefined>;
|
|
36472
|
+
get(packageId: string, options?: SpacebringRequestOptions): Promise<Package>;
|
|
36437
36473
|
create(packageBody: CreatePackageBody, options?: SpacebringRequestOptions): Promise<Package>;
|
|
36438
36474
|
update(packageId: string, packageBody: PatchPackageBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
36439
36475
|
delete(packageId: string, options?: SpacebringRequestOptions): Promise<undefined>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2052,7 +2052,11 @@ interface paths {
|
|
|
2052
2052
|
path?: never;
|
|
2053
2053
|
cookie?: never;
|
|
2054
2054
|
};
|
|
2055
|
-
|
|
2055
|
+
/**
|
|
2056
|
+
* Retrieve a package
|
|
2057
|
+
* @description Retrieve a package. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
|
|
2058
|
+
*/
|
|
2059
|
+
get: operations["getPackage"];
|
|
2056
2060
|
put?: never;
|
|
2057
2061
|
post?: never;
|
|
2058
2062
|
/**
|
|
@@ -9712,8 +9716,6 @@ interface components {
|
|
|
9712
9716
|
lastSeenDate?: string;
|
|
9713
9717
|
/** @description Location-scoped admin permissions. Included only for owners and super admins or when viewing the current user's registration. */
|
|
9714
9718
|
locationPermissions?: {
|
|
9715
|
-
/** @description Whether the admin can manage other admins. */
|
|
9716
|
-
admins: boolean;
|
|
9717
9719
|
/** @description Whether permissions apply to all locations. */
|
|
9718
9720
|
allLocations: boolean;
|
|
9719
9721
|
/** @description Whether the admin can access analytics. */
|
|
@@ -9722,8 +9724,11 @@ interface components {
|
|
|
9722
9724
|
benefits: boolean;
|
|
9723
9725
|
/** @description Whether the admin can manage billing. */
|
|
9724
9726
|
billing: boolean;
|
|
9725
|
-
/**
|
|
9726
|
-
|
|
9727
|
+
/**
|
|
9728
|
+
* @deprecated
|
|
9729
|
+
* @description Deprecated. Use resources instead.
|
|
9730
|
+
*/
|
|
9731
|
+
bookings?: boolean;
|
|
9727
9732
|
/** @description Whether the admin can manage customers. */
|
|
9728
9733
|
customers: boolean;
|
|
9729
9734
|
/** @description Whether the admin can manage events. */
|
|
@@ -24532,11 +24537,6 @@ interface components {
|
|
|
24532
24537
|
/** @description Whether two-way sync is enabled. */
|
|
24533
24538
|
twoWaySyncEnabled: boolean;
|
|
24534
24539
|
} | null;
|
|
24535
|
-
/**
|
|
24536
|
-
* Format: uuid
|
|
24537
|
-
* @description Optional client-provided resource id.
|
|
24538
|
-
*/
|
|
24539
|
-
id?: string;
|
|
24540
24540
|
/** @description Kisi access group reference. */
|
|
24541
24541
|
kisiGroupRef?: number | null;
|
|
24542
24542
|
/**
|
|
@@ -31962,6 +31962,41 @@ interface operations {
|
|
|
31962
31962
|
};
|
|
31963
31963
|
};
|
|
31964
31964
|
};
|
|
31965
|
+
getPackage: {
|
|
31966
|
+
parameters: {
|
|
31967
|
+
query?: never;
|
|
31968
|
+
header?: {
|
|
31969
|
+
/** @description The id of the network. Required when using bearer token authentication */
|
|
31970
|
+
"spacebring-network-id"?: string;
|
|
31971
|
+
};
|
|
31972
|
+
path: {
|
|
31973
|
+
/** @description The id of the package. */
|
|
31974
|
+
packageId: string;
|
|
31975
|
+
};
|
|
31976
|
+
cookie?: never;
|
|
31977
|
+
};
|
|
31978
|
+
requestBody?: never;
|
|
31979
|
+
responses: {
|
|
31980
|
+
/** @description OK */
|
|
31981
|
+
200: {
|
|
31982
|
+
headers: {
|
|
31983
|
+
[name: string]: unknown;
|
|
31984
|
+
};
|
|
31985
|
+
content: {
|
|
31986
|
+
"application/json": components["schemas"]["getPackage"];
|
|
31987
|
+
};
|
|
31988
|
+
};
|
|
31989
|
+
/** @description Bad Request */
|
|
31990
|
+
400: {
|
|
31991
|
+
headers: {
|
|
31992
|
+
[name: string]: unknown;
|
|
31993
|
+
};
|
|
31994
|
+
content: {
|
|
31995
|
+
"application/json": components["schemas"]["responseError"];
|
|
31996
|
+
};
|
|
31997
|
+
};
|
|
31998
|
+
};
|
|
31999
|
+
};
|
|
31965
32000
|
deletePackage: {
|
|
31966
32001
|
parameters: {
|
|
31967
32002
|
query?: never;
|
|
@@ -35642,7 +35677,7 @@ type CreatePlanBody = NonNullable<NonNullable<operations["createPlan"]["requestB
|
|
|
35642
35677
|
type UpdatePlanBody = NonNullable<NonNullable<operations["updatePlan"]["requestBody"]>["content"]["application/json"]["plan"]>;
|
|
35643
35678
|
|
|
35644
35679
|
/** A Package entity as returned by the Spacebring API. */
|
|
35645
|
-
type Package = NonNullable<operations["
|
|
35680
|
+
type Package = NonNullable<operations["getPackage"]["responses"][200]["content"]["application/json"]["package"]>;
|
|
35646
35681
|
/** Query parameters for `sb.packages.list()`. */
|
|
35647
35682
|
interface GetPackagesQuery {
|
|
35648
35683
|
/** Maximum number of packages per page. Defaults to 25 when omitted or invalid; values above 100 are capped at 100. */
|
|
@@ -36434,6 +36469,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
36434
36469
|
searchQueryNext?: string;
|
|
36435
36470
|
}>;
|
|
36436
36471
|
iterate(query?: Omit<GetPackagesQuery, "nextPageToken">, options?: SpacebringRequestOptions): AsyncGenerator<Package, void, undefined>;
|
|
36472
|
+
get(packageId: string, options?: SpacebringRequestOptions): Promise<Package>;
|
|
36437
36473
|
create(packageBody: CreatePackageBody, options?: SpacebringRequestOptions): Promise<Package>;
|
|
36438
36474
|
update(packageId: string, packageBody: PatchPackageBody, options?: SpacebringRequestOptions): Promise<undefined>;
|
|
36439
36475
|
delete(packageId: string, options?: SpacebringRequestOptions): Promise<undefined>;
|
package/dist/index.js
CHANGED
|
@@ -1962,6 +1962,15 @@ function createPackages(client, defaults) {
|
|
|
1962
1962
|
"packages"
|
|
1963
1963
|
);
|
|
1964
1964
|
},
|
|
1965
|
+
/**
|
|
1966
|
+
* Retrieve a package
|
|
1967
|
+
*
|
|
1968
|
+
* @param packageId The id of the package.
|
|
1969
|
+
* @param options Request options (abort signal).
|
|
1970
|
+
*/
|
|
1971
|
+
async get(packageId, options) {
|
|
1972
|
+
return unwrapProp(await client.GET("/packages/v1/{packageId}", { params: { path: { packageId } }, signal: options?.signal }), "package", "GET /packages/v1/{packageId}");
|
|
1973
|
+
},
|
|
1965
1974
|
/** Create a package */
|
|
1966
1975
|
async create(packageBody, options) {
|
|
1967
1976
|
return unwrapProp(await client.POST("/packages/v1", { body: { package: packageBody }, signal: options?.signal }), "package", "POST /packages/v1");
|