@spaciv/sdk 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/dist/apis/AccountsApi.d.ts +4 -4
- package/dist/apis/AccountsApi.js +2 -2
- package/dist/apis/InternalApi.d.ts +57 -1
- package/dist/apis/InternalApi.js +83 -0
- package/dist/apis/ScriptsApi.d.ts +32 -9
- package/dist/apis/ScriptsApi.js +39 -4
- package/dist/esm/apis/AccountsApi.d.ts +4 -4
- package/dist/esm/apis/AccountsApi.js +2 -2
- package/dist/esm/apis/InternalApi.d.ts +57 -1
- package/dist/esm/apis/InternalApi.js +84 -1
- package/dist/esm/apis/ScriptsApi.d.ts +32 -9
- package/dist/esm/apis/ScriptsApi.js +40 -5
- package/dist/esm/models/AccountCalculationUsageDay.d.ts +6 -0
- package/dist/esm/models/AccountCalculationUsageDay.js +4 -0
- package/dist/esm/models/ScriptLimitOverrides.d.ts +62 -0
- package/dist/esm/models/ScriptLimitOverrides.js +51 -0
- package/dist/esm/models/ScriptLimitValues.d.ts +62 -0
- package/dist/esm/models/ScriptLimitValues.js +63 -0
- package/dist/esm/models/ScriptLimits.d.ts +62 -0
- package/dist/esm/models/ScriptLimits.js +63 -0
- package/dist/esm/models/ScriptLimitsResBody.d.ts +46 -0
- package/dist/esm/models/ScriptLimitsResBody.js +53 -0
- package/dist/esm/models/ScriptUsage.d.ts +50 -0
- package/dist/esm/models/ScriptUsage.js +55 -0
- package/dist/esm/models/ScriptUsageResBody.d.ts +103 -0
- package/dist/esm/models/ScriptUsageResBody.js +93 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/models/AccountCalculationUsageDay.d.ts +6 -0
- package/dist/models/AccountCalculationUsageDay.js +4 -0
- package/dist/models/ScriptLimitOverrides.d.ts +62 -0
- package/dist/models/ScriptLimitOverrides.js +58 -0
- package/dist/models/ScriptLimitValues.d.ts +62 -0
- package/dist/models/ScriptLimitValues.js +70 -0
- package/dist/models/ScriptLimits.d.ts +62 -0
- package/dist/models/ScriptLimits.js +70 -0
- package/dist/models/ScriptLimitsResBody.d.ts +46 -0
- package/dist/models/ScriptLimitsResBody.js +60 -0
- package/dist/models/ScriptUsage.d.ts +50 -0
- package/dist/models/ScriptUsage.js +62 -0
- package/dist/models/ScriptUsageResBody.d.ts +103 -0
- package/dist/models/ScriptUsageResBody.js +101 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +4 -4
- package/src/apis/InternalApi.ts +152 -0
- package/src/apis/ScriptsApi.ts +65 -8
- package/src/models/AccountCalculationUsageDay.ts +9 -0
- package/src/models/ScriptLimitOverrides.ts +105 -0
- package/src/models/ScriptLimitValues.ts +111 -0
- package/src/models/ScriptLimits.ts +111 -0
- package/src/models/ScriptLimitsResBody.ts +99 -0
- package/src/models/ScriptUsage.ts +93 -0
- package/src/models/ScriptUsageResBody.ts +183 -0
- package/src/models/index.ts +6 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { FeatureGroupsResBody, I18nTranslationsExportParamsWrapperBody, I18nTranslationsImportParamsWrapperBody, ReconcileReport, RepairFloorplansResBody, RetriesResBody, SysAdminUpdateFeatureGroupsParamsWrapperBody } from '../models/index';
|
|
13
|
+
import type { FeatureGroupsResBody, I18nTranslationsExportParamsWrapperBody, I18nTranslationsImportParamsWrapperBody, ReconcileReport, RepairFloorplansResBody, RetriesResBody, ScriptLimitOverrides, ScriptLimitsResBody, SysAdminUpdateFeatureGroupsParamsWrapperBody } from '../models/index';
|
|
14
14
|
export interface InternalApiCreateAdminPopulateRequest {
|
|
15
15
|
body: number;
|
|
16
16
|
}
|
|
@@ -27,6 +27,13 @@ export interface InternalApiCreateTranslationsExportRequest {
|
|
|
27
27
|
export interface InternalApiCreateTranslationsImportRequest {
|
|
28
28
|
i18nTranslationsImportParamsWrapperBody: I18nTranslationsImportParamsWrapperBody;
|
|
29
29
|
}
|
|
30
|
+
export interface InternalApiListAdminAccountsScriptLimitsRequest {
|
|
31
|
+
account: number;
|
|
32
|
+
}
|
|
33
|
+
export interface InternalApiUpdateAdminAccountsScriptLimitsRequest {
|
|
34
|
+
account: number;
|
|
35
|
+
scriptLimitOverrides: ScriptLimitOverrides;
|
|
36
|
+
}
|
|
30
37
|
/**
|
|
31
38
|
* InternalApi - interface
|
|
32
39
|
*
|
|
@@ -170,6 +177,20 @@ export interface InternalApiInterface {
|
|
|
170
177
|
* Import translations from CSV
|
|
171
178
|
*/
|
|
172
179
|
createTranslationsImport(requestParameters: InternalApiCreateTranslationsImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
180
|
+
/**
|
|
181
|
+
* Returns the code defaults for scripts, the account\'s overrides and the limits that apply to it. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
182
|
+
* @summary Get an account\'s script limits
|
|
183
|
+
* @param {number} account
|
|
184
|
+
* @param {*} [options] Override http request option.
|
|
185
|
+
* @throws {RequiredError}
|
|
186
|
+
* @memberof InternalApiInterface
|
|
187
|
+
*/
|
|
188
|
+
listAdminAccountsScriptLimitsRaw(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>>;
|
|
189
|
+
/**
|
|
190
|
+
* Returns the code defaults for scripts, the account\'s overrides and the limits that apply to it. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
191
|
+
* Get an account\'s script limits
|
|
192
|
+
*/
|
|
193
|
+
listAdminAccountsScriptLimits(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody>;
|
|
173
194
|
/**
|
|
174
195
|
* Dispatches events to regenerate any preset images and derived assets for the caller\'s account. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
175
196
|
* @summary Regenerate customer preset assets
|
|
@@ -183,6 +204,21 @@ export interface InternalApiInterface {
|
|
|
183
204
|
* Regenerate customer preset assets
|
|
184
205
|
*/
|
|
185
206
|
listAdminRegeneratePresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
207
|
+
/**
|
|
208
|
+
* Replaces all of the account\'s script limit overrides with the body; an absent field uses the default, so an empty body returns the account to the defaults. Rejected with 422 when a value is not positive, or when maxCreditsPerMonth is above 9223372036854. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
209
|
+
* @summary Set an account\'s script limits
|
|
210
|
+
* @param {number} account
|
|
211
|
+
* @param {ScriptLimitOverrides} scriptLimitOverrides
|
|
212
|
+
* @param {*} [options] Override http request option.
|
|
213
|
+
* @throws {RequiredError}
|
|
214
|
+
* @memberof InternalApiInterface
|
|
215
|
+
*/
|
|
216
|
+
updateAdminAccountsScriptLimitsRaw(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>>;
|
|
217
|
+
/**
|
|
218
|
+
* Replaces all of the account\'s script limit overrides with the body; an absent field uses the default, so an empty body returns the account to the defaults. Rejected with 422 when a value is not positive, or when maxCreditsPerMonth is above 9223372036854. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
219
|
+
* Set an account\'s script limits
|
|
220
|
+
*/
|
|
221
|
+
updateAdminAccountsScriptLimits(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody>;
|
|
186
222
|
}
|
|
187
223
|
/**
|
|
188
224
|
*
|
|
@@ -288,6 +324,16 @@ export declare class InternalApi extends runtime.BaseAPI implements InternalApiI
|
|
|
288
324
|
* Import translations from CSV
|
|
289
325
|
*/
|
|
290
326
|
createTranslationsImport(requestParameters: InternalApiCreateTranslationsImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
327
|
+
/**
|
|
328
|
+
* Returns the code defaults for scripts, the account\'s overrides and the limits that apply to it. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
329
|
+
* Get an account\'s script limits
|
|
330
|
+
*/
|
|
331
|
+
listAdminAccountsScriptLimitsRaw(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>>;
|
|
332
|
+
/**
|
|
333
|
+
* Returns the code defaults for scripts, the account\'s overrides and the limits that apply to it. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
334
|
+
* Get an account\'s script limits
|
|
335
|
+
*/
|
|
336
|
+
listAdminAccountsScriptLimits(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody>;
|
|
291
337
|
/**
|
|
292
338
|
* Dispatches events to regenerate any preset images and derived assets for the caller\'s account. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
293
339
|
* Regenerate customer preset assets
|
|
@@ -298,4 +344,14 @@ export declare class InternalApi extends runtime.BaseAPI implements InternalApiI
|
|
|
298
344
|
* Regenerate customer preset assets
|
|
299
345
|
*/
|
|
300
346
|
listAdminRegeneratePresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
347
|
+
/**
|
|
348
|
+
* Replaces all of the account\'s script limit overrides with the body; an absent field uses the default, so an empty body returns the account to the defaults. Rejected with 422 when a value is not positive, or when maxCreditsPerMonth is above 9223372036854. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
349
|
+
* Set an account\'s script limits
|
|
350
|
+
*/
|
|
351
|
+
updateAdminAccountsScriptLimitsRaw(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>>;
|
|
352
|
+
/**
|
|
353
|
+
* Replaces all of the account\'s script limit overrides with the body; an absent field uses the default, so an empty body returns the account to the defaults. Rejected with 422 when a value is not positive, or when maxCreditsPerMonth is above 9223372036854. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
354
|
+
* Set an account\'s script limits
|
|
355
|
+
*/
|
|
356
|
+
updateAdminAccountsScriptLimits(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody>;
|
|
301
357
|
}
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { FeatureGroupsResBodyFromJSON, I18nTranslationsExportParamsWrapperBodyToJSON, I18nTranslationsImportParamsWrapperBodyToJSON, ReconcileReportFromJSON, RepairFloorplansResBodyFromJSON, RetriesResBodyFromJSON, SysAdminUpdateFeatureGroupsParamsWrapperBodyToJSON, } from '../models/index';
|
|
24
|
+
import { FeatureGroupsResBodyFromJSON, I18nTranslationsExportParamsWrapperBodyToJSON, I18nTranslationsImportParamsWrapperBodyToJSON, ReconcileReportFromJSON, RepairFloorplansResBodyFromJSON, RetriesResBodyFromJSON, ScriptLimitOverridesToJSON, ScriptLimitsResBodyFromJSON, SysAdminUpdateFeatureGroupsParamsWrapperBodyToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -409,6 +409,45 @@ export class InternalApi extends runtime.BaseAPI {
|
|
|
409
409
|
return yield response.value();
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
|
+
/**
|
|
413
|
+
* Returns the code defaults for scripts, the account\'s overrides and the limits that apply to it. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
414
|
+
* Get an account\'s script limits
|
|
415
|
+
*/
|
|
416
|
+
listAdminAccountsScriptLimitsRaw(requestParameters, initOverrides) {
|
|
417
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
418
|
+
if (requestParameters['account'] == null) {
|
|
419
|
+
throw new runtime.RequiredError('account', 'Required parameter "account" was null or undefined when calling listAdminAccountsScriptLimits().');
|
|
420
|
+
}
|
|
421
|
+
const queryParameters = {};
|
|
422
|
+
const headerParameters = {};
|
|
423
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
424
|
+
const token = this.configuration.accessToken;
|
|
425
|
+
const tokenString = yield token("accessToken", []);
|
|
426
|
+
if (tokenString) {
|
|
427
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
let urlPath = `/v1/admin/accounts/{account}/script-limits`;
|
|
431
|
+
urlPath = urlPath.replace(`{${"account"}}`, encodeURIComponent(String(requestParameters['account'])));
|
|
432
|
+
const response = yield this.request({
|
|
433
|
+
path: urlPath,
|
|
434
|
+
method: 'GET',
|
|
435
|
+
headers: headerParameters,
|
|
436
|
+
query: queryParameters,
|
|
437
|
+
}, initOverrides);
|
|
438
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScriptLimitsResBodyFromJSON(jsonValue));
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Returns the code defaults for scripts, the account\'s overrides and the limits that apply to it. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
443
|
+
* Get an account\'s script limits
|
|
444
|
+
*/
|
|
445
|
+
listAdminAccountsScriptLimits(requestParameters, initOverrides) {
|
|
446
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
447
|
+
const response = yield this.listAdminAccountsScriptLimitsRaw(requestParameters, initOverrides);
|
|
448
|
+
return yield response.value();
|
|
449
|
+
});
|
|
450
|
+
}
|
|
412
451
|
/**
|
|
413
452
|
* Dispatches events to regenerate any preset images and derived assets for the caller\'s account. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
414
453
|
* Regenerate customer preset assets
|
|
@@ -443,4 +482,48 @@ export class InternalApi extends runtime.BaseAPI {
|
|
|
443
482
|
yield this.listAdminRegeneratePresetsRaw(initOverrides);
|
|
444
483
|
});
|
|
445
484
|
}
|
|
485
|
+
/**
|
|
486
|
+
* Replaces all of the account\'s script limit overrides with the body; an absent field uses the default, so an empty body returns the account to the defaults. Rejected with 422 when a value is not positive, or when maxCreditsPerMonth is above 9223372036854. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
487
|
+
* Set an account\'s script limits
|
|
488
|
+
*/
|
|
489
|
+
updateAdminAccountsScriptLimitsRaw(requestParameters, initOverrides) {
|
|
490
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
491
|
+
if (requestParameters['account'] == null) {
|
|
492
|
+
throw new runtime.RequiredError('account', 'Required parameter "account" was null or undefined when calling updateAdminAccountsScriptLimits().');
|
|
493
|
+
}
|
|
494
|
+
if (requestParameters['scriptLimitOverrides'] == null) {
|
|
495
|
+
throw new runtime.RequiredError('scriptLimitOverrides', 'Required parameter "scriptLimitOverrides" was null or undefined when calling updateAdminAccountsScriptLimits().');
|
|
496
|
+
}
|
|
497
|
+
const queryParameters = {};
|
|
498
|
+
const headerParameters = {};
|
|
499
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
500
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
501
|
+
const token = this.configuration.accessToken;
|
|
502
|
+
const tokenString = yield token("accessToken", []);
|
|
503
|
+
if (tokenString) {
|
|
504
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
let urlPath = `/v1/admin/accounts/{account}/script-limits`;
|
|
508
|
+
urlPath = urlPath.replace(`{${"account"}}`, encodeURIComponent(String(requestParameters['account'])));
|
|
509
|
+
const response = yield this.request({
|
|
510
|
+
path: urlPath,
|
|
511
|
+
method: 'PUT',
|
|
512
|
+
headers: headerParameters,
|
|
513
|
+
query: queryParameters,
|
|
514
|
+
body: ScriptLimitOverridesToJSON(requestParameters['scriptLimitOverrides']),
|
|
515
|
+
}, initOverrides);
|
|
516
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScriptLimitsResBodyFromJSON(jsonValue));
|
|
517
|
+
});
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Replaces all of the account\'s script limit overrides with the body; an absent field uses the default, so an empty body returns the account to the defaults. Rejected with 422 when a value is not positive, or when maxCreditsPerMonth is above 9223372036854. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
521
|
+
* Set an account\'s script limits
|
|
522
|
+
*/
|
|
523
|
+
updateAdminAccountsScriptLimits(requestParameters, initOverrides) {
|
|
524
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
525
|
+
const response = yield this.updateAdminAccountsScriptLimitsRaw(requestParameters, initOverrides);
|
|
526
|
+
return yield response.value();
|
|
527
|
+
});
|
|
528
|
+
}
|
|
446
529
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
+
}
|