@spaciv/sdk 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/dist/apis/AccountsApi.d.ts +4 -4
- package/dist/apis/AccountsApi.js +2 -2
- package/dist/apis/FloorPlansApi.d.ts +13 -13
- package/dist/apis/FloorPlansApi.js +6 -6
- package/dist/apis/InternalApi.d.ts +57 -1
- package/dist/apis/InternalApi.js +83 -0
- package/dist/apis/ScriptsApi.d.ts +32 -9
- package/dist/apis/ScriptsApi.js +39 -4
- package/dist/esm/apis/AccountsApi.d.ts +4 -4
- package/dist/esm/apis/AccountsApi.js +2 -2
- package/dist/esm/apis/FloorPlansApi.d.ts +13 -13
- package/dist/esm/apis/FloorPlansApi.js +6 -6
- package/dist/esm/apis/InternalApi.d.ts +57 -1
- package/dist/esm/apis/InternalApi.js +84 -1
- package/dist/esm/apis/ScriptsApi.d.ts +32 -9
- package/dist/esm/apis/ScriptsApi.js +40 -5
- package/dist/esm/models/AccountCalculationUsageDay.d.ts +6 -0
- package/dist/esm/models/AccountCalculationUsageDay.js +4 -0
- package/dist/esm/models/FloorplanBrief.d.ts +12 -0
- package/dist/esm/models/FloorplanBrief.js +4 -0
- package/dist/esm/models/FloorplanGetBody.d.ts +12 -0
- package/dist/esm/models/FloorplanGetBody.js +4 -0
- package/dist/esm/models/FloorplanPatchParamsBody.d.ts +12 -0
- package/dist/esm/models/FloorplanPatchParamsBody.js +4 -0
- package/dist/esm/models/ScriptLimitOverrides.d.ts +62 -0
- package/dist/esm/models/ScriptLimitOverrides.js +51 -0
- package/dist/esm/models/ScriptLimitValues.d.ts +62 -0
- package/dist/esm/models/ScriptLimitValues.js +63 -0
- package/dist/esm/models/ScriptLimits.d.ts +62 -0
- package/dist/esm/models/ScriptLimits.js +63 -0
- package/dist/esm/models/ScriptLimitsResBody.d.ts +46 -0
- package/dist/esm/models/ScriptLimitsResBody.js +53 -0
- package/dist/esm/models/ScriptUsage.d.ts +50 -0
- package/dist/esm/models/ScriptUsage.js +55 -0
- package/dist/esm/models/ScriptUsageResBody.d.ts +103 -0
- package/dist/esm/models/ScriptUsageResBody.js +93 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/models/AccountCalculationUsageDay.d.ts +6 -0
- package/dist/models/AccountCalculationUsageDay.js +4 -0
- package/dist/models/FloorplanBrief.d.ts +12 -0
- package/dist/models/FloorplanBrief.js +4 -0
- package/dist/models/FloorplanGetBody.d.ts +12 -0
- package/dist/models/FloorplanGetBody.js +4 -0
- package/dist/models/FloorplanPatchParamsBody.d.ts +12 -0
- package/dist/models/FloorplanPatchParamsBody.js +4 -0
- package/dist/models/ScriptLimitOverrides.d.ts +62 -0
- package/dist/models/ScriptLimitOverrides.js +58 -0
- package/dist/models/ScriptLimitValues.d.ts +62 -0
- package/dist/models/ScriptLimitValues.js +70 -0
- package/dist/models/ScriptLimits.d.ts +62 -0
- package/dist/models/ScriptLimits.js +70 -0
- package/dist/models/ScriptLimitsResBody.d.ts +46 -0
- package/dist/models/ScriptLimitsResBody.js +60 -0
- package/dist/models/ScriptUsage.d.ts +50 -0
- package/dist/models/ScriptUsage.js +62 -0
- package/dist/models/ScriptUsageResBody.d.ts +103 -0
- package/dist/models/ScriptUsageResBody.js +101 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +4 -4
- package/src/apis/FloorPlansApi.ts +13 -13
- package/src/apis/InternalApi.ts +152 -0
- package/src/apis/ScriptsApi.ts +65 -8
- package/src/models/AccountCalculationUsageDay.ts +9 -0
- package/src/models/FloorplanBrief.ts +16 -0
- package/src/models/FloorplanGetBody.ts +16 -0
- package/src/models/FloorplanPatchParamsBody.ts +16 -0
- package/src/models/ScriptLimitOverrides.ts +105 -0
- package/src/models/ScriptLimitValues.ts +111 -0
- package/src/models/ScriptLimits.ts +111 -0
- package/src/models/ScriptLimitsResBody.ts +99 -0
- package/src/models/ScriptUsage.ts +93 -0
- package/src/models/ScriptUsageResBody.ts +183 -0
- package/src/models/index.ts +6 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ScriptAuditResBody, ScriptDetail, ScriptExportResBody, ScriptListResBody, ScriptPatchReqBody, ScriptPostReqBody, ScriptRunLogsResBody, ScriptRunsResBody, ScriptSchedulePreviewReqBody, ScriptSchedulePreviewResBody, ScriptSecretsReqBody, ScriptSecretsResBody, ScriptWebhookResBody } from '../models/index';
|
|
13
|
+
import type { ScriptAuditResBody, ScriptDetail, ScriptExportResBody, ScriptListResBody, ScriptPatchReqBody, ScriptPostReqBody, ScriptRunLogsResBody, ScriptRunsResBody, ScriptSchedulePreviewReqBody, ScriptSchedulePreviewResBody, ScriptSecretsReqBody, ScriptSecretsResBody, ScriptUsageResBody, ScriptWebhookResBody } from '../models/index';
|
|
14
14
|
export interface ScriptsApiCreateRequest {
|
|
15
15
|
scriptPostReqBody: ScriptPostReqBody;
|
|
16
16
|
}
|
|
@@ -59,7 +59,7 @@ export interface ScriptsApiUpdateSecretsRequest {
|
|
|
59
59
|
*/
|
|
60
60
|
export interface ScriptsApiInterface {
|
|
61
61
|
/**
|
|
62
|
-
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
62
|
+
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts, or when the script is enabled and the account already has its limit of enabled scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
63
63
|
* @summary Create a script
|
|
64
64
|
* @param {ScriptPostReqBody} scriptPostReqBody
|
|
65
65
|
* @param {*} [options] Override http request option.
|
|
@@ -68,7 +68,7 @@ export interface ScriptsApiInterface {
|
|
|
68
68
|
*/
|
|
69
69
|
createRaw(requestParameters: ScriptsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptDetail>>;
|
|
70
70
|
/**
|
|
71
|
-
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
71
|
+
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts, or when the script is enabled and the account already has its limit of enabled scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
72
72
|
* Create a script
|
|
73
73
|
*/
|
|
74
74
|
create(requestParameters: ScriptsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptDetail>;
|
|
@@ -171,6 +171,19 @@ export interface ScriptsApiInterface {
|
|
|
171
171
|
* Export scripts
|
|
172
172
|
*/
|
|
173
173
|
getExport(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptExportResBody>;
|
|
174
|
+
/**
|
|
175
|
+
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
176
|
+
* @summary Get script usage
|
|
177
|
+
* @param {*} [options] Override http request option.
|
|
178
|
+
* @throws {RequiredError}
|
|
179
|
+
* @memberof ScriptsApiInterface
|
|
180
|
+
*/
|
|
181
|
+
getUsageRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptUsageResBody>>;
|
|
182
|
+
/**
|
|
183
|
+
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
184
|
+
* Get script usage
|
|
185
|
+
*/
|
|
186
|
+
getUsage(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptUsageResBody>;
|
|
174
187
|
/**
|
|
175
188
|
* Lists the account\'s scripts, sorted by name, without their source code. Requires the *Manage my account* permission.
|
|
176
189
|
* @summary List scripts
|
|
@@ -216,7 +229,7 @@ export interface ScriptsApiInterface {
|
|
|
216
229
|
*/
|
|
217
230
|
listRunsLogs(requestParameters: ScriptsApiListRunsLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptRunLogsResBody>;
|
|
218
231
|
/**
|
|
219
|
-
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale,
|
|
232
|
+
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale, when enabling a script whose key needs re-authorising, or when enabling it would exceed the account\'s limit of enabled scripts; with `422` when the result is invalid, including a changed schedule that runs more often than the account\'s minimum interval. Requires the *Manage my account* permission.
|
|
220
233
|
* @summary Update a script
|
|
221
234
|
* @param {string} id
|
|
222
235
|
* @param {ScriptPatchReqBody} scriptPatchReqBody
|
|
@@ -226,7 +239,7 @@ export interface ScriptsApiInterface {
|
|
|
226
239
|
*/
|
|
227
240
|
updateRaw(requestParameters: ScriptsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptDetail>>;
|
|
228
241
|
/**
|
|
229
|
-
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale,
|
|
242
|
+
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale, when enabling a script whose key needs re-authorising, or when enabling it would exceed the account\'s limit of enabled scripts; with `422` when the result is invalid, including a changed schedule that runs more often than the account\'s minimum interval. Requires the *Manage my account* permission.
|
|
230
243
|
* Update a script
|
|
231
244
|
*/
|
|
232
245
|
update(requestParameters: ScriptsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptDetail>;
|
|
@@ -251,12 +264,12 @@ export interface ScriptsApiInterface {
|
|
|
251
264
|
*/
|
|
252
265
|
export declare class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInterface {
|
|
253
266
|
/**
|
|
254
|
-
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
267
|
+
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts, or when the script is enabled and the account already has its limit of enabled scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
255
268
|
* Create a script
|
|
256
269
|
*/
|
|
257
270
|
createRaw(requestParameters: ScriptsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptDetail>>;
|
|
258
271
|
/**
|
|
259
|
-
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
272
|
+
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts, or when the script is enabled and the account already has its limit of enabled scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
260
273
|
* Create a script
|
|
261
274
|
*/
|
|
262
275
|
create(requestParameters: ScriptsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptDetail>;
|
|
@@ -330,6 +343,16 @@ export declare class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInt
|
|
|
330
343
|
* Export scripts
|
|
331
344
|
*/
|
|
332
345
|
getExport(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptExportResBody>;
|
|
346
|
+
/**
|
|
347
|
+
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
348
|
+
* Get script usage
|
|
349
|
+
*/
|
|
350
|
+
getUsageRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptUsageResBody>>;
|
|
351
|
+
/**
|
|
352
|
+
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
353
|
+
* Get script usage
|
|
354
|
+
*/
|
|
355
|
+
getUsage(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptUsageResBody>;
|
|
333
356
|
/**
|
|
334
357
|
* Lists the account\'s scripts, sorted by name, without their source code. Requires the *Manage my account* permission.
|
|
335
358
|
* List scripts
|
|
@@ -361,12 +384,12 @@ export declare class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInt
|
|
|
361
384
|
*/
|
|
362
385
|
listRunsLogs(requestParameters: ScriptsApiListRunsLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptRunLogsResBody>;
|
|
363
386
|
/**
|
|
364
|
-
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale,
|
|
387
|
+
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale, when enabling a script whose key needs re-authorising, or when enabling it would exceed the account\'s limit of enabled scripts; with `422` when the result is invalid, including a changed schedule that runs more often than the account\'s minimum interval. Requires the *Manage my account* permission.
|
|
365
388
|
* Update a script
|
|
366
389
|
*/
|
|
367
390
|
updateRaw(requestParameters: ScriptsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptDetail>>;
|
|
368
391
|
/**
|
|
369
|
-
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale,
|
|
392
|
+
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale, when enabling a script whose key needs re-authorising, or when enabling it would exceed the account\'s limit of enabled scripts; with `422` when the result is invalid, including a changed schedule that runs more often than the account\'s minimum interval. Requires the *Manage my account* permission.
|
|
370
393
|
* Update a script
|
|
371
394
|
*/
|
|
372
395
|
update(requestParameters: ScriptsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptDetail>;
|
|
@@ -21,13 +21,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { ScriptAuditResBodyFromJSON, ScriptDetailFromJSON, ScriptExportResBodyFromJSON, ScriptListResBodyFromJSON, ScriptPatchReqBodyToJSON, ScriptPostReqBodyToJSON, ScriptRunLogsResBodyFromJSON, ScriptRunsResBodyFromJSON, ScriptSchedulePreviewReqBodyToJSON, ScriptSchedulePreviewResBodyFromJSON, ScriptSecretsReqBodyToJSON, ScriptSecretsResBodyFromJSON, ScriptWebhookResBodyFromJSON, } from '../models/index';
|
|
24
|
+
import { ScriptAuditResBodyFromJSON, ScriptDetailFromJSON, ScriptExportResBodyFromJSON, ScriptListResBodyFromJSON, ScriptPatchReqBodyToJSON, ScriptPostReqBodyToJSON, ScriptRunLogsResBodyFromJSON, ScriptRunsResBodyFromJSON, ScriptSchedulePreviewReqBodyToJSON, ScriptSchedulePreviewResBodyFromJSON, ScriptSecretsReqBodyToJSON, ScriptSecretsResBodyFromJSON, ScriptUsageResBodyFromJSON, ScriptWebhookResBodyFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class ScriptsApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
30
|
+
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts, or when the script is enabled and the account already has its limit of enabled scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
31
31
|
* Create a script
|
|
32
32
|
*/
|
|
33
33
|
createRaw(requestParameters, initOverrides) {
|
|
@@ -57,7 +57,7 @@ export class ScriptsApi extends runtime.BaseAPI {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
60
|
+
* Creates a script whose Python, Go or JavaScript handler is called on a schedule, from a webhook, or both. The handler\'s context carries a Spaciv API key acting with the caller\'s permissions, except the account-administration permissions (*Manage my account*, *Manage users*, *Edit my user profile*, *Edit billing address* and the system permissions), which a script\'s key never carries, plus the account and, when a project is set, the project; the key is rotated automatically. A non-null return value is written to the run\'s logs. When `webhook` is true the response\'s `webhookUrl` is the only time the URL is returned. Rejected with `422` when the source, schedule or secrets are invalid or the project does not exist, and with `409` when the account already has 50 scripts, or when the script is enabled and the account already has its limit of enabled scripts. Requires the *Manage my account* permission; a script\'s own API key cannot call this or any other script operation.
|
|
61
61
|
* Create a script
|
|
62
62
|
*/
|
|
63
63
|
create(requestParameters, initOverrides) {
|
|
@@ -341,6 +341,41 @@ export class ScriptsApi extends runtime.BaseAPI {
|
|
|
341
341
|
return yield response.value();
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
346
|
+
* Get script usage
|
|
347
|
+
*/
|
|
348
|
+
getUsageRaw(initOverrides) {
|
|
349
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
350
|
+
const queryParameters = {};
|
|
351
|
+
const headerParameters = {};
|
|
352
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
353
|
+
const token = this.configuration.accessToken;
|
|
354
|
+
const tokenString = yield token("accessToken", []);
|
|
355
|
+
if (tokenString) {
|
|
356
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
let urlPath = `/v1/scripts/usage`;
|
|
360
|
+
const response = yield this.request({
|
|
361
|
+
path: urlPath,
|
|
362
|
+
method: 'GET',
|
|
363
|
+
headers: headerParameters,
|
|
364
|
+
query: queryParameters,
|
|
365
|
+
}, initOverrides);
|
|
366
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScriptUsageResBodyFromJSON(jsonValue));
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
371
|
+
* Get script usage
|
|
372
|
+
*/
|
|
373
|
+
getUsage(initOverrides) {
|
|
374
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
375
|
+
const response = yield this.getUsageRaw(initOverrides);
|
|
376
|
+
return yield response.value();
|
|
377
|
+
});
|
|
378
|
+
}
|
|
344
379
|
/**
|
|
345
380
|
* Lists the account\'s scripts, sorted by name, without their source code. Requires the *Manage my account* permission.
|
|
346
381
|
* List scripts
|
|
@@ -465,7 +500,7 @@ export class ScriptsApi extends runtime.BaseAPI {
|
|
|
465
500
|
});
|
|
466
501
|
}
|
|
467
502
|
/**
|
|
468
|
-
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale,
|
|
503
|
+
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale, when enabling a script whose key needs re-authorising, or when enabling it would exceed the account\'s limit of enabled scripts; with `422` when the result is invalid, including a changed schedule that runs more often than the account\'s minimum interval. Requires the *Manage my account* permission.
|
|
469
504
|
* Update a script
|
|
470
505
|
*/
|
|
471
506
|
updateRaw(requestParameters, initOverrides) {
|
|
@@ -499,7 +534,7 @@ export class ScriptsApi extends runtime.BaseAPI {
|
|
|
499
534
|
});
|
|
500
535
|
}
|
|
501
536
|
/**
|
|
502
|
-
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale,
|
|
537
|
+
* Updates the fields given. Changing the project replaces the script\'s API key with one scoped to the new project. When someone other than the key\'s owner changes the language, manifest or files, the key is replaced with one acting as them. Turning the webhook on returns its `webhookUrl` once. Rejected with `409` when `revision` is stale, when enabling a script whose key needs re-authorising, or when enabling it would exceed the account\'s limit of enabled scripts; with `422` when the result is invalid, including a changed schedule that runs more often than the account\'s minimum interval. Requires the *Manage my account* permission.
|
|
503
538
|
* Update a script
|
|
504
539
|
*/
|
|
505
540
|
update(requestParameters, initOverrides) {
|
|
@@ -39,6 +39,12 @@ export interface AccountCalculationUsageDay {
|
|
|
39
39
|
* @memberof AccountCalculationUsageDay
|
|
40
40
|
*/
|
|
41
41
|
date: Date;
|
|
42
|
+
/**
|
|
43
|
+
* Credits used running scripts: one per started minute of each run.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof AccountCalculationUsageDay
|
|
46
|
+
*/
|
|
47
|
+
scripts: number;
|
|
42
48
|
}
|
|
43
49
|
/**
|
|
44
50
|
* Check if a given object implements the AccountCalculationUsageDay interface.
|
|
@@ -23,6 +23,8 @@ export function instanceOfAccountCalculationUsageDay(value) {
|
|
|
23
23
|
return false;
|
|
24
24
|
if (!('date' in value) || value['date'] === undefined)
|
|
25
25
|
return false;
|
|
26
|
+
if (!('scripts' in value) || value['scripts'] === undefined)
|
|
27
|
+
return false;
|
|
26
28
|
return true;
|
|
27
29
|
}
|
|
28
30
|
export function AccountCalculationUsageDayFromJSON(json) {
|
|
@@ -37,6 +39,7 @@ export function AccountCalculationUsageDayFromJSONTyped(json, ignoreDiscriminato
|
|
|
37
39
|
'ai': json['ai'],
|
|
38
40
|
'build': json['build'],
|
|
39
41
|
'date': (new Date(json['date'])),
|
|
42
|
+
'scripts': json['scripts'],
|
|
40
43
|
};
|
|
41
44
|
}
|
|
42
45
|
export function AccountCalculationUsageDayToJSON(json) {
|
|
@@ -51,5 +54,6 @@ export function AccountCalculationUsageDayToJSONTyped(value, ignoreDiscriminator
|
|
|
51
54
|
'ai': value['ai'],
|
|
52
55
|
'build': value['build'],
|
|
53
56
|
'date': ((value['date']).toISOString().substring(0, 10)),
|
|
57
|
+
'scripts': value['scripts'],
|
|
54
58
|
};
|
|
55
59
|
}
|
|
@@ -15,12 +15,24 @@
|
|
|
15
15
|
* @interface FloorplanBrief
|
|
16
16
|
*/
|
|
17
17
|
export interface FloorplanBrief {
|
|
18
|
+
/**
|
|
19
|
+
* ID of the account file used as the background image, if one is set.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof FloorplanBrief
|
|
22
|
+
*/
|
|
23
|
+
backgroundFile?: string;
|
|
18
24
|
/**
|
|
19
25
|
*
|
|
20
26
|
* @type {number}
|
|
21
27
|
* @memberof FloorplanBrief
|
|
22
28
|
*/
|
|
23
29
|
createdAt: number;
|
|
30
|
+
/**
|
|
31
|
+
* ID of the account file used as the foreground image, if one is set.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof FloorplanBrief
|
|
34
|
+
*/
|
|
35
|
+
foregroundFile?: string;
|
|
24
36
|
/**
|
|
25
37
|
*
|
|
26
38
|
* @type {string}
|
|
@@ -35,7 +35,9 @@ export function FloorplanBriefFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
35
|
return json;
|
|
36
36
|
}
|
|
37
37
|
return {
|
|
38
|
+
'backgroundFile': json['backgroundFile'] == null ? undefined : json['backgroundFile'],
|
|
38
39
|
'createdAt': json['createdAt'],
|
|
40
|
+
'foregroundFile': json['foregroundFile'] == null ? undefined : json['foregroundFile'],
|
|
39
41
|
'id': json['id'],
|
|
40
42
|
'name': json['name'],
|
|
41
43
|
'property': json['property'],
|
|
@@ -50,7 +52,9 @@ export function FloorplanBriefToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
50
52
|
return value;
|
|
51
53
|
}
|
|
52
54
|
return {
|
|
55
|
+
'backgroundFile': value['backgroundFile'],
|
|
53
56
|
'createdAt': value['createdAt'],
|
|
57
|
+
'foregroundFile': value['foregroundFile'],
|
|
54
58
|
'id': value['id'],
|
|
55
59
|
'name': value['name'],
|
|
56
60
|
'property': value['property'],
|
|
@@ -17,12 +17,24 @@ import type { FloorplanGetBodySpace } from './FloorplanGetBodySpace';
|
|
|
17
17
|
* @interface FloorplanGetBody
|
|
18
18
|
*/
|
|
19
19
|
export interface FloorplanGetBody {
|
|
20
|
+
/**
|
|
21
|
+
* ID of the account file used as the background image, if one is set.
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof FloorplanGetBody
|
|
24
|
+
*/
|
|
25
|
+
backgroundFile?: string;
|
|
20
26
|
/**
|
|
21
27
|
*
|
|
22
28
|
* @type {number}
|
|
23
29
|
* @memberof FloorplanGetBody
|
|
24
30
|
*/
|
|
25
31
|
createdAt: number;
|
|
32
|
+
/**
|
|
33
|
+
* ID of the account file used as the foreground image, if one is set.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof FloorplanGetBody
|
|
36
|
+
*/
|
|
37
|
+
foregroundFile?: string;
|
|
26
38
|
/**
|
|
27
39
|
*
|
|
28
40
|
* @type {string}
|
|
@@ -39,7 +39,9 @@ export function FloorplanGetBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
39
39
|
return json;
|
|
40
40
|
}
|
|
41
41
|
return {
|
|
42
|
+
'backgroundFile': json['backgroundFile'] == null ? undefined : json['backgroundFile'],
|
|
42
43
|
'createdAt': json['createdAt'],
|
|
44
|
+
'foregroundFile': json['foregroundFile'] == null ? undefined : json['foregroundFile'],
|
|
43
45
|
'name': json['name'],
|
|
44
46
|
'overlayOffset': FloorplanGetBodyOverlayOffsetFromJSON(json['overlayOffset']),
|
|
45
47
|
'property': json['property'],
|
|
@@ -55,7 +57,9 @@ export function FloorplanGetBodyToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
55
57
|
return value;
|
|
56
58
|
}
|
|
57
59
|
return {
|
|
60
|
+
'backgroundFile': value['backgroundFile'],
|
|
58
61
|
'createdAt': value['createdAt'],
|
|
62
|
+
'foregroundFile': value['foregroundFile'],
|
|
59
63
|
'name': value['name'],
|
|
60
64
|
'overlayOffset': FloorplanGetBodyOverlayOffsetToJSON(value['overlayOffset']),
|
|
61
65
|
'property': value['property'],
|
|
@@ -17,12 +17,24 @@ import type { FloorplanCreateSpaceRepeated } from './FloorplanCreateSpaceRepeate
|
|
|
17
17
|
* @interface FloorplanPatchParamsBody
|
|
18
18
|
*/
|
|
19
19
|
export interface FloorplanPatchParamsBody {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof FloorplanPatchParamsBody
|
|
24
|
+
*/
|
|
25
|
+
backgroundFile?: string;
|
|
20
26
|
/**
|
|
21
27
|
*
|
|
22
28
|
* @type {number}
|
|
23
29
|
* @memberof FloorplanPatchParamsBody
|
|
24
30
|
*/
|
|
25
31
|
createdAt?: number;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof FloorplanPatchParamsBody
|
|
36
|
+
*/
|
|
37
|
+
foregroundFile?: string;
|
|
26
38
|
/**
|
|
27
39
|
*
|
|
28
40
|
* @type {string}
|
|
@@ -27,7 +27,9 @@ export function FloorplanPatchParamsBodyFromJSONTyped(json, ignoreDiscriminator)
|
|
|
27
27
|
return json;
|
|
28
28
|
}
|
|
29
29
|
return {
|
|
30
|
+
'backgroundFile': json['backgroundFile'] == null ? undefined : json['backgroundFile'],
|
|
30
31
|
'createdAt': json['createdAt'] == null ? undefined : json['createdAt'],
|
|
32
|
+
'foregroundFile': json['foregroundFile'] == null ? undefined : json['foregroundFile'],
|
|
31
33
|
'name': json['name'] == null ? undefined : json['name'],
|
|
32
34
|
'overlayOffset': json['overlayOffset'] == null ? undefined : FloorplanChangelogOverlayOffsetFromJSON(json['overlayOffset']),
|
|
33
35
|
'property': json['property'] == null ? undefined : json['property'],
|
|
@@ -43,7 +45,9 @@ export function FloorplanPatchParamsBodyToJSONTyped(value, ignoreDiscriminator =
|
|
|
43
45
|
return value;
|
|
44
46
|
}
|
|
45
47
|
return {
|
|
48
|
+
'backgroundFile': value['backgroundFile'],
|
|
46
49
|
'createdAt': value['createdAt'],
|
|
50
|
+
'foregroundFile': value['foregroundFile'],
|
|
47
51
|
'name': value['name'],
|
|
48
52
|
'overlayOffset': FloorplanChangelogOverlayOffsetToJSON(value['overlayOffset']),
|
|
49
53
|
'property': value['property'],
|
|
@@ -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 ScriptLimitOverrides
|
|
16
|
+
*/
|
|
17
|
+
export interface ScriptLimitOverrides {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ScriptLimitOverrides
|
|
22
|
+
*/
|
|
23
|
+
maxConcurrentRuns?: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ScriptLimitOverrides
|
|
28
|
+
*/
|
|
29
|
+
maxCreditsPerMonth?: number;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ScriptLimitOverrides
|
|
34
|
+
*/
|
|
35
|
+
maxEnabledScripts?: number;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ScriptLimitOverrides
|
|
40
|
+
*/
|
|
41
|
+
maxRunSeconds?: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof ScriptLimitOverrides
|
|
46
|
+
*/
|
|
47
|
+
minCronIntervalSeconds?: number;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof ScriptLimitOverrides
|
|
52
|
+
*/
|
|
53
|
+
webhookRequestsPerMinute?: number;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the ScriptLimitOverrides interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfScriptLimitOverrides(value: object): value is ScriptLimitOverrides;
|
|
59
|
+
export declare function ScriptLimitOverridesFromJSON(json: any): ScriptLimitOverrides;
|
|
60
|
+
export declare function ScriptLimitOverridesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimitOverrides;
|
|
61
|
+
export declare function ScriptLimitOverridesToJSON(json: any): ScriptLimitOverrides;
|
|
62
|
+
export declare function ScriptLimitOverridesToJSONTyped(value?: ScriptLimitOverrides | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -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;
|