@spaciv/sdk 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) 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/FloorPlansApi.d.ts +13 -13
  6. package/dist/apis/FloorPlansApi.js +6 -6
  7. package/dist/apis/InternalApi.d.ts +57 -1
  8. package/dist/apis/InternalApi.js +83 -0
  9. package/dist/apis/ScriptsApi.d.ts +32 -9
  10. package/dist/apis/ScriptsApi.js +39 -4
  11. package/dist/esm/apis/AccountsApi.d.ts +4 -4
  12. package/dist/esm/apis/AccountsApi.js +2 -2
  13. package/dist/esm/apis/FloorPlansApi.d.ts +13 -13
  14. package/dist/esm/apis/FloorPlansApi.js +6 -6
  15. package/dist/esm/apis/InternalApi.d.ts +57 -1
  16. package/dist/esm/apis/InternalApi.js +84 -1
  17. package/dist/esm/apis/ScriptsApi.d.ts +32 -9
  18. package/dist/esm/apis/ScriptsApi.js +40 -5
  19. package/dist/esm/models/AccountCalculationUsageDay.d.ts +6 -0
  20. package/dist/esm/models/AccountCalculationUsageDay.js +4 -0
  21. package/dist/esm/models/FloorplanBrief.d.ts +12 -0
  22. package/dist/esm/models/FloorplanBrief.js +4 -0
  23. package/dist/esm/models/FloorplanGetBody.d.ts +12 -0
  24. package/dist/esm/models/FloorplanGetBody.js +4 -0
  25. package/dist/esm/models/FloorplanPatchParamsBody.d.ts +12 -0
  26. package/dist/esm/models/FloorplanPatchParamsBody.js +4 -0
  27. package/dist/esm/models/ScriptLimitOverrides.d.ts +62 -0
  28. package/dist/esm/models/ScriptLimitOverrides.js +51 -0
  29. package/dist/esm/models/ScriptLimitValues.d.ts +62 -0
  30. package/dist/esm/models/ScriptLimitValues.js +63 -0
  31. package/dist/esm/models/ScriptLimits.d.ts +62 -0
  32. package/dist/esm/models/ScriptLimits.js +63 -0
  33. package/dist/esm/models/ScriptLimitsResBody.d.ts +46 -0
  34. package/dist/esm/models/ScriptLimitsResBody.js +53 -0
  35. package/dist/esm/models/ScriptUsage.d.ts +50 -0
  36. package/dist/esm/models/ScriptUsage.js +55 -0
  37. package/dist/esm/models/ScriptUsageResBody.d.ts +103 -0
  38. package/dist/esm/models/ScriptUsageResBody.js +93 -0
  39. package/dist/esm/models/index.d.ts +6 -0
  40. package/dist/esm/models/index.js +6 -0
  41. package/dist/models/AccountCalculationUsageDay.d.ts +6 -0
  42. package/dist/models/AccountCalculationUsageDay.js +4 -0
  43. package/dist/models/FloorplanBrief.d.ts +12 -0
  44. package/dist/models/FloorplanBrief.js +4 -0
  45. package/dist/models/FloorplanGetBody.d.ts +12 -0
  46. package/dist/models/FloorplanGetBody.js +4 -0
  47. package/dist/models/FloorplanPatchParamsBody.d.ts +12 -0
  48. package/dist/models/FloorplanPatchParamsBody.js +4 -0
  49. package/dist/models/ScriptLimitOverrides.d.ts +62 -0
  50. package/dist/models/ScriptLimitOverrides.js +58 -0
  51. package/dist/models/ScriptLimitValues.d.ts +62 -0
  52. package/dist/models/ScriptLimitValues.js +70 -0
  53. package/dist/models/ScriptLimits.d.ts +62 -0
  54. package/dist/models/ScriptLimits.js +70 -0
  55. package/dist/models/ScriptLimitsResBody.d.ts +46 -0
  56. package/dist/models/ScriptLimitsResBody.js +60 -0
  57. package/dist/models/ScriptUsage.d.ts +50 -0
  58. package/dist/models/ScriptUsage.js +62 -0
  59. package/dist/models/ScriptUsageResBody.d.ts +103 -0
  60. package/dist/models/ScriptUsageResBody.js +101 -0
  61. package/dist/models/index.d.ts +6 -0
  62. package/dist/models/index.js +6 -0
  63. package/package.json +1 -1
  64. package/src/apis/AccountsApi.ts +4 -4
  65. package/src/apis/FloorPlansApi.ts +13 -13
  66. package/src/apis/InternalApi.ts +152 -0
  67. package/src/apis/ScriptsApi.ts +65 -8
  68. package/src/models/AccountCalculationUsageDay.ts +9 -0
  69. package/src/models/FloorplanBrief.ts +16 -0
  70. package/src/models/FloorplanGetBody.ts +16 -0
  71. package/src/models/FloorplanPatchParamsBody.ts +16 -0
  72. package/src/models/ScriptLimitOverrides.ts +105 -0
  73. package/src/models/ScriptLimitValues.ts +111 -0
  74. package/src/models/ScriptLimits.ts +111 -0
  75. package/src/models/ScriptLimitsResBody.ts +99 -0
  76. package/src/models/ScriptUsage.ts +93 -0
  77. package/src/models/ScriptUsageResBody.ts +183 -0
  78. package/src/models/index.ts +6 -0
@@ -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() {
@@ -85,18 +85,18 @@ export interface FloorPlansApiInterface {
85
85
  */
86
86
  get(requestParameters: FloorPlansApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FloorplanGetBody>;
87
87
  /**
88
- * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay). When no image has been uploaded a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored image matches a virus signature; the bytes are kept for investigation.
88
+ * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay): the account file set as the layer\'s `backgroundFile` or `foregroundFile`, or, when there is none or it has been deleted from file storage, an image uploaded to the layer through `PUT`. When the layer has neither, a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission; the *View file storage* permission is not needed to read the layer\'s account file. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the image matches a virus signature; the bytes are kept for investigation.
89
89
  * @summary Get a floor plan image
90
90
  * @param {string} id
91
91
  * @param {'image' | 'foreground'} imageType Which image layer to retrieve: the base drawing (image) or the foreground overlay (foreground).
92
- * @param {boolean} [noFallback] When true, returns 404 instead of a generated placeholder if no image has been uploaded.
92
+ * @param {boolean} [noFallback] When true, returns 404 instead of a generated placeholder if the layer has no image.
93
93
  * @param {*} [options] Override http request option.
94
94
  * @throws {RequiredError}
95
95
  * @memberof FloorPlansApiInterface
96
96
  */
97
97
  getImagesRaw(requestParameters: FloorPlansApiGetImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
98
98
  /**
99
- * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay). When no image has been uploaded a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored image matches a virus signature; the bytes are kept for investigation.
99
+ * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay): the account file set as the layer\'s `backgroundFile` or `foregroundFile`, or, when there is none or it has been deleted from file storage, an image uploaded to the layer through `PUT`. When the layer has neither, a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission; the *View file storage* permission is not needed to read the layer\'s account file. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the image matches a virus signature; the bytes are kept for investigation.
100
100
  * Get a floor plan image
101
101
  */
102
102
  getImages(requestParameters: FloorPlansApiGetImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
@@ -114,7 +114,7 @@ export interface FloorPlansApiInterface {
114
114
  */
115
115
  list(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FloorplanBrief>>;
116
116
  /**
117
- * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, and space geometry. Only fields present in the request body are changed. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission.
117
+ * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, background and foreground images, and space geometry. Only fields present in the request body are changed, and the request fails with `409` if the floor plan keeps changing while they are. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission. `backgroundFile` and `foregroundFile` take the ID of an image in the account\'s file storage (see `/v1/account/files`), or an empty string to remove the layer\'s image; choosing a file also requires the *View file storage* permission. The file must be a PNG, JPEG, GIF, WebP or SVG image of at most 4 MB that is not quarantined, otherwise the request fails with `422` (`403` when quarantined) and nothing is changed. Setting or removing a layer\'s file also deletes any image previously uploaded to that layer through `PUT /v1/floorplans/{id}/images/{imageType}`.
118
118
  * @summary Update a floor plan
119
119
  * @param {string} id
120
120
  * @param {FloorplanPatchParamsBody} [floorplanPatchParamsBody]
@@ -124,12 +124,12 @@ export interface FloorPlansApiInterface {
124
124
  */
125
125
  updateRaw(requestParameters: FloorPlansApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
126
126
  /**
127
- * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, and space geometry. Only fields present in the request body are changed. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission.
127
+ * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, background and foreground images, and space geometry. Only fields present in the request body are changed, and the request fails with `409` if the floor plan keeps changing while they are. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission. `backgroundFile` and `foregroundFile` take the ID of an image in the account\'s file storage (see `/v1/account/files`), or an empty string to remove the layer\'s image; choosing a file also requires the *View file storage* permission. The file must be a PNG, JPEG, GIF, WebP or SVG image of at most 4 MB that is not quarantined, otherwise the request fails with `422` (`403` when quarantined) and nothing is changed. Setting or removing a layer\'s file also deletes any image previously uploaded to that layer through `PUT /v1/floorplans/{id}/images/{imageType}`.
128
128
  * Update a floor plan
129
129
  */
130
130
  update(requestParameters: FloorPlansApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
131
131
  /**
132
- * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Requires the *Edit floorplans* permission.
132
+ * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Either way, the layer stops showing any account file set for it through `PATCH /v1/floorplans/{id}`; prefer setting `backgroundFile` or `foregroundFile` there instead. Requires the *Edit floorplans* permission.
133
133
  * @summary Upload a floor plan image
134
134
  * @param {string} id
135
135
  * @param {'image' | 'foreground'} imageType Which image layer to upload: the base drawing (image) or the foreground overlay (foreground).
@@ -141,7 +141,7 @@ export interface FloorPlansApiInterface {
141
141
  */
142
142
  updateImagesRaw(requestParameters: FloorPlansApiUpdateImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
143
143
  /**
144
- * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Requires the *Edit floorplans* permission.
144
+ * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Either way, the layer stops showing any account file set for it through `PATCH /v1/floorplans/{id}`; prefer setting `backgroundFile` or `foregroundFile` there instead. Requires the *Edit floorplans* permission.
145
145
  * Upload a floor plan image
146
146
  */
147
147
  updateImages(requestParameters: FloorPlansApiUpdateImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
@@ -181,12 +181,12 @@ export declare class FloorPlansApi extends runtime.BaseAPI implements FloorPlans
181
181
  */
182
182
  get(requestParameters: FloorPlansApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FloorplanGetBody>;
183
183
  /**
184
- * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay). When no image has been uploaded a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored image matches a virus signature; the bytes are kept for investigation.
184
+ * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay): the account file set as the layer\'s `backgroundFile` or `foregroundFile`, or, when there is none or it has been deleted from file storage, an image uploaded to the layer through `PUT`. When the layer has neither, a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission; the *View file storage* permission is not needed to read the layer\'s account file. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the image matches a virus signature; the bytes are kept for investigation.
185
185
  * Get a floor plan image
186
186
  */
187
187
  getImagesRaw(requestParameters: FloorPlansApiGetImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
188
188
  /**
189
- * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay). When no image has been uploaded a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored image matches a virus signature; the bytes are kept for investigation.
189
+ * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay): the account file set as the layer\'s `backgroundFile` or `foregroundFile`, or, when there is none or it has been deleted from file storage, an image uploaded to the layer through `PUT`. When the layer has neither, a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission; the *View file storage* permission is not needed to read the layer\'s account file. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the image matches a virus signature; the bytes are kept for investigation.
190
190
  * Get a floor plan image
191
191
  */
192
192
  getImages(requestParameters: FloorPlansApiGetImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
@@ -201,22 +201,22 @@ export declare class FloorPlansApi extends runtime.BaseAPI implements FloorPlans
201
201
  */
202
202
  list(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FloorplanBrief>>;
203
203
  /**
204
- * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, and space geometry. Only fields present in the request body are changed. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission.
204
+ * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, background and foreground images, and space geometry. Only fields present in the request body are changed, and the request fails with `409` if the floor plan keeps changing while they are. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission. `backgroundFile` and `foregroundFile` take the ID of an image in the account\'s file storage (see `/v1/account/files`), or an empty string to remove the layer\'s image; choosing a file also requires the *View file storage* permission. The file must be a PNG, JPEG, GIF, WebP or SVG image of at most 4 MB that is not quarantined, otherwise the request fails with `422` (`403` when quarantined) and nothing is changed. Setting or removing a layer\'s file also deletes any image previously uploaded to that layer through `PUT /v1/floorplans/{id}/images/{imageType}`.
205
205
  * Update a floor plan
206
206
  */
207
207
  updateRaw(requestParameters: FloorPlansApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
208
208
  /**
209
- * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, and space geometry. Only fields present in the request body are changed. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission.
209
+ * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, background and foreground images, and space geometry. Only fields present in the request body are changed, and the request fails with `409` if the floor plan keeps changing while they are. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission. `backgroundFile` and `foregroundFile` take the ID of an image in the account\'s file storage (see `/v1/account/files`), or an empty string to remove the layer\'s image; choosing a file also requires the *View file storage* permission. The file must be a PNG, JPEG, GIF, WebP or SVG image of at most 4 MB that is not quarantined, otherwise the request fails with `422` (`403` when quarantined) and nothing is changed. Setting or removing a layer\'s file also deletes any image previously uploaded to that layer through `PUT /v1/floorplans/{id}/images/{imageType}`.
210
210
  * Update a floor plan
211
211
  */
212
212
  update(requestParameters: FloorPlansApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
213
213
  /**
214
- * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Requires the *Edit floorplans* permission.
214
+ * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Either way, the layer stops showing any account file set for it through `PATCH /v1/floorplans/{id}`; prefer setting `backgroundFile` or `foregroundFile` there instead. Requires the *Edit floorplans* permission.
215
215
  * Upload a floor plan image
216
216
  */
217
217
  updateImagesRaw(requestParameters: FloorPlansApiUpdateImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
218
218
  /**
219
- * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Requires the *Edit floorplans* permission.
219
+ * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Either way, the layer stops showing any account file set for it through `PATCH /v1/floorplans/{id}`; prefer setting `backgroundFile` or `foregroundFile` there instead. Requires the *Edit floorplans* permission.
220
220
  * Upload a floor plan image
221
221
  */
222
222
  updateImages(requestParameters: FloorPlansApiUpdateImagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
@@ -150,7 +150,7 @@ export class FloorPlansApi extends runtime.BaseAPI {
150
150
  });
151
151
  }
152
152
  /**
153
- * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay). When no image has been uploaded a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored image matches a virus signature; the bytes are kept for investigation.
153
+ * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay): the account file set as the layer\'s `backgroundFile` or `foregroundFile`, or, when there is none or it has been deleted from file storage, an image uploaded to the layer through `PUT`. When the layer has neither, a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission; the *View file storage* permission is not needed to read the layer\'s account file. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the image matches a virus signature; the bytes are kept for investigation.
154
154
  * Get a floor plan image
155
155
  */
156
156
  getImagesRaw(requestParameters, initOverrides) {
@@ -191,7 +191,7 @@ export class FloorPlansApi extends runtime.BaseAPI {
191
191
  });
192
192
  }
193
193
  /**
194
- * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay). When no image has been uploaded a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the stored image matches a virus signature; the bytes are kept for investigation.
194
+ * Returns the raw image bytes for the specified layer (`image` for the base drawing, `foreground` for the overlay): the account file set as the layer\'s `backgroundFile` or `foregroundFile`, or, when there is none or it has been deleted from file storage, an image uploaded to the layer through `PUT`. When the layer has neither, a generated placeholder is returned unless `noFallback=true` is set. Requires the *View floorplans* permission; the *View file storage* permission is not needed to read the layer\'s account file. Returns `403` (`file quarantined: it matched a virus signature`) when a rescan found the image matches a virus signature; the bytes are kept for investigation.
195
195
  * Get a floor plan image
196
196
  */
197
197
  getImages(requestParameters, initOverrides) {
@@ -236,7 +236,7 @@ export class FloorPlansApi extends runtime.BaseAPI {
236
236
  });
237
237
  }
238
238
  /**
239
- * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, and space geometry. Only fields present in the request body are changed. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission.
239
+ * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, background and foreground images, and space geometry. Only fields present in the request body are changed, and the request fails with `409` if the floor plan keeps changing while they are. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission. `backgroundFile` and `foregroundFile` take the ID of an image in the account\'s file storage (see `/v1/account/files`), or an empty string to remove the layer\'s image; choosing a file also requires the *View file storage* permission. The file must be a PNG, JPEG, GIF, WebP or SVG image of at most 4 MB that is not quarantined, otherwise the request fails with `422` (`403` when quarantined) and nothing is changed. Setting or removing a layer\'s file also deletes any image previously uploaded to that layer through `PUT /v1/floorplans/{id}/images/{imageType}`.
240
240
  * Update a floor plan
241
241
  */
242
242
  updateRaw(requestParameters, initOverrides) {
@@ -267,7 +267,7 @@ export class FloorPlansApi extends runtime.BaseAPI {
267
267
  });
268
268
  }
269
269
  /**
270
- * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, and space geometry. Only fields present in the request body are changed. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission.
270
+ * Partially updates the floor plan\'s name, linked property and node, creation timestamp, image overlay offset, background and foreground images, and space geometry. Only fields present in the request body are changed, and the request fails with `409` if the floor plan keeps changing while they are. When `spaces` is provided the entire space overlay is replaced. Requires the *Edit floorplans* permission. `backgroundFile` and `foregroundFile` take the ID of an image in the account\'s file storage (see `/v1/account/files`), or an empty string to remove the layer\'s image; choosing a file also requires the *View file storage* permission. The file must be a PNG, JPEG, GIF, WebP or SVG image of at most 4 MB that is not quarantined, otherwise the request fails with `422` (`403` when quarantined) and nothing is changed. Setting or removing a layer\'s file also deletes any image previously uploaded to that layer through `PUT /v1/floorplans/{id}/images/{imageType}`.
271
271
  * Update a floor plan
272
272
  */
273
273
  update(requestParameters, initOverrides) {
@@ -277,7 +277,7 @@ export class FloorPlansApi extends runtime.BaseAPI {
277
277
  });
278
278
  }
279
279
  /**
280
- * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Requires the *Edit floorplans* permission.
280
+ * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Either way, the layer stops showing any account file set for it through `PATCH /v1/floorplans/{id}`; prefer setting `backgroundFile` or `foregroundFile` there instead. Requires the *Edit floorplans* permission.
281
281
  * Upload a floor plan image
282
282
  */
283
283
  updateImagesRaw(requestParameters, initOverrides) {
@@ -332,7 +332,7 @@ export class FloorPlansApi extends runtime.BaseAPI {
332
332
  });
333
333
  }
334
334
  /**
335
- * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Requires the *Edit floorplans* permission.
335
+ * Uploads an image file for the specified layer of a floor plan. Submit a `multipart/form-data` request with the file under the `file` key; the maximum file size is 4 MB. Accepted MIME types: `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml` (detected from file bytes). Omitting the file part deletes any existing image for that layer. Either way, the layer stops showing any account file set for it through `PATCH /v1/floorplans/{id}`; prefer setting `backgroundFile` or `foregroundFile` there instead. Requires the *Edit floorplans* permission.
336
336
  * Upload a floor plan image
337
337
  */
338
338
  updateImages(requestParameters, initOverrides) {
@@ -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
  }