@spaciv/sdk 0.1.5 → 0.1.6
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/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/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/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/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/InternalApi.ts +152 -0
- package/src/apis/ScriptsApi.ts +65 -8
- package/src/models/AccountCalculationUsageDay.ts +9 -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,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> {
|
package/src/apis/InternalApi.ts
CHANGED
|
@@ -22,6 +22,8 @@ import type {
|
|
|
22
22
|
ReconcileReport,
|
|
23
23
|
RepairFloorplansResBody,
|
|
24
24
|
RetriesResBody,
|
|
25
|
+
ScriptLimitOverrides,
|
|
26
|
+
ScriptLimitsResBody,
|
|
25
27
|
SysAdminUpdateFeatureGroupsParamsWrapperBody,
|
|
26
28
|
} from '../models/index';
|
|
27
29
|
import {
|
|
@@ -39,6 +41,10 @@ import {
|
|
|
39
41
|
RepairFloorplansResBodyToJSON,
|
|
40
42
|
RetriesResBodyFromJSON,
|
|
41
43
|
RetriesResBodyToJSON,
|
|
44
|
+
ScriptLimitOverridesFromJSON,
|
|
45
|
+
ScriptLimitOverridesToJSON,
|
|
46
|
+
ScriptLimitsResBodyFromJSON,
|
|
47
|
+
ScriptLimitsResBodyToJSON,
|
|
42
48
|
SysAdminUpdateFeatureGroupsParamsWrapperBodyFromJSON,
|
|
43
49
|
SysAdminUpdateFeatureGroupsParamsWrapperBodyToJSON,
|
|
44
50
|
} from '../models/index';
|
|
@@ -64,6 +70,15 @@ export interface InternalApiCreateTranslationsImportRequest {
|
|
|
64
70
|
i18nTranslationsImportParamsWrapperBody: I18nTranslationsImportParamsWrapperBody;
|
|
65
71
|
}
|
|
66
72
|
|
|
73
|
+
export interface InternalApiListAdminAccountsScriptLimitsRequest {
|
|
74
|
+
account: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface InternalApiUpdateAdminAccountsScriptLimitsRequest {
|
|
78
|
+
account: number;
|
|
79
|
+
scriptLimitOverrides: ScriptLimitOverrides;
|
|
80
|
+
}
|
|
81
|
+
|
|
67
82
|
/**
|
|
68
83
|
* InternalApi - interface
|
|
69
84
|
*
|
|
@@ -227,6 +242,22 @@ export interface InternalApiInterface {
|
|
|
227
242
|
*/
|
|
228
243
|
createTranslationsImport(requestParameters: InternalApiCreateTranslationsImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
229
244
|
|
|
245
|
+
/**
|
|
246
|
+
* Returns the code defaults for scripts, the account\'s overrides and the limits that apply to it. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
247
|
+
* @summary Get an account\'s script limits
|
|
248
|
+
* @param {number} account
|
|
249
|
+
* @param {*} [options] Override http request option.
|
|
250
|
+
* @throws {RequiredError}
|
|
251
|
+
* @memberof InternalApiInterface
|
|
252
|
+
*/
|
|
253
|
+
listAdminAccountsScriptLimitsRaw(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>>;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Returns the code defaults for scripts, the account\'s overrides and the limits that apply to it. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
257
|
+
* Get an account\'s script limits
|
|
258
|
+
*/
|
|
259
|
+
listAdminAccountsScriptLimits(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody>;
|
|
260
|
+
|
|
230
261
|
/**
|
|
231
262
|
* Dispatches events to regenerate any preset images and derived assets for the caller\'s account. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
232
263
|
* @summary Regenerate customer preset assets
|
|
@@ -242,6 +273,23 @@ export interface InternalApiInterface {
|
|
|
242
273
|
*/
|
|
243
274
|
listAdminRegeneratePresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
244
275
|
|
|
276
|
+
/**
|
|
277
|
+
* Replaces all of the account\'s script limit overrides with the body; an absent field uses the default, so an empty body returns the account to the defaults. Rejected with 422 when a value is not positive, or when maxCreditsPerMonth is above 9223372036854. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
278
|
+
* @summary Set an account\'s script limits
|
|
279
|
+
* @param {number} account
|
|
280
|
+
* @param {ScriptLimitOverrides} scriptLimitOverrides
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
* @memberof InternalApiInterface
|
|
284
|
+
*/
|
|
285
|
+
updateAdminAccountsScriptLimitsRaw(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>>;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Replaces all of the account\'s script limit overrides with the body; an absent field uses the default, so an empty body returns the account to the defaults. Rejected with 422 when a value is not positive, or when maxCreditsPerMonth is above 9223372036854. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
289
|
+
* Set an account\'s script limits
|
|
290
|
+
*/
|
|
291
|
+
updateAdminAccountsScriptLimits(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody>;
|
|
292
|
+
|
|
245
293
|
}
|
|
246
294
|
|
|
247
295
|
/**
|
|
@@ -692,6 +740,53 @@ export class InternalApi extends runtime.BaseAPI implements InternalApiInterface
|
|
|
692
740
|
return await response.value();
|
|
693
741
|
}
|
|
694
742
|
|
|
743
|
+
/**
|
|
744
|
+
* Returns the code defaults for scripts, the account\'s overrides and the limits that apply to it. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
745
|
+
* Get an account\'s script limits
|
|
746
|
+
*/
|
|
747
|
+
async listAdminAccountsScriptLimitsRaw(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>> {
|
|
748
|
+
if (requestParameters['account'] == null) {
|
|
749
|
+
throw new runtime.RequiredError(
|
|
750
|
+
'account',
|
|
751
|
+
'Required parameter "account" was null or undefined when calling listAdminAccountsScriptLimits().'
|
|
752
|
+
);
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
const queryParameters: any = {};
|
|
756
|
+
|
|
757
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
758
|
+
|
|
759
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
760
|
+
const token = this.configuration.accessToken;
|
|
761
|
+
const tokenString = await token("accessToken", []);
|
|
762
|
+
|
|
763
|
+
if (tokenString) {
|
|
764
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
let urlPath = `/v1/admin/accounts/{account}/script-limits`;
|
|
769
|
+
urlPath = urlPath.replace(`{${"account"}}`, encodeURIComponent(String(requestParameters['account'])));
|
|
770
|
+
|
|
771
|
+
const response = await this.request({
|
|
772
|
+
path: urlPath,
|
|
773
|
+
method: 'GET',
|
|
774
|
+
headers: headerParameters,
|
|
775
|
+
query: queryParameters,
|
|
776
|
+
}, initOverrides);
|
|
777
|
+
|
|
778
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScriptLimitsResBodyFromJSON(jsonValue));
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Returns the code defaults for scripts, the account\'s overrides and the limits that apply to it. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
783
|
+
* Get an account\'s script limits
|
|
784
|
+
*/
|
|
785
|
+
async listAdminAccountsScriptLimits(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody> {
|
|
786
|
+
const response = await this.listAdminAccountsScriptLimitsRaw(requestParameters, initOverrides);
|
|
787
|
+
return await response.value();
|
|
788
|
+
}
|
|
789
|
+
|
|
695
790
|
/**
|
|
696
791
|
* Dispatches events to regenerate any preset images and derived assets for the caller\'s account. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
697
792
|
* Regenerate customer preset assets
|
|
@@ -730,4 +825,61 @@ export class InternalApi extends runtime.BaseAPI implements InternalApiInterface
|
|
|
730
825
|
await this.listAdminRegeneratePresetsRaw(initOverrides);
|
|
731
826
|
}
|
|
732
827
|
|
|
828
|
+
/**
|
|
829
|
+
* Replaces all of the account\'s script limit overrides with the body; an absent field uses the default, so an empty body returns the account to the defaults. Rejected with 422 when a value is not positive, or when maxCreditsPerMonth is above 9223372036854. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
830
|
+
* Set an account\'s script limits
|
|
831
|
+
*/
|
|
832
|
+
async updateAdminAccountsScriptLimitsRaw(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>> {
|
|
833
|
+
if (requestParameters['account'] == null) {
|
|
834
|
+
throw new runtime.RequiredError(
|
|
835
|
+
'account',
|
|
836
|
+
'Required parameter "account" was null or undefined when calling updateAdminAccountsScriptLimits().'
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
if (requestParameters['scriptLimitOverrides'] == null) {
|
|
841
|
+
throw new runtime.RequiredError(
|
|
842
|
+
'scriptLimitOverrides',
|
|
843
|
+
'Required parameter "scriptLimitOverrides" was null or undefined when calling updateAdminAccountsScriptLimits().'
|
|
844
|
+
);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
const queryParameters: any = {};
|
|
848
|
+
|
|
849
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
850
|
+
|
|
851
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
852
|
+
|
|
853
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
854
|
+
const token = this.configuration.accessToken;
|
|
855
|
+
const tokenString = await token("accessToken", []);
|
|
856
|
+
|
|
857
|
+
if (tokenString) {
|
|
858
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
let urlPath = `/v1/admin/accounts/{account}/script-limits`;
|
|
863
|
+
urlPath = urlPath.replace(`{${"account"}}`, encodeURIComponent(String(requestParameters['account'])));
|
|
864
|
+
|
|
865
|
+
const response = await this.request({
|
|
866
|
+
path: urlPath,
|
|
867
|
+
method: 'PUT',
|
|
868
|
+
headers: headerParameters,
|
|
869
|
+
query: queryParameters,
|
|
870
|
+
body: ScriptLimitOverridesToJSON(requestParameters['scriptLimitOverrides']),
|
|
871
|
+
}, initOverrides);
|
|
872
|
+
|
|
873
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScriptLimitsResBodyFromJSON(jsonValue));
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* Replaces all of the account\'s script limit overrides with the body; an absent field uses the default, so an empty body returns the account to the defaults. Rejected with 422 when a value is not positive, or when maxCreditsPerMonth is above 9223372036854. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
878
|
+
* Set an account\'s script limits
|
|
879
|
+
*/
|
|
880
|
+
async updateAdminAccountsScriptLimits(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody> {
|
|
881
|
+
const response = await this.updateAdminAccountsScriptLimitsRaw(requestParameters, initOverrides);
|
|
882
|
+
return await response.value();
|
|
883
|
+
}
|
|
884
|
+
|
|
733
885
|
}
|