@spaciv/sdk 0.1.20 → 0.1.22
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 +27 -1
- package/README.md +2 -2
- package/dist/apis/LogicLayersApi.d.ts +279 -0
- package/dist/apis/{SpaceRulesetsApi.js → LogicLayersApi.js} +72 -62
- package/dist/apis/ObjectGroupsApi.d.ts +28 -1
- package/dist/apis/ObjectGroupsApi.js +40 -0
- package/dist/apis/PropertiesApi.d.ts +16 -16
- package/dist/apis/PropertiesApi.js +8 -8
- package/dist/apis/ScenariosApi.d.ts +4 -4
- package/dist/apis/ScenariosApi.js +2 -2
- package/dist/apis/ScriptsApi.d.ts +57 -1
- package/dist/apis/ScriptsApi.js +82 -0
- package/dist/apis/TopDownModelsApi.d.ts +4 -4
- package/dist/apis/TopDownModelsApi.js +2 -2
- package/dist/apis/VariablesApi.d.ts +4 -4
- package/dist/apis/VariablesApi.js +2 -2
- package/dist/apis/index.d.ts +1 -1
- package/dist/apis/index.js +1 -1
- package/dist/esm/apis/LogicLayersApi.d.ts +279 -0
- package/dist/esm/apis/{SpaceRulesetsApi.js → LogicLayersApi.js} +70 -60
- package/dist/esm/apis/ObjectGroupsApi.d.ts +28 -1
- package/dist/esm/apis/ObjectGroupsApi.js +41 -1
- package/dist/esm/apis/PropertiesApi.d.ts +16 -16
- package/dist/esm/apis/PropertiesApi.js +8 -8
- package/dist/esm/apis/ScenariosApi.d.ts +4 -4
- package/dist/esm/apis/ScenariosApi.js +2 -2
- package/dist/esm/apis/ScriptsApi.d.ts +57 -1
- package/dist/esm/apis/ScriptsApi.js +83 -1
- package/dist/esm/apis/TopDownModelsApi.d.ts +4 -4
- package/dist/esm/apis/TopDownModelsApi.js +2 -2
- package/dist/esm/apis/VariablesApi.d.ts +4 -4
- package/dist/esm/apis/VariablesApi.js +2 -2
- package/dist/esm/apis/index.d.ts +1 -1
- package/dist/esm/apis/index.js +1 -1
- package/dist/esm/models/CalcCompare.d.ts +45 -0
- package/dist/esm/models/CalcCompare.js +52 -0
- package/dist/esm/models/CalcCondition.d.ts +46 -0
- package/dist/esm/models/CalcCondition.js +53 -0
- package/dist/esm/models/CalcHasNode.d.ts +44 -0
- package/dist/esm/models/CalcHasNode.js +51 -0
- package/dist/esm/models/CalcIsObject.d.ts +32 -0
- package/dist/esm/models/CalcIsObject.js +43 -0
- package/dist/esm/models/CalcRuleRef.d.ts +2 -1
- package/dist/esm/models/CalcRuleRef.js +7 -0
- package/dist/esm/models/CalcRuleRefOneOf2.d.ts +3 -2
- package/dist/esm/models/CalcRuleRefOneOf2.js +4 -3
- package/dist/esm/models/CalcRuleRefOneOf3.d.ts +2 -3
- package/dist/esm/models/CalcRuleRefOneOf3.js +3 -4
- package/dist/esm/models/CalcRuleRefOneOf4.d.ts +3 -3
- package/dist/esm/models/CalcRuleRefOneOf4.js +4 -4
- package/dist/esm/models/CalcRuleRefOneOf5.d.ts +3 -2
- package/dist/esm/models/CalcRuleRefOneOf5.js +4 -3
- package/dist/esm/models/CalcRuleRefOneOf6.d.ts +32 -0
- package/dist/esm/models/CalcRuleRefOneOf6.js +43 -0
- package/dist/esm/models/CalcTest.d.ts +24 -0
- package/dist/esm/models/CalcTest.js +58 -0
- package/dist/esm/models/CalcTestOneOf.d.ts +33 -0
- package/dist/esm/models/CalcTestOneOf.js +44 -0
- package/dist/esm/models/CalcTestOneOf1.d.ts +33 -0
- package/dist/esm/models/CalcTestOneOf1.js +44 -0
- package/dist/esm/models/CalcTestOneOf2.d.ts +33 -0
- package/dist/esm/models/CalcTestOneOf2.js +44 -0
- package/dist/esm/models/Group.d.ts +45 -0
- package/dist/esm/models/Group.js +52 -0
- package/dist/esm/models/LayerVariablesRes.d.ts +1 -1
- package/dist/esm/models/LogicAssignment.d.ts +23 -0
- package/dist/esm/models/LogicAssignment.js +51 -0
- package/dist/esm/models/LogicAssignmentOneOf.d.ts +32 -0
- package/dist/esm/models/LogicAssignmentOneOf.js +43 -0
- package/dist/esm/models/LogicAssignmentOneOf1.d.ts +32 -0
- package/dist/esm/models/LogicAssignmentOneOf1.js +43 -0
- package/dist/esm/models/LogicDemand.d.ts +40 -0
- package/dist/esm/models/LogicDemand.js +49 -0
- package/dist/esm/models/LogicLayerConfig.d.ts +39 -0
- package/dist/esm/models/LogicLayerConfig.js +48 -0
- package/dist/esm/models/LogicPer.d.ts +45 -0
- package/dist/esm/models/LogicPer.js +52 -0
- package/dist/esm/models/LogicRule.d.ts +66 -0
- package/dist/esm/models/LogicRule.js +67 -0
- package/dist/esm/models/LogicSupply.d.ts +48 -0
- package/dist/esm/models/LogicSupply.js +54 -0
- package/dist/esm/models/LogicSupplyWeight.d.ts +32 -0
- package/dist/esm/models/LogicSupplyWeight.js +43 -0
- package/dist/esm/models/MaybeVarInt.d.ts +2 -2
- package/dist/esm/models/MaybeVarInt.js +5 -5
- package/dist/esm/models/MaybeVarProp.d.ts +2 -2
- package/dist/esm/models/MaybeVarProp.js +5 -5
- package/dist/esm/models/MaybeVarStr.d.ts +2 -2
- package/dist/esm/models/MaybeVarStr.js +5 -5
- package/dist/esm/models/ModelObject.d.ts +38 -0
- package/dist/esm/models/ModelObject.js +47 -0
- package/dist/esm/models/ObjectGroupListEntry.d.ts +0 -6
- package/dist/esm/models/ObjectGroupListEntry.js +0 -4
- package/dist/esm/models/ScratchpadOutput.d.ts +69 -0
- package/dist/esm/models/ScratchpadOutput.js +64 -0
- package/dist/esm/models/ScratchpadOutputFile.d.ts +44 -0
- package/dist/esm/models/ScratchpadOutputFile.js +49 -0
- package/dist/esm/models/ScratchpadRun.d.ts +127 -0
- package/dist/esm/models/ScratchpadRun.js +91 -0
- package/dist/esm/models/ScratchpadRunPostReqBody.d.ts +58 -0
- package/dist/esm/models/ScratchpadRunPostReqBody.js +53 -0
- package/dist/esm/models/SelectObjectsParamsWrapperBody.d.ts +33 -0
- package/dist/esm/models/SelectObjectsParamsWrapperBody.js +44 -0
- package/dist/esm/models/Selection.d.ts +39 -0
- package/dist/esm/models/Selection.js +48 -0
- package/dist/esm/models/SpaceRuleSetJSON.d.ts +3 -2
- package/dist/esm/models/SpaceRuleSetJSON.js +3 -2
- package/dist/esm/models/SpaceRulesetCreate.d.ts +1 -1
- package/dist/esm/models/index.d.ts +26 -0
- package/dist/esm/models/index.js +26 -0
- package/dist/models/CalcCompare.d.ts +45 -0
- package/dist/models/CalcCompare.js +59 -0
- package/dist/models/CalcCondition.d.ts +46 -0
- package/dist/models/CalcCondition.js +60 -0
- package/dist/models/CalcHasNode.d.ts +44 -0
- package/dist/models/CalcHasNode.js +58 -0
- package/dist/models/CalcIsObject.d.ts +32 -0
- package/dist/models/CalcIsObject.js +50 -0
- package/dist/models/CalcRuleRef.d.ts +2 -1
- package/dist/models/CalcRuleRef.js +7 -0
- package/dist/models/CalcRuleRefOneOf2.d.ts +3 -2
- package/dist/models/CalcRuleRefOneOf2.js +4 -3
- package/dist/models/CalcRuleRefOneOf3.d.ts +2 -3
- package/dist/models/CalcRuleRefOneOf3.js +3 -4
- package/dist/models/CalcRuleRefOneOf4.d.ts +3 -3
- package/dist/models/CalcRuleRefOneOf4.js +4 -4
- package/dist/models/CalcRuleRefOneOf5.d.ts +3 -2
- package/dist/models/CalcRuleRefOneOf5.js +4 -3
- package/dist/models/CalcRuleRefOneOf6.d.ts +32 -0
- package/dist/models/CalcRuleRefOneOf6.js +50 -0
- package/dist/models/CalcTest.d.ts +24 -0
- package/dist/models/CalcTest.js +64 -0
- package/dist/models/CalcTestOneOf.d.ts +33 -0
- package/dist/models/CalcTestOneOf.js +51 -0
- package/dist/models/CalcTestOneOf1.d.ts +33 -0
- package/dist/models/CalcTestOneOf1.js +51 -0
- package/dist/models/CalcTestOneOf2.d.ts +33 -0
- package/dist/models/CalcTestOneOf2.js +51 -0
- package/dist/models/Group.d.ts +45 -0
- package/dist/models/Group.js +59 -0
- package/dist/models/LayerVariablesRes.d.ts +1 -1
- package/dist/models/LogicAssignment.d.ts +23 -0
- package/dist/models/LogicAssignment.js +57 -0
- package/dist/models/LogicAssignmentOneOf.d.ts +32 -0
- package/dist/models/LogicAssignmentOneOf.js +50 -0
- package/dist/models/LogicAssignmentOneOf1.d.ts +32 -0
- package/dist/models/LogicAssignmentOneOf1.js +50 -0
- package/dist/models/LogicDemand.d.ts +40 -0
- package/dist/models/LogicDemand.js +56 -0
- package/dist/models/LogicLayerConfig.d.ts +39 -0
- package/dist/models/LogicLayerConfig.js +55 -0
- package/dist/models/LogicPer.d.ts +45 -0
- package/dist/models/LogicPer.js +59 -0
- package/dist/models/LogicRule.d.ts +66 -0
- package/dist/models/LogicRule.js +74 -0
- package/dist/models/LogicSupply.d.ts +48 -0
- package/dist/models/LogicSupply.js +61 -0
- package/dist/models/LogicSupplyWeight.d.ts +32 -0
- package/dist/models/LogicSupplyWeight.js +50 -0
- package/dist/models/MaybeVarInt.d.ts +2 -2
- package/dist/models/MaybeVarInt.js +5 -5
- package/dist/models/MaybeVarProp.d.ts +2 -2
- package/dist/models/MaybeVarProp.js +5 -5
- package/dist/models/MaybeVarStr.d.ts +2 -2
- package/dist/models/MaybeVarStr.js +5 -5
- package/dist/models/ModelObject.d.ts +38 -0
- package/dist/models/ModelObject.js +54 -0
- package/dist/models/ObjectGroupListEntry.d.ts +0 -6
- package/dist/models/ObjectGroupListEntry.js +0 -4
- package/dist/models/ScratchpadOutput.d.ts +69 -0
- package/dist/models/ScratchpadOutput.js +71 -0
- package/dist/models/ScratchpadOutputFile.d.ts +44 -0
- package/dist/models/ScratchpadOutputFile.js +56 -0
- package/dist/models/ScratchpadRun.d.ts +127 -0
- package/dist/models/ScratchpadRun.js +99 -0
- package/dist/models/ScratchpadRunPostReqBody.d.ts +58 -0
- package/dist/models/ScratchpadRunPostReqBody.js +60 -0
- package/dist/models/SelectObjectsParamsWrapperBody.d.ts +33 -0
- package/dist/models/SelectObjectsParamsWrapperBody.js +51 -0
- package/dist/models/Selection.d.ts +39 -0
- package/dist/models/Selection.js +55 -0
- package/dist/models/SpaceRuleSetJSON.d.ts +3 -2
- package/dist/models/SpaceRuleSetJSON.js +3 -2
- package/dist/models/SpaceRulesetCreate.d.ts +1 -1
- package/dist/models/index.d.ts +26 -0
- package/dist/models/index.js +26 -0
- package/package.json +1 -1
- package/src/apis/{SpaceRulesetsApi.ts → LogicLayersApi.ts} +136 -121
- package/src/apis/ObjectGroupsApi.ts +75 -0
- package/src/apis/PropertiesApi.ts +16 -16
- package/src/apis/ScenariosApi.ts +4 -4
- package/src/apis/ScriptsApi.ts +148 -0
- package/src/apis/TopDownModelsApi.ts +4 -4
- package/src/apis/VariablesApi.ts +4 -4
- package/src/apis/index.ts +1 -1
- package/src/models/CalcCompare.ts +92 -0
- package/src/models/CalcCondition.ts +99 -0
- package/src/models/CalcHasNode.ts +84 -0
- package/src/models/CalcIsObject.ts +66 -0
- package/src/models/CalcRuleRef.ts +14 -1
- package/src/models/CalcRuleRefOneOf2.ts +13 -5
- package/src/models/CalcRuleRefOneOf3.ts +5 -13
- package/src/models/CalcRuleRefOneOf4.ts +11 -11
- package/src/models/CalcRuleRefOneOf5.ts +13 -5
- package/src/models/CalcRuleRefOneOf6.ts +66 -0
- package/src/models/CalcTest.ts +89 -0
- package/src/models/CalcTestOneOf.ts +74 -0
- package/src/models/CalcTestOneOf1.ts +74 -0
- package/src/models/CalcTestOneOf2.ts +74 -0
- package/src/models/Group.ts +92 -0
- package/src/models/LayerVariablesRes.ts +1 -1
- package/src/models/LogicAssignment.ts +76 -0
- package/src/models/LogicAssignmentOneOf.ts +66 -0
- package/src/models/LogicAssignmentOneOf1.ts +66 -0
- package/src/models/LogicDemand.ts +90 -0
- package/src/models/LogicLayerConfig.ts +83 -0
- package/src/models/LogicPer.ts +92 -0
- package/src/models/LogicRule.ts +140 -0
- package/src/models/LogicSupply.ts +99 -0
- package/src/models/LogicSupplyWeight.ts +66 -0
- package/src/models/MaybeVarInt.ts +11 -11
- package/src/models/MaybeVarProp.ts +11 -11
- package/src/models/MaybeVarStr.ts +11 -11
- package/src/models/ModelObject.ts +75 -0
- package/src/models/ObjectGroupListEntry.ts +0 -9
- package/src/models/ScratchpadOutput.ts +126 -0
- package/src/models/ScratchpadOutputFile.ts +83 -0
- package/src/models/ScratchpadRun.ts +203 -0
- package/src/models/ScratchpadRunPostReqBody.ts +99 -0
- package/src/models/SelectObjectsParamsWrapperBody.ts +74 -0
- package/src/models/Selection.ts +83 -0
- package/src/models/SpaceRuleSetJSON.ts +12 -4
- package/src/models/SpaceRulesetCreate.ts +1 -1
- package/src/models/index.ts +26 -0
- package/dist/apis/SpaceRulesetsApi.d.ts +0 -269
- package/dist/esm/apis/SpaceRulesetsApi.d.ts +0 -269
|
@@ -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 { EntryPatchToJSON, ObjectGroupChangelogBodyFromJSON, ObjectGroupChangelogBodyToJSON, ObjectGroupEntriesResFromJSON, ObjectGroupEntrySearchResFromJSON, ObjectGroupEntryUpdateToJSON, ObjectGroupListResFromJSON, } from '../models/index';
|
|
24
|
+
import { EntryPatchToJSON, ObjectGroupChangelogBodyFromJSON, ObjectGroupChangelogBodyToJSON, ObjectGroupEntriesResFromJSON, ObjectGroupEntrySearchResFromJSON, ObjectGroupEntryUpdateToJSON, ObjectGroupListResFromJSON, SelectObjectsParamsWrapperBodyToJSON, SelectionFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -68,6 +68,46 @@ export class ObjectGroupsApi extends runtime.BaseAPI {
|
|
|
68
68
|
return yield response.value();
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Lists the objects in the account\'s active object groups that `filters` select, grouped by object group, both by name. Filters match as in a calculation: an object group\'s own properties apply to each of its entries, a tree node also selects the nodes below it, and a group\'s property (`og:<object group id>`) selects that group\'s entries. At most 500 objects are returned, with `truncated` set when more matched. Nothing is changed. Requires the *View objects* permission.
|
|
73
|
+
* Select objects by filters
|
|
74
|
+
*/
|
|
75
|
+
createSelectRaw(requestParameters, initOverrides) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
if (requestParameters['selectObjectsParamsWrapperBody'] == null) {
|
|
78
|
+
throw new runtime.RequiredError('selectObjectsParamsWrapperBody', 'Required parameter "selectObjectsParamsWrapperBody" was null or undefined when calling createSelect().');
|
|
79
|
+
}
|
|
80
|
+
const queryParameters = {};
|
|
81
|
+
const headerParameters = {};
|
|
82
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
83
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
84
|
+
const token = this.configuration.accessToken;
|
|
85
|
+
const tokenString = yield token("accessToken", []);
|
|
86
|
+
if (tokenString) {
|
|
87
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
let urlPath = `/v1/object-groups/select`;
|
|
91
|
+
const response = yield this.request({
|
|
92
|
+
path: urlPath,
|
|
93
|
+
method: 'POST',
|
|
94
|
+
headers: headerParameters,
|
|
95
|
+
query: queryParameters,
|
|
96
|
+
body: SelectObjectsParamsWrapperBodyToJSON(requestParameters['selectObjectsParamsWrapperBody']),
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SelectionFromJSON(jsonValue));
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Lists the objects in the account\'s active object groups that `filters` select, grouped by object group, both by name. Filters match as in a calculation: an object group\'s own properties apply to each of its entries, a tree node also selects the nodes below it, and a group\'s property (`og:<object group id>`) selects that group\'s entries. At most 500 objects are returned, with `truncated` set when more matched. Nothing is changed. Requires the *View objects* permission.
|
|
103
|
+
* Select objects by filters
|
|
104
|
+
*/
|
|
105
|
+
createSelect(requestParameters, initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const response = yield this.createSelectRaw(requestParameters, initOverrides);
|
|
108
|
+
return yield response.value();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
71
111
|
/**
|
|
72
112
|
* Permanently deletes the object group and all its entries, or transitions it to a different lifecycle state. Pass `action=archive` to archive it (recoverable via `action=restore`) or omit `action` to purge it immediately. Returns `409` if a purge keeps conflicting with concurrent writes, in which case only some entries may have been deleted; repeating the request finishes the purge. A completed purge clears the allowed `options` of object variables on the group. Requires the *Edit objects* permission.
|
|
73
113
|
* Delete or archive an object group
|
|
@@ -53,7 +53,7 @@ export interface PropertiesApiInterface {
|
|
|
53
53
|
*/
|
|
54
54
|
create(requestParameters: PropertiesApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
55
55
|
/**
|
|
56
|
-
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
56
|
+
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties, including object group properties (id `og:<object group id>`), cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
57
57
|
* @summary Delete a property
|
|
58
58
|
* @param {string} id
|
|
59
59
|
* @param {*} [options] Override http request option.
|
|
@@ -62,7 +62,7 @@ export interface PropertiesApiInterface {
|
|
|
62
62
|
*/
|
|
63
63
|
deleteRaw(requestParameters: PropertiesApiDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
64
64
|
/**
|
|
65
|
-
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
65
|
+
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties, including object group properties (id `og:<object group id>`), cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
66
66
|
* Delete a property
|
|
67
67
|
*/
|
|
68
68
|
delete(requestParameters: PropertiesApiDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -81,7 +81,7 @@ export interface PropertiesApiInterface {
|
|
|
81
81
|
*/
|
|
82
82
|
duplicate(requestParameters: PropertiesApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
83
83
|
/**
|
|
84
|
-
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (
|
|
84
|
+
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (`count`, `growth`) are always available to callers with either permission. An object group property has the id `og:<object group id>`, is named after its object group, and its tree has one node per object in the group (node id = object id) under a `Root` node; it returns `404` when the object group does not exist, and `403` unless the caller can see the group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group) and, for a private group, has full property access. Callers with *Edit properties* are treated as having full view access, since a caller trusted to modify a property must also be able to read it.
|
|
85
85
|
* @summary Get a property
|
|
86
86
|
* @param {string} id
|
|
87
87
|
* @param {*} [options] Override http request option.
|
|
@@ -90,12 +90,12 @@ export interface PropertiesApiInterface {
|
|
|
90
90
|
*/
|
|
91
91
|
getRaw(requestParameters: PropertiesApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PropertyRes>>;
|
|
92
92
|
/**
|
|
93
|
-
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (
|
|
93
|
+
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (`count`, `growth`) are always available to callers with either permission. An object group property has the id `og:<object group id>`, is named after its object group, and its tree has one node per object in the group (node id = object id) under a `Root` node; it returns `404` when the object group does not exist, and `403` unless the caller can see the group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group) and, for a private group, has full property access. Callers with *Edit properties* are treated as having full view access, since a caller trusted to modify a property must also be able to read it.
|
|
94
94
|
* Get a property
|
|
95
95
|
*/
|
|
96
96
|
get(requestParameters: PropertiesApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyRes>;
|
|
97
97
|
/**
|
|
98
|
-
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are
|
|
98
|
+
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are included: `count` and `growth`, and one tree property per active object group, with the id `og:<object group id>`, named after the group, whose nodes are the group\'s objects. An object group property is listed only to callers who can see that group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group), and is public when its group is. Callers with *View properties* or *Edit properties* see all properties; callers with only *View public properties* see only those marked public. Use `types` to restrict results to specific property types.
|
|
99
99
|
* @summary List properties
|
|
100
100
|
* @param {Array<number>} [types] Filter by property type. Pass one or more numeric type values (e.g. the integer values of the PropertyType enum). When omitted, all types are returned.
|
|
101
101
|
* @param {Array<number>} [objectTypes]
|
|
@@ -105,12 +105,12 @@ export interface PropertiesApiInterface {
|
|
|
105
105
|
*/
|
|
106
106
|
listRaw(requestParameters: PropertiesApiListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PropertyListRes>>;
|
|
107
107
|
/**
|
|
108
|
-
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are
|
|
108
|
+
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are included: `count` and `growth`, and one tree property per active object group, with the id `og:<object group id>`, named after the group, whose nodes are the group\'s objects. An object group property is listed only to callers who can see that group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group), and is public when its group is. Callers with *View properties* or *Edit properties* see all properties; callers with only *View public properties* see only those marked public. Use `types` to restrict results to specific property types.
|
|
109
109
|
* List properties
|
|
110
110
|
*/
|
|
111
111
|
list(requestParameters: PropertiesApiListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyListRes>;
|
|
112
112
|
/**
|
|
113
|
-
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for built-in property ids
|
|
113
|
+
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for the built-in property ids `count` and `growth`, which are not backed by a real stored property and cannot hold node data. Any update to an object group property (id `og:<object group id>`) is rejected with a `400`: its name and nodes come from the object group. New or re-parented nodes are placed after their siblings. A node\'s `position` moves it to that zero-based index among its siblings (clamped to the end); negative positions are rejected with a `400`. Setting `delete` removes the property. While a live data collection uses the property for anonymisation, deleting it, changing its type away from tree, clearing all nodes, or deleting, re-parenting or changing the ID of an existing node returns a `409`; adding nodes under a parent and editing names are allowed.
|
|
114
114
|
* @summary Update a property
|
|
115
115
|
* @param {string} id
|
|
116
116
|
* @param {PropertyBody} [propertyBody]
|
|
@@ -120,7 +120,7 @@ export interface PropertiesApiInterface {
|
|
|
120
120
|
*/
|
|
121
121
|
updateRaw(requestParameters: PropertiesApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
122
122
|
/**
|
|
123
|
-
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for built-in property ids
|
|
123
|
+
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for the built-in property ids `count` and `growth`, which are not backed by a real stored property and cannot hold node data. Any update to an object group property (id `og:<object group id>`) is rejected with a `400`: its name and nodes come from the object group. New or re-parented nodes are placed after their siblings. A node\'s `position` moves it to that zero-based index among its siblings (clamped to the end); negative positions are rejected with a `400`. Setting `delete` removes the property. While a live data collection uses the property for anonymisation, deleting it, changing its type away from tree, clearing all nodes, or deleting, re-parenting or changing the ID of an existing node returns a `409`; adding nodes under a parent and editing names are allowed.
|
|
124
124
|
* Update a property
|
|
125
125
|
*/
|
|
126
126
|
update(requestParameters: PropertiesApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -140,12 +140,12 @@ export declare class PropertiesApi extends runtime.BaseAPI implements Properties
|
|
|
140
140
|
*/
|
|
141
141
|
create(requestParameters?: PropertiesApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
142
142
|
/**
|
|
143
|
-
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
143
|
+
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties, including object group properties (id `og:<object group id>`), cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
144
144
|
* Delete a property
|
|
145
145
|
*/
|
|
146
146
|
deleteRaw(requestParameters: PropertiesApiDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
147
147
|
/**
|
|
148
|
-
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
148
|
+
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties, including object group properties (id `og:<object group id>`), cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
149
149
|
* Delete a property
|
|
150
150
|
*/
|
|
151
151
|
delete(requestParameters: PropertiesApiDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -160,32 +160,32 @@ export declare class PropertiesApi extends runtime.BaseAPI implements Properties
|
|
|
160
160
|
*/
|
|
161
161
|
duplicate(requestParameters: PropertiesApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
162
162
|
/**
|
|
163
|
-
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (
|
|
163
|
+
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (`count`, `growth`) are always available to callers with either permission. An object group property has the id `og:<object group id>`, is named after its object group, and its tree has one node per object in the group (node id = object id) under a `Root` node; it returns `404` when the object group does not exist, and `403` unless the caller can see the group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group) and, for a private group, has full property access. Callers with *Edit properties* are treated as having full view access, since a caller trusted to modify a property must also be able to read it.
|
|
164
164
|
* Get a property
|
|
165
165
|
*/
|
|
166
166
|
getRaw(requestParameters: PropertiesApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PropertyRes>>;
|
|
167
167
|
/**
|
|
168
|
-
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (
|
|
168
|
+
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (`count`, `growth`) are always available to callers with either permission. An object group property has the id `og:<object group id>`, is named after its object group, and its tree has one node per object in the group (node id = object id) under a `Root` node; it returns `404` when the object group does not exist, and `403` unless the caller can see the group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group) and, for a private group, has full property access. Callers with *Edit properties* are treated as having full view access, since a caller trusted to modify a property must also be able to read it.
|
|
169
169
|
* Get a property
|
|
170
170
|
*/
|
|
171
171
|
get(requestParameters: PropertiesApiGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyRes>;
|
|
172
172
|
/**
|
|
173
|
-
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are
|
|
173
|
+
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are included: `count` and `growth`, and one tree property per active object group, with the id `og:<object group id>`, named after the group, whose nodes are the group\'s objects. An object group property is listed only to callers who can see that group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group), and is public when its group is. Callers with *View properties* or *Edit properties* see all properties; callers with only *View public properties* see only those marked public. Use `types` to restrict results to specific property types.
|
|
174
174
|
* List properties
|
|
175
175
|
*/
|
|
176
176
|
listRaw(requestParameters: PropertiesApiListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PropertyListRes>>;
|
|
177
177
|
/**
|
|
178
|
-
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are
|
|
178
|
+
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are included: `count` and `growth`, and one tree property per active object group, with the id `og:<object group id>`, named after the group, whose nodes are the group\'s objects. An object group property is listed only to callers who can see that group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group), and is public when its group is. Callers with *View properties* or *Edit properties* see all properties; callers with only *View public properties* see only those marked public. Use `types` to restrict results to specific property types.
|
|
179
179
|
* List properties
|
|
180
180
|
*/
|
|
181
181
|
list(requestParameters?: PropertiesApiListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PropertyListRes>;
|
|
182
182
|
/**
|
|
183
|
-
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for built-in property ids
|
|
183
|
+
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for the built-in property ids `count` and `growth`, which are not backed by a real stored property and cannot hold node data. Any update to an object group property (id `og:<object group id>`) is rejected with a `400`: its name and nodes come from the object group. New or re-parented nodes are placed after their siblings. A node\'s `position` moves it to that zero-based index among its siblings (clamped to the end); negative positions are rejected with a `400`. Setting `delete` removes the property. While a live data collection uses the property for anonymisation, deleting it, changing its type away from tree, clearing all nodes, or deleting, re-parenting or changing the ID of an existing node returns a `409`; adding nodes under a parent and editing names are allowed.
|
|
184
184
|
* Update a property
|
|
185
185
|
*/
|
|
186
186
|
updateRaw(requestParameters: PropertiesApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
187
187
|
/**
|
|
188
|
-
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for built-in property ids
|
|
188
|
+
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for the built-in property ids `count` and `growth`, which are not backed by a real stored property and cannot hold node data. Any update to an object group property (id `og:<object group id>`) is rejected with a `400`: its name and nodes come from the object group. New or re-parented nodes are placed after their siblings. A node\'s `position` moves it to that zero-based index among its siblings (clamped to the end); negative positions are rejected with a `400`. Setting `delete` removes the property. While a live data collection uses the property for anonymisation, deleting it, changing its type away from tree, clearing all nodes, or deleting, re-parenting or changing the ID of an existing node returns a `409`; adding nodes under a parent and editing names are allowed.
|
|
189
189
|
* Update a property
|
|
190
190
|
*/
|
|
191
191
|
update(requestParameters: PropertiesApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -69,7 +69,7 @@ export class PropertiesApi extends runtime.BaseAPI {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
72
|
+
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties, including object group properties (id `og:<object group id>`), cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
73
73
|
* Delete a property
|
|
74
74
|
*/
|
|
75
75
|
deleteRaw(requestParameters, initOverrides) {
|
|
@@ -98,7 +98,7 @@ export class PropertiesApi extends runtime.BaseAPI {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
|
-
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
101
|
+
* Permanently removes the specified property and all its nodes. The property is removed from every variable\'s allowed `options`, and a variable whose value was the property moves to its first remaining option; node variables on the property lose their options. Built-in properties, including object group properties (id `og:<object group id>`), cannot be deleted. Requires the *Edit properties* permission. Returns `409` if a live data collection uses the property for anonymisation.
|
|
102
102
|
* Delete a property
|
|
103
103
|
*/
|
|
104
104
|
delete(requestParameters, initOverrides) {
|
|
@@ -151,7 +151,7 @@ export class PropertiesApi extends runtime.BaseAPI {
|
|
|
151
151
|
});
|
|
152
152
|
}
|
|
153
153
|
/**
|
|
154
|
-
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (
|
|
154
|
+
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (`count`, `growth`) are always available to callers with either permission. An object group property has the id `og:<object group id>`, is named after its object group, and its tree has one node per object in the group (node id = object id) under a `Root` node; it returns `404` when the object group does not exist, and `403` unless the caller can see the group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group) and, for a private group, has full property access. Callers with *Edit properties* are treated as having full view access, since a caller trusted to modify a property must also be able to read it.
|
|
155
155
|
* Get a property
|
|
156
156
|
*/
|
|
157
157
|
getRaw(requestParameters, initOverrides) {
|
|
@@ -180,7 +180,7 @@ export class PropertiesApi extends runtime.BaseAPI {
|
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
182
|
/**
|
|
183
|
-
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (
|
|
183
|
+
* Returns the full record for a single property, including its metadata and — for tree-type properties — the complete node hierarchy. Callers with only the *View public properties* permission receive a `403` if the property is not public. Built-in system properties (`count`, `growth`) are always available to callers with either permission. An object group property has the id `og:<object group id>`, is named after its object group, and its tree has one node per object in the group (node id = object id) under a `Root` node; it returns `404` when the object group does not exist, and `403` unless the caller can see the group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group) and, for a private group, has full property access. Callers with *Edit properties* are treated as having full view access, since a caller trusted to modify a property must also be able to read it.
|
|
184
184
|
* Get a property
|
|
185
185
|
*/
|
|
186
186
|
get(requestParameters, initOverrides) {
|
|
@@ -190,7 +190,7 @@ export class PropertiesApi extends runtime.BaseAPI {
|
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
|
-
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are
|
|
193
|
+
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are included: `count` and `growth`, and one tree property per active object group, with the id `og:<object group id>`, named after the group, whose nodes are the group\'s objects. An object group property is listed only to callers who can see that group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group), and is public when its group is. Callers with *View properties* or *Edit properties* see all properties; callers with only *View public properties* see only those marked public. Use `types` to restrict results to specific property types.
|
|
194
194
|
* List properties
|
|
195
195
|
*/
|
|
196
196
|
listRaw(requestParameters, initOverrides) {
|
|
@@ -221,7 +221,7 @@ export class PropertiesApi extends runtime.BaseAPI {
|
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
|
-
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are
|
|
224
|
+
* Returns all properties available to the account, sorted alphabetically by name. Built-in system properties are included: `count` and `growth`, and one tree property per active object group, with the id `og:<object group id>`, named after the group, whose nodes are the group\'s objects. An object group property is listed only to callers who can see that group\'s objects (*View objects* or *Edit objects*, or *View public objects* for a public group), and is public when its group is. Callers with *View properties* or *Edit properties* see all properties; callers with only *View public properties* see only those marked public. Use `types` to restrict results to specific property types.
|
|
225
225
|
* List properties
|
|
226
226
|
*/
|
|
227
227
|
list() {
|
|
@@ -231,7 +231,7 @@ export class PropertiesApi extends runtime.BaseAPI {
|
|
|
231
231
|
});
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
234
|
-
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for built-in property ids
|
|
234
|
+
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for the built-in property ids `count` and `growth`, which are not backed by a real stored property and cannot hold node data. Any update to an object group property (id `og:<object group id>`) is rejected with a `400`: its name and nodes come from the object group. New or re-parented nodes are placed after their siblings. A node\'s `position` moves it to that zero-based index among its siblings (clamped to the end); negative positions are rejected with a `400`. Setting `delete` removes the property. While a live data collection uses the property for anonymisation, deleting it, changing its type away from tree, clearing all nodes, or deleting, re-parenting or changing the ID of an existing node returns a `409`; adding nodes under a parent and editing names are allowed.
|
|
235
235
|
* Update a property
|
|
236
236
|
*/
|
|
237
237
|
updateRaw(requestParameters, initOverrides) {
|
|
@@ -262,7 +262,7 @@ export class PropertiesApi extends runtime.BaseAPI {
|
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
/**
|
|
265
|
-
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for built-in property ids
|
|
265
|
+
* Applies an incremental update to the specified property. The request body may contain updated metadata and node changes for tree-type properties. Supports large node sets — the request body limit is 64 MB with a 20-second read timeout. Renaming a node ID requires the *Edit property ID* permission in addition to *Edit properties*; a `403` is returned if that permission is absent. Deleted nodes are removed from node variables\' allowed `options`, and a variable whose value was a deleted node moves to its first remaining option; renamed nodes are renamed in both the options and the value. Node changes are rejected with a `400` for the built-in property ids `count` and `growth`, which are not backed by a real stored property and cannot hold node data. Any update to an object group property (id `og:<object group id>`) is rejected with a `400`: its name and nodes come from the object group. New or re-parented nodes are placed after their siblings. A node\'s `position` moves it to that zero-based index among its siblings (clamped to the end); negative positions are rejected with a `400`. Setting `delete` removes the property. While a live data collection uses the property for anonymisation, deleting it, changing its type away from tree, clearing all nodes, or deleting, re-parenting or changing the ID of an existing node returns a `409`; adding nodes under a parent and editing names are allowed.
|
|
266
266
|
* Update a property
|
|
267
267
|
*/
|
|
268
268
|
update(requestParameters, initOverrides) {
|
|
@@ -110,7 +110,7 @@ export interface ScenariosApiInterface {
|
|
|
110
110
|
*/
|
|
111
111
|
list(requestParameters: ScenariosApiListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScenarioListRes>;
|
|
112
112
|
/**
|
|
113
|
-
* Returns, per active scenario, the account variables that the modifier formulas of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
113
|
+
* Returns, per active scenario, the account variables that the modifier formulas and logic layer functions of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
114
114
|
* @summary List account variables used by scenario layers
|
|
115
115
|
* @param {*} [options] Override http request option.
|
|
116
116
|
* @throws {RequiredError}
|
|
@@ -118,7 +118,7 @@ export interface ScenariosApiInterface {
|
|
|
118
118
|
*/
|
|
119
119
|
listLayerVariablesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LayerVariablesRes>>;
|
|
120
120
|
/**
|
|
121
|
-
* Returns, per active scenario, the account variables that the modifier formulas of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
121
|
+
* Returns, per active scenario, the account variables that the modifier formulas and logic layer functions of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
122
122
|
* List account variables used by scenario layers
|
|
123
123
|
*/
|
|
124
124
|
listLayerVariables(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LayerVariablesRes>;
|
|
@@ -193,12 +193,12 @@ export declare class ScenariosApi extends runtime.BaseAPI implements ScenariosAp
|
|
|
193
193
|
*/
|
|
194
194
|
list(requestParameters?: ScenariosApiListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScenarioListRes>;
|
|
195
195
|
/**
|
|
196
|
-
* Returns, per active scenario, the account variables that the modifier formulas of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
196
|
+
* Returns, per active scenario, the account variables that the modifier formulas and logic layer functions of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
197
197
|
* List account variables used by scenario layers
|
|
198
198
|
*/
|
|
199
199
|
listLayerVariablesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LayerVariablesRes>>;
|
|
200
200
|
/**
|
|
201
|
-
* Returns, per active scenario, the account variables that the modifier formulas of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
201
|
+
* Returns, per active scenario, the account variables that the modifier formulas and logic layer functions of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
202
202
|
* List account variables used by scenario layers
|
|
203
203
|
*/
|
|
204
204
|
listLayerVariables(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LayerVariablesRes>;
|
|
@@ -232,7 +232,7 @@ export class ScenariosApi extends runtime.BaseAPI {
|
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
|
-
* Returns, per active scenario, the account variables that the modifier formulas of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
235
|
+
* Returns, per active scenario, the account variables that the modifier formulas and logic layer functions of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
236
236
|
* List account variables used by scenario layers
|
|
237
237
|
*/
|
|
238
238
|
listLayerVariablesRaw(initOverrides) {
|
|
@@ -257,7 +257,7 @@ export class ScenariosApi extends runtime.BaseAPI {
|
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
259
|
/**
|
|
260
|
-
* Returns, per active scenario, the account variables that the modifier formulas of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
260
|
+
* Returns, per active scenario, the account variables that the modifier formulas and logic layer functions of its layers reference, following stacked scenarios. Changing one of these variables recalculates every visualisation of that scenario. Scenarios whose layers use no account variables are omitted. Requires the *View projects* permission and the *Variable controls* feature.
|
|
261
261
|
* List account variables used by scenario layers
|
|
262
262
|
*/
|
|
263
263
|
listLayerVariables(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 { ScriptAuditResBody, ScriptDetail, ScriptExportResBody, ScriptListResBody, ScriptPatchReqBody, ScriptPostReqBody, ScriptRunLogsResBody, ScriptRunsResBody, ScriptSchedulePreviewReqBody, ScriptSchedulePreviewResBody, ScriptSecretsReqBody, ScriptSecretsResBody, ScriptUsageResBody, ScriptWebhookResBody } from '../models/index';
|
|
13
|
+
import type { ScratchpadRun, ScratchpadRunPostReqBody, ScriptAuditResBody, ScriptDetail, ScriptExportResBody, ScriptListResBody, ScriptPatchReqBody, ScriptPostReqBody, ScriptRunLogsResBody, ScriptRunsResBody, ScriptSchedulePreviewReqBody, ScriptSchedulePreviewResBody, ScriptSecretsReqBody, ScriptSecretsResBody, ScriptUsageResBody, ScriptWebhookResBody } from '../models/index';
|
|
14
14
|
export interface ScriptsApiCreateRequest {
|
|
15
15
|
scriptPostReqBody: ScriptPostReqBody;
|
|
16
16
|
}
|
|
@@ -23,6 +23,9 @@ export interface ScriptsApiCreateRegenerateWebhookRequest {
|
|
|
23
23
|
export interface ScriptsApiCreateSchedulePreviewRequest {
|
|
24
24
|
scriptSchedulePreviewReqBody: ScriptSchedulePreviewReqBody;
|
|
25
25
|
}
|
|
26
|
+
export interface ScriptsApiCreateScratchpadRunsRequest {
|
|
27
|
+
scratchpadRunPostReqBody: ScratchpadRunPostReqBody;
|
|
28
|
+
}
|
|
26
29
|
export interface ScriptsApiDeleteRequest {
|
|
27
30
|
id: string;
|
|
28
31
|
}
|
|
@@ -34,6 +37,10 @@ export interface ScriptsApiGetAuditRequest {
|
|
|
34
37
|
limit?: number;
|
|
35
38
|
cursor?: string;
|
|
36
39
|
}
|
|
40
|
+
export interface ScriptsApiGetScratchpadRunsRequest {
|
|
41
|
+
runId: string;
|
|
42
|
+
waitSeconds?: number;
|
|
43
|
+
}
|
|
37
44
|
export interface ScriptsApiListRunsRequest {
|
|
38
45
|
id: string;
|
|
39
46
|
limit?: number;
|
|
@@ -114,6 +121,20 @@ export interface ScriptsApiInterface {
|
|
|
114
121
|
* Preview a script schedule
|
|
115
122
|
*/
|
|
116
123
|
createSchedulePreview(requestParameters: ScriptsApiCreateSchedulePreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptSchedulePreviewResBody>;
|
|
124
|
+
/**
|
|
125
|
+
* Runs Python or JavaScript code once in a sandbox without saving it as a script, for working something out from the account\'s data. The handler is the one an integration script implements, with `input` as `event.input`; there is no build, so dependency manifests and Go are not supported. The code runs with a read-only access token scoped to the caller: only the caller\'s view permissions, in the caller\'s current project if there is one, for 5 minutes. `ctx.fetch` sends it to the Spaciv API. Files the handler writes to its output directory (`ctx.output_dir` in Python, `ctx.outputDir` in JavaScript) are returned with its stdout, stderr and return value. Limits: code up to 256 KiB in at most 50 files, `input` up to 1 MiB, and `timeoutSeconds` up to 120 (default 30). Of the output, stdout and stderr are kept up to 256 KiB each, the return value up to 256 KiB, and up to 20 output files totalling 2 MiB. Runs count towards the account\'s script credits and concurrent runs. The request waits up to `waitSeconds` for the run to finish; a run still in progress is returned without `output`, and can be read with `GET /v1/scripts/scratchpad/runs/{runId}`. A run is visible only to the user who started it, and is kept for 24 hours. Returns `422` when the language or code is not accepted, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
126
|
+
* @summary Run scratchpad code
|
|
127
|
+
* @param {ScratchpadRunPostReqBody} scratchpadRunPostReqBody
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
* @memberof ScriptsApiInterface
|
|
131
|
+
*/
|
|
132
|
+
createScratchpadRunsRaw(requestParameters: ScriptsApiCreateScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScratchpadRun>>;
|
|
133
|
+
/**
|
|
134
|
+
* Runs Python or JavaScript code once in a sandbox without saving it as a script, for working something out from the account\'s data. The handler is the one an integration script implements, with `input` as `event.input`; there is no build, so dependency manifests and Go are not supported. The code runs with a read-only access token scoped to the caller: only the caller\'s view permissions, in the caller\'s current project if there is one, for 5 minutes. `ctx.fetch` sends it to the Spaciv API. Files the handler writes to its output directory (`ctx.output_dir` in Python, `ctx.outputDir` in JavaScript) are returned with its stdout, stderr and return value. Limits: code up to 256 KiB in at most 50 files, `input` up to 1 MiB, and `timeoutSeconds` up to 120 (default 30). Of the output, stdout and stderr are kept up to 256 KiB each, the return value up to 256 KiB, and up to 20 output files totalling 2 MiB. Runs count towards the account\'s script credits and concurrent runs. The request waits up to `waitSeconds` for the run to finish; a run still in progress is returned without `output`, and can be read with `GET /v1/scripts/scratchpad/runs/{runId}`. A run is visible only to the user who started it, and is kept for 24 hours. Returns `422` when the language or code is not accepted, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
135
|
+
* Run scratchpad code
|
|
136
|
+
*/
|
|
137
|
+
createScratchpadRuns(requestParameters: ScriptsApiCreateScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScratchpadRun>;
|
|
117
138
|
/**
|
|
118
139
|
* Stops any active runs, deletes the script with its secrets and run history, and revokes its API keys. Requires the *Manage my account* permission.
|
|
119
140
|
* @summary Delete a script
|
|
@@ -171,6 +192,21 @@ export interface ScriptsApiInterface {
|
|
|
171
192
|
* Export scripts
|
|
172
193
|
*/
|
|
173
194
|
getExport(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptExportResBody>;
|
|
195
|
+
/**
|
|
196
|
+
* Returns a scratchpad run the caller started, with its output once it has finished. Runs are kept for 24 hours. Returns `404` when the run does not exist, has expired or was started by someone else, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
197
|
+
* @summary Get a scratchpad run
|
|
198
|
+
* @param {string} runId
|
|
199
|
+
* @param {number} [waitSeconds] Longest to wait for a run in progress to finish before responding. Defaults to 0, returning at once.
|
|
200
|
+
* @param {*} [options] Override http request option.
|
|
201
|
+
* @throws {RequiredError}
|
|
202
|
+
* @memberof ScriptsApiInterface
|
|
203
|
+
*/
|
|
204
|
+
getScratchpadRunsRaw(requestParameters: ScriptsApiGetScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScratchpadRun>>;
|
|
205
|
+
/**
|
|
206
|
+
* Returns a scratchpad run the caller started, with its output once it has finished. Runs are kept for 24 hours. Returns `404` when the run does not exist, has expired or was started by someone else, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
207
|
+
* Get a scratchpad run
|
|
208
|
+
*/
|
|
209
|
+
getScratchpadRuns(requestParameters: ScriptsApiGetScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScratchpadRun>;
|
|
174
210
|
/**
|
|
175
211
|
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
176
212
|
* @summary Get script usage
|
|
@@ -303,6 +339,16 @@ export declare class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInt
|
|
|
303
339
|
* Preview a script schedule
|
|
304
340
|
*/
|
|
305
341
|
createSchedulePreview(requestParameters: ScriptsApiCreateSchedulePreviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptSchedulePreviewResBody>;
|
|
342
|
+
/**
|
|
343
|
+
* Runs Python or JavaScript code once in a sandbox without saving it as a script, for working something out from the account\'s data. The handler is the one an integration script implements, with `input` as `event.input`; there is no build, so dependency manifests and Go are not supported. The code runs with a read-only access token scoped to the caller: only the caller\'s view permissions, in the caller\'s current project if there is one, for 5 minutes. `ctx.fetch` sends it to the Spaciv API. Files the handler writes to its output directory (`ctx.output_dir` in Python, `ctx.outputDir` in JavaScript) are returned with its stdout, stderr and return value. Limits: code up to 256 KiB in at most 50 files, `input` up to 1 MiB, and `timeoutSeconds` up to 120 (default 30). Of the output, stdout and stderr are kept up to 256 KiB each, the return value up to 256 KiB, and up to 20 output files totalling 2 MiB. Runs count towards the account\'s script credits and concurrent runs. The request waits up to `waitSeconds` for the run to finish; a run still in progress is returned without `output`, and can be read with `GET /v1/scripts/scratchpad/runs/{runId}`. A run is visible only to the user who started it, and is kept for 24 hours. Returns `422` when the language or code is not accepted, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
344
|
+
* Run scratchpad code
|
|
345
|
+
*/
|
|
346
|
+
createScratchpadRunsRaw(requestParameters: ScriptsApiCreateScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScratchpadRun>>;
|
|
347
|
+
/**
|
|
348
|
+
* Runs Python or JavaScript code once in a sandbox without saving it as a script, for working something out from the account\'s data. The handler is the one an integration script implements, with `input` as `event.input`; there is no build, so dependency manifests and Go are not supported. The code runs with a read-only access token scoped to the caller: only the caller\'s view permissions, in the caller\'s current project if there is one, for 5 minutes. `ctx.fetch` sends it to the Spaciv API. Files the handler writes to its output directory (`ctx.output_dir` in Python, `ctx.outputDir` in JavaScript) are returned with its stdout, stderr and return value. Limits: code up to 256 KiB in at most 50 files, `input` up to 1 MiB, and `timeoutSeconds` up to 120 (default 30). Of the output, stdout and stderr are kept up to 256 KiB each, the return value up to 256 KiB, and up to 20 output files totalling 2 MiB. Runs count towards the account\'s script credits and concurrent runs. The request waits up to `waitSeconds` for the run to finish; a run still in progress is returned without `output`, and can be read with `GET /v1/scripts/scratchpad/runs/{runId}`. A run is visible only to the user who started it, and is kept for 24 hours. Returns `422` when the language or code is not accepted, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
349
|
+
* Run scratchpad code
|
|
350
|
+
*/
|
|
351
|
+
createScratchpadRuns(requestParameters: ScriptsApiCreateScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScratchpadRun>;
|
|
306
352
|
/**
|
|
307
353
|
* Stops any active runs, deletes the script with its secrets and run history, and revokes its API keys. Requires the *Manage my account* permission.
|
|
308
354
|
* Delete a script
|
|
@@ -343,6 +389,16 @@ export declare class ScriptsApi extends runtime.BaseAPI implements ScriptsApiInt
|
|
|
343
389
|
* Export scripts
|
|
344
390
|
*/
|
|
345
391
|
getExport(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScriptExportResBody>;
|
|
392
|
+
/**
|
|
393
|
+
* Returns a scratchpad run the caller started, with its output once it has finished. Runs are kept for 24 hours. Returns `404` when the run does not exist, has expired or was started by someone else, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
394
|
+
* Get a scratchpad run
|
|
395
|
+
*/
|
|
396
|
+
getScratchpadRunsRaw(requestParameters: ScriptsApiGetScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ScratchpadRun>>;
|
|
397
|
+
/**
|
|
398
|
+
* Returns a scratchpad run the caller started, with its output once it has finished. Runs are kept for 24 hours. Returns `404` when the run does not exist, has expired or was started by someone else, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
399
|
+
* Get a scratchpad run
|
|
400
|
+
*/
|
|
401
|
+
getScratchpadRuns(requestParameters: ScriptsApiGetScratchpadRunsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ScratchpadRun>;
|
|
346
402
|
/**
|
|
347
403
|
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
348
404
|
* Get script usage
|
|
@@ -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 { ScriptAuditResBodyFromJSON, ScriptDetailFromJSON, ScriptExportResBodyFromJSON, ScriptListResBodyFromJSON, ScriptPatchReqBodyToJSON, ScriptPostReqBodyToJSON, ScriptRunLogsResBodyFromJSON, ScriptRunsResBodyFromJSON, ScriptSchedulePreviewReqBodyToJSON, ScriptSchedulePreviewResBodyFromJSON, ScriptSecretsReqBodyToJSON, ScriptSecretsResBodyFromJSON, ScriptUsageResBodyFromJSON, ScriptWebhookResBodyFromJSON, } from '../models/index';
|
|
24
|
+
import { ScratchpadRunFromJSON, ScratchpadRunPostReqBodyToJSON, ScriptAuditResBodyFromJSON, ScriptDetailFromJSON, ScriptExportResBodyFromJSON, ScriptListResBodyFromJSON, ScriptPatchReqBodyToJSON, ScriptPostReqBodyToJSON, ScriptRunLogsResBodyFromJSON, ScriptRunsResBodyFromJSON, ScriptSchedulePreviewReqBodyToJSON, ScriptSchedulePreviewResBodyFromJSON, ScriptSecretsReqBodyToJSON, ScriptSecretsResBodyFromJSON, ScriptUsageResBodyFromJSON, ScriptWebhookResBodyFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -184,6 +184,46 @@ export class ScriptsApi extends runtime.BaseAPI {
|
|
|
184
184
|
return yield response.value();
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Runs Python or JavaScript code once in a sandbox without saving it as a script, for working something out from the account\'s data. The handler is the one an integration script implements, with `input` as `event.input`; there is no build, so dependency manifests and Go are not supported. The code runs with a read-only access token scoped to the caller: only the caller\'s view permissions, in the caller\'s current project if there is one, for 5 minutes. `ctx.fetch` sends it to the Spaciv API. Files the handler writes to its output directory (`ctx.output_dir` in Python, `ctx.outputDir` in JavaScript) are returned with its stdout, stderr and return value. Limits: code up to 256 KiB in at most 50 files, `input` up to 1 MiB, and `timeoutSeconds` up to 120 (default 30). Of the output, stdout and stderr are kept up to 256 KiB each, the return value up to 256 KiB, and up to 20 output files totalling 2 MiB. Runs count towards the account\'s script credits and concurrent runs. The request waits up to `waitSeconds` for the run to finish; a run still in progress is returned without `output`, and can be read with `GET /v1/scripts/scratchpad/runs/{runId}`. A run is visible only to the user who started it, and is kept for 24 hours. Returns `422` when the language or code is not accepted, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
189
|
+
* Run scratchpad code
|
|
190
|
+
*/
|
|
191
|
+
createScratchpadRunsRaw(requestParameters, initOverrides) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
if (requestParameters['scratchpadRunPostReqBody'] == null) {
|
|
194
|
+
throw new runtime.RequiredError('scratchpadRunPostReqBody', 'Required parameter "scratchpadRunPostReqBody" was null or undefined when calling createScratchpadRuns().');
|
|
195
|
+
}
|
|
196
|
+
const queryParameters = {};
|
|
197
|
+
const headerParameters = {};
|
|
198
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
199
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
200
|
+
const token = this.configuration.accessToken;
|
|
201
|
+
const tokenString = yield token("accessToken", []);
|
|
202
|
+
if (tokenString) {
|
|
203
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
let urlPath = `/v1/scripts/scratchpad/runs`;
|
|
207
|
+
const response = yield this.request({
|
|
208
|
+
path: urlPath,
|
|
209
|
+
method: 'POST',
|
|
210
|
+
headers: headerParameters,
|
|
211
|
+
query: queryParameters,
|
|
212
|
+
body: ScratchpadRunPostReqBodyToJSON(requestParameters['scratchpadRunPostReqBody']),
|
|
213
|
+
}, initOverrides);
|
|
214
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScratchpadRunFromJSON(jsonValue));
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Runs Python or JavaScript code once in a sandbox without saving it as a script, for working something out from the account\'s data. The handler is the one an integration script implements, with `input` as `event.input`; there is no build, so dependency manifests and Go are not supported. The code runs with a read-only access token scoped to the caller: only the caller\'s view permissions, in the caller\'s current project if there is one, for 5 minutes. `ctx.fetch` sends it to the Spaciv API. Files the handler writes to its output directory (`ctx.output_dir` in Python, `ctx.outputDir` in JavaScript) are returned with its stdout, stderr and return value. Limits: code up to 256 KiB in at most 50 files, `input` up to 1 MiB, and `timeoutSeconds` up to 120 (default 30). Of the output, stdout and stderr are kept up to 256 KiB each, the return value up to 256 KiB, and up to 20 output files totalling 2 MiB. Runs count towards the account\'s script credits and concurrent runs. The request waits up to `waitSeconds` for the run to finish; a run still in progress is returned without `output`, and can be read with `GET /v1/scripts/scratchpad/runs/{runId}`. A run is visible only to the user who started it, and is kept for 24 hours. Returns `422` when the language or code is not accepted, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
219
|
+
* Run scratchpad code
|
|
220
|
+
*/
|
|
221
|
+
createScratchpadRuns(requestParameters, initOverrides) {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
const response = yield this.createScratchpadRunsRaw(requestParameters, initOverrides);
|
|
224
|
+
return yield response.value();
|
|
225
|
+
});
|
|
226
|
+
}
|
|
187
227
|
/**
|
|
188
228
|
* Stops any active runs, deletes the script with its secrets and run history, and revokes its API keys. Requires the *Manage my account* permission.
|
|
189
229
|
* Delete a script
|
|
@@ -341,6 +381,48 @@ export class ScriptsApi extends runtime.BaseAPI {
|
|
|
341
381
|
return yield response.value();
|
|
342
382
|
});
|
|
343
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
* Returns a scratchpad run the caller started, with its output once it has finished. Runs are kept for 24 hours. Returns `404` when the run does not exist, has expired or was started by someone else, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
386
|
+
* Get a scratchpad run
|
|
387
|
+
*/
|
|
388
|
+
getScratchpadRunsRaw(requestParameters, initOverrides) {
|
|
389
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
390
|
+
if (requestParameters['runId'] == null) {
|
|
391
|
+
throw new runtime.RequiredError('runId', 'Required parameter "runId" was null or undefined when calling getScratchpadRuns().');
|
|
392
|
+
}
|
|
393
|
+
const queryParameters = {};
|
|
394
|
+
if (requestParameters['waitSeconds'] != null) {
|
|
395
|
+
queryParameters['waitSeconds'] = requestParameters['waitSeconds'];
|
|
396
|
+
}
|
|
397
|
+
const headerParameters = {};
|
|
398
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
399
|
+
const token = this.configuration.accessToken;
|
|
400
|
+
const tokenString = yield token("accessToken", []);
|
|
401
|
+
if (tokenString) {
|
|
402
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
let urlPath = `/v1/scripts/scratchpad/runs/{runId}`;
|
|
406
|
+
urlPath = urlPath.replace(`{${"runId"}}`, encodeURIComponent(String(requestParameters['runId'])));
|
|
407
|
+
const response = yield this.request({
|
|
408
|
+
path: urlPath,
|
|
409
|
+
method: 'GET',
|
|
410
|
+
headers: headerParameters,
|
|
411
|
+
query: queryParameters,
|
|
412
|
+
}, initOverrides);
|
|
413
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ScratchpadRunFromJSON(jsonValue));
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* Returns a scratchpad run the caller started, with its output once it has finished. Runs are kept for 24 hours. Returns `404` when the run does not exist, has expired or was started by someone else, and `403` for a script\'s API key or a scratchpad run\'s own token. Requires the *AI assistant* permission.
|
|
418
|
+
* Get a scratchpad run
|
|
419
|
+
*/
|
|
420
|
+
getScratchpadRuns(requestParameters, initOverrides) {
|
|
421
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
422
|
+
const response = yield this.getScratchpadRunsRaw(requestParameters, initOverrides);
|
|
423
|
+
return yield response.value();
|
|
424
|
+
});
|
|
425
|
+
}
|
|
344
426
|
/**
|
|
345
427
|
* Returns the credits the account\'s script runs were charged this calendar month (UTC), against the account\'s monthly script credit limit and its other script limits, with how many runs each script made, failed and had refused. creditState is near from 80% of the monthly limit and reached once it is used, after which runs are recorded as quota_exceeded until the month ends. creditsUsed is the scripts figure of `GET /v1/account/usage/calculation-credits`. Run counts are added when runs end. Requires the *Manage my account* permission.
|
|
346
428
|
* Get script usage
|