@spaciv/sdk 0.1.5 → 0.1.7
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/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/dist/apis/AccountsApi.d.ts +4 -4
- package/dist/apis/AccountsApi.js +2 -2
- package/dist/apis/FloorPlansApi.d.ts +13 -13
- package/dist/apis/FloorPlansApi.js +6 -6
- package/dist/apis/InternalApi.d.ts +57 -1
- package/dist/apis/InternalApi.js +83 -0
- package/dist/apis/ScriptsApi.d.ts +32 -9
- package/dist/apis/ScriptsApi.js +39 -4
- package/dist/esm/apis/AccountsApi.d.ts +4 -4
- package/dist/esm/apis/AccountsApi.js +2 -2
- package/dist/esm/apis/FloorPlansApi.d.ts +13 -13
- package/dist/esm/apis/FloorPlansApi.js +6 -6
- package/dist/esm/apis/InternalApi.d.ts +57 -1
- package/dist/esm/apis/InternalApi.js +84 -1
- package/dist/esm/apis/ScriptsApi.d.ts +32 -9
- package/dist/esm/apis/ScriptsApi.js +40 -5
- package/dist/esm/models/AccountCalculationUsageDay.d.ts +6 -0
- package/dist/esm/models/AccountCalculationUsageDay.js +4 -0
- package/dist/esm/models/FloorplanBrief.d.ts +12 -0
- package/dist/esm/models/FloorplanBrief.js +4 -0
- package/dist/esm/models/FloorplanGetBody.d.ts +12 -0
- package/dist/esm/models/FloorplanGetBody.js +4 -0
- package/dist/esm/models/FloorplanPatchParamsBody.d.ts +12 -0
- package/dist/esm/models/FloorplanPatchParamsBody.js +4 -0
- package/dist/esm/models/ScriptLimitOverrides.d.ts +62 -0
- package/dist/esm/models/ScriptLimitOverrides.js +51 -0
- package/dist/esm/models/ScriptLimitValues.d.ts +62 -0
- package/dist/esm/models/ScriptLimitValues.js +63 -0
- package/dist/esm/models/ScriptLimits.d.ts +62 -0
- package/dist/esm/models/ScriptLimits.js +63 -0
- package/dist/esm/models/ScriptLimitsResBody.d.ts +46 -0
- package/dist/esm/models/ScriptLimitsResBody.js +53 -0
- package/dist/esm/models/ScriptUsage.d.ts +50 -0
- package/dist/esm/models/ScriptUsage.js +55 -0
- package/dist/esm/models/ScriptUsageResBody.d.ts +103 -0
- package/dist/esm/models/ScriptUsageResBody.js +93 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/models/AccountCalculationUsageDay.d.ts +6 -0
- package/dist/models/AccountCalculationUsageDay.js +4 -0
- package/dist/models/FloorplanBrief.d.ts +12 -0
- package/dist/models/FloorplanBrief.js +4 -0
- package/dist/models/FloorplanGetBody.d.ts +12 -0
- package/dist/models/FloorplanGetBody.js +4 -0
- package/dist/models/FloorplanPatchParamsBody.d.ts +12 -0
- package/dist/models/FloorplanPatchParamsBody.js +4 -0
- package/dist/models/ScriptLimitOverrides.d.ts +62 -0
- package/dist/models/ScriptLimitOverrides.js +58 -0
- package/dist/models/ScriptLimitValues.d.ts +62 -0
- package/dist/models/ScriptLimitValues.js +70 -0
- package/dist/models/ScriptLimits.d.ts +62 -0
- package/dist/models/ScriptLimits.js +70 -0
- package/dist/models/ScriptLimitsResBody.d.ts +46 -0
- package/dist/models/ScriptLimitsResBody.js +60 -0
- package/dist/models/ScriptUsage.d.ts +50 -0
- package/dist/models/ScriptUsage.js +62 -0
- package/dist/models/ScriptUsageResBody.d.ts +103 -0
- package/dist/models/ScriptUsageResBody.js +101 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +4 -4
- package/src/apis/FloorPlansApi.ts +13 -13
- package/src/apis/InternalApi.ts +152 -0
- package/src/apis/ScriptsApi.ts +65 -8
- package/src/models/AccountCalculationUsageDay.ts +9 -0
- package/src/models/FloorplanBrief.ts +16 -0
- package/src/models/FloorplanGetBody.ts +16 -0
- package/src/models/FloorplanPatchParamsBody.ts +16 -0
- package/src/models/ScriptLimitOverrides.ts +105 -0
- package/src/models/ScriptLimitValues.ts +111 -0
- package/src/models/ScriptLimits.ts +111 -0
- package/src/models/ScriptLimitsResBody.ts +99 -0
- package/src/models/ScriptUsage.ts +93 -0
- package/src/models/ScriptUsageResBody.ts +183 -0
- package/src/models/index.ts +6 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* spaciv API
|
|
6
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@spaciv.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfScriptLimitsResBody = instanceOfScriptLimitsResBody;
|
|
17
|
+
exports.ScriptLimitsResBodyFromJSON = ScriptLimitsResBodyFromJSON;
|
|
18
|
+
exports.ScriptLimitsResBodyFromJSONTyped = ScriptLimitsResBodyFromJSONTyped;
|
|
19
|
+
exports.ScriptLimitsResBodyToJSON = ScriptLimitsResBodyToJSON;
|
|
20
|
+
exports.ScriptLimitsResBodyToJSONTyped = ScriptLimitsResBodyToJSONTyped;
|
|
21
|
+
const ScriptLimitValues_1 = require("./ScriptLimitValues");
|
|
22
|
+
const ScriptLimitOverrides_1 = require("./ScriptLimitOverrides");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the ScriptLimitsResBody interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfScriptLimitsResBody(value) {
|
|
27
|
+
if (!('defaults' in value) || value['defaults'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('effective' in value) || value['effective'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('overrides' in value) || value['overrides'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function ScriptLimitsResBodyFromJSON(json) {
|
|
36
|
+
return ScriptLimitsResBodyFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function ScriptLimitsResBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'defaults': (0, ScriptLimitValues_1.ScriptLimitValuesFromJSON)(json['defaults']),
|
|
44
|
+
'effective': (0, ScriptLimitValues_1.ScriptLimitValuesFromJSON)(json['effective']),
|
|
45
|
+
'overrides': (0, ScriptLimitOverrides_1.ScriptLimitOverridesFromJSON)(json['overrides']),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function ScriptLimitsResBodyToJSON(json) {
|
|
49
|
+
return ScriptLimitsResBodyToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function ScriptLimitsResBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'defaults': (0, ScriptLimitValues_1.ScriptLimitValuesToJSON)(value['defaults']),
|
|
57
|
+
'effective': (0, ScriptLimitValues_1.ScriptLimitValuesToJSON)(value['effective']),
|
|
58
|
+
'overrides': (0, ScriptLimitOverrides_1.ScriptLimitOverridesToJSON)(value['overrides']),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spaciv API
|
|
3
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@spaciv.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ScriptUsage
|
|
16
|
+
*/
|
|
17
|
+
export interface ScriptUsage {
|
|
18
|
+
/**
|
|
19
|
+
* Runs that ended in error, timeout or killed.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ScriptUsage
|
|
22
|
+
*/
|
|
23
|
+
failedRuns: number;
|
|
24
|
+
/**
|
|
25
|
+
* Runs that did not start because a limit was reached.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ScriptUsage
|
|
28
|
+
*/
|
|
29
|
+
quotaExceededRuns: number;
|
|
30
|
+
/**
|
|
31
|
+
* Runs that were not refused by a limit, whatever their outcome, including runs that failed before their sandbox started.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ScriptUsage
|
|
34
|
+
*/
|
|
35
|
+
runs: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ScriptUsage
|
|
40
|
+
*/
|
|
41
|
+
scriptId: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the ScriptUsage interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfScriptUsage(value: object): value is ScriptUsage;
|
|
47
|
+
export declare function ScriptUsageFromJSON(json: any): ScriptUsage;
|
|
48
|
+
export declare function ScriptUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptUsage;
|
|
49
|
+
export declare function ScriptUsageToJSON(json: any): ScriptUsage;
|
|
50
|
+
export declare function ScriptUsageToJSONTyped(value?: ScriptUsage | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* spaciv API
|
|
6
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@spaciv.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfScriptUsage = instanceOfScriptUsage;
|
|
17
|
+
exports.ScriptUsageFromJSON = ScriptUsageFromJSON;
|
|
18
|
+
exports.ScriptUsageFromJSONTyped = ScriptUsageFromJSONTyped;
|
|
19
|
+
exports.ScriptUsageToJSON = ScriptUsageToJSON;
|
|
20
|
+
exports.ScriptUsageToJSONTyped = ScriptUsageToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the ScriptUsage interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfScriptUsage(value) {
|
|
25
|
+
if (!('failedRuns' in value) || value['failedRuns'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('quotaExceededRuns' in value) || value['quotaExceededRuns'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('runs' in value) || value['runs'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('scriptId' in value) || value['scriptId'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
function ScriptUsageFromJSON(json) {
|
|
36
|
+
return ScriptUsageFromJSONTyped(json, false);
|
|
37
|
+
}
|
|
38
|
+
function ScriptUsageFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
|
+
if (json == null) {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'failedRuns': json['failedRuns'],
|
|
44
|
+
'quotaExceededRuns': json['quotaExceededRuns'],
|
|
45
|
+
'runs': json['runs'],
|
|
46
|
+
'scriptId': json['scriptId'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function ScriptUsageToJSON(json) {
|
|
50
|
+
return ScriptUsageToJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
function ScriptUsageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
|
+
if (value == null) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'failedRuns': value['failedRuns'],
|
|
58
|
+
'quotaExceededRuns': value['quotaExceededRuns'],
|
|
59
|
+
'runs': value['runs'],
|
|
60
|
+
'scriptId': value['scriptId'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* spaciv API
|
|
3
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@spaciv.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ScriptLimits } from './ScriptLimits';
|
|
13
|
+
import type { ScriptUsage } from './ScriptUsage';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface ScriptUsageResBody
|
|
18
|
+
*/
|
|
19
|
+
export interface ScriptUsageResBody {
|
|
20
|
+
/**
|
|
21
|
+
* near from 80% of maxCreditsPerMonth; reached once they are used, after which runs are recorded as quota_exceeded until the month ends.
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof ScriptUsageResBody
|
|
24
|
+
*/
|
|
25
|
+
creditState: ScriptUsageResBodyCreditStateEnum;
|
|
26
|
+
/**
|
|
27
|
+
* Credits the account's script runs were charged this month: the scripts figure the account Usage tab shows.
|
|
28
|
+
* @type {number}
|
|
29
|
+
* @memberof ScriptUsageResBody
|
|
30
|
+
*/
|
|
31
|
+
creditsUsed: number;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {number}
|
|
35
|
+
* @memberof ScriptUsageResBody
|
|
36
|
+
*/
|
|
37
|
+
enabledScripts: number;
|
|
38
|
+
/**
|
|
39
|
+
* Runs that ended in error, timeout or killed.
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @memberof ScriptUsageResBody
|
|
42
|
+
*/
|
|
43
|
+
failedRuns: number;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {ScriptLimits}
|
|
47
|
+
* @memberof ScriptUsageResBody
|
|
48
|
+
*/
|
|
49
|
+
limits: ScriptLimits;
|
|
50
|
+
/**
|
|
51
|
+
* The calendar month (UTC) the usage covers.
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof ScriptUsageResBody
|
|
54
|
+
*/
|
|
55
|
+
period: string;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {Date}
|
|
59
|
+
* @memberof ScriptUsageResBody
|
|
60
|
+
*/
|
|
61
|
+
periodEnd: Date;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {Date}
|
|
65
|
+
* @memberof ScriptUsageResBody
|
|
66
|
+
*/
|
|
67
|
+
periodStart: Date;
|
|
68
|
+
/**
|
|
69
|
+
* Runs that did not start because a limit was reached.
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @memberof ScriptUsageResBody
|
|
72
|
+
*/
|
|
73
|
+
quotaExceededRuns: number;
|
|
74
|
+
/**
|
|
75
|
+
* Runs that were not refused by a limit, whatever their outcome, including runs that failed before their sandbox started.
|
|
76
|
+
* @type {number}
|
|
77
|
+
* @memberof ScriptUsageResBody
|
|
78
|
+
*/
|
|
79
|
+
runs: number;
|
|
80
|
+
/**
|
|
81
|
+
* Usage of each script that has run this month, deleted scripts included, sorted by scriptId.
|
|
82
|
+
* @type {Array<ScriptUsage>}
|
|
83
|
+
* @memberof ScriptUsageResBody
|
|
84
|
+
*/
|
|
85
|
+
scripts: Array<ScriptUsage>;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* @export
|
|
89
|
+
*/
|
|
90
|
+
export declare const ScriptUsageResBodyCreditStateEnum: {
|
|
91
|
+
readonly Ok: "ok";
|
|
92
|
+
readonly Near: "near";
|
|
93
|
+
readonly Reached: "reached";
|
|
94
|
+
};
|
|
95
|
+
export type ScriptUsageResBodyCreditStateEnum = typeof ScriptUsageResBodyCreditStateEnum[keyof typeof ScriptUsageResBodyCreditStateEnum];
|
|
96
|
+
/**
|
|
97
|
+
* Check if a given object implements the ScriptUsageResBody interface.
|
|
98
|
+
*/
|
|
99
|
+
export declare function instanceOfScriptUsageResBody(value: object): value is ScriptUsageResBody;
|
|
100
|
+
export declare function ScriptUsageResBodyFromJSON(json: any): ScriptUsageResBody;
|
|
101
|
+
export declare function ScriptUsageResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptUsageResBody;
|
|
102
|
+
export declare function ScriptUsageResBodyToJSON(json: any): ScriptUsageResBody;
|
|
103
|
+
export declare function ScriptUsageResBodyToJSONTyped(value?: ScriptUsageResBody | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* spaciv API
|
|
6
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@spaciv.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.ScriptUsageResBodyCreditStateEnum = void 0;
|
|
17
|
+
exports.instanceOfScriptUsageResBody = instanceOfScriptUsageResBody;
|
|
18
|
+
exports.ScriptUsageResBodyFromJSON = ScriptUsageResBodyFromJSON;
|
|
19
|
+
exports.ScriptUsageResBodyFromJSONTyped = ScriptUsageResBodyFromJSONTyped;
|
|
20
|
+
exports.ScriptUsageResBodyToJSON = ScriptUsageResBodyToJSON;
|
|
21
|
+
exports.ScriptUsageResBodyToJSONTyped = ScriptUsageResBodyToJSONTyped;
|
|
22
|
+
const ScriptLimits_1 = require("./ScriptLimits");
|
|
23
|
+
const ScriptUsage_1 = require("./ScriptUsage");
|
|
24
|
+
/**
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
exports.ScriptUsageResBodyCreditStateEnum = {
|
|
28
|
+
Ok: 'ok',
|
|
29
|
+
Near: 'near',
|
|
30
|
+
Reached: 'reached'
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the ScriptUsageResBody interface.
|
|
34
|
+
*/
|
|
35
|
+
function instanceOfScriptUsageResBody(value) {
|
|
36
|
+
if (!('creditState' in value) || value['creditState'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('creditsUsed' in value) || value['creditsUsed'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('enabledScripts' in value) || value['enabledScripts'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('failedRuns' in value) || value['failedRuns'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('limits' in value) || value['limits'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('period' in value) || value['period'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('periodEnd' in value) || value['periodEnd'] === undefined)
|
|
49
|
+
return false;
|
|
50
|
+
if (!('periodStart' in value) || value['periodStart'] === undefined)
|
|
51
|
+
return false;
|
|
52
|
+
if (!('quotaExceededRuns' in value) || value['quotaExceededRuns'] === undefined)
|
|
53
|
+
return false;
|
|
54
|
+
if (!('runs' in value) || value['runs'] === undefined)
|
|
55
|
+
return false;
|
|
56
|
+
if (!('scripts' in value) || value['scripts'] === undefined)
|
|
57
|
+
return false;
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
function ScriptUsageResBodyFromJSON(json) {
|
|
61
|
+
return ScriptUsageResBodyFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
function ScriptUsageResBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
'creditState': json['creditState'],
|
|
69
|
+
'creditsUsed': json['creditsUsed'],
|
|
70
|
+
'enabledScripts': json['enabledScripts'],
|
|
71
|
+
'failedRuns': json['failedRuns'],
|
|
72
|
+
'limits': (0, ScriptLimits_1.ScriptLimitsFromJSON)(json['limits']),
|
|
73
|
+
'period': json['period'],
|
|
74
|
+
'periodEnd': (new Date(json['periodEnd'])),
|
|
75
|
+
'periodStart': (new Date(json['periodStart'])),
|
|
76
|
+
'quotaExceededRuns': json['quotaExceededRuns'],
|
|
77
|
+
'runs': json['runs'],
|
|
78
|
+
'scripts': (json['scripts'].map(ScriptUsage_1.ScriptUsageFromJSON)),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function ScriptUsageResBodyToJSON(json) {
|
|
82
|
+
return ScriptUsageResBodyToJSONTyped(json, false);
|
|
83
|
+
}
|
|
84
|
+
function ScriptUsageResBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
85
|
+
if (value == null) {
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
'creditState': value['creditState'],
|
|
90
|
+
'creditsUsed': value['creditsUsed'],
|
|
91
|
+
'enabledScripts': value['enabledScripts'],
|
|
92
|
+
'failedRuns': value['failedRuns'],
|
|
93
|
+
'limits': (0, ScriptLimits_1.ScriptLimitsToJSON)(value['limits']),
|
|
94
|
+
'period': value['period'],
|
|
95
|
+
'periodEnd': ((value['periodEnd']).toISOString()),
|
|
96
|
+
'periodStart': ((value['periodStart']).toISOString()),
|
|
97
|
+
'quotaExceededRuns': value['quotaExceededRuns'],
|
|
98
|
+
'runs': value['runs'],
|
|
99
|
+
'scripts': (value['scripts'].map(ScriptUsage_1.ScriptUsageToJSON)),
|
|
100
|
+
};
|
|
101
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -299,6 +299,10 @@ export * from './ScriptExport';
|
|
|
299
299
|
export * from './ScriptExportResBody';
|
|
300
300
|
export * from './ScriptExportRun';
|
|
301
301
|
export * from './ScriptKey';
|
|
302
|
+
export * from './ScriptLimitOverrides';
|
|
303
|
+
export * from './ScriptLimitValues';
|
|
304
|
+
export * from './ScriptLimits';
|
|
305
|
+
export * from './ScriptLimitsResBody';
|
|
302
306
|
export * from './ScriptListResBody';
|
|
303
307
|
export * from './ScriptLogLine';
|
|
304
308
|
export * from './ScriptPatchReqBody';
|
|
@@ -313,6 +317,8 @@ export * from './ScriptSchedulePreviewResBody';
|
|
|
313
317
|
export * from './ScriptSecretsReqBody';
|
|
314
318
|
export * from './ScriptSecretsResBody';
|
|
315
319
|
export * from './ScriptSummary';
|
|
320
|
+
export * from './ScriptUsage';
|
|
321
|
+
export * from './ScriptUsageResBody';
|
|
316
322
|
export * from './ScriptWebhookResBody';
|
|
317
323
|
export * from './SendPasswordPutReqBody';
|
|
318
324
|
export * from './SerializedEvent';
|
package/dist/models/index.js
CHANGED
|
@@ -317,6 +317,10 @@ __exportStar(require("./ScriptExport"), exports);
|
|
|
317
317
|
__exportStar(require("./ScriptExportResBody"), exports);
|
|
318
318
|
__exportStar(require("./ScriptExportRun"), exports);
|
|
319
319
|
__exportStar(require("./ScriptKey"), exports);
|
|
320
|
+
__exportStar(require("./ScriptLimitOverrides"), exports);
|
|
321
|
+
__exportStar(require("./ScriptLimitValues"), exports);
|
|
322
|
+
__exportStar(require("./ScriptLimits"), exports);
|
|
323
|
+
__exportStar(require("./ScriptLimitsResBody"), exports);
|
|
320
324
|
__exportStar(require("./ScriptListResBody"), exports);
|
|
321
325
|
__exportStar(require("./ScriptLogLine"), exports);
|
|
322
326
|
__exportStar(require("./ScriptPatchReqBody"), exports);
|
|
@@ -331,6 +335,8 @@ __exportStar(require("./ScriptSchedulePreviewResBody"), exports);
|
|
|
331
335
|
__exportStar(require("./ScriptSecretsReqBody"), exports);
|
|
332
336
|
__exportStar(require("./ScriptSecretsResBody"), exports);
|
|
333
337
|
__exportStar(require("./ScriptSummary"), exports);
|
|
338
|
+
__exportStar(require("./ScriptUsage"), exports);
|
|
339
|
+
__exportStar(require("./ScriptUsageResBody"), exports);
|
|
334
340
|
__exportStar(require("./ScriptWebhookResBody"), exports);
|
|
335
341
|
__exportStar(require("./SendPasswordPutReqBody"), exports);
|
|
336
342
|
__exportStar(require("./SerializedEvent"), exports);
|
package/package.json
CHANGED
package/src/apis/AccountsApi.ts
CHANGED
|
@@ -312,7 +312,7 @@ export interface AccountsApiInterface {
|
|
|
312
312
|
listAuthOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetAuthOptionsResBody>;
|
|
313
313
|
|
|
314
314
|
/**
|
|
315
|
-
* Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it
|
|
315
|
+
* Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
|
|
316
316
|
* @summary Get the account\'s credit usage
|
|
317
317
|
* @param {30 | 90 | 365} [days] How many days of usage to return, ending today (UTC).
|
|
318
318
|
* @param {*} [options] Override http request option.
|
|
@@ -322,7 +322,7 @@ export interface AccountsApiInterface {
|
|
|
322
322
|
listUsageCalculationCreditsRaw(requestParameters: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountCalculationUsageBody>>;
|
|
323
323
|
|
|
324
324
|
/**
|
|
325
|
-
* Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it
|
|
325
|
+
* Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
|
|
326
326
|
* Get the account\'s credit usage
|
|
327
327
|
*/
|
|
328
328
|
listUsageCalculationCredits(requestParameters: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountCalculationUsageBody>;
|
|
@@ -939,7 +939,7 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface
|
|
|
939
939
|
}
|
|
940
940
|
|
|
941
941
|
/**
|
|
942
|
-
* Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it
|
|
942
|
+
* Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
|
|
943
943
|
* Get the account\'s credit usage
|
|
944
944
|
*/
|
|
945
945
|
async listUsageCalculationCreditsRaw(requestParameters: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountCalculationUsageBody>> {
|
|
@@ -973,7 +973,7 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface
|
|
|
973
973
|
}
|
|
974
974
|
|
|
975
975
|
/**
|
|
976
|
-
* Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it
|
|
976
|
+
* Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
|
|
977
977
|
* Get the account\'s credit usage
|
|
978
978
|
*/
|
|
979
979
|
async listUsageCalculationCredits(requestParameters: AccountsApiListUsageCalculationCreditsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountCalculationUsageBody> {
|
|
@@ -120,11 +120,11 @@ export interface FloorPlansApiInterface {
|
|
|
120
120
|
get(requestParameters: FloorPlansApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FloorplanGetBody>;
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay)
|
|
123
|
+
* Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay): the account file set as the layer\'s `backgroundFile` or `foregroundFile`, or, when there is none or it has been deleted from file storage, an image uploaded to the layer through `PUT`. When the layer has neither, a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission; the *View file storage* permission is not needed to read the layer\'s account file. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the image matches a virus signature; the bytes are kept for investigation.
|
|
124
124
|
* @summary Get a floor plan image
|
|
125
125
|
* @param {string} id
|
|
126
126
|
* @param {'image' | 'foreground'} imageType Which image layer to retrieve: the base drawing (image) or the foreground overlay (foreground).
|
|
127
|
-
* @param {boolean} [noFallback] When true, returns 404 instead of a generated placeholder if
|
|
127
|
+
* @param {boolean} [noFallback] When true, returns 404 instead of a generated placeholder if the layer has no image.
|
|
128
128
|
* @param {*} [options] Override http request option.
|
|
129
129
|
* @throws {RequiredError}
|
|
130
130
|
* @memberof FloorPlansApiInterface
|
|
@@ -132,7 +132,7 @@ export interface FloorPlansApiInterface {
|
|
|
132
132
|
getImagesRaw(requestParameters: FloorPlansApiGetImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
* Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay)
|
|
135
|
+
* Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay): the account file set as the layer\'s `backgroundFile` or `foregroundFile`, or, when there is none or it has been deleted from file storage, an image uploaded to the layer through `PUT`. When the layer has neither, a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission; the *View file storage* permission is not needed to read the layer\'s account file. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the image matches a virus signature; the bytes are kept for investigation.
|
|
136
136
|
* Get a floor plan image
|
|
137
137
|
*/
|
|
138
138
|
getImages(requestParameters: FloorPlansApiGetImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
@@ -153,7 +153,7 @@ export interface FloorPlansApiInterface {
|
|
|
153
153
|
list(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FloorplanBrief>>;
|
|
154
154
|
|
|
155
155
|
/**
|
|
156
|
-
* Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, and space geometry. Only fields present in the request body are changed. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission.
|
|
156
|
+
* Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, background and foreground images, and space geometry. Only fields present in the request body are changed, and the request fails with `409` if the floor plan keeps changing while they are. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission. `backgroundFile` and `foregroundFile` take the ID of an image in the account\'s file storage (see `/v1/account/files`), or an empty string to remove the layer\'s image; choosing a file also requires the *View file storage* permission. The file must be a PNG, JPEG, GIF, WebP or SVG image of at most 4 MB that is not quarantined, otherwise the request fails with `422` (`403` when quarantined) and nothing is changed. Setting or removing a layer\'s file also deletes any image previously uploaded to that layer through `PUT /v1/floorplans/{id}/images/{imageType}`.
|
|
157
157
|
* @summary Update a floor plan
|
|
158
158
|
* @param {string} id
|
|
159
159
|
* @param {FloorplanPatchParamsBody} [floorplanPatchParamsBody]
|
|
@@ -164,13 +164,13 @@ export interface FloorPlansApiInterface {
|
|
|
164
164
|
updateRaw(requestParameters: FloorPlansApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
|
-
* Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, and space geometry. Only fields present in the request body are changed. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission.
|
|
167
|
+
* Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, background and foreground images, and space geometry. Only fields present in the request body are changed, and the request fails with `409` if the floor plan keeps changing while they are. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission. `backgroundFile` and `foregroundFile` take the ID of an image in the account\'s file storage (see `/v1/account/files`), or an empty string to remove the layer\'s image; choosing a file also requires the *View file storage* permission. The file must be a PNG, JPEG, GIF, WebP or SVG image of at most 4 MB that is not quarantined, otherwise the request fails with `422` (`403` when quarantined) and nothing is changed. Setting or removing a layer\'s file also deletes any image previously uploaded to that layer through `PUT /v1/floorplans/{id}/images/{imageType}`.
|
|
168
168
|
* Update a floor plan
|
|
169
169
|
*/
|
|
170
170
|
update(requestParameters: FloorPlansApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
|
-
* Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Requires the *Edit floorplans* permission.
|
|
173
|
+
* Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Either way, the layer stops showing any account file set for it through `PATCH /v1/floorplans/{id}`; prefer setting `backgroundFile` or `foregroundFile` there instead. Requires the *Edit floorplans* permission.
|
|
174
174
|
* @summary Upload a floor plan image
|
|
175
175
|
* @param {string} id
|
|
176
176
|
* @param {'image' | 'foreground'} imageType Which image layer to upload: the base drawing (image) or the foreground overlay (foreground).
|
|
@@ -183,7 +183,7 @@ export interface FloorPlansApiInterface {
|
|
|
183
183
|
updateImagesRaw(requestParameters: FloorPlansApiUpdateImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
184
184
|
|
|
185
185
|
/**
|
|
186
|
-
* Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Requires the *Edit floorplans* permission.
|
|
186
|
+
* Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Either way, the layer stops showing any account file set for it through `PATCH /v1/floorplans/{id}`; prefer setting `backgroundFile` or `foregroundFile` there instead. Requires the *Edit floorplans* permission.
|
|
187
187
|
* Upload a floor plan image
|
|
188
188
|
*/
|
|
189
189
|
updateImages(requestParameters: FloorPlansApiUpdateImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
@@ -343,7 +343,7 @@ export class FloorPlansApi extends runtime.BaseAPI implements FloorPlansApiInter
|
|
|
343
343
|
}
|
|
344
344
|
|
|
345
345
|
/**
|
|
346
|
-
* Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay)
|
|
346
|
+
* Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay): the account file set as the layer\'s `backgroundFile` or `foregroundFile`, or, when there is none or it has been deleted from file storage, an image uploaded to the layer through `PUT`. When the layer has neither, a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission; the *View file storage* permission is not needed to read the layer\'s account file. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the image matches a virus signature; the bytes are kept for investigation.
|
|
347
347
|
* Get a floor plan image
|
|
348
348
|
*/
|
|
349
349
|
async getImagesRaw(requestParameters: FloorPlansApiGetImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>> {
|
|
@@ -397,7 +397,7 @@ export class FloorPlansApi extends runtime.BaseAPI implements FloorPlansApiInter
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
/**
|
|
400
|
-
* Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay)
|
|
400
|
+
* Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay): the account file set as the layer\'s `backgroundFile` or `foregroundFile`, or, when there is none or it has been deleted from file storage, an image uploaded to the layer through `PUT`. When the layer has neither, a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission; the *View file storage* permission is not needed to read the layer\'s account file. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the image matches a virus signature; the bytes are kept for investigation.
|
|
401
401
|
* Get a floor plan image
|
|
402
402
|
*/
|
|
403
403
|
async getImages(requestParameters: FloorPlansApiGetImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string> {
|
|
@@ -445,7 +445,7 @@ export class FloorPlansApi extends runtime.BaseAPI implements FloorPlansApiInter
|
|
|
445
445
|
}
|
|
446
446
|
|
|
447
447
|
/**
|
|
448
|
-
* Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, and space geometry. Only fields present in the request body are changed. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission.
|
|
448
|
+
* Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, background and foreground images, and space geometry. Only fields present in the request body are changed, and the request fails with `409` if the floor plan keeps changing while they are. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission. `backgroundFile` and `foregroundFile` take the ID of an image in the account\'s file storage (see `/v1/account/files`), or an empty string to remove the layer\'s image; choosing a file also requires the *View file storage* permission. The file must be a PNG, JPEG, GIF, WebP or SVG image of at most 4 MB that is not quarantined, otherwise the request fails with `422` (`403` when quarantined) and nothing is changed. Setting or removing a layer\'s file also deletes any image previously uploaded to that layer through `PUT /v1/floorplans/{id}/images/{imageType}`.
|
|
449
449
|
* Update a floor plan
|
|
450
450
|
*/
|
|
451
451
|
async updateRaw(requestParameters: FloorPlansApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
|
@@ -486,7 +486,7 @@ export class FloorPlansApi extends runtime.BaseAPI implements FloorPlansApiInter
|
|
|
486
486
|
}
|
|
487
487
|
|
|
488
488
|
/**
|
|
489
|
-
* Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, and space geometry. Only fields present in the request body are changed. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission.
|
|
489
|
+
* Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, background and foreground images, and space geometry. Only fields present in the request body are changed, and the request fails with `409` if the floor plan keeps changing while they are. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission. `backgroundFile` and `foregroundFile` take the ID of an image in the account\'s file storage (see `/v1/account/files`), or an empty string to remove the layer\'s image; choosing a file also requires the *View file storage* permission. The file must be a PNG, JPEG, GIF, WebP or SVG image of at most 4 MB that is not quarantined, otherwise the request fails with `422` (`403` when quarantined) and nothing is changed. Setting or removing a layer\'s file also deletes any image previously uploaded to that layer through `PUT /v1/floorplans/{id}/images/{imageType}`.
|
|
490
490
|
* Update a floor plan
|
|
491
491
|
*/
|
|
492
492
|
async update(requestParameters: FloorPlansApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
|
@@ -495,7 +495,7 @@ export class FloorPlansApi extends runtime.BaseAPI implements FloorPlansApiInter
|
|
|
495
495
|
}
|
|
496
496
|
|
|
497
497
|
/**
|
|
498
|
-
* Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Requires the *Edit floorplans* permission.
|
|
498
|
+
* Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Either way, the layer stops showing any account file set for it through `PATCH /v1/floorplans/{id}`; prefer setting `backgroundFile` or `foregroundFile` there instead. Requires the *Edit floorplans* permission.
|
|
499
499
|
* Upload a floor plan image
|
|
500
500
|
*/
|
|
501
501
|
async updateImagesRaw(requestParameters: FloorPlansApiUpdateImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
|
@@ -566,7 +566,7 @@ export class FloorPlansApi extends runtime.BaseAPI implements FloorPlansApiInter
|
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
/**
|
|
569
|
-
* Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Requires the *Edit floorplans* permission.
|
|
569
|
+
* Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Either way, the layer stops showing any account file set for it through `PATCH /v1/floorplans/{id}`; prefer setting `backgroundFile` or `foregroundFile` there instead. Requires the *Edit floorplans* permission.
|
|
570
570
|
* Upload a floor plan image
|
|
571
571
|
*/
|
|
572
572
|
async updateImages(requestParameters: FloorPlansApiUpdateImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|