@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.
Files changed (58) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/dist/apis/AccountsApi.d.ts +4 -4
  4. package/dist/apis/AccountsApi.js +2 -2
  5. package/dist/apis/InternalApi.d.ts +57 -1
  6. package/dist/apis/InternalApi.js +83 -0
  7. package/dist/apis/ScriptsApi.d.ts +32 -9
  8. package/dist/apis/ScriptsApi.js +39 -4
  9. package/dist/esm/apis/AccountsApi.d.ts +4 -4
  10. package/dist/esm/apis/AccountsApi.js +2 -2
  11. package/dist/esm/apis/InternalApi.d.ts +57 -1
  12. package/dist/esm/apis/InternalApi.js +84 -1
  13. package/dist/esm/apis/ScriptsApi.d.ts +32 -9
  14. package/dist/esm/apis/ScriptsApi.js +40 -5
  15. package/dist/esm/models/AccountCalculationUsageDay.d.ts +6 -0
  16. package/dist/esm/models/AccountCalculationUsageDay.js +4 -0
  17. package/dist/esm/models/ScriptLimitOverrides.d.ts +62 -0
  18. package/dist/esm/models/ScriptLimitOverrides.js +51 -0
  19. package/dist/esm/models/ScriptLimitValues.d.ts +62 -0
  20. package/dist/esm/models/ScriptLimitValues.js +63 -0
  21. package/dist/esm/models/ScriptLimits.d.ts +62 -0
  22. package/dist/esm/models/ScriptLimits.js +63 -0
  23. package/dist/esm/models/ScriptLimitsResBody.d.ts +46 -0
  24. package/dist/esm/models/ScriptLimitsResBody.js +53 -0
  25. package/dist/esm/models/ScriptUsage.d.ts +50 -0
  26. package/dist/esm/models/ScriptUsage.js +55 -0
  27. package/dist/esm/models/ScriptUsageResBody.d.ts +103 -0
  28. package/dist/esm/models/ScriptUsageResBody.js +93 -0
  29. package/dist/esm/models/index.d.ts +6 -0
  30. package/dist/esm/models/index.js +6 -0
  31. package/dist/models/AccountCalculationUsageDay.d.ts +6 -0
  32. package/dist/models/AccountCalculationUsageDay.js +4 -0
  33. package/dist/models/ScriptLimitOverrides.d.ts +62 -0
  34. package/dist/models/ScriptLimitOverrides.js +58 -0
  35. package/dist/models/ScriptLimitValues.d.ts +62 -0
  36. package/dist/models/ScriptLimitValues.js +70 -0
  37. package/dist/models/ScriptLimits.d.ts +62 -0
  38. package/dist/models/ScriptLimits.js +70 -0
  39. package/dist/models/ScriptLimitsResBody.d.ts +46 -0
  40. package/dist/models/ScriptLimitsResBody.js +60 -0
  41. package/dist/models/ScriptUsage.d.ts +50 -0
  42. package/dist/models/ScriptUsage.js +62 -0
  43. package/dist/models/ScriptUsageResBody.d.ts +103 -0
  44. package/dist/models/ScriptUsageResBody.js +101 -0
  45. package/dist/models/index.d.ts +6 -0
  46. package/dist/models/index.js +6 -0
  47. package/package.json +1 -1
  48. package/src/apis/AccountsApi.ts +4 -4
  49. package/src/apis/InternalApi.ts +152 -0
  50. package/src/apis/ScriptsApi.ts +65 -8
  51. package/src/models/AccountCalculationUsageDay.ts +9 -0
  52. package/src/models/ScriptLimitOverrides.ts +105 -0
  53. package/src/models/ScriptLimitValues.ts +111 -0
  54. package/src/models/ScriptLimits.ts +111 -0
  55. package/src/models/ScriptLimitsResBody.ts +99 -0
  56. package/src/models/ScriptUsage.ts +93 -0
  57. package/src/models/ScriptUsageResBody.ts +183 -0
  58. package/src/models/index.ts +6 -0
@@ -335,6 +335,10 @@ src/models/ScriptExport.ts
335
335
  src/models/ScriptExportResBody.ts
336
336
  src/models/ScriptExportRun.ts
337
337
  src/models/ScriptKey.ts
338
+ src/models/ScriptLimitOverrides.ts
339
+ src/models/ScriptLimitValues.ts
340
+ src/models/ScriptLimits.ts
341
+ src/models/ScriptLimitsResBody.ts
338
342
  src/models/ScriptListResBody.ts
339
343
  src/models/ScriptLogLine.ts
340
344
  src/models/ScriptPatchReqBody.ts
@@ -349,6 +353,8 @@ src/models/ScriptSchedulePreviewResBody.ts
349
353
  src/models/ScriptSecretsReqBody.ts
350
354
  src/models/ScriptSecretsResBody.ts
351
355
  src/models/ScriptSummary.ts
356
+ src/models/ScriptUsage.ts
357
+ src/models/ScriptUsageResBody.ts
352
358
  src/models/ScriptWebhookResBody.ts
353
359
  src/models/SendPasswordPutReqBody.ts
354
360
  src/models/SerializedEvent.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @spaciv/sdk@0.1.5
1
+ ## @spaciv/sdk@0.1.6
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @spaciv/sdk@0.1.5 --save
39
+ npm install @spaciv/sdk@0.1.6 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -223,7 +223,7 @@ export interface AccountsApiInterface {
223
223
  */
224
224
  listAuthOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetAuthOptionsResBody>;
225
225
  /**
226
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
226
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
227
227
  * @summary Get the account\'s credit usage
228
228
  * @param {30 | 90 | 365} [days] How many days of usage to return, ending today (UTC).
229
229
  * @param {*} [options] Override http request option.
@@ -232,7 +232,7 @@ export interface AccountsApiInterface {
232
232
  */
233
233
  listUsageCalculationCreditsRaw(requestParameters: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountCalculationUsageBody>>;
234
234
  /**
235
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
235
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
236
236
  * Get the account\'s credit usage
237
237
  */
238
238
  listUsageCalculationCredits(requestParameters: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountCalculationUsageBody>;
@@ -428,12 +428,12 @@ export declare class AccountsApi extends runtime.BaseAPI implements AccountsApiI
428
428
  */
429
429
  listAuthOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetAuthOptionsResBody>;
430
430
  /**
431
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
431
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
432
432
  * Get the account\'s credit usage
433
433
  */
434
434
  listUsageCalculationCreditsRaw(requestParameters: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountCalculationUsageBody>>;
435
435
  /**
436
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
436
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
437
437
  * Get the account\'s credit usage
438
438
  */
439
439
  listUsageCalculationCredits(requestParameters?: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountCalculationUsageBody>;
@@ -500,7 +500,7 @@ class AccountsApi extends runtime.BaseAPI {
500
500
  });
501
501
  }
502
502
  /**
503
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
503
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
504
504
  * Get the account\'s credit usage
505
505
  */
506
506
  listUsageCalculationCreditsRaw(requestParameters, initOverrides) {
@@ -528,7 +528,7 @@ class AccountsApi extends runtime.BaseAPI {
528
528
  });
529
529
  }
530
530
  /**
531
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
531
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
532
532
  * Get the account\'s credit usage
533
533
  */
534
534
  listUsageCalculationCredits() {
@@ -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
  }
@@ -412,6 +412,45 @@ class InternalApi extends runtime.BaseAPI {
412
412
  return yield response.value();
413
413
  });
414
414
  }
415
+ /**
416
+ * 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.
417
+ * Get an account\'s script limits
418
+ */
419
+ listAdminAccountsScriptLimitsRaw(requestParameters, initOverrides) {
420
+ return __awaiter(this, void 0, void 0, function* () {
421
+ if (requestParameters['account'] == null) {
422
+ throw new runtime.RequiredError('account', 'Required parameter "account" was null or undefined when calling listAdminAccountsScriptLimits().');
423
+ }
424
+ const queryParameters = {};
425
+ const headerParameters = {};
426
+ if (this.configuration && this.configuration.accessToken) {
427
+ const token = this.configuration.accessToken;
428
+ const tokenString = yield token("accessToken", []);
429
+ if (tokenString) {
430
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
431
+ }
432
+ }
433
+ let urlPath = `/v1/admin/accounts/{account}/script-limits`;
434
+ urlPath = urlPath.replace(`{${"account"}}`, encodeURIComponent(String(requestParameters['account'])));
435
+ const response = yield this.request({
436
+ path: urlPath,
437
+ method: 'GET',
438
+ headers: headerParameters,
439
+ query: queryParameters,
440
+ }, initOverrides);
441
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ScriptLimitsResBodyFromJSON)(jsonValue));
442
+ });
443
+ }
444
+ /**
445
+ * 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.
446
+ * Get an account\'s script limits
447
+ */
448
+ listAdminAccountsScriptLimits(requestParameters, initOverrides) {
449
+ return __awaiter(this, void 0, void 0, function* () {
450
+ const response = yield this.listAdminAccountsScriptLimitsRaw(requestParameters, initOverrides);
451
+ return yield response.value();
452
+ });
453
+ }
415
454
  /**
416
455
  * Dispatches events to regenerate any preset images and derived assets for the caller\'s account. Requires the *Project admin controls* and *Sys admin* permissions.
417
456
  * Regenerate customer preset assets
@@ -446,5 +485,49 @@ class InternalApi extends runtime.BaseAPI {
446
485
  yield this.listAdminRegeneratePresetsRaw(initOverrides);
447
486
  });
448
487
  }
488
+ /**
489
+ * 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.
490
+ * Set an account\'s script limits
491
+ */
492
+ updateAdminAccountsScriptLimitsRaw(requestParameters, initOverrides) {
493
+ return __awaiter(this, void 0, void 0, function* () {
494
+ if (requestParameters['account'] == null) {
495
+ throw new runtime.RequiredError('account', 'Required parameter "account" was null or undefined when calling updateAdminAccountsScriptLimits().');
496
+ }
497
+ if (requestParameters['scriptLimitOverrides'] == null) {
498
+ throw new runtime.RequiredError('scriptLimitOverrides', 'Required parameter "scriptLimitOverrides" was null or undefined when calling updateAdminAccountsScriptLimits().');
499
+ }
500
+ const queryParameters = {};
501
+ const headerParameters = {};
502
+ headerParameters['Content-Type'] = 'application/json';
503
+ if (this.configuration && this.configuration.accessToken) {
504
+ const token = this.configuration.accessToken;
505
+ const tokenString = yield token("accessToken", []);
506
+ if (tokenString) {
507
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
508
+ }
509
+ }
510
+ let urlPath = `/v1/admin/accounts/{account}/script-limits`;
511
+ urlPath = urlPath.replace(`{${"account"}}`, encodeURIComponent(String(requestParameters['account'])));
512
+ const response = yield this.request({
513
+ path: urlPath,
514
+ method: 'PUT',
515
+ headers: headerParameters,
516
+ query: queryParameters,
517
+ body: (0, index_1.ScriptLimitOverridesToJSON)(requestParameters['scriptLimitOverrides']),
518
+ }, initOverrides);
519
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ScriptLimitsResBodyFromJSON)(jsonValue));
520
+ });
521
+ }
522
+ /**
523
+ * 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.
524
+ * Set an account\'s script limits
525
+ */
526
+ updateAdminAccountsScriptLimits(requestParameters, initOverrides) {
527
+ return __awaiter(this, void 0, void 0, function* () {
528
+ const response = yield this.updateAdminAccountsScriptLimitsRaw(requestParameters, initOverrides);
529
+ return yield response.value();
530
+ });
531
+ }
449
532
  }
450
533
  exports.InternalApi = InternalApi;
@@ -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, or when enabling a script whose key needs re-authorising; with `422` when the result is invalid. Requires the *Manage my account* permission.
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, or when enabling a script whose key needs re-authorising; with `422` when the result is invalid. Requires the *Manage my account* permission.
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, or when enabling a script whose key needs re-authorising; with `422` when the result is invalid. Requires the *Manage my account* permission.
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, or when enabling a script whose key needs re-authorising; with `422` when the result is invalid. Requires the *Manage my account* permission.
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>;
@@ -30,7 +30,7 @@ const index_1 = require("../models/index");
30
30
  */
31
31
  class ScriptsApi extends runtime.BaseAPI {
32
32
  /**
33
- * 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.
33
+ * 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.
34
34
  * Create a script
35
35
  */
36
36
  createRaw(requestParameters, initOverrides) {
@@ -60,7 +60,7 @@ class ScriptsApi extends runtime.BaseAPI {
60
60
  });
61
61
  }
62
62
  /**
63
- * 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.
63
+ * 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.
64
64
  * Create a script
65
65
  */
66
66
  create(requestParameters, initOverrides) {
@@ -344,6 +344,41 @@ class ScriptsApi extends runtime.BaseAPI {
344
344
  return yield response.value();
345
345
  });
346
346
  }
347
+ /**
348
+ * 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.
349
+ * Get script usage
350
+ */
351
+ getUsageRaw(initOverrides) {
352
+ return __awaiter(this, void 0, void 0, function* () {
353
+ const queryParameters = {};
354
+ const headerParameters = {};
355
+ if (this.configuration && this.configuration.accessToken) {
356
+ const token = this.configuration.accessToken;
357
+ const tokenString = yield token("accessToken", []);
358
+ if (tokenString) {
359
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
360
+ }
361
+ }
362
+ let urlPath = `/v1/scripts/usage`;
363
+ const response = yield this.request({
364
+ path: urlPath,
365
+ method: 'GET',
366
+ headers: headerParameters,
367
+ query: queryParameters,
368
+ }, initOverrides);
369
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ScriptUsageResBodyFromJSON)(jsonValue));
370
+ });
371
+ }
372
+ /**
373
+ * 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.
374
+ * Get script usage
375
+ */
376
+ getUsage(initOverrides) {
377
+ return __awaiter(this, void 0, void 0, function* () {
378
+ const response = yield this.getUsageRaw(initOverrides);
379
+ return yield response.value();
380
+ });
381
+ }
347
382
  /**
348
383
  * Lists the account\'s scripts, sorted by name, without their source code. Requires the *Manage my account* permission.
349
384
  * List scripts
@@ -468,7 +503,7 @@ class ScriptsApi extends runtime.BaseAPI {
468
503
  });
469
504
  }
470
505
  /**
471
- * 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, or when enabling a script whose key needs re-authorising; with `422` when the result is invalid. Requires the *Manage my account* permission.
506
+ * 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.
472
507
  * Update a script
473
508
  */
474
509
  updateRaw(requestParameters, initOverrides) {
@@ -502,7 +537,7 @@ class ScriptsApi extends runtime.BaseAPI {
502
537
  });
503
538
  }
504
539
  /**
505
- * 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, or when enabling a script whose key needs re-authorising; with `422` when the result is invalid. Requires the *Manage my account* permission.
540
+ * 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.
506
541
  * Update a script
507
542
  */
508
543
  update(requestParameters, initOverrides) {
@@ -223,7 +223,7 @@ export interface AccountsApiInterface {
223
223
  */
224
224
  listAuthOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetAuthOptionsResBody>;
225
225
  /**
226
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
226
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
227
227
  * @summary Get the account\'s credit usage
228
228
  * @param {30 | 90 | 365} [days] How many days of usage to return, ending today (UTC).
229
229
  * @param {*} [options] Override http request option.
@@ -232,7 +232,7 @@ export interface AccountsApiInterface {
232
232
  */
233
233
  listUsageCalculationCreditsRaw(requestParameters: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountCalculationUsageBody>>;
234
234
  /**
235
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
235
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
236
236
  * Get the account\'s credit usage
237
237
  */
238
238
  listUsageCalculationCredits(requestParameters: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountCalculationUsageBody>;
@@ -428,12 +428,12 @@ export declare class AccountsApi extends runtime.BaseAPI implements AccountsApiI
428
428
  */
429
429
  listAuthOptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetAuthOptionsResBody>;
430
430
  /**
431
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
431
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
432
432
  * Get the account\'s credit usage
433
433
  */
434
434
  listUsageCalculationCreditsRaw(requestParameters: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountCalculationUsageBody>>;
435
435
  /**
436
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
436
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
437
437
  * Get the account\'s credit usage
438
438
  */
439
439
  listUsageCalculationCredits(requestParameters?: AccountsApiListUsageCalculationCreditsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountCalculationUsageBody>;
@@ -497,7 +497,7 @@ export class AccountsApi extends runtime.BaseAPI {
497
497
  });
498
498
  }
499
499
  /**
500
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
500
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
501
501
  * Get the account\'s credit usage
502
502
  */
503
503
  listUsageCalculationCreditsRaw(requestParameters, initOverrides) {
@@ -525,7 +525,7 @@ export class AccountsApi extends runtime.BaseAPI {
525
525
  });
526
526
  }
527
527
  /**
528
- * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it and the AI assistant. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
528
+ * Returns the credits the account used on each of the last `days` days, split into building layer data, aggregating it, the AI assistant and running scripts. A piece of calculation work is charged once however many times it is computed, and a result already cached costs nothing. A script run is charged once, when it ends. Credits are the same unit the rest of the account\'s usage is counted in. Requires the *Manage my account* permission. Returns `500` if the usage cannot be read.
529
529
  * Get the account\'s credit usage
530
530
  */
531
531
  listUsageCalculationCredits() {