@spaciv/sdk 0.1.21 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/.openapi-generator/FILES +24 -1
  2. package/README.md +2 -2
  3. package/dist/apis/FilesApi.d.ts +28 -1
  4. package/dist/apis/FilesApi.js +40 -0
  5. package/dist/apis/LogicLayersApi.d.ts +279 -0
  6. package/dist/apis/{SpaceRulesetsApi.js → LogicLayersApi.js} +72 -62
  7. package/dist/apis/ObjectGroupsApi.d.ts +28 -1
  8. package/dist/apis/ObjectGroupsApi.js +40 -0
  9. package/dist/apis/PropertiesApi.d.ts +16 -16
  10. package/dist/apis/PropertiesApi.js +8 -8
  11. package/dist/apis/ScenariosApi.d.ts +4 -4
  12. package/dist/apis/ScenariosApi.js +2 -2
  13. package/dist/apis/TopDownModelsApi.d.ts +4 -4
  14. package/dist/apis/TopDownModelsApi.js +2 -2
  15. package/dist/apis/VariablesApi.d.ts +4 -4
  16. package/dist/apis/VariablesApi.js +2 -2
  17. package/dist/apis/index.d.ts +1 -1
  18. package/dist/apis/index.js +1 -1
  19. package/dist/esm/apis/FilesApi.d.ts +28 -1
  20. package/dist/esm/apis/FilesApi.js +41 -1
  21. package/dist/esm/apis/LogicLayersApi.d.ts +279 -0
  22. package/dist/esm/apis/{SpaceRulesetsApi.js → LogicLayersApi.js} +70 -60
  23. package/dist/esm/apis/ObjectGroupsApi.d.ts +28 -1
  24. package/dist/esm/apis/ObjectGroupsApi.js +41 -1
  25. package/dist/esm/apis/PropertiesApi.d.ts +16 -16
  26. package/dist/esm/apis/PropertiesApi.js +8 -8
  27. package/dist/esm/apis/ScenariosApi.d.ts +4 -4
  28. package/dist/esm/apis/ScenariosApi.js +2 -2
  29. package/dist/esm/apis/TopDownModelsApi.d.ts +4 -4
  30. package/dist/esm/apis/TopDownModelsApi.js +2 -2
  31. package/dist/esm/apis/VariablesApi.d.ts +4 -4
  32. package/dist/esm/apis/VariablesApi.js +2 -2
  33. package/dist/esm/apis/index.d.ts +1 -1
  34. package/dist/esm/apis/index.js +1 -1
  35. package/dist/esm/models/AccountTextFilePostBody.d.ts +38 -0
  36. package/dist/esm/models/AccountTextFilePostBody.js +45 -0
  37. package/dist/esm/models/CalcCompare.d.ts +45 -0
  38. package/dist/esm/models/CalcCompare.js +52 -0
  39. package/dist/esm/models/CalcCondition.d.ts +46 -0
  40. package/dist/esm/models/CalcCondition.js +53 -0
  41. package/dist/esm/models/CalcHasNode.d.ts +44 -0
  42. package/dist/esm/models/CalcHasNode.js +51 -0
  43. package/dist/esm/models/CalcIsObject.d.ts +32 -0
  44. package/dist/esm/models/CalcIsObject.js +43 -0
  45. package/dist/esm/models/CalcRuleRef.d.ts +2 -1
  46. package/dist/esm/models/CalcRuleRef.js +7 -0
  47. package/dist/esm/models/CalcRuleRefOneOf2.d.ts +3 -2
  48. package/dist/esm/models/CalcRuleRefOneOf2.js +4 -3
  49. package/dist/esm/models/CalcRuleRefOneOf3.d.ts +2 -3
  50. package/dist/esm/models/CalcRuleRefOneOf3.js +3 -4
  51. package/dist/esm/models/CalcRuleRefOneOf4.d.ts +3 -3
  52. package/dist/esm/models/CalcRuleRefOneOf4.js +4 -4
  53. package/dist/esm/models/CalcRuleRefOneOf5.d.ts +3 -2
  54. package/dist/esm/models/CalcRuleRefOneOf5.js +4 -3
  55. package/dist/esm/models/CalcRuleRefOneOf6.d.ts +32 -0
  56. package/dist/esm/models/CalcRuleRefOneOf6.js +43 -0
  57. package/dist/esm/models/CalcTest.d.ts +24 -0
  58. package/dist/esm/models/CalcTest.js +58 -0
  59. package/dist/esm/models/CalcTestOneOf.d.ts +33 -0
  60. package/dist/esm/models/CalcTestOneOf.js +44 -0
  61. package/dist/esm/models/CalcTestOneOf1.d.ts +33 -0
  62. package/dist/esm/models/CalcTestOneOf1.js +44 -0
  63. package/dist/esm/models/CalcTestOneOf2.d.ts +33 -0
  64. package/dist/esm/models/CalcTestOneOf2.js +44 -0
  65. package/dist/esm/models/Group.d.ts +45 -0
  66. package/dist/esm/models/Group.js +52 -0
  67. package/dist/esm/models/LayerVariablesRes.d.ts +1 -1
  68. package/dist/esm/models/LogicAssignment.d.ts +23 -0
  69. package/dist/esm/models/LogicAssignment.js +51 -0
  70. package/dist/esm/models/LogicAssignmentOneOf.d.ts +32 -0
  71. package/dist/esm/models/LogicAssignmentOneOf.js +43 -0
  72. package/dist/esm/models/LogicAssignmentOneOf1.d.ts +32 -0
  73. package/dist/esm/models/LogicAssignmentOneOf1.js +43 -0
  74. package/dist/esm/models/LogicDemand.d.ts +40 -0
  75. package/dist/esm/models/LogicDemand.js +49 -0
  76. package/dist/esm/models/LogicLayerConfig.d.ts +39 -0
  77. package/dist/esm/models/LogicLayerConfig.js +48 -0
  78. package/dist/esm/models/LogicPer.d.ts +45 -0
  79. package/dist/esm/models/LogicPer.js +52 -0
  80. package/dist/esm/models/LogicRule.d.ts +66 -0
  81. package/dist/esm/models/LogicRule.js +67 -0
  82. package/dist/esm/models/LogicSupply.d.ts +48 -0
  83. package/dist/esm/models/LogicSupply.js +54 -0
  84. package/dist/esm/models/LogicSupplyWeight.d.ts +32 -0
  85. package/dist/esm/models/LogicSupplyWeight.js +43 -0
  86. package/dist/esm/models/MaybeVarInt.d.ts +2 -2
  87. package/dist/esm/models/MaybeVarInt.js +5 -5
  88. package/dist/esm/models/MaybeVarProp.d.ts +2 -2
  89. package/dist/esm/models/MaybeVarProp.js +5 -5
  90. package/dist/esm/models/MaybeVarStr.d.ts +2 -2
  91. package/dist/esm/models/MaybeVarStr.js +5 -5
  92. package/dist/esm/models/ModelObject.d.ts +38 -0
  93. package/dist/esm/models/ModelObject.js +47 -0
  94. package/dist/esm/models/ModelRecord.d.ts +1 -1
  95. package/dist/esm/models/ObjectGroupListEntry.d.ts +0 -6
  96. package/dist/esm/models/ObjectGroupListEntry.js +0 -4
  97. package/dist/esm/models/SelectObjectsParamsWrapperBody.d.ts +33 -0
  98. package/dist/esm/models/SelectObjectsParamsWrapperBody.js +44 -0
  99. package/dist/esm/models/Selection.d.ts +39 -0
  100. package/dist/esm/models/Selection.js +48 -0
  101. package/dist/esm/models/SpaceRuleSetJSON.d.ts +3 -2
  102. package/dist/esm/models/SpaceRuleSetJSON.js +3 -2
  103. package/dist/esm/models/SpaceRulesetCreate.d.ts +1 -1
  104. package/dist/esm/models/index.d.ts +23 -0
  105. package/dist/esm/models/index.js +23 -0
  106. package/dist/models/AccountTextFilePostBody.d.ts +38 -0
  107. package/dist/models/AccountTextFilePostBody.js +52 -0
  108. package/dist/models/CalcCompare.d.ts +45 -0
  109. package/dist/models/CalcCompare.js +59 -0
  110. package/dist/models/CalcCondition.d.ts +46 -0
  111. package/dist/models/CalcCondition.js +60 -0
  112. package/dist/models/CalcHasNode.d.ts +44 -0
  113. package/dist/models/CalcHasNode.js +58 -0
  114. package/dist/models/CalcIsObject.d.ts +32 -0
  115. package/dist/models/CalcIsObject.js +50 -0
  116. package/dist/models/CalcRuleRef.d.ts +2 -1
  117. package/dist/models/CalcRuleRef.js +7 -0
  118. package/dist/models/CalcRuleRefOneOf2.d.ts +3 -2
  119. package/dist/models/CalcRuleRefOneOf2.js +4 -3
  120. package/dist/models/CalcRuleRefOneOf3.d.ts +2 -3
  121. package/dist/models/CalcRuleRefOneOf3.js +3 -4
  122. package/dist/models/CalcRuleRefOneOf4.d.ts +3 -3
  123. package/dist/models/CalcRuleRefOneOf4.js +4 -4
  124. package/dist/models/CalcRuleRefOneOf5.d.ts +3 -2
  125. package/dist/models/CalcRuleRefOneOf5.js +4 -3
  126. package/dist/models/CalcRuleRefOneOf6.d.ts +32 -0
  127. package/dist/models/CalcRuleRefOneOf6.js +50 -0
  128. package/dist/models/CalcTest.d.ts +24 -0
  129. package/dist/models/CalcTest.js +64 -0
  130. package/dist/models/CalcTestOneOf.d.ts +33 -0
  131. package/dist/models/CalcTestOneOf.js +51 -0
  132. package/dist/models/CalcTestOneOf1.d.ts +33 -0
  133. package/dist/models/CalcTestOneOf1.js +51 -0
  134. package/dist/models/CalcTestOneOf2.d.ts +33 -0
  135. package/dist/models/CalcTestOneOf2.js +51 -0
  136. package/dist/models/Group.d.ts +45 -0
  137. package/dist/models/Group.js +59 -0
  138. package/dist/models/LayerVariablesRes.d.ts +1 -1
  139. package/dist/models/LogicAssignment.d.ts +23 -0
  140. package/dist/models/LogicAssignment.js +57 -0
  141. package/dist/models/LogicAssignmentOneOf.d.ts +32 -0
  142. package/dist/models/LogicAssignmentOneOf.js +50 -0
  143. package/dist/models/LogicAssignmentOneOf1.d.ts +32 -0
  144. package/dist/models/LogicAssignmentOneOf1.js +50 -0
  145. package/dist/models/LogicDemand.d.ts +40 -0
  146. package/dist/models/LogicDemand.js +56 -0
  147. package/dist/models/LogicLayerConfig.d.ts +39 -0
  148. package/dist/models/LogicLayerConfig.js +55 -0
  149. package/dist/models/LogicPer.d.ts +45 -0
  150. package/dist/models/LogicPer.js +59 -0
  151. package/dist/models/LogicRule.d.ts +66 -0
  152. package/dist/models/LogicRule.js +74 -0
  153. package/dist/models/LogicSupply.d.ts +48 -0
  154. package/dist/models/LogicSupply.js +61 -0
  155. package/dist/models/LogicSupplyWeight.d.ts +32 -0
  156. package/dist/models/LogicSupplyWeight.js +50 -0
  157. package/dist/models/MaybeVarInt.d.ts +2 -2
  158. package/dist/models/MaybeVarInt.js +5 -5
  159. package/dist/models/MaybeVarProp.d.ts +2 -2
  160. package/dist/models/MaybeVarProp.js +5 -5
  161. package/dist/models/MaybeVarStr.d.ts +2 -2
  162. package/dist/models/MaybeVarStr.js +5 -5
  163. package/dist/models/ModelObject.d.ts +38 -0
  164. package/dist/models/ModelObject.js +54 -0
  165. package/dist/models/ModelRecord.d.ts +1 -1
  166. package/dist/models/ObjectGroupListEntry.d.ts +0 -6
  167. package/dist/models/ObjectGroupListEntry.js +0 -4
  168. package/dist/models/SelectObjectsParamsWrapperBody.d.ts +33 -0
  169. package/dist/models/SelectObjectsParamsWrapperBody.js +51 -0
  170. package/dist/models/Selection.d.ts +39 -0
  171. package/dist/models/Selection.js +55 -0
  172. package/dist/models/SpaceRuleSetJSON.d.ts +3 -2
  173. package/dist/models/SpaceRuleSetJSON.js +3 -2
  174. package/dist/models/SpaceRulesetCreate.d.ts +1 -1
  175. package/dist/models/index.d.ts +23 -0
  176. package/dist/models/index.js +23 -0
  177. package/package.json +1 -1
  178. package/src/apis/FilesApi.ts +72 -0
  179. package/src/apis/{SpaceRulesetsApi.ts → LogicLayersApi.ts} +136 -121
  180. package/src/apis/ObjectGroupsApi.ts +75 -0
  181. package/src/apis/PropertiesApi.ts +16 -16
  182. package/src/apis/ScenariosApi.ts +4 -4
  183. package/src/apis/TopDownModelsApi.ts +4 -4
  184. package/src/apis/VariablesApi.ts +4 -4
  185. package/src/apis/index.ts +1 -1
  186. package/src/models/AccountTextFilePostBody.ts +74 -0
  187. package/src/models/CalcCompare.ts +92 -0
  188. package/src/models/CalcCondition.ts +99 -0
  189. package/src/models/CalcHasNode.ts +84 -0
  190. package/src/models/CalcIsObject.ts +66 -0
  191. package/src/models/CalcRuleRef.ts +14 -1
  192. package/src/models/CalcRuleRefOneOf2.ts +13 -5
  193. package/src/models/CalcRuleRefOneOf3.ts +5 -13
  194. package/src/models/CalcRuleRefOneOf4.ts +11 -11
  195. package/src/models/CalcRuleRefOneOf5.ts +13 -5
  196. package/src/models/CalcRuleRefOneOf6.ts +66 -0
  197. package/src/models/CalcTest.ts +89 -0
  198. package/src/models/CalcTestOneOf.ts +74 -0
  199. package/src/models/CalcTestOneOf1.ts +74 -0
  200. package/src/models/CalcTestOneOf2.ts +74 -0
  201. package/src/models/Group.ts +92 -0
  202. package/src/models/LayerVariablesRes.ts +1 -1
  203. package/src/models/LogicAssignment.ts +76 -0
  204. package/src/models/LogicAssignmentOneOf.ts +66 -0
  205. package/src/models/LogicAssignmentOneOf1.ts +66 -0
  206. package/src/models/LogicDemand.ts +90 -0
  207. package/src/models/LogicLayerConfig.ts +83 -0
  208. package/src/models/LogicPer.ts +92 -0
  209. package/src/models/LogicRule.ts +140 -0
  210. package/src/models/LogicSupply.ts +99 -0
  211. package/src/models/LogicSupplyWeight.ts +66 -0
  212. package/src/models/MaybeVarInt.ts +11 -11
  213. package/src/models/MaybeVarProp.ts +11 -11
  214. package/src/models/MaybeVarStr.ts +11 -11
  215. package/src/models/ModelObject.ts +75 -0
  216. package/src/models/ModelRecord.ts +1 -1
  217. package/src/models/ObjectGroupListEntry.ts +0 -9
  218. package/src/models/SelectObjectsParamsWrapperBody.ts +74 -0
  219. package/src/models/Selection.ts +83 -0
  220. package/src/models/SpaceRuleSetJSON.ts +12 -4
  221. package/src/models/SpaceRulesetCreate.ts +1 -1
  222. package/src/models/index.ts +23 -0
  223. package/dist/apis/SpaceRulesetsApi.d.ts +0 -269
  224. package/dist/esm/apis/SpaceRulesetsApi.d.ts +0 -269
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * spaciv API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@spaciv.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfModelObject = instanceOfModelObject;
17
+ exports.ModelObjectFromJSON = ModelObjectFromJSON;
18
+ exports.ModelObjectFromJSONTyped = ModelObjectFromJSONTyped;
19
+ exports.ModelObjectToJSON = ModelObjectToJSON;
20
+ exports.ModelObjectToJSONTyped = ModelObjectToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ModelObject interface.
23
+ */
24
+ function instanceOfModelObject(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('name' in value) || value['name'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function ModelObjectFromJSON(json) {
32
+ return ModelObjectFromJSONTyped(json, false);
33
+ }
34
+ function ModelObjectFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'id': json['id'],
40
+ 'name': json['name'],
41
+ };
42
+ }
43
+ function ModelObjectToJSON(json) {
44
+ return ModelObjectToJSONTyped(json, false);
45
+ }
46
+ function ModelObjectToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'id': value['id'],
52
+ 'name': value['name'],
53
+ };
54
+ }
@@ -28,7 +28,7 @@ export interface ModelRecord {
28
28
  */
29
29
  id: string;
30
30
  /**
31
- * Media type detected from the file's contents when they were last stored, rather than from its name or the type the client declared.
31
+ * Media type detected from the file's contents when they were last stored, rather than from its name or the type the client declared. A file created empty in the app takes its type from its extension, such as text/markdown; charset=utf-8 for .md, and keeps it while its contents are detected as plain text.
32
32
  * @type {string}
33
33
  * @memberof ModelRecord
34
34
  */
@@ -27,12 +27,6 @@ export interface ObjectGroupListEntry {
27
27
  * @memberof ObjectGroupListEntry
28
28
  */
29
29
  entries: number;
30
- /**
31
- *
32
- * @type {boolean}
33
- * @memberof ObjectGroupListEntry
34
- */
35
- hasModules: boolean;
36
30
  /**
37
31
  *
38
32
  * @type {string}
@@ -26,8 +26,6 @@ function instanceOfObjectGroupListEntry(value) {
26
26
  return false;
27
27
  if (!('entries' in value) || value['entries'] === undefined)
28
28
  return false;
29
- if (!('hasModules' in value) || value['hasModules'] === undefined)
30
- return false;
31
29
  if (!('id' in value) || value['id'] === undefined)
32
30
  return false;
33
31
  if (!('isPublic' in value) || value['isPublic'] === undefined)
@@ -46,7 +44,6 @@ function ObjectGroupListEntryFromJSONTyped(json, ignoreDiscriminator) {
46
44
  return {
47
45
  'description': json['description'],
48
46
  'entries': json['entries'],
49
- 'hasModules': json['hasModules'],
50
47
  'id': json['id'],
51
48
  'isPublic': json['isPublic'],
52
49
  'name': json['name'],
@@ -62,7 +59,6 @@ function ObjectGroupListEntryToJSONTyped(value, ignoreDiscriminator = false) {
62
59
  return {
63
60
  'description': value['description'],
64
61
  'entries': value['entries'],
65
- 'hasModules': value['hasModules'],
66
62
  'id': value['id'],
67
63
  'isPublic': value['isPublic'],
68
64
  'name': value['name'],
@@ -0,0 +1,33 @@
1
+ /**
2
+ * spaciv API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@spaciv.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { FilterGroup } from './FilterGroup';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SelectObjectsParamsWrapperBody
17
+ */
18
+ export interface SelectObjectsParamsWrapperBody {
19
+ /**
20
+ * Filter groups, of which any may match; within a group every filter must. None selects every object.
21
+ * @type {Array<FilterGroup>}
22
+ * @memberof SelectObjectsParamsWrapperBody
23
+ */
24
+ filters: Array<FilterGroup>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the SelectObjectsParamsWrapperBody interface.
28
+ */
29
+ export declare function instanceOfSelectObjectsParamsWrapperBody(value: object): value is SelectObjectsParamsWrapperBody;
30
+ export declare function SelectObjectsParamsWrapperBodyFromJSON(json: any): SelectObjectsParamsWrapperBody;
31
+ export declare function SelectObjectsParamsWrapperBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): SelectObjectsParamsWrapperBody;
32
+ export declare function SelectObjectsParamsWrapperBodyToJSON(json: any): SelectObjectsParamsWrapperBody;
33
+ export declare function SelectObjectsParamsWrapperBodyToJSONTyped(value?: SelectObjectsParamsWrapperBody | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * spaciv API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@spaciv.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfSelectObjectsParamsWrapperBody = instanceOfSelectObjectsParamsWrapperBody;
17
+ exports.SelectObjectsParamsWrapperBodyFromJSON = SelectObjectsParamsWrapperBodyFromJSON;
18
+ exports.SelectObjectsParamsWrapperBodyFromJSONTyped = SelectObjectsParamsWrapperBodyFromJSONTyped;
19
+ exports.SelectObjectsParamsWrapperBodyToJSON = SelectObjectsParamsWrapperBodyToJSON;
20
+ exports.SelectObjectsParamsWrapperBodyToJSONTyped = SelectObjectsParamsWrapperBodyToJSONTyped;
21
+ const FilterGroup_1 = require("./FilterGroup");
22
+ /**
23
+ * Check if a given object implements the SelectObjectsParamsWrapperBody interface.
24
+ */
25
+ function instanceOfSelectObjectsParamsWrapperBody(value) {
26
+ if (!('filters' in value) || value['filters'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ function SelectObjectsParamsWrapperBodyFromJSON(json) {
31
+ return SelectObjectsParamsWrapperBodyFromJSONTyped(json, false);
32
+ }
33
+ function SelectObjectsParamsWrapperBodyFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'filters': (json['filters'].map(FilterGroup_1.FilterGroupFromJSON)),
39
+ };
40
+ }
41
+ function SelectObjectsParamsWrapperBodyToJSON(json) {
42
+ return SelectObjectsParamsWrapperBodyToJSONTyped(json, false);
43
+ }
44
+ function SelectObjectsParamsWrapperBodyToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'filters': (value['filters'].map(FilterGroup_1.FilterGroupToJSON)),
50
+ };
51
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * spaciv API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ * Contact: support@spaciv.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Group } from './Group';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface Selection
17
+ */
18
+ export interface Selection {
19
+ /**
20
+ * The object groups holding a selected object, by name, each with its selected objects by name.
21
+ * @type {Array<Group>}
22
+ * @memberof Selection
23
+ */
24
+ groups: Array<Group>;
25
+ /**
26
+ * More objects matched than were returned; narrow the filters to see the rest.
27
+ * @type {boolean}
28
+ * @memberof Selection
29
+ */
30
+ truncated: boolean;
31
+ }
32
+ /**
33
+ * Check if a given object implements the Selection interface.
34
+ */
35
+ export declare function instanceOfSelection(value: object): value is Selection;
36
+ export declare function SelectionFromJSON(json: any): Selection;
37
+ export declare function SelectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Selection;
38
+ export declare function SelectionToJSON(json: any): Selection;
39
+ export declare function SelectionToJSONTyped(value?: Selection | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * spaciv API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@spaciv.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfSelection = instanceOfSelection;
17
+ exports.SelectionFromJSON = SelectionFromJSON;
18
+ exports.SelectionFromJSONTyped = SelectionFromJSONTyped;
19
+ exports.SelectionToJSON = SelectionToJSON;
20
+ exports.SelectionToJSONTyped = SelectionToJSONTyped;
21
+ const Group_1 = require("./Group");
22
+ /**
23
+ * Check if a given object implements the Selection interface.
24
+ */
25
+ function instanceOfSelection(value) {
26
+ if (!('groups' in value) || value['groups'] === undefined)
27
+ return false;
28
+ if (!('truncated' in value) || value['truncated'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function SelectionFromJSON(json) {
33
+ return SelectionFromJSONTyped(json, false);
34
+ }
35
+ function SelectionFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'groups': (json['groups'].map(Group_1.GroupFromJSON)),
41
+ 'truncated': json['truncated'],
42
+ };
43
+ }
44
+ function SelectionToJSON(json) {
45
+ return SelectionToJSONTyped(json, false);
46
+ }
47
+ function SelectionToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'groups': (value['groups'].map(Group_1.GroupToJSON)),
53
+ 'truncated': value['truncated'],
54
+ };
55
+ }
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { LogicLayerConfig } from './LogicLayerConfig';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -17,10 +18,10 @@
17
18
  export interface SpaceRuleSetJSON {
18
19
  /**
19
20
  *
20
- * @type {any}
21
+ * @type {LogicLayerConfig}
21
22
  * @memberof SpaceRuleSetJSON
22
23
  */
23
- config: any | null;
24
+ config: LogicLayerConfig;
24
25
  /**
25
26
  *
26
27
  * @type {string}
@@ -18,6 +18,7 @@ exports.SpaceRuleSetJSONFromJSON = SpaceRuleSetJSONFromJSON;
18
18
  exports.SpaceRuleSetJSONFromJSONTyped = SpaceRuleSetJSONFromJSONTyped;
19
19
  exports.SpaceRuleSetJSONToJSON = SpaceRuleSetJSONToJSON;
20
20
  exports.SpaceRuleSetJSONToJSONTyped = SpaceRuleSetJSONToJSONTyped;
21
+ const LogicLayerConfig_1 = require("./LogicLayerConfig");
21
22
  /**
22
23
  * Check if a given object implements the SpaceRuleSetJSON interface.
23
24
  */
@@ -46,7 +47,7 @@ function SpaceRuleSetJSONFromJSONTyped(json, ignoreDiscriminator) {
46
47
  return json;
47
48
  }
48
49
  return {
49
- 'config': json['config'],
50
+ 'config': (0, LogicLayerConfig_1.LogicLayerConfigFromJSON)(json['config']),
50
51
  'createdDate': json['createdDate'],
51
52
  'creationMode': json['creationMode'],
52
53
  'description': json['description'],
@@ -63,7 +64,7 @@ function SpaceRuleSetJSONToJSONTyped(value, ignoreDiscriminator = false) {
63
64
  return value;
64
65
  }
65
66
  return {
66
- 'config': value['config'],
67
+ 'config': (0, LogicLayerConfig_1.LogicLayerConfigToJSON)(value['config']),
67
68
  'createdDate': value['createdDate'],
68
69
  'creationMode': value['creationMode'],
69
70
  'description': value['description'],
@@ -34,7 +34,7 @@ export interface SpaceRulesetCreate {
34
34
  */
35
35
  preset?: string;
36
36
  /**
37
- * Ruleset type: "Standard", "Amenity", or "Advanced". Determines the initial calculation configuration template when no preset is supplied.
37
+ * Kept as a label: "Standard", "Amenity", or "Advanced". Every logic layer starts with no rules when no preset is supplied.
38
38
  * @type {string}
39
39
  * @memberof SpaceRulesetCreate
40
40
  */
@@ -19,6 +19,7 @@ export * from './AccountPostOIDCProviderReqBody';
19
19
  export * from './AccountPostReqBody';
20
20
  export * from './AccountPutOIDCClientSecretReqBody';
21
21
  export * from './AccountPutReqBody';
22
+ export * from './AccountTextFilePostBody';
22
23
  export * from './AccountUsageResBody';
23
24
  export * from './ActivityData';
24
25
  export * from './ActivityLocationData';
@@ -60,7 +61,11 @@ export * from './CalcAxis';
60
61
  export * from './CalcAxisMember';
61
62
  export * from './CalcBody';
62
63
  export * from './CalcChildren';
64
+ export * from './CalcCompare';
65
+ export * from './CalcCondition';
63
66
  export * from './CalcErrorBody';
67
+ export * from './CalcHasNode';
68
+ export * from './CalcIsObject';
64
69
  export * from './CalcList';
65
70
  export * from './CalcListEntry';
66
71
  export * from './CalcListTwoD';
@@ -73,11 +78,16 @@ export * from './CalcRuleRefOneOf2';
73
78
  export * from './CalcRuleRefOneOf3';
74
79
  export * from './CalcRuleRefOneOf4';
75
80
  export * from './CalcRuleRefOneOf5';
81
+ export * from './CalcRuleRefOneOf6';
76
82
  export * from './CalcSegmentation';
77
83
  export * from './CalcSegmentationOneOf';
78
84
  export * from './CalcSegmentationOneOf1';
79
85
  export * from './CalcSegmentationOneOf2';
80
86
  export * from './CalcSelect';
87
+ export * from './CalcTest';
88
+ export * from './CalcTestOneOf';
89
+ export * from './CalcTestOneOf1';
90
+ export * from './CalcTestOneOf2';
81
91
  export * from './CalcTreeList';
82
92
  export * from './CalcTreeValue';
83
93
  export * from './CalcTypeSingleValue';
@@ -203,6 +213,7 @@ export * from './GetEntry';
203
213
  export * from './GetMappingRes';
204
214
  export * from './GetResponseBody';
205
215
  export * from './GetTopDownModelEntriesRes';
216
+ export * from './Group';
206
217
  export * from './I18nTranslationsExportParamsWrapperBody';
207
218
  export * from './I18nTranslationsImportParamsWrapperBody';
208
219
  export * from './I18nTranslationsParamsWrapperBody';
@@ -227,6 +238,15 @@ export * from './ListAccountsForUserRow';
227
238
  export * from './ListPage';
228
239
  export * from './ListUserDetailsWithEmailRow';
229
240
  export * from './LocationData';
241
+ export * from './LogicAssignment';
242
+ export * from './LogicAssignmentOneOf';
243
+ export * from './LogicAssignmentOneOf1';
244
+ export * from './LogicDemand';
245
+ export * from './LogicLayerConfig';
246
+ export * from './LogicPer';
247
+ export * from './LogicRule';
248
+ export * from './LogicSupply';
249
+ export * from './LogicSupplyWeight';
230
250
  export * from './MappingProp';
231
251
  export * from './MappingScenario';
232
252
  export * from './MaybeVarFunc';
@@ -241,6 +261,7 @@ export * from './MeetingSizeData';
241
261
  export * from './MetaVersionResponse';
242
262
  export * from './MissingAttributeDetail';
243
263
  export * from './MissingObjectDetail';
264
+ export * from './ModelObject';
244
265
  export * from './ModelRecord';
245
266
  export * from './MultiSelectChangelogData';
246
267
  export * from './MultiSelectContributionData';
@@ -328,6 +349,8 @@ export * from './ScriptSummary';
328
349
  export * from './ScriptUsage';
329
350
  export * from './ScriptUsageResBody';
330
351
  export * from './ScriptWebhookResBody';
352
+ export * from './SelectObjectsParamsWrapperBody';
353
+ export * from './Selection';
331
354
  export * from './SendPasswordPutReqBody';
332
355
  export * from './SerializedEvent';
333
356
  export * from './ServerMessage';
@@ -37,6 +37,7 @@ __exportStar(require("./AccountPostOIDCProviderReqBody"), exports);
37
37
  __exportStar(require("./AccountPostReqBody"), exports);
38
38
  __exportStar(require("./AccountPutOIDCClientSecretReqBody"), exports);
39
39
  __exportStar(require("./AccountPutReqBody"), exports);
40
+ __exportStar(require("./AccountTextFilePostBody"), exports);
40
41
  __exportStar(require("./AccountUsageResBody"), exports);
41
42
  __exportStar(require("./ActivityData"), exports);
42
43
  __exportStar(require("./ActivityLocationData"), exports);
@@ -78,7 +79,11 @@ __exportStar(require("./CalcAxis"), exports);
78
79
  __exportStar(require("./CalcAxisMember"), exports);
79
80
  __exportStar(require("./CalcBody"), exports);
80
81
  __exportStar(require("./CalcChildren"), exports);
82
+ __exportStar(require("./CalcCompare"), exports);
83
+ __exportStar(require("./CalcCondition"), exports);
81
84
  __exportStar(require("./CalcErrorBody"), exports);
85
+ __exportStar(require("./CalcHasNode"), exports);
86
+ __exportStar(require("./CalcIsObject"), exports);
82
87
  __exportStar(require("./CalcList"), exports);
83
88
  __exportStar(require("./CalcListEntry"), exports);
84
89
  __exportStar(require("./CalcListTwoD"), exports);
@@ -91,11 +96,16 @@ __exportStar(require("./CalcRuleRefOneOf2"), exports);
91
96
  __exportStar(require("./CalcRuleRefOneOf3"), exports);
92
97
  __exportStar(require("./CalcRuleRefOneOf4"), exports);
93
98
  __exportStar(require("./CalcRuleRefOneOf5"), exports);
99
+ __exportStar(require("./CalcRuleRefOneOf6"), exports);
94
100
  __exportStar(require("./CalcSegmentation"), exports);
95
101
  __exportStar(require("./CalcSegmentationOneOf"), exports);
96
102
  __exportStar(require("./CalcSegmentationOneOf1"), exports);
97
103
  __exportStar(require("./CalcSegmentationOneOf2"), exports);
98
104
  __exportStar(require("./CalcSelect"), exports);
105
+ __exportStar(require("./CalcTest"), exports);
106
+ __exportStar(require("./CalcTestOneOf"), exports);
107
+ __exportStar(require("./CalcTestOneOf1"), exports);
108
+ __exportStar(require("./CalcTestOneOf2"), exports);
99
109
  __exportStar(require("./CalcTreeList"), exports);
100
110
  __exportStar(require("./CalcTreeValue"), exports);
101
111
  __exportStar(require("./CalcTypeSingleValue"), exports);
@@ -221,6 +231,7 @@ __exportStar(require("./GetEntry"), exports);
221
231
  __exportStar(require("./GetMappingRes"), exports);
222
232
  __exportStar(require("./GetResponseBody"), exports);
223
233
  __exportStar(require("./GetTopDownModelEntriesRes"), exports);
234
+ __exportStar(require("./Group"), exports);
224
235
  __exportStar(require("./I18nTranslationsExportParamsWrapperBody"), exports);
225
236
  __exportStar(require("./I18nTranslationsImportParamsWrapperBody"), exports);
226
237
  __exportStar(require("./I18nTranslationsParamsWrapperBody"), exports);
@@ -245,6 +256,15 @@ __exportStar(require("./ListAccountsForUserRow"), exports);
245
256
  __exportStar(require("./ListPage"), exports);
246
257
  __exportStar(require("./ListUserDetailsWithEmailRow"), exports);
247
258
  __exportStar(require("./LocationData"), exports);
259
+ __exportStar(require("./LogicAssignment"), exports);
260
+ __exportStar(require("./LogicAssignmentOneOf"), exports);
261
+ __exportStar(require("./LogicAssignmentOneOf1"), exports);
262
+ __exportStar(require("./LogicDemand"), exports);
263
+ __exportStar(require("./LogicLayerConfig"), exports);
264
+ __exportStar(require("./LogicPer"), exports);
265
+ __exportStar(require("./LogicRule"), exports);
266
+ __exportStar(require("./LogicSupply"), exports);
267
+ __exportStar(require("./LogicSupplyWeight"), exports);
248
268
  __exportStar(require("./MappingProp"), exports);
249
269
  __exportStar(require("./MappingScenario"), exports);
250
270
  __exportStar(require("./MaybeVarFunc"), exports);
@@ -259,6 +279,7 @@ __exportStar(require("./MeetingSizeData"), exports);
259
279
  __exportStar(require("./MetaVersionResponse"), exports);
260
280
  __exportStar(require("./MissingAttributeDetail"), exports);
261
281
  __exportStar(require("./MissingObjectDetail"), exports);
282
+ __exportStar(require("./ModelObject"), exports);
262
283
  __exportStar(require("./ModelRecord"), exports);
263
284
  __exportStar(require("./MultiSelectChangelogData"), exports);
264
285
  __exportStar(require("./MultiSelectContributionData"), exports);
@@ -346,6 +367,8 @@ __exportStar(require("./ScriptSummary"), exports);
346
367
  __exportStar(require("./ScriptUsage"), exports);
347
368
  __exportStar(require("./ScriptUsageResBody"), exports);
348
369
  __exportStar(require("./ScriptWebhookResBody"), exports);
370
+ __exportStar(require("./SelectObjectsParamsWrapperBody"), exports);
371
+ __exportStar(require("./Selection"), exports);
349
372
  __exportStar(require("./SendPasswordPutReqBody"), exports);
350
373
  __exportStar(require("./SerializedEvent"), exports);
351
374
  __exportStar(require("./ServerMessage"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaciv/sdk",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "OpenAPI client for @spaciv/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -18,6 +18,7 @@ import type {
18
18
  AccountDirectoryPatchBody,
19
19
  AccountDirectoryPostBody,
20
20
  AccountFilePatchBody,
21
+ AccountTextFilePostBody,
21
22
  Directory,
22
23
  DirectoryPage,
23
24
  ErrorModel,
@@ -31,6 +32,8 @@ import {
31
32
  AccountDirectoryPostBodyToJSON,
32
33
  AccountFilePatchBodyFromJSON,
33
34
  AccountFilePatchBodyToJSON,
35
+ AccountTextFilePostBodyFromJSON,
36
+ AccountTextFilePostBodyToJSON,
34
37
  DirectoryFromJSON,
35
38
  DirectoryToJSON,
36
39
  DirectoryPageFromJSON,
@@ -52,6 +55,10 @@ export interface FilesApiCreateAccountFilesRequest {
52
55
  name?: string;
53
56
  }
54
57
 
58
+ export interface FilesApiCreateAccountTextFilesRequest {
59
+ accountTextFilePostBody: AccountTextFilePostBody;
60
+ }
61
+
55
62
  export interface FilesApiDeleteAccountDirectoriesRequest {
56
63
  id: string;
57
64
  }
@@ -132,6 +139,22 @@ export interface FilesApiInterface {
132
139
  */
133
140
  createAccountFiles(requestParameters: FilesApiCreateAccountFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
134
141
 
142
+ /**
143
+ * Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly: a name already taken there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
144
+ * @summary Create an empty text file in the account\'s files
145
+ * @param {AccountTextFilePostBody} accountTextFilePostBody
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ * @memberof FilesApiInterface
149
+ */
150
+ createAccountTextFilesRaw(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>>;
151
+
152
+ /**
153
+ * Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly: a name already taken there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
154
+ * Create an empty text file in the account\'s files
155
+ */
156
+ createAccountTextFiles(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord>;
157
+
135
158
  /**
136
159
  * Deletes an empty directory from the account\'s files. A directory that still holds a file or another directory is rejected with 409 `directory is not empty`: move or delete its contents first. Deleting a directory that is already gone succeeds rather than returning 404. Any other 409 means the directory changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
137
160
  * @summary Delete a directory
@@ -388,6 +411,55 @@ export class FilesApi extends runtime.BaseAPI implements FilesApiInterface {
388
411
  return await response.value();
389
412
  }
390
413
 
414
+ /**
415
+ * Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly: a name already taken there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
416
+ * Create an empty text file in the account\'s files
417
+ */
418
+ async createAccountTextFilesRaw(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelRecord>> {
419
+ if (requestParameters['accountTextFilePostBody'] == null) {
420
+ throw new runtime.RequiredError(
421
+ 'accountTextFilePostBody',
422
+ 'Required parameter "accountTextFilePostBody" was null or undefined when calling createAccountTextFiles().'
423
+ );
424
+ }
425
+
426
+ const queryParameters: any = {};
427
+
428
+ const headerParameters: runtime.HTTPHeaders = {};
429
+
430
+ headerParameters['Content-Type'] = 'application/json';
431
+
432
+ if (this.configuration && this.configuration.accessToken) {
433
+ const token = this.configuration.accessToken;
434
+ const tokenString = await token("accessToken", []);
435
+
436
+ if (tokenString) {
437
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
438
+ }
439
+ }
440
+
441
+ let urlPath = `/v1/account/text-files`;
442
+
443
+ const response = await this.request({
444
+ path: urlPath,
445
+ method: 'POST',
446
+ headers: headerParameters,
447
+ query: queryParameters,
448
+ body: AccountTextFilePostBodyToJSON(requestParameters['accountTextFilePostBody']),
449
+ }, initOverrides);
450
+
451
+ return new runtime.JSONApiResponse(response, (jsonValue) => ModelRecordFromJSON(jsonValue));
452
+ }
453
+
454
+ /**
455
+ * Creates an empty file to write in, at the root or inside another directory, and returns its record. The file is always text, and the name\'s extension, compared ignoring case, chooses its type: `.md` gives `text/markdown; charset=utf-8`, `.py` `text/x-python; charset=utf-8`, `.js` `text/javascript; charset=utf-8`, `.ts` `text/x-typescript; charset=utf-8` and `.go` `text/x-go; charset=utf-8`. Any other name, with or without an extension, gives `text/plain; charset=utf-8`. The file keeps that type when its content is replaced, as long as the new content is detected as plain text. Write the file\'s content by replacing it, with the `ETag` its content is read with. The name is normalised to Unicode NFC, and names are unique within a directory among its files and directories, compared exactly: a name already taken there is rejected with 409 rather than numbered, as an upload\'s would be. Returns 404 if the account has no directory with the given `parentId`. The file counts towards the account\'s 1 GiB storage quota like an upload, and is rejected with 413 when the account is already past it. Requires the *Edit file storage* permission.
456
+ * Create an empty text file in the account\'s files
457
+ */
458
+ async createAccountTextFiles(requestParameters: FilesApiCreateAccountTextFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelRecord> {
459
+ const response = await this.createAccountTextFilesRaw(requestParameters, initOverrides);
460
+ return await response.value();
461
+ }
462
+
391
463
  /**
392
464
  * Deletes an empty directory from the account\'s files. A directory that still holds a file or another directory is rejected with 409 `directory is not empty`: move or delete its contents first. Deleting a directory that is already gone succeeds rather than returning 404. Any other 409 means the directory changed during the request, and the request can be retried. Requires the *Edit file storage* permission.
393
465
  * Delete a directory