@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,51 @@
|
|
|
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
|
+
* Check if a given object implements the ScriptLimitOverrides interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfScriptLimitOverrides(value) {
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
export function ScriptLimitOverridesFromJSON(json) {
|
|
21
|
+
return ScriptLimitOverridesFromJSONTyped(json, false);
|
|
22
|
+
}
|
|
23
|
+
export function ScriptLimitOverridesFromJSONTyped(json, ignoreDiscriminator) {
|
|
24
|
+
if (json == null) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
'maxConcurrentRuns': json['maxConcurrentRuns'] == null ? undefined : json['maxConcurrentRuns'],
|
|
29
|
+
'maxCreditsPerMonth': json['maxCreditsPerMonth'] == null ? undefined : json['maxCreditsPerMonth'],
|
|
30
|
+
'maxEnabledScripts': json['maxEnabledScripts'] == null ? undefined : json['maxEnabledScripts'],
|
|
31
|
+
'maxRunSeconds': json['maxRunSeconds'] == null ? undefined : json['maxRunSeconds'],
|
|
32
|
+
'minCronIntervalSeconds': json['minCronIntervalSeconds'] == null ? undefined : json['minCronIntervalSeconds'],
|
|
33
|
+
'webhookRequestsPerMinute': json['webhookRequestsPerMinute'] == null ? undefined : json['webhookRequestsPerMinute'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function ScriptLimitOverridesToJSON(json) {
|
|
37
|
+
return ScriptLimitOverridesToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function ScriptLimitOverridesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'maxConcurrentRuns': value['maxConcurrentRuns'],
|
|
45
|
+
'maxCreditsPerMonth': value['maxCreditsPerMonth'],
|
|
46
|
+
'maxEnabledScripts': value['maxEnabledScripts'],
|
|
47
|
+
'maxRunSeconds': value['maxRunSeconds'],
|
|
48
|
+
'minCronIntervalSeconds': value['minCronIntervalSeconds'],
|
|
49
|
+
'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 ScriptLimitValues
|
|
16
|
+
*/
|
|
17
|
+
export interface ScriptLimitValues {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ScriptLimitValues
|
|
22
|
+
*/
|
|
23
|
+
maxConcurrentRuns: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ScriptLimitValues
|
|
28
|
+
*/
|
|
29
|
+
maxCreditsPerMonth: number;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ScriptLimitValues
|
|
34
|
+
*/
|
|
35
|
+
maxEnabledScripts: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ScriptLimitValues
|
|
40
|
+
*/
|
|
41
|
+
maxRunSeconds: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof ScriptLimitValues
|
|
46
|
+
*/
|
|
47
|
+
minCronIntervalSeconds: number;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof ScriptLimitValues
|
|
52
|
+
*/
|
|
53
|
+
webhookRequestsPerMinute: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the ScriptLimitValues interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfScriptLimitValues(value: object): value is ScriptLimitValues;
|
|
59
|
+
export declare function ScriptLimitValuesFromJSON(json: any): ScriptLimitValues;
|
|
60
|
+
export declare function ScriptLimitValuesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimitValues;
|
|
61
|
+
export declare function ScriptLimitValuesToJSON(json: any): ScriptLimitValues;
|
|
62
|
+
export declare function ScriptLimitValuesToJSONTyped(value?: ScriptLimitValues | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
* Check if a given object implements the ScriptLimitValues interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfScriptLimitValues(value) {
|
|
18
|
+
if (!('maxConcurrentRuns' in value) || value['maxConcurrentRuns'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('maxCreditsPerMonth' in value) || value['maxCreditsPerMonth'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('maxEnabledScripts' in value) || value['maxEnabledScripts'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('maxRunSeconds' in value) || value['maxRunSeconds'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('minCronIntervalSeconds' in value) || value['minCronIntervalSeconds'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('webhookRequestsPerMinute' in value) || value['webhookRequestsPerMinute'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
export function ScriptLimitValuesFromJSON(json) {
|
|
33
|
+
return ScriptLimitValuesFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function ScriptLimitValuesFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'maxConcurrentRuns': json['maxConcurrentRuns'],
|
|
41
|
+
'maxCreditsPerMonth': json['maxCreditsPerMonth'],
|
|
42
|
+
'maxEnabledScripts': json['maxEnabledScripts'],
|
|
43
|
+
'maxRunSeconds': json['maxRunSeconds'],
|
|
44
|
+
'minCronIntervalSeconds': json['minCronIntervalSeconds'],
|
|
45
|
+
'webhookRequestsPerMinute': json['webhookRequestsPerMinute'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function ScriptLimitValuesToJSON(json) {
|
|
49
|
+
return ScriptLimitValuesToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
export function ScriptLimitValuesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'maxConcurrentRuns': value['maxConcurrentRuns'],
|
|
57
|
+
'maxCreditsPerMonth': value['maxCreditsPerMonth'],
|
|
58
|
+
'maxEnabledScripts': value['maxEnabledScripts'],
|
|
59
|
+
'maxRunSeconds': value['maxRunSeconds'],
|
|
60
|
+
'minCronIntervalSeconds': value['minCronIntervalSeconds'],
|
|
61
|
+
'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 ScriptLimits
|
|
16
|
+
*/
|
|
17
|
+
export interface ScriptLimits {
|
|
18
|
+
/**
|
|
19
|
+
* Runs the account may have in progress at once.
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ScriptLimits
|
|
22
|
+
*/
|
|
23
|
+
maxConcurrentRuns: number;
|
|
24
|
+
/**
|
|
25
|
+
* 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.
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ScriptLimits
|
|
28
|
+
*/
|
|
29
|
+
maxCreditsPerMonth: number;
|
|
30
|
+
/**
|
|
31
|
+
* Scripts the account may have enabled at once.
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ScriptLimits
|
|
34
|
+
*/
|
|
35
|
+
maxEnabledScripts: number;
|
|
36
|
+
/**
|
|
37
|
+
* Longest a single run may take; a script's own timeout is capped to it.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ScriptLimits
|
|
40
|
+
*/
|
|
41
|
+
maxRunSeconds: number;
|
|
42
|
+
/**
|
|
43
|
+
* Shortest time allowed between two scheduled runs of a script.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof ScriptLimits
|
|
46
|
+
*/
|
|
47
|
+
minCronIntervalSeconds: number;
|
|
48
|
+
/**
|
|
49
|
+
* Webhook calls each script accepts per minute, and at most in a burst.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof ScriptLimits
|
|
52
|
+
*/
|
|
53
|
+
webhookRequestsPerMinute: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the ScriptLimits interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfScriptLimits(value: object): value is ScriptLimits;
|
|
59
|
+
export declare function ScriptLimitsFromJSON(json: any): ScriptLimits;
|
|
60
|
+
export declare function ScriptLimitsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimits;
|
|
61
|
+
export declare function ScriptLimitsToJSON(json: any): ScriptLimits;
|
|
62
|
+
export declare function ScriptLimitsToJSONTyped(value?: ScriptLimits | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
* Check if a given object implements the ScriptLimits interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfScriptLimits(value) {
|
|
18
|
+
if (!('maxConcurrentRuns' in value) || value['maxConcurrentRuns'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('maxCreditsPerMonth' in value) || value['maxCreditsPerMonth'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('maxEnabledScripts' in value) || value['maxEnabledScripts'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('maxRunSeconds' in value) || value['maxRunSeconds'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
if (!('minCronIntervalSeconds' in value) || value['minCronIntervalSeconds'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('webhookRequestsPerMinute' in value) || value['webhookRequestsPerMinute'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
export function ScriptLimitsFromJSON(json) {
|
|
33
|
+
return ScriptLimitsFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function ScriptLimitsFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'maxConcurrentRuns': json['maxConcurrentRuns'],
|
|
41
|
+
'maxCreditsPerMonth': json['maxCreditsPerMonth'],
|
|
42
|
+
'maxEnabledScripts': json['maxEnabledScripts'],
|
|
43
|
+
'maxRunSeconds': json['maxRunSeconds'],
|
|
44
|
+
'minCronIntervalSeconds': json['minCronIntervalSeconds'],
|
|
45
|
+
'webhookRequestsPerMinute': json['webhookRequestsPerMinute'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function ScriptLimitsToJSON(json) {
|
|
49
|
+
return ScriptLimitsToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
export function ScriptLimitsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'maxConcurrentRuns': value['maxConcurrentRuns'],
|
|
57
|
+
'maxCreditsPerMonth': value['maxCreditsPerMonth'],
|
|
58
|
+
'maxEnabledScripts': value['maxEnabledScripts'],
|
|
59
|
+
'maxRunSeconds': value['maxRunSeconds'],
|
|
60
|
+
'minCronIntervalSeconds': value['minCronIntervalSeconds'],
|
|
61
|
+
'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { ScriptLimitValues } from './ScriptLimitValues';
|
|
13
|
+
import type { ScriptLimitOverrides } from './ScriptLimitOverrides';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface ScriptLimitsResBody
|
|
18
|
+
*/
|
|
19
|
+
export interface ScriptLimitsResBody {
|
|
20
|
+
/**
|
|
21
|
+
* The code defaults for scripts.
|
|
22
|
+
* @type {ScriptLimitValues}
|
|
23
|
+
* @memberof ScriptLimitsResBody
|
|
24
|
+
*/
|
|
25
|
+
defaults: ScriptLimitValues;
|
|
26
|
+
/**
|
|
27
|
+
* The limits that apply to the account.
|
|
28
|
+
* @type {ScriptLimitValues}
|
|
29
|
+
* @memberof ScriptLimitsResBody
|
|
30
|
+
*/
|
|
31
|
+
effective: ScriptLimitValues;
|
|
32
|
+
/**
|
|
33
|
+
* This account's overrides; an absent field uses the default.
|
|
34
|
+
* @type {ScriptLimitOverrides}
|
|
35
|
+
* @memberof ScriptLimitsResBody
|
|
36
|
+
*/
|
|
37
|
+
overrides: ScriptLimitOverrides;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the ScriptLimitsResBody interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function instanceOfScriptLimitsResBody(value: object): value is ScriptLimitsResBody;
|
|
43
|
+
export declare function ScriptLimitsResBodyFromJSON(json: any): ScriptLimitsResBody;
|
|
44
|
+
export declare function ScriptLimitsResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimitsResBody;
|
|
45
|
+
export declare function ScriptLimitsResBodyToJSON(json: any): ScriptLimitsResBody;
|
|
46
|
+
export declare function ScriptLimitsResBodyToJSONTyped(value?: ScriptLimitsResBody | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
import { ScriptLimitValuesFromJSON, ScriptLimitValuesToJSON, } from './ScriptLimitValues';
|
|
15
|
+
import { ScriptLimitOverridesFromJSON, ScriptLimitOverridesToJSON, } from './ScriptLimitOverrides';
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the ScriptLimitsResBody interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfScriptLimitsResBody(value) {
|
|
20
|
+
if (!('defaults' in value) || value['defaults'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('effective' in value) || value['effective'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('overrides' in value) || value['overrides'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function ScriptLimitsResBodyFromJSON(json) {
|
|
29
|
+
return ScriptLimitsResBodyFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function ScriptLimitsResBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'defaults': ScriptLimitValuesFromJSON(json['defaults']),
|
|
37
|
+
'effective': ScriptLimitValuesFromJSON(json['effective']),
|
|
38
|
+
'overrides': ScriptLimitOverridesFromJSON(json['overrides']),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export function ScriptLimitsResBodyToJSON(json) {
|
|
42
|
+
return ScriptLimitsResBodyToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
export function ScriptLimitsResBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'defaults': ScriptLimitValuesToJSON(value['defaults']),
|
|
50
|
+
'effective': ScriptLimitValuesToJSON(value['effective']),
|
|
51
|
+
'overrides': ScriptLimitOverridesToJSON(value['overrides']),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -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,55 @@
|
|
|
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
|
+
* Check if a given object implements the ScriptUsage interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfScriptUsage(value) {
|
|
18
|
+
if (!('failedRuns' in value) || value['failedRuns'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('quotaExceededRuns' in value) || value['quotaExceededRuns'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('runs' in value) || value['runs'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
if (!('scriptId' in value) || value['scriptId'] === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
export function ScriptUsageFromJSON(json) {
|
|
29
|
+
return ScriptUsageFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
export function ScriptUsageFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if (json == null) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
'failedRuns': json['failedRuns'],
|
|
37
|
+
'quotaExceededRuns': json['quotaExceededRuns'],
|
|
38
|
+
'runs': json['runs'],
|
|
39
|
+
'scriptId': json['scriptId'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export function ScriptUsageToJSON(json) {
|
|
43
|
+
return ScriptUsageToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
export function ScriptUsageToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'failedRuns': value['failedRuns'],
|
|
51
|
+
'quotaExceededRuns': value['quotaExceededRuns'],
|
|
52
|
+
'runs': value['runs'],
|
|
53
|
+
'scriptId': value['scriptId'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -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;
|