@spaciv/sdk 0.1.4 → 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/AssistantChatPollBody.d.ts +6 -0
- package/dist/esm/models/AssistantChatPollBody.js +4 -0
- package/dist/esm/models/AssistantChatPollMessage.d.ts +6 -0
- package/dist/esm/models/AssistantChatPollMessage.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/AssistantChatPollBody.d.ts +6 -0
- package/dist/models/AssistantChatPollBody.js +4 -0
- package/dist/models/AssistantChatPollMessage.d.ts +6 -0
- package/dist/models/AssistantChatPollMessage.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/AssistantChatPollBody.ts +9 -0
- package/src/models/AssistantChatPollMessage.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/InternalApi.ts
CHANGED
|
@@ -22,6 +22,8 @@ import type {
|
|
|
22
22
|
ReconcileReport,
|
|
23
23
|
RepairFloorplansResBody,
|
|
24
24
|
RetriesResBody,
|
|
25
|
+
ScriptLimitOverrides,
|
|
26
|
+
ScriptLimitsResBody,
|
|
25
27
|
SysAdminUpdateFeatureGroupsParamsWrapperBody,
|
|
26
28
|
} from '../models/index';
|
|
27
29
|
import {
|
|
@@ -39,6 +41,10 @@ import {
|
|
|
39
41
|
RepairFloorplansResBodyToJSON,
|
|
40
42
|
RetriesResBodyFromJSON,
|
|
41
43
|
RetriesResBodyToJSON,
|
|
44
|
+
ScriptLimitOverridesFromJSON,
|
|
45
|
+
ScriptLimitOverridesToJSON,
|
|
46
|
+
ScriptLimitsResBodyFromJSON,
|
|
47
|
+
ScriptLimitsResBodyToJSON,
|
|
42
48
|
SysAdminUpdateFeatureGroupsParamsWrapperBodyFromJSON,
|
|
43
49
|
SysAdminUpdateFeatureGroupsParamsWrapperBodyToJSON,
|
|
44
50
|
} from '../models/index';
|
|
@@ -64,6 +70,15 @@ export interface InternalApiCreateTranslationsImportRequest {
|
|
|
64
70
|
i18nTranslationsImportParamsWrapperBody: I18nTranslationsImportParamsWrapperBody;
|
|
65
71
|
}
|
|
66
72
|
|
|
73
|
+
export interface InternalApiListAdminAccountsScriptLimitsRequest {
|
|
74
|
+
account: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface InternalApiUpdateAdminAccountsScriptLimitsRequest {
|
|
78
|
+
account: number;
|
|
79
|
+
scriptLimitOverrides: ScriptLimitOverrides;
|
|
80
|
+
}
|
|
81
|
+
|
|
67
82
|
/**
|
|
68
83
|
* InternalApi - interface
|
|
69
84
|
*
|
|
@@ -227,6 +242,22 @@ export interface InternalApiInterface {
|
|
|
227
242
|
*/
|
|
228
243
|
createTranslationsImport(requestParameters: InternalApiCreateTranslationsImportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
229
244
|
|
|
245
|
+
/**
|
|
246
|
+
* 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.
|
|
247
|
+
* @summary Get an account\'s script limits
|
|
248
|
+
* @param {number} account
|
|
249
|
+
* @param {*} [options] Override http request option.
|
|
250
|
+
* @throws {RequiredError}
|
|
251
|
+
* @memberof InternalApiInterface
|
|
252
|
+
*/
|
|
253
|
+
listAdminAccountsScriptLimitsRaw(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>>;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* 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.
|
|
257
|
+
* Get an account\'s script limits
|
|
258
|
+
*/
|
|
259
|
+
listAdminAccountsScriptLimits(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody>;
|
|
260
|
+
|
|
230
261
|
/**
|
|
231
262
|
* Dispatches events to regenerate any preset images and derived assets for the caller\'s account. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
232
263
|
* @summary Regenerate customer preset assets
|
|
@@ -242,6 +273,23 @@ export interface InternalApiInterface {
|
|
|
242
273
|
*/
|
|
243
274
|
listAdminRegeneratePresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
244
275
|
|
|
276
|
+
/**
|
|
277
|
+
* 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.
|
|
278
|
+
* @summary Set an account\'s script limits
|
|
279
|
+
* @param {number} account
|
|
280
|
+
* @param {ScriptLimitOverrides} scriptLimitOverrides
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
* @memberof InternalApiInterface
|
|
284
|
+
*/
|
|
285
|
+
updateAdminAccountsScriptLimitsRaw(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>>;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* 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.
|
|
289
|
+
* Set an account\'s script limits
|
|
290
|
+
*/
|
|
291
|
+
updateAdminAccountsScriptLimits(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody>;
|
|
292
|
+
|
|
245
293
|
}
|
|
246
294
|
|
|
247
295
|
/**
|
|
@@ -692,6 +740,53 @@ export class InternalApi extends runtime.BaseAPI implements InternalApiInterface
|
|
|
692
740
|
return await response.value();
|
|
693
741
|
}
|
|
694
742
|
|
|
743
|
+
/**
|
|
744
|
+
* 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.
|
|
745
|
+
* Get an account\'s script limits
|
|
746
|
+
*/
|
|
747
|
+
async listAdminAccountsScriptLimitsRaw(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>> {
|
|
748
|
+
if (requestParameters['account'] == null) {
|
|
749
|
+
throw new runtime.RequiredError(
|
|
750
|
+
'account',
|
|
751
|
+
'Required parameter "account" was null or undefined when calling listAdminAccountsScriptLimits().'
|
|
752
|
+
);
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
const queryParameters: any = {};
|
|
756
|
+
|
|
757
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
758
|
+
|
|
759
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
760
|
+
const token = this.configuration.accessToken;
|
|
761
|
+
const tokenString = await token("accessToken", []);
|
|
762
|
+
|
|
763
|
+
if (tokenString) {
|
|
764
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
let urlPath = `/v1/admin/accounts/{account}/script-limits`;
|
|
769
|
+
urlPath = urlPath.replace(`{${"account"}}`, encodeURIComponent(String(requestParameters['account'])));
|
|
770
|
+
|
|
771
|
+
const response = await this.request({
|
|
772
|
+
path: urlPath,
|
|
773
|
+
method: 'GET',
|
|
774
|
+
headers: headerParameters,
|
|
775
|
+
query: queryParameters,
|
|
776
|
+
}, initOverrides);
|
|
777
|
+
|
|
778
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScriptLimitsResBodyFromJSON(jsonValue));
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* 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.
|
|
783
|
+
* Get an account\'s script limits
|
|
784
|
+
*/
|
|
785
|
+
async listAdminAccountsScriptLimits(requestParameters: InternalApiListAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody> {
|
|
786
|
+
const response = await this.listAdminAccountsScriptLimitsRaw(requestParameters, initOverrides);
|
|
787
|
+
return await response.value();
|
|
788
|
+
}
|
|
789
|
+
|
|
695
790
|
/**
|
|
696
791
|
* Dispatches events to regenerate any preset images and derived assets for the caller\'s account. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
697
792
|
* Regenerate customer preset assets
|
|
@@ -730,4 +825,61 @@ export class InternalApi extends runtime.BaseAPI implements InternalApiInterface
|
|
|
730
825
|
await this.listAdminRegeneratePresetsRaw(initOverrides);
|
|
731
826
|
}
|
|
732
827
|
|
|
828
|
+
/**
|
|
829
|
+
* 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.
|
|
830
|
+
* Set an account\'s script limits
|
|
831
|
+
*/
|
|
832
|
+
async updateAdminAccountsScriptLimitsRaw(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScriptLimitsResBody>> {
|
|
833
|
+
if (requestParameters['account'] == null) {
|
|
834
|
+
throw new runtime.RequiredError(
|
|
835
|
+
'account',
|
|
836
|
+
'Required parameter "account" was null or undefined when calling updateAdminAccountsScriptLimits().'
|
|
837
|
+
);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
if (requestParameters['scriptLimitOverrides'] == null) {
|
|
841
|
+
throw new runtime.RequiredError(
|
|
842
|
+
'scriptLimitOverrides',
|
|
843
|
+
'Required parameter "scriptLimitOverrides" was null or undefined when calling updateAdminAccountsScriptLimits().'
|
|
844
|
+
);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
const queryParameters: any = {};
|
|
848
|
+
|
|
849
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
850
|
+
|
|
851
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
852
|
+
|
|
853
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
854
|
+
const token = this.configuration.accessToken;
|
|
855
|
+
const tokenString = await token("accessToken", []);
|
|
856
|
+
|
|
857
|
+
if (tokenString) {
|
|
858
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
let urlPath = `/v1/admin/accounts/{account}/script-limits`;
|
|
863
|
+
urlPath = urlPath.replace(`{${"account"}}`, encodeURIComponent(String(requestParameters['account'])));
|
|
864
|
+
|
|
865
|
+
const response = await this.request({
|
|
866
|
+
path: urlPath,
|
|
867
|
+
method: 'PUT',
|
|
868
|
+
headers: headerParameters,
|
|
869
|
+
query: queryParameters,
|
|
870
|
+
body: ScriptLimitOverridesToJSON(requestParameters['scriptLimitOverrides']),
|
|
871
|
+
}, initOverrides);
|
|
872
|
+
|
|
873
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScriptLimitsResBodyFromJSON(jsonValue));
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* 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.
|
|
878
|
+
* Set an account\'s script limits
|
|
879
|
+
*/
|
|
880
|
+
async updateAdminAccountsScriptLimits(requestParameters: InternalApiUpdateAdminAccountsScriptLimitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptLimitsResBody> {
|
|
881
|
+
const response = await this.updateAdminAccountsScriptLimitsRaw(requestParameters, initOverrides);
|
|
882
|
+
return await response.value();
|
|
883
|
+
}
|
|
884
|
+
|
|
733
885
|
}
|
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
|
|
|
@@ -53,6 +53,12 @@ export interface AssistantChatPollBody {
|
|
|
53
53
|
* @memberof AssistantChatPollBody
|
|
54
54
|
*/
|
|
55
55
|
failure?: AssistantConversationFailureBody;
|
|
56
|
+
/**
|
|
57
|
+
* Tool calls whose results, failed or not, were recorded after the since cursor, by the toolCallId of their action message. A call that succeeded has no message of its own, so this is how a client tells a finished action from one still running. A later poll can list a call again.
|
|
58
|
+
* @type {Array<string>}
|
|
59
|
+
* @memberof AssistantChatPollBody
|
|
60
|
+
*/
|
|
61
|
+
finishedToolCallIds: Array<string>;
|
|
56
62
|
/**
|
|
57
63
|
*
|
|
58
64
|
* @type {Array<AssistantChatPollMessage>}
|
|
@@ -72,6 +78,7 @@ export interface AssistantChatPollBody {
|
|
|
72
78
|
*/
|
|
73
79
|
export function instanceOfAssistantChatPollBody(value: object): value is AssistantChatPollBody {
|
|
74
80
|
if (!('actions' in value) || value['actions'] === undefined) return false;
|
|
81
|
+
if (!('finishedToolCallIds' in value) || value['finishedToolCallIds'] === undefined) return false;
|
|
75
82
|
if (!('messages' in value) || value['messages'] === undefined) return false;
|
|
76
83
|
if (!('status' in value) || value['status'] === undefined) return false;
|
|
77
84
|
return true;
|
|
@@ -89,6 +96,7 @@ export function AssistantChatPollBodyFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
89
96
|
|
|
90
97
|
'actions': ((json['actions'] as Array<any>).map(AssistantChatPollActionFromJSON)),
|
|
91
98
|
'failure': json['failure'] == null ? undefined : AssistantConversationFailureBodyFromJSON(json['failure']),
|
|
99
|
+
'finishedToolCallIds': json['finishedToolCallIds'],
|
|
92
100
|
'messages': ((json['messages'] as Array<any>).map(AssistantChatPollMessageFromJSON)),
|
|
93
101
|
'status': json['status'],
|
|
94
102
|
};
|
|
@@ -107,6 +115,7 @@ export function AssistantChatPollBodyToJSONTyped(value?: AssistantChatPollBody |
|
|
|
107
115
|
|
|
108
116
|
'actions': ((value['actions'] as Array<any>).map(AssistantChatPollActionToJSON)),
|
|
109
117
|
'failure': AssistantConversationFailureBodyToJSON(value['failure']),
|
|
118
|
+
'finishedToolCallIds': value['finishedToolCallIds'],
|
|
110
119
|
'messages': ((value['messages'] as Array<any>).map(AssistantChatPollMessageToJSON)),
|
|
111
120
|
'status': value['status'],
|
|
112
121
|
};
|
|
@@ -75,6 +75,12 @@ export interface AssistantChatPollMessage {
|
|
|
75
75
|
* @memberof AssistantChatPollMessage
|
|
76
76
|
*/
|
|
77
77
|
text: string;
|
|
78
|
+
/**
|
|
79
|
+
* Id of the tool call an action message (kind 2) stands for. Empty on every other message.
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof AssistantChatPollMessage
|
|
82
|
+
*/
|
|
83
|
+
toolCallId: string;
|
|
78
84
|
}
|
|
79
85
|
|
|
80
86
|
/**
|
|
@@ -89,6 +95,7 @@ export function instanceOfAssistantChatPollMessage(value: object): value is Assi
|
|
|
89
95
|
if (!('requestId' in value) || value['requestId'] === undefined) return false;
|
|
90
96
|
if (!('role' in value) || value['role'] === undefined) return false;
|
|
91
97
|
if (!('text' in value) || value['text'] === undefined) return false;
|
|
98
|
+
if (!('toolCallId' in value) || value['toolCallId'] === undefined) return false;
|
|
92
99
|
return true;
|
|
93
100
|
}
|
|
94
101
|
|
|
@@ -110,6 +117,7 @@ export function AssistantChatPollMessageFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
110
117
|
'requestId': json['requestId'],
|
|
111
118
|
'role': json['role'],
|
|
112
119
|
'text': json['text'],
|
|
120
|
+
'toolCallId': json['toolCallId'],
|
|
113
121
|
};
|
|
114
122
|
}
|
|
115
123
|
|
|
@@ -132,6 +140,7 @@ export function AssistantChatPollMessageToJSONTyped(value?: AssistantChatPollMes
|
|
|
132
140
|
'requestId': value['requestId'],
|
|
133
141
|
'role': value['role'],
|
|
134
142
|
'text': value['text'],
|
|
143
|
+
'toolCallId': value['toolCallId'],
|
|
135
144
|
};
|
|
136
145
|
}
|
|
137
146
|
|
|
@@ -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
|
+
|