@spaciv/sdk 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/dist/apis/AccountsApi.d.ts +4 -4
- package/dist/apis/AccountsApi.js +2 -2
- package/dist/apis/InternalApi.d.ts +57 -1
- package/dist/apis/InternalApi.js +83 -0
- package/dist/apis/ScriptsApi.d.ts +32 -9
- package/dist/apis/ScriptsApi.js +39 -4
- package/dist/esm/apis/AccountsApi.d.ts +4 -4
- package/dist/esm/apis/AccountsApi.js +2 -2
- package/dist/esm/apis/InternalApi.d.ts +57 -1
- package/dist/esm/apis/InternalApi.js +84 -1
- package/dist/esm/apis/ScriptsApi.d.ts +32 -9
- package/dist/esm/apis/ScriptsApi.js +40 -5
- package/dist/esm/models/AccountCalculationUsageDay.d.ts +6 -0
- package/dist/esm/models/AccountCalculationUsageDay.js +4 -0
- package/dist/esm/models/ScriptLimitOverrides.d.ts +62 -0
- package/dist/esm/models/ScriptLimitOverrides.js +51 -0
- package/dist/esm/models/ScriptLimitValues.d.ts +62 -0
- package/dist/esm/models/ScriptLimitValues.js +63 -0
- package/dist/esm/models/ScriptLimits.d.ts +62 -0
- package/dist/esm/models/ScriptLimits.js +63 -0
- package/dist/esm/models/ScriptLimitsResBody.d.ts +46 -0
- package/dist/esm/models/ScriptLimitsResBody.js +53 -0
- package/dist/esm/models/ScriptUsage.d.ts +50 -0
- package/dist/esm/models/ScriptUsage.js +55 -0
- package/dist/esm/models/ScriptUsageResBody.d.ts +103 -0
- package/dist/esm/models/ScriptUsageResBody.js +93 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -0
- package/dist/models/AccountCalculationUsageDay.d.ts +6 -0
- package/dist/models/AccountCalculationUsageDay.js +4 -0
- package/dist/models/ScriptLimitOverrides.d.ts +62 -0
- package/dist/models/ScriptLimitOverrides.js +58 -0
- package/dist/models/ScriptLimitValues.d.ts +62 -0
- package/dist/models/ScriptLimitValues.js +70 -0
- package/dist/models/ScriptLimits.d.ts +62 -0
- package/dist/models/ScriptLimits.js +70 -0
- package/dist/models/ScriptLimitsResBody.d.ts +46 -0
- package/dist/models/ScriptLimitsResBody.js +60 -0
- package/dist/models/ScriptUsage.d.ts +50 -0
- package/dist/models/ScriptUsage.js +62 -0
- package/dist/models/ScriptUsageResBody.d.ts +103 -0
- package/dist/models/ScriptUsageResBody.js +101 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +4 -4
- package/src/apis/InternalApi.ts +152 -0
- package/src/apis/ScriptsApi.ts +65 -8
- package/src/models/AccountCalculationUsageDay.ts +9 -0
- package/src/models/ScriptLimitOverrides.ts +105 -0
- package/src/models/ScriptLimitValues.ts +111 -0
- package/src/models/ScriptLimits.ts +111 -0
- package/src/models/ScriptLimitsResBody.ts +99 -0
- package/src/models/ScriptUsage.ts +93 -0
- package/src/models/ScriptUsageResBody.ts +183 -0
- package/src/models/index.ts +6 -0
package/src/apis/ScriptsApi.ts
CHANGED
|
@@ -28,6 +28,7 @@ import type {
|
|
|
28
28
|
ScriptSchedulePreviewResBody,
|
|
29
29
|
ScriptSecretsReqBody,
|
|
30
30
|
ScriptSecretsResBody,
|
|
31
|
+
ScriptUsageResBody,
|
|
31
32
|
ScriptWebhookResBody,
|
|
32
33
|
} from '../models/index';
|
|
33
34
|
import {
|
|
@@ -57,6 +58,8 @@ import {
|
|
|
57
58
|
ScriptSecretsReqBodyToJSON,
|
|
58
59
|
ScriptSecretsResBodyFromJSON,
|
|
59
60
|
ScriptSecretsResBodyToJSON,
|
|
61
|
+
ScriptUsageResBodyFromJSON,
|
|
62
|
+
ScriptUsageResBodyToJSON,
|
|
60
63
|
ScriptWebhookResBodyFromJSON,
|
|
61
64
|
ScriptWebhookResBodyToJSON,
|
|
62
65
|
} from '../models/index';
|
|
@@ -120,7 +123,7 @@ export interface ScriptsApiUpdateSecretsRequest {
|
|
|
120
123
|
*/
|
|
121
124
|
export interface ScriptsApiInterface {
|
|
122
125
|
/**
|
|
123
|
-
* 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.
|
|
126
|
+
* 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.
|
|
124
127
|
* @summary Create a script
|
|
125
128
|
* @param {ScriptPostReqBody} scriptPostReqBody
|
|
126
129
|
* @param {*} [options] Override http request option.
|
|
@@ -130,7 +133,7 @@ export interface ScriptsApiInterface {
|
|
|
130
133
|
createRaw(requestParameters: ScriptsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptDetail>>;
|
|
131
134
|
|
|
132
135
|
/**
|
|
133
|
-
* 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.
|
|
136
|
+
* 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.
|
|
134
137
|
* Create a script
|
|
135
138
|
*/
|
|
136
139
|
create(requestParameters: ScriptsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptDetail>;
|
|
@@ -248,6 +251,21 @@ export interface ScriptsApiInterface {
|
|
|
248
251
|
*/
|
|
249
252
|
getExport(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptExportResBody>;
|
|
250
253
|
|
|
254
|
+
/**
|
|
255
|
+
* 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.
|
|
256
|
+
* @summary Get script usage
|
|
257
|
+
* @param {*} [options] Override http request option.
|
|
258
|
+
* @throws {RequiredError}
|
|
259
|
+
* @memberof ScriptsApiInterface
|
|
260
|
+
*/
|
|
261
|
+
getUsageRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptUsageResBody>>;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* 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.
|
|
265
|
+
* Get script usage
|
|
266
|
+
*/
|
|
267
|
+
getUsage(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptUsageResBody>;
|
|
268
|
+
|
|
251
269
|
/**
|
|
252
270
|
* Lists the account\'s scripts, sorted by name, without their source code. Requires the *Manage my account* permission.
|
|
253
271
|
* @summary List scripts
|
|
@@ -299,7 +317,7 @@ export interface ScriptsApiInterface {
|
|
|
299
317
|
listRunsLogs(requestParameters: ScriptsApiListRunsLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptRunLogsResBody>;
|
|
300
318
|
|
|
301
319
|
/**
|
|
302
|
-
* 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,
|
|
320
|
+
* 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.
|
|
303
321
|
* @summary Update a script
|
|
304
322
|
* @param {string} id
|
|
305
323
|
* @param {ScriptPatchReqBody} scriptPatchReqBody
|
|
@@ -310,7 +328,7 @@ export interface ScriptsApiInterface {
|
|
|
310
328
|
updateRaw(requestParameters: ScriptsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptDetail>>;
|
|
311
329
|
|
|
312
330
|
/**
|
|
313
|
-
* 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,
|
|
331
|
+
* 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.
|
|
314
332
|
* Update a script
|
|
315
333
|
*/
|
|
316
334
|
update(requestParameters: ScriptsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptDetail>;
|
|
@@ -340,7 +358,7 @@ export interface ScriptsApiInterface {
|
|
|
340
358
|
export class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInterface {
|
|
341
359
|
|
|
342
360
|
/**
|
|
343
|
-
* 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.
|
|
361
|
+
* 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.
|
|
344
362
|
* Create a script
|
|
345
363
|
*/
|
|
346
364
|
async createRaw(requestParameters: ScriptsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptDetail>> {
|
|
@@ -380,7 +398,7 @@ export class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInterface {
|
|
|
380
398
|
}
|
|
381
399
|
|
|
382
400
|
/**
|
|
383
|
-
* 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.
|
|
401
|
+
* 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.
|
|
384
402
|
* Create a script
|
|
385
403
|
*/
|
|
386
404
|
async create(requestParameters: ScriptsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptDetail> {
|
|
@@ -718,6 +736,45 @@ export class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInterface {
|
|
|
718
736
|
return await response.value();
|
|
719
737
|
}
|
|
720
738
|
|
|
739
|
+
/**
|
|
740
|
+
* 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.
|
|
741
|
+
* Get script usage
|
|
742
|
+
*/
|
|
743
|
+
async getUsageRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptUsageResBody>> {
|
|
744
|
+
const queryParameters: any = {};
|
|
745
|
+
|
|
746
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
747
|
+
|
|
748
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
749
|
+
const token = this.configuration.accessToken;
|
|
750
|
+
const tokenString = await token("accessToken", []);
|
|
751
|
+
|
|
752
|
+
if (tokenString) {
|
|
753
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
let urlPath = `/v1/scripts/usage`;
|
|
758
|
+
|
|
759
|
+
const response = await this.request({
|
|
760
|
+
path: urlPath,
|
|
761
|
+
method: 'GET',
|
|
762
|
+
headers: headerParameters,
|
|
763
|
+
query: queryParameters,
|
|
764
|
+
}, initOverrides);
|
|
765
|
+
|
|
766
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScriptUsageResBodyFromJSON(jsonValue));
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* 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.
|
|
771
|
+
* Get script usage
|
|
772
|
+
*/
|
|
773
|
+
async getUsage(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptUsageResBody> {
|
|
774
|
+
const response = await this.getUsageRaw(initOverrides);
|
|
775
|
+
return await response.value();
|
|
776
|
+
}
|
|
777
|
+
|
|
721
778
|
/**
|
|
722
779
|
* Lists the account\'s scripts, sorted by name, without their source code. Requires the *Manage my account* permission.
|
|
723
780
|
* List scripts
|
|
@@ -868,7 +925,7 @@ export class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInterface {
|
|
|
868
925
|
}
|
|
869
926
|
|
|
870
927
|
/**
|
|
871
|
-
* 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,
|
|
928
|
+
* 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.
|
|
872
929
|
* Update a script
|
|
873
930
|
*/
|
|
874
931
|
async updateRaw(requestParameters: ScriptsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptDetail>> {
|
|
@@ -916,7 +973,7 @@ export class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInterface {
|
|
|
916
973
|
}
|
|
917
974
|
|
|
918
975
|
/**
|
|
919
|
-
* 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,
|
|
976
|
+
* 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.
|
|
920
977
|
* Update a script
|
|
921
978
|
*/
|
|
922
979
|
async update(requestParameters: ScriptsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptDetail> {
|
|
@@ -43,6 +43,12 @@ export interface AccountCalculationUsageDay {
|
|
|
43
43
|
* @memberof AccountCalculationUsageDay
|
|
44
44
|
*/
|
|
45
45
|
date: Date;
|
|
46
|
+
/**
|
|
47
|
+
* Credits used running scripts: one per started minute of each run.
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof AccountCalculationUsageDay
|
|
50
|
+
*/
|
|
51
|
+
scripts: number;
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
/**
|
|
@@ -53,6 +59,7 @@ export function instanceOfAccountCalculationUsageDay(value: object): value is Ac
|
|
|
53
59
|
if (!('ai' in value) || value['ai'] === undefined) return false;
|
|
54
60
|
if (!('build' in value) || value['build'] === undefined) return false;
|
|
55
61
|
if (!('date' in value) || value['date'] === undefined) return false;
|
|
62
|
+
if (!('scripts' in value) || value['scripts'] === undefined) return false;
|
|
56
63
|
return true;
|
|
57
64
|
}
|
|
58
65
|
|
|
@@ -70,6 +77,7 @@ export function AccountCalculationUsageDayFromJSONTyped(json: any, ignoreDiscrim
|
|
|
70
77
|
'ai': json['ai'],
|
|
71
78
|
'build': json['build'],
|
|
72
79
|
'date': (new Date(json['date'])),
|
|
80
|
+
'scripts': json['scripts'],
|
|
73
81
|
};
|
|
74
82
|
}
|
|
75
83
|
|
|
@@ -88,6 +96,7 @@ export function AccountCalculationUsageDayToJSONTyped(value?: AccountCalculation
|
|
|
88
96
|
'ai': value['ai'],
|
|
89
97
|
'build': value['build'],
|
|
90
98
|
'date': ((value['date']).toISOString().substring(0,10)),
|
|
99
|
+
'scripts': value['scripts'],
|
|
91
100
|
};
|
|
92
101
|
}
|
|
93
102
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ScriptLimitOverrides
|
|
20
|
+
*/
|
|
21
|
+
export interface ScriptLimitOverrides {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ScriptLimitOverrides
|
|
26
|
+
*/
|
|
27
|
+
maxConcurrentRuns?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ScriptLimitOverrides
|
|
32
|
+
*/
|
|
33
|
+
maxCreditsPerMonth?: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ScriptLimitOverrides
|
|
38
|
+
*/
|
|
39
|
+
maxEnabledScripts?: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ScriptLimitOverrides
|
|
44
|
+
*/
|
|
45
|
+
maxRunSeconds?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ScriptLimitOverrides
|
|
50
|
+
*/
|
|
51
|
+
minCronIntervalSeconds?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof ScriptLimitOverrides
|
|
56
|
+
*/
|
|
57
|
+
webhookRequestsPerMinute?: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the ScriptLimitOverrides interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfScriptLimitOverrides(value: object): value is ScriptLimitOverrides {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function ScriptLimitOverridesFromJSON(json: any): ScriptLimitOverrides {
|
|
68
|
+
return ScriptLimitOverridesFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function ScriptLimitOverridesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimitOverrides {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'maxConcurrentRuns': json['maxConcurrentRuns'] == null ? undefined : json['maxConcurrentRuns'],
|
|
78
|
+
'maxCreditsPerMonth': json['maxCreditsPerMonth'] == null ? undefined : json['maxCreditsPerMonth'],
|
|
79
|
+
'maxEnabledScripts': json['maxEnabledScripts'] == null ? undefined : json['maxEnabledScripts'],
|
|
80
|
+
'maxRunSeconds': json['maxRunSeconds'] == null ? undefined : json['maxRunSeconds'],
|
|
81
|
+
'minCronIntervalSeconds': json['minCronIntervalSeconds'] == null ? undefined : json['minCronIntervalSeconds'],
|
|
82
|
+
'webhookRequestsPerMinute': json['webhookRequestsPerMinute'] == null ? undefined : json['webhookRequestsPerMinute'],
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function ScriptLimitOverridesToJSON(json: any): ScriptLimitOverrides {
|
|
87
|
+
return ScriptLimitOverridesToJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function ScriptLimitOverridesToJSONTyped(value?: ScriptLimitOverrides | null, ignoreDiscriminator: boolean = false): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'maxConcurrentRuns': value['maxConcurrentRuns'],
|
|
98
|
+
'maxCreditsPerMonth': value['maxCreditsPerMonth'],
|
|
99
|
+
'maxEnabledScripts': value['maxEnabledScripts'],
|
|
100
|
+
'maxRunSeconds': value['maxRunSeconds'],
|
|
101
|
+
'minCronIntervalSeconds': value['minCronIntervalSeconds'],
|
|
102
|
+
'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ScriptLimitValues
|
|
20
|
+
*/
|
|
21
|
+
export interface ScriptLimitValues {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ScriptLimitValues
|
|
26
|
+
*/
|
|
27
|
+
maxConcurrentRuns: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ScriptLimitValues
|
|
32
|
+
*/
|
|
33
|
+
maxCreditsPerMonth: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ScriptLimitValues
|
|
38
|
+
*/
|
|
39
|
+
maxEnabledScripts: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ScriptLimitValues
|
|
44
|
+
*/
|
|
45
|
+
maxRunSeconds: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ScriptLimitValues
|
|
50
|
+
*/
|
|
51
|
+
minCronIntervalSeconds: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof ScriptLimitValues
|
|
56
|
+
*/
|
|
57
|
+
webhookRequestsPerMinute: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the ScriptLimitValues interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfScriptLimitValues(value: object): value is ScriptLimitValues {
|
|
64
|
+
if (!('maxConcurrentRuns' in value) || value['maxConcurrentRuns'] === undefined) return false;
|
|
65
|
+
if (!('maxCreditsPerMonth' in value) || value['maxCreditsPerMonth'] === undefined) return false;
|
|
66
|
+
if (!('maxEnabledScripts' in value) || value['maxEnabledScripts'] === undefined) return false;
|
|
67
|
+
if (!('maxRunSeconds' in value) || value['maxRunSeconds'] === undefined) return false;
|
|
68
|
+
if (!('minCronIntervalSeconds' in value) || value['minCronIntervalSeconds'] === undefined) return false;
|
|
69
|
+
if (!('webhookRequestsPerMinute' in value) || value['webhookRequestsPerMinute'] === undefined) return false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function ScriptLimitValuesFromJSON(json: any): ScriptLimitValues {
|
|
74
|
+
return ScriptLimitValuesFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ScriptLimitValuesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimitValues {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'maxConcurrentRuns': json['maxConcurrentRuns'],
|
|
84
|
+
'maxCreditsPerMonth': json['maxCreditsPerMonth'],
|
|
85
|
+
'maxEnabledScripts': json['maxEnabledScripts'],
|
|
86
|
+
'maxRunSeconds': json['maxRunSeconds'],
|
|
87
|
+
'minCronIntervalSeconds': json['minCronIntervalSeconds'],
|
|
88
|
+
'webhookRequestsPerMinute': json['webhookRequestsPerMinute'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function ScriptLimitValuesToJSON(json: any): ScriptLimitValues {
|
|
93
|
+
return ScriptLimitValuesToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function ScriptLimitValuesToJSONTyped(value?: ScriptLimitValues | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'maxConcurrentRuns': value['maxConcurrentRuns'],
|
|
104
|
+
'maxCreditsPerMonth': value['maxCreditsPerMonth'],
|
|
105
|
+
'maxEnabledScripts': value['maxEnabledScripts'],
|
|
106
|
+
'maxRunSeconds': value['maxRunSeconds'],
|
|
107
|
+
'minCronIntervalSeconds': value['minCronIntervalSeconds'],
|
|
108
|
+
'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ScriptLimits
|
|
20
|
+
*/
|
|
21
|
+
export interface ScriptLimits {
|
|
22
|
+
/**
|
|
23
|
+
* Runs the account may have in progress at once.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ScriptLimits
|
|
26
|
+
*/
|
|
27
|
+
maxConcurrentRuns: number;
|
|
28
|
+
/**
|
|
29
|
+
* Credits the account's script runs may be charged in a calendar month (UTC). Once they are used, further runs are recorded as quota_exceeded and do not start.
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ScriptLimits
|
|
32
|
+
*/
|
|
33
|
+
maxCreditsPerMonth: number;
|
|
34
|
+
/**
|
|
35
|
+
* Scripts the account may have enabled at once.
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof ScriptLimits
|
|
38
|
+
*/
|
|
39
|
+
maxEnabledScripts: number;
|
|
40
|
+
/**
|
|
41
|
+
* Longest a single run may take; a script's own timeout is capped to it.
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ScriptLimits
|
|
44
|
+
*/
|
|
45
|
+
maxRunSeconds: number;
|
|
46
|
+
/**
|
|
47
|
+
* Shortest time allowed between two scheduled runs of a script.
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ScriptLimits
|
|
50
|
+
*/
|
|
51
|
+
minCronIntervalSeconds: number;
|
|
52
|
+
/**
|
|
53
|
+
* Webhook calls each script accepts per minute, and at most in a burst.
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof ScriptLimits
|
|
56
|
+
*/
|
|
57
|
+
webhookRequestsPerMinute: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the ScriptLimits interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfScriptLimits(value: object): value is ScriptLimits {
|
|
64
|
+
if (!('maxConcurrentRuns' in value) || value['maxConcurrentRuns'] === undefined) return false;
|
|
65
|
+
if (!('maxCreditsPerMonth' in value) || value['maxCreditsPerMonth'] === undefined) return false;
|
|
66
|
+
if (!('maxEnabledScripts' in value) || value['maxEnabledScripts'] === undefined) return false;
|
|
67
|
+
if (!('maxRunSeconds' in value) || value['maxRunSeconds'] === undefined) return false;
|
|
68
|
+
if (!('minCronIntervalSeconds' in value) || value['minCronIntervalSeconds'] === undefined) return false;
|
|
69
|
+
if (!('webhookRequestsPerMinute' in value) || value['webhookRequestsPerMinute'] === undefined) return false;
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function ScriptLimitsFromJSON(json: any): ScriptLimits {
|
|
74
|
+
return ScriptLimitsFromJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function ScriptLimitsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimits {
|
|
78
|
+
if (json == null) {
|
|
79
|
+
return json;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
|
|
83
|
+
'maxConcurrentRuns': json['maxConcurrentRuns'],
|
|
84
|
+
'maxCreditsPerMonth': json['maxCreditsPerMonth'],
|
|
85
|
+
'maxEnabledScripts': json['maxEnabledScripts'],
|
|
86
|
+
'maxRunSeconds': json['maxRunSeconds'],
|
|
87
|
+
'minCronIntervalSeconds': json['minCronIntervalSeconds'],
|
|
88
|
+
'webhookRequestsPerMinute': json['webhookRequestsPerMinute'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function ScriptLimitsToJSON(json: any): ScriptLimits {
|
|
93
|
+
return ScriptLimitsToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function ScriptLimitsToJSONTyped(value?: ScriptLimits | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'maxConcurrentRuns': value['maxConcurrentRuns'],
|
|
104
|
+
'maxCreditsPerMonth': value['maxCreditsPerMonth'],
|
|
105
|
+
'maxEnabledScripts': value['maxEnabledScripts'],
|
|
106
|
+
'maxRunSeconds': value['maxRunSeconds'],
|
|
107
|
+
'minCronIntervalSeconds': value['minCronIntervalSeconds'],
|
|
108
|
+
'webhookRequestsPerMinute': value['webhookRequestsPerMinute'],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ScriptLimitValues } from './ScriptLimitValues';
|
|
17
|
+
import {
|
|
18
|
+
ScriptLimitValuesFromJSON,
|
|
19
|
+
ScriptLimitValuesFromJSONTyped,
|
|
20
|
+
ScriptLimitValuesToJSON,
|
|
21
|
+
ScriptLimitValuesToJSONTyped,
|
|
22
|
+
} from './ScriptLimitValues';
|
|
23
|
+
import type { ScriptLimitOverrides } from './ScriptLimitOverrides';
|
|
24
|
+
import {
|
|
25
|
+
ScriptLimitOverridesFromJSON,
|
|
26
|
+
ScriptLimitOverridesFromJSONTyped,
|
|
27
|
+
ScriptLimitOverridesToJSON,
|
|
28
|
+
ScriptLimitOverridesToJSONTyped,
|
|
29
|
+
} from './ScriptLimitOverrides';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface ScriptLimitsResBody
|
|
35
|
+
*/
|
|
36
|
+
export interface ScriptLimitsResBody {
|
|
37
|
+
/**
|
|
38
|
+
* The code defaults for scripts.
|
|
39
|
+
* @type {ScriptLimitValues}
|
|
40
|
+
* @memberof ScriptLimitsResBody
|
|
41
|
+
*/
|
|
42
|
+
defaults: ScriptLimitValues;
|
|
43
|
+
/**
|
|
44
|
+
* The limits that apply to the account.
|
|
45
|
+
* @type {ScriptLimitValues}
|
|
46
|
+
* @memberof ScriptLimitsResBody
|
|
47
|
+
*/
|
|
48
|
+
effective: ScriptLimitValues;
|
|
49
|
+
/**
|
|
50
|
+
* This account's overrides; an absent field uses the default.
|
|
51
|
+
* @type {ScriptLimitOverrides}
|
|
52
|
+
* @memberof ScriptLimitsResBody
|
|
53
|
+
*/
|
|
54
|
+
overrides: ScriptLimitOverrides;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the ScriptLimitsResBody interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfScriptLimitsResBody(value: object): value is ScriptLimitsResBody {
|
|
61
|
+
if (!('defaults' in value) || value['defaults'] === undefined) return false;
|
|
62
|
+
if (!('effective' in value) || value['effective'] === undefined) return false;
|
|
63
|
+
if (!('overrides' in value) || value['overrides'] === undefined) return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function ScriptLimitsResBodyFromJSON(json: any): ScriptLimitsResBody {
|
|
68
|
+
return ScriptLimitsResBodyFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function ScriptLimitsResBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScriptLimitsResBody {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'defaults': ScriptLimitValuesFromJSON(json['defaults']),
|
|
78
|
+
'effective': ScriptLimitValuesFromJSON(json['effective']),
|
|
79
|
+
'overrides': ScriptLimitOverridesFromJSON(json['overrides']),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function ScriptLimitsResBodyToJSON(json: any): ScriptLimitsResBody {
|
|
84
|
+
return ScriptLimitsResBodyToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function ScriptLimitsResBodyToJSONTyped(value?: ScriptLimitsResBody | null, ignoreDiscriminator: boolean = false): any {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'defaults': ScriptLimitValuesToJSON(value['defaults']),
|
|
95
|
+
'effective': ScriptLimitValuesToJSON(value['effective']),
|
|
96
|
+
'overrides': ScriptLimitOverridesToJSON(value['overrides']),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|