@spaciv/sdk 0.1.4 → 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/AssistantChatPollBody.d.ts +6 -0
- package/dist/esm/models/AssistantChatPollBody.js +4 -0
- package/dist/esm/models/AssistantChatPollMessage.d.ts +6 -0
- package/dist/esm/models/AssistantChatPollMessage.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/AssistantChatPollBody.d.ts +6 -0
- package/dist/models/AssistantChatPollBody.js +4 -0
- package/dist/models/AssistantChatPollMessage.d.ts +6 -0
- package/dist/models/AssistantChatPollMessage.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/AssistantChatPollBody.ts +9 -0
- package/src/models/AssistantChatPollMessage.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,111 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ScriptLimitValues
|
|
20
|
+
*/
|
|
21
|
+
export interface ScriptLimitValues {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ScriptLimitValues
|
|
26
|
+
*/
|
|
27
|
+
maxConcurrentRuns: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ScriptLimitValues
|
|
32
|
+
*/
|
|
33
|
+
maxCreditsPerMonth: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ScriptLimitValues
|
|
38
|
+
*/
|
|
39
|
+
maxEnabledScripts: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ScriptLimitValues
|
|
44
|
+
*/
|
|
45
|
+
maxRunSeconds: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ScriptLimitValues
|
|
50
|
+
*/
|
|
51
|
+
minCronIntervalSeconds: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof ScriptLimitValues
|
|
56
|
+
*/
|
|
57
|
+
webhookRequestsPerMinute: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the ScriptLimitValues interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfScriptLimitValues(value: object): value is ScriptLimitValues {
|
|
64
|
+
if (!('maxConcurrentRuns' in value) || value['maxConcurrentRuns'] === undefined) return false;
|
|
65
|
+
if (!('maxCreditsPerMonth' in value) || value['maxCreditsPerMonth'] === undefined) return false;
|
|
66
|
+
if (!('maxEnabledScripts' in value) || value['maxEnabledScripts'] === undefined) return false;
|
|
67
|
+
if (!('maxRunSeconds' in value) || value['maxRunSeconds'] === undefined) return false;
|
|
68
|
+
if (!('minCronIntervalSeconds' in value) || value['minCronIntervalSeconds'] === undefined) return false;
|
|
69
|
+
if (!('webhookRequestsPerMinute' in value) || value['webhookRequestsPerMinute'] === undefined) return false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function ScriptLimitValuesFromJSON(json: any): ScriptLimitValues {
|
|
74
|
+
return ScriptLimitValuesFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ScriptLimitValuesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimitValues {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'maxConcurrentRuns': json['maxConcurrentRuns'],
|
|
84
|
+
'maxCreditsPerMonth': json['maxCreditsPerMonth'],
|
|
85
|
+
'maxEnabledScripts': json['maxEnabledScripts'],
|
|
86
|
+
'maxRunSeconds': json['maxRunSeconds'],
|
|
87
|
+
'minCronIntervalSeconds': json['minCronIntervalSeconds'],
|
|
88
|
+
'webhookRequestsPerMinute': json['webhookRequestsPerMinute'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function ScriptLimitValuesToJSON(json: any): ScriptLimitValues {
|
|
93
|
+
return ScriptLimitValuesToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function ScriptLimitValuesToJSONTyped(value?: ScriptLimitValues | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'maxConcurrentRuns': value['maxConcurrentRuns'],
|
|
104
|
+
'maxCreditsPerMonth': value['maxCreditsPerMonth'],
|
|
105
|
+
'maxEnabledScripts': value['maxEnabledScripts'],
|
|
106
|
+
'maxRunSeconds': value['maxRunSeconds'],
|
|
107
|
+
'minCronIntervalSeconds': value['minCronIntervalSeconds'],
|
|
108
|
+
'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ScriptLimits
|
|
20
|
+
*/
|
|
21
|
+
export interface ScriptLimits {
|
|
22
|
+
/**
|
|
23
|
+
* Runs the account may have in progress at once.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ScriptLimits
|
|
26
|
+
*/
|
|
27
|
+
maxConcurrentRuns: number;
|
|
28
|
+
/**
|
|
29
|
+
* Credits the account's script runs may be charged in a calendar month (UTC). Once they are used, further runs are recorded as quota_exceeded and do not start.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ScriptLimits
|
|
32
|
+
*/
|
|
33
|
+
maxCreditsPerMonth: number;
|
|
34
|
+
/**
|
|
35
|
+
* Scripts the account may have enabled at once.
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ScriptLimits
|
|
38
|
+
*/
|
|
39
|
+
maxEnabledScripts: number;
|
|
40
|
+
/**
|
|
41
|
+
* Longest a single run may take; a script's own timeout is capped to it.
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ScriptLimits
|
|
44
|
+
*/
|
|
45
|
+
maxRunSeconds: number;
|
|
46
|
+
/**
|
|
47
|
+
* Shortest time allowed between two scheduled runs of a script.
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ScriptLimits
|
|
50
|
+
*/
|
|
51
|
+
minCronIntervalSeconds: number;
|
|
52
|
+
/**
|
|
53
|
+
* Webhook calls each script accepts per minute, and at most in a burst.
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof ScriptLimits
|
|
56
|
+
*/
|
|
57
|
+
webhookRequestsPerMinute: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the ScriptLimits interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfScriptLimits(value: object): value is ScriptLimits {
|
|
64
|
+
if (!('maxConcurrentRuns' in value) || value['maxConcurrentRuns'] === undefined) return false;
|
|
65
|
+
if (!('maxCreditsPerMonth' in value) || value['maxCreditsPerMonth'] === undefined) return false;
|
|
66
|
+
if (!('maxEnabledScripts' in value) || value['maxEnabledScripts'] === undefined) return false;
|
|
67
|
+
if (!('maxRunSeconds' in value) || value['maxRunSeconds'] === undefined) return false;
|
|
68
|
+
if (!('minCronIntervalSeconds' in value) || value['minCronIntervalSeconds'] === undefined) return false;
|
|
69
|
+
if (!('webhookRequestsPerMinute' in value) || value['webhookRequestsPerMinute'] === undefined) return false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function ScriptLimitsFromJSON(json: any): ScriptLimits {
|
|
74
|
+
return ScriptLimitsFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ScriptLimitsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimits {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'maxConcurrentRuns': json['maxConcurrentRuns'],
|
|
84
|
+
'maxCreditsPerMonth': json['maxCreditsPerMonth'],
|
|
85
|
+
'maxEnabledScripts': json['maxEnabledScripts'],
|
|
86
|
+
'maxRunSeconds': json['maxRunSeconds'],
|
|
87
|
+
'minCronIntervalSeconds': json['minCronIntervalSeconds'],
|
|
88
|
+
'webhookRequestsPerMinute': json['webhookRequestsPerMinute'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function ScriptLimitsToJSON(json: any): ScriptLimits {
|
|
93
|
+
return ScriptLimitsToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function ScriptLimitsToJSONTyped(value?: ScriptLimits | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'maxConcurrentRuns': value['maxConcurrentRuns'],
|
|
104
|
+
'maxCreditsPerMonth': value['maxCreditsPerMonth'],
|
|
105
|
+
'maxEnabledScripts': value['maxEnabledScripts'],
|
|
106
|
+
'maxRunSeconds': value['maxRunSeconds'],
|
|
107
|
+
'minCronIntervalSeconds': value['minCronIntervalSeconds'],
|
|
108
|
+
'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ScriptLimitValues } from './ScriptLimitValues';
|
|
17
|
+
import {
|
|
18
|
+
ScriptLimitValuesFromJSON,
|
|
19
|
+
ScriptLimitValuesFromJSONTyped,
|
|
20
|
+
ScriptLimitValuesToJSON,
|
|
21
|
+
ScriptLimitValuesToJSONTyped,
|
|
22
|
+
} from './ScriptLimitValues';
|
|
23
|
+
import type { ScriptLimitOverrides } from './ScriptLimitOverrides';
|
|
24
|
+
import {
|
|
25
|
+
ScriptLimitOverridesFromJSON,
|
|
26
|
+
ScriptLimitOverridesFromJSONTyped,
|
|
27
|
+
ScriptLimitOverridesToJSON,
|
|
28
|
+
ScriptLimitOverridesToJSONTyped,
|
|
29
|
+
} from './ScriptLimitOverrides';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface ScriptLimitsResBody
|
|
35
|
+
*/
|
|
36
|
+
export interface ScriptLimitsResBody {
|
|
37
|
+
/**
|
|
38
|
+
* The code defaults for scripts.
|
|
39
|
+
* @type {ScriptLimitValues}
|
|
40
|
+
* @memberof ScriptLimitsResBody
|
|
41
|
+
*/
|
|
42
|
+
defaults: ScriptLimitValues;
|
|
43
|
+
/**
|
|
44
|
+
* The limits that apply to the account.
|
|
45
|
+
* @type {ScriptLimitValues}
|
|
46
|
+
* @memberof ScriptLimitsResBody
|
|
47
|
+
*/
|
|
48
|
+
effective: ScriptLimitValues;
|
|
49
|
+
/**
|
|
50
|
+
* This account's overrides; an absent field uses the default.
|
|
51
|
+
* @type {ScriptLimitOverrides}
|
|
52
|
+
* @memberof ScriptLimitsResBody
|
|
53
|
+
*/
|
|
54
|
+
overrides: ScriptLimitOverrides;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the ScriptLimitsResBody interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfScriptLimitsResBody(value: object): value is ScriptLimitsResBody {
|
|
61
|
+
if (!('defaults' in value) || value['defaults'] === undefined) return false;
|
|
62
|
+
if (!('effective' in value) || value['effective'] === undefined) return false;
|
|
63
|
+
if (!('overrides' in value) || value['overrides'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function ScriptLimitsResBodyFromJSON(json: any): ScriptLimitsResBody {
|
|
68
|
+
return ScriptLimitsResBodyFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function ScriptLimitsResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimitsResBody {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'defaults': ScriptLimitValuesFromJSON(json['defaults']),
|
|
78
|
+
'effective': ScriptLimitValuesFromJSON(json['effective']),
|
|
79
|
+
'overrides': ScriptLimitOverridesFromJSON(json['overrides']),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function ScriptLimitsResBodyToJSON(json: any): ScriptLimitsResBody {
|
|
84
|
+
return ScriptLimitsResBodyToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function ScriptLimitsResBodyToJSONTyped(value?: ScriptLimitsResBody | null, ignoreDiscriminator: boolean = false): any {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'defaults': ScriptLimitValuesToJSON(value['defaults']),
|
|
95
|
+
'effective': ScriptLimitValuesToJSON(value['effective']),
|
|
96
|
+
'overrides': ScriptLimitOverridesToJSON(value['overrides']),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ScriptUsage
|
|
20
|
+
*/
|
|
21
|
+
export interface ScriptUsage {
|
|
22
|
+
/**
|
|
23
|
+
* Runs that ended in error, timeout or killed.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ScriptUsage
|
|
26
|
+
*/
|
|
27
|
+
failedRuns: number;
|
|
28
|
+
/**
|
|
29
|
+
* Runs that did not start because a limit was reached.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ScriptUsage
|
|
32
|
+
*/
|
|
33
|
+
quotaExceededRuns: number;
|
|
34
|
+
/**
|
|
35
|
+
* Runs that were not refused by a limit, whatever their outcome, including runs that failed before their sandbox started.
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ScriptUsage
|
|
38
|
+
*/
|
|
39
|
+
runs: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof ScriptUsage
|
|
44
|
+
*/
|
|
45
|
+
scriptId: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the ScriptUsage interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfScriptUsage(value: object): value is ScriptUsage {
|
|
52
|
+
if (!('failedRuns' in value) || value['failedRuns'] === undefined) return false;
|
|
53
|
+
if (!('quotaExceededRuns' in value) || value['quotaExceededRuns'] === undefined) return false;
|
|
54
|
+
if (!('runs' in value) || value['runs'] === undefined) return false;
|
|
55
|
+
if (!('scriptId' in value) || value['scriptId'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ScriptUsageFromJSON(json: any): ScriptUsage {
|
|
60
|
+
return ScriptUsageFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function ScriptUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptUsage {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'failedRuns': json['failedRuns'],
|
|
70
|
+
'quotaExceededRuns': json['quotaExceededRuns'],
|
|
71
|
+
'runs': json['runs'],
|
|
72
|
+
'scriptId': json['scriptId'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function ScriptUsageToJSON(json: any): ScriptUsage {
|
|
77
|
+
return ScriptUsageToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function ScriptUsageToJSONTyped(value?: ScriptUsage | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'failedRuns': value['failedRuns'],
|
|
88
|
+
'quotaExceededRuns': value['quotaExceededRuns'],
|
|
89
|
+
'runs': value['runs'],
|
|
90
|
+
'scriptId': value['scriptId'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ScriptLimits } from './ScriptLimits';
|
|
17
|
+
import {
|
|
18
|
+
ScriptLimitsFromJSON,
|
|
19
|
+
ScriptLimitsFromJSONTyped,
|
|
20
|
+
ScriptLimitsToJSON,
|
|
21
|
+
ScriptLimitsToJSONTyped,
|
|
22
|
+
} from './ScriptLimits';
|
|
23
|
+
import type { ScriptUsage } from './ScriptUsage';
|
|
24
|
+
import {
|
|
25
|
+
ScriptUsageFromJSON,
|
|
26
|
+
ScriptUsageFromJSONTyped,
|
|
27
|
+
ScriptUsageToJSON,
|
|
28
|
+
ScriptUsageToJSONTyped,
|
|
29
|
+
} from './ScriptUsage';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface ScriptUsageResBody
|
|
35
|
+
*/
|
|
36
|
+
export interface ScriptUsageResBody {
|
|
37
|
+
/**
|
|
38
|
+
* near from 80% of maxCreditsPerMonth; reached once they are used, after which runs are recorded as quota_exceeded until the month ends.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ScriptUsageResBody
|
|
41
|
+
*/
|
|
42
|
+
creditState: ScriptUsageResBodyCreditStateEnum;
|
|
43
|
+
/**
|
|
44
|
+
* Credits the account's script runs were charged this month: the scripts figure the account Usage tab shows.
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof ScriptUsageResBody
|
|
47
|
+
*/
|
|
48
|
+
creditsUsed: number;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof ScriptUsageResBody
|
|
53
|
+
*/
|
|
54
|
+
enabledScripts: number;
|
|
55
|
+
/**
|
|
56
|
+
* Runs that ended in error, timeout or killed.
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof ScriptUsageResBody
|
|
59
|
+
*/
|
|
60
|
+
failedRuns: number;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {ScriptLimits}
|
|
64
|
+
* @memberof ScriptUsageResBody
|
|
65
|
+
*/
|
|
66
|
+
limits: ScriptLimits;
|
|
67
|
+
/**
|
|
68
|
+
* The calendar month (UTC) the usage covers.
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof ScriptUsageResBody
|
|
71
|
+
*/
|
|
72
|
+
period: string;
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @type {Date}
|
|
76
|
+
* @memberof ScriptUsageResBody
|
|
77
|
+
*/
|
|
78
|
+
periodEnd: Date;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {Date}
|
|
82
|
+
* @memberof ScriptUsageResBody
|
|
83
|
+
*/
|
|
84
|
+
periodStart: Date;
|
|
85
|
+
/**
|
|
86
|
+
* Runs that did not start because a limit was reached.
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof ScriptUsageResBody
|
|
89
|
+
*/
|
|
90
|
+
quotaExceededRuns: number;
|
|
91
|
+
/**
|
|
92
|
+
* Runs that were not refused by a limit, whatever their outcome, including runs that failed before their sandbox started.
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @memberof ScriptUsageResBody
|
|
95
|
+
*/
|
|
96
|
+
runs: number;
|
|
97
|
+
/**
|
|
98
|
+
* Usage of each script that has run this month, deleted scripts included, sorted by scriptId.
|
|
99
|
+
* @type {Array<ScriptUsage>}
|
|
100
|
+
* @memberof ScriptUsageResBody
|
|
101
|
+
*/
|
|
102
|
+
scripts: Array<ScriptUsage>;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @export
|
|
108
|
+
*/
|
|
109
|
+
export const ScriptUsageResBodyCreditStateEnum = {
|
|
110
|
+
Ok: 'ok',
|
|
111
|
+
Near: 'near',
|
|
112
|
+
Reached: 'reached'
|
|
113
|
+
} as const;
|
|
114
|
+
export type ScriptUsageResBodyCreditStateEnum = typeof ScriptUsageResBodyCreditStateEnum[keyof typeof ScriptUsageResBodyCreditStateEnum];
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Check if a given object implements the ScriptUsageResBody interface.
|
|
119
|
+
*/
|
|
120
|
+
export function instanceOfScriptUsageResBody(value: object): value is ScriptUsageResBody {
|
|
121
|
+
if (!('creditState' in value) || value['creditState'] === undefined) return false;
|
|
122
|
+
if (!('creditsUsed' in value) || value['creditsUsed'] === undefined) return false;
|
|
123
|
+
if (!('enabledScripts' in value) || value['enabledScripts'] === undefined) return false;
|
|
124
|
+
if (!('failedRuns' in value) || value['failedRuns'] === undefined) return false;
|
|
125
|
+
if (!('limits' in value) || value['limits'] === undefined) return false;
|
|
126
|
+
if (!('period' in value) || value['period'] === undefined) return false;
|
|
127
|
+
if (!('periodEnd' in value) || value['periodEnd'] === undefined) return false;
|
|
128
|
+
if (!('periodStart' in value) || value['periodStart'] === undefined) return false;
|
|
129
|
+
if (!('quotaExceededRuns' in value) || value['quotaExceededRuns'] === undefined) return false;
|
|
130
|
+
if (!('runs' in value) || value['runs'] === undefined) return false;
|
|
131
|
+
if (!('scripts' in value) || value['scripts'] === undefined) return false;
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function ScriptUsageResBodyFromJSON(json: any): ScriptUsageResBody {
|
|
136
|
+
return ScriptUsageResBodyFromJSONTyped(json, false);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function ScriptUsageResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptUsageResBody {
|
|
140
|
+
if (json == null) {
|
|
141
|
+
return json;
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
|
|
145
|
+
'creditState': json['creditState'],
|
|
146
|
+
'creditsUsed': json['creditsUsed'],
|
|
147
|
+
'enabledScripts': json['enabledScripts'],
|
|
148
|
+
'failedRuns': json['failedRuns'],
|
|
149
|
+
'limits': ScriptLimitsFromJSON(json['limits']),
|
|
150
|
+
'period': json['period'],
|
|
151
|
+
'periodEnd': (new Date(json['periodEnd'])),
|
|
152
|
+
'periodStart': (new Date(json['periodStart'])),
|
|
153
|
+
'quotaExceededRuns': json['quotaExceededRuns'],
|
|
154
|
+
'runs': json['runs'],
|
|
155
|
+
'scripts': ((json['scripts'] as Array<any>).map(ScriptUsageFromJSON)),
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function ScriptUsageResBodyToJSON(json: any): ScriptUsageResBody {
|
|
160
|
+
return ScriptUsageResBodyToJSONTyped(json, false);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export function ScriptUsageResBodyToJSONTyped(value?: ScriptUsageResBody | null, ignoreDiscriminator: boolean = false): any {
|
|
164
|
+
if (value == null) {
|
|
165
|
+
return value;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
|
|
170
|
+
'creditState': value['creditState'],
|
|
171
|
+
'creditsUsed': value['creditsUsed'],
|
|
172
|
+
'enabledScripts': value['enabledScripts'],
|
|
173
|
+
'failedRuns': value['failedRuns'],
|
|
174
|
+
'limits': ScriptLimitsToJSON(value['limits']),
|
|
175
|
+
'period': value['period'],
|
|
176
|
+
'periodEnd': ((value['periodEnd']).toISOString()),
|
|
177
|
+
'periodStart': ((value['periodStart']).toISOString()),
|
|
178
|
+
'quotaExceededRuns': value['quotaExceededRuns'],
|
|
179
|
+
'runs': value['runs'],
|
|
180
|
+
'scripts': ((value['scripts'] as Array<any>).map(ScriptUsageToJSON)),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -301,6 +301,10 @@ export * from './ScriptExport';
|
|
|
301
301
|
export * from './ScriptExportResBody';
|
|
302
302
|
export * from './ScriptExportRun';
|
|
303
303
|
export * from './ScriptKey';
|
|
304
|
+
export * from './ScriptLimitOverrides';
|
|
305
|
+
export * from './ScriptLimitValues';
|
|
306
|
+
export * from './ScriptLimits';
|
|
307
|
+
export * from './ScriptLimitsResBody';
|
|
304
308
|
export * from './ScriptListResBody';
|
|
305
309
|
export * from './ScriptLogLine';
|
|
306
310
|
export * from './ScriptPatchReqBody';
|
|
@@ -315,6 +319,8 @@ export * from './ScriptSchedulePreviewResBody';
|
|
|
315
319
|
export * from './ScriptSecretsReqBody';
|
|
316
320
|
export * from './ScriptSecretsResBody';
|
|
317
321
|
export * from './ScriptSummary';
|
|
322
|
+
export * from './ScriptUsage';
|
|
323
|
+
export * from './ScriptUsageResBody';
|
|
318
324
|
export * from './ScriptWebhookResBody';
|
|
319
325
|
export * from './SendPasswordPutReqBody';
|
|
320
326
|
export * from './SerializedEvent';
|