@spaciv/sdk 0.1.21 → 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.
Files changed (211) hide show
  1. package/.openapi-generator/FILES +23 -1
  2. package/README.md +2 -2
  3. package/dist/apis/LogicLayersApi.d.ts +279 -0
  4. package/dist/apis/{SpaceRulesetsApi.js → LogicLayersApi.js} +72 -62
  5. package/dist/apis/ObjectGroupsApi.d.ts +28 -1
  6. package/dist/apis/ObjectGroupsApi.js +40 -0
  7. package/dist/apis/PropertiesApi.d.ts +16 -16
  8. package/dist/apis/PropertiesApi.js +8 -8
  9. package/dist/apis/ScenariosApi.d.ts +4 -4
  10. package/dist/apis/ScenariosApi.js +2 -2
  11. package/dist/apis/TopDownModelsApi.d.ts +4 -4
  12. package/dist/apis/TopDownModelsApi.js +2 -2
  13. package/dist/apis/VariablesApi.d.ts +4 -4
  14. package/dist/apis/VariablesApi.js +2 -2
  15. package/dist/apis/index.d.ts +1 -1
  16. package/dist/apis/index.js +1 -1
  17. package/dist/esm/apis/LogicLayersApi.d.ts +279 -0
  18. package/dist/esm/apis/{SpaceRulesetsApi.js → LogicLayersApi.js} +70 -60
  19. package/dist/esm/apis/ObjectGroupsApi.d.ts +28 -1
  20. package/dist/esm/apis/ObjectGroupsApi.js +41 -1
  21. package/dist/esm/apis/PropertiesApi.d.ts +16 -16
  22. package/dist/esm/apis/PropertiesApi.js +8 -8
  23. package/dist/esm/apis/ScenariosApi.d.ts +4 -4
  24. package/dist/esm/apis/ScenariosApi.js +2 -2
  25. package/dist/esm/apis/TopDownModelsApi.d.ts +4 -4
  26. package/dist/esm/apis/TopDownModelsApi.js +2 -2
  27. package/dist/esm/apis/VariablesApi.d.ts +4 -4
  28. package/dist/esm/apis/VariablesApi.js +2 -2
  29. package/dist/esm/apis/index.d.ts +1 -1
  30. package/dist/esm/apis/index.js +1 -1
  31. package/dist/esm/models/CalcCompare.d.ts +45 -0
  32. package/dist/esm/models/CalcCompare.js +52 -0
  33. package/dist/esm/models/CalcCondition.d.ts +46 -0
  34. package/dist/esm/models/CalcCondition.js +53 -0
  35. package/dist/esm/models/CalcHasNode.d.ts +44 -0
  36. package/dist/esm/models/CalcHasNode.js +51 -0
  37. package/dist/esm/models/CalcIsObject.d.ts +32 -0
  38. package/dist/esm/models/CalcIsObject.js +43 -0
  39. package/dist/esm/models/CalcRuleRef.d.ts +2 -1
  40. package/dist/esm/models/CalcRuleRef.js +7 -0
  41. package/dist/esm/models/CalcRuleRefOneOf2.d.ts +3 -2
  42. package/dist/esm/models/CalcRuleRefOneOf2.js +4 -3
  43. package/dist/esm/models/CalcRuleRefOneOf3.d.ts +2 -3
  44. package/dist/esm/models/CalcRuleRefOneOf3.js +3 -4
  45. package/dist/esm/models/CalcRuleRefOneOf4.d.ts +3 -3
  46. package/dist/esm/models/CalcRuleRefOneOf4.js +4 -4
  47. package/dist/esm/models/CalcRuleRefOneOf5.d.ts +3 -2
  48. package/dist/esm/models/CalcRuleRefOneOf5.js +4 -3
  49. package/dist/esm/models/CalcRuleRefOneOf6.d.ts +32 -0
  50. package/dist/esm/models/CalcRuleRefOneOf6.js +43 -0
  51. package/dist/esm/models/CalcTest.d.ts +24 -0
  52. package/dist/esm/models/CalcTest.js +58 -0
  53. package/dist/esm/models/CalcTestOneOf.d.ts +33 -0
  54. package/dist/esm/models/CalcTestOneOf.js +44 -0
  55. package/dist/esm/models/CalcTestOneOf1.d.ts +33 -0
  56. package/dist/esm/models/CalcTestOneOf1.js +44 -0
  57. package/dist/esm/models/CalcTestOneOf2.d.ts +33 -0
  58. package/dist/esm/models/CalcTestOneOf2.js +44 -0
  59. package/dist/esm/models/Group.d.ts +45 -0
  60. package/dist/esm/models/Group.js +52 -0
  61. package/dist/esm/models/LayerVariablesRes.d.ts +1 -1
  62. package/dist/esm/models/LogicAssignment.d.ts +23 -0
  63. package/dist/esm/models/LogicAssignment.js +51 -0
  64. package/dist/esm/models/LogicAssignmentOneOf.d.ts +32 -0
  65. package/dist/esm/models/LogicAssignmentOneOf.js +43 -0
  66. package/dist/esm/models/LogicAssignmentOneOf1.d.ts +32 -0
  67. package/dist/esm/models/LogicAssignmentOneOf1.js +43 -0
  68. package/dist/esm/models/LogicDemand.d.ts +40 -0
  69. package/dist/esm/models/LogicDemand.js +49 -0
  70. package/dist/esm/models/LogicLayerConfig.d.ts +39 -0
  71. package/dist/esm/models/LogicLayerConfig.js +48 -0
  72. package/dist/esm/models/LogicPer.d.ts +45 -0
  73. package/dist/esm/models/LogicPer.js +52 -0
  74. package/dist/esm/models/LogicRule.d.ts +66 -0
  75. package/dist/esm/models/LogicRule.js +67 -0
  76. package/dist/esm/models/LogicSupply.d.ts +48 -0
  77. package/dist/esm/models/LogicSupply.js +54 -0
  78. package/dist/esm/models/LogicSupplyWeight.d.ts +32 -0
  79. package/dist/esm/models/LogicSupplyWeight.js +43 -0
  80. package/dist/esm/models/MaybeVarInt.d.ts +2 -2
  81. package/dist/esm/models/MaybeVarInt.js +5 -5
  82. package/dist/esm/models/MaybeVarProp.d.ts +2 -2
  83. package/dist/esm/models/MaybeVarProp.js +5 -5
  84. package/dist/esm/models/MaybeVarStr.d.ts +2 -2
  85. package/dist/esm/models/MaybeVarStr.js +5 -5
  86. package/dist/esm/models/ModelObject.d.ts +38 -0
  87. package/dist/esm/models/ModelObject.js +47 -0
  88. package/dist/esm/models/ObjectGroupListEntry.d.ts +0 -6
  89. package/dist/esm/models/ObjectGroupListEntry.js +0 -4
  90. package/dist/esm/models/SelectObjectsParamsWrapperBody.d.ts +33 -0
  91. package/dist/esm/models/SelectObjectsParamsWrapperBody.js +44 -0
  92. package/dist/esm/models/Selection.d.ts +39 -0
  93. package/dist/esm/models/Selection.js +48 -0
  94. package/dist/esm/models/SpaceRuleSetJSON.d.ts +3 -2
  95. package/dist/esm/models/SpaceRuleSetJSON.js +3 -2
  96. package/dist/esm/models/SpaceRulesetCreate.d.ts +1 -1
  97. package/dist/esm/models/index.d.ts +22 -0
  98. package/dist/esm/models/index.js +22 -0
  99. package/dist/models/CalcCompare.d.ts +45 -0
  100. package/dist/models/CalcCompare.js +59 -0
  101. package/dist/models/CalcCondition.d.ts +46 -0
  102. package/dist/models/CalcCondition.js +60 -0
  103. package/dist/models/CalcHasNode.d.ts +44 -0
  104. package/dist/models/CalcHasNode.js +58 -0
  105. package/dist/models/CalcIsObject.d.ts +32 -0
  106. package/dist/models/CalcIsObject.js +50 -0
  107. package/dist/models/CalcRuleRef.d.ts +2 -1
  108. package/dist/models/CalcRuleRef.js +7 -0
  109. package/dist/models/CalcRuleRefOneOf2.d.ts +3 -2
  110. package/dist/models/CalcRuleRefOneOf2.js +4 -3
  111. package/dist/models/CalcRuleRefOneOf3.d.ts +2 -3
  112. package/dist/models/CalcRuleRefOneOf3.js +3 -4
  113. package/dist/models/CalcRuleRefOneOf4.d.ts +3 -3
  114. package/dist/models/CalcRuleRefOneOf4.js +4 -4
  115. package/dist/models/CalcRuleRefOneOf5.d.ts +3 -2
  116. package/dist/models/CalcRuleRefOneOf5.js +4 -3
  117. package/dist/models/CalcRuleRefOneOf6.d.ts +32 -0
  118. package/dist/models/CalcRuleRefOneOf6.js +50 -0
  119. package/dist/models/CalcTest.d.ts +24 -0
  120. package/dist/models/CalcTest.js +64 -0
  121. package/dist/models/CalcTestOneOf.d.ts +33 -0
  122. package/dist/models/CalcTestOneOf.js +51 -0
  123. package/dist/models/CalcTestOneOf1.d.ts +33 -0
  124. package/dist/models/CalcTestOneOf1.js +51 -0
  125. package/dist/models/CalcTestOneOf2.d.ts +33 -0
  126. package/dist/models/CalcTestOneOf2.js +51 -0
  127. package/dist/models/Group.d.ts +45 -0
  128. package/dist/models/Group.js +59 -0
  129. package/dist/models/LayerVariablesRes.d.ts +1 -1
  130. package/dist/models/LogicAssignment.d.ts +23 -0
  131. package/dist/models/LogicAssignment.js +57 -0
  132. package/dist/models/LogicAssignmentOneOf.d.ts +32 -0
  133. package/dist/models/LogicAssignmentOneOf.js +50 -0
  134. package/dist/models/LogicAssignmentOneOf1.d.ts +32 -0
  135. package/dist/models/LogicAssignmentOneOf1.js +50 -0
  136. package/dist/models/LogicDemand.d.ts +40 -0
  137. package/dist/models/LogicDemand.js +56 -0
  138. package/dist/models/LogicLayerConfig.d.ts +39 -0
  139. package/dist/models/LogicLayerConfig.js +55 -0
  140. package/dist/models/LogicPer.d.ts +45 -0
  141. package/dist/models/LogicPer.js +59 -0
  142. package/dist/models/LogicRule.d.ts +66 -0
  143. package/dist/models/LogicRule.js +74 -0
  144. package/dist/models/LogicSupply.d.ts +48 -0
  145. package/dist/models/LogicSupply.js +61 -0
  146. package/dist/models/LogicSupplyWeight.d.ts +32 -0
  147. package/dist/models/LogicSupplyWeight.js +50 -0
  148. package/dist/models/MaybeVarInt.d.ts +2 -2
  149. package/dist/models/MaybeVarInt.js +5 -5
  150. package/dist/models/MaybeVarProp.d.ts +2 -2
  151. package/dist/models/MaybeVarProp.js +5 -5
  152. package/dist/models/MaybeVarStr.d.ts +2 -2
  153. package/dist/models/MaybeVarStr.js +5 -5
  154. package/dist/models/ModelObject.d.ts +38 -0
  155. package/dist/models/ModelObject.js +54 -0
  156. package/dist/models/ObjectGroupListEntry.d.ts +0 -6
  157. package/dist/models/ObjectGroupListEntry.js +0 -4
  158. package/dist/models/SelectObjectsParamsWrapperBody.d.ts +33 -0
  159. package/dist/models/SelectObjectsParamsWrapperBody.js +51 -0
  160. package/dist/models/Selection.d.ts +39 -0
  161. package/dist/models/Selection.js +55 -0
  162. package/dist/models/SpaceRuleSetJSON.d.ts +3 -2
  163. package/dist/models/SpaceRuleSetJSON.js +3 -2
  164. package/dist/models/SpaceRulesetCreate.d.ts +1 -1
  165. package/dist/models/index.d.ts +22 -0
  166. package/dist/models/index.js +22 -0
  167. package/package.json +1 -1
  168. package/src/apis/{SpaceRulesetsApi.ts → LogicLayersApi.ts} +136 -121
  169. package/src/apis/ObjectGroupsApi.ts +75 -0
  170. package/src/apis/PropertiesApi.ts +16 -16
  171. package/src/apis/ScenariosApi.ts +4 -4
  172. package/src/apis/TopDownModelsApi.ts +4 -4
  173. package/src/apis/VariablesApi.ts +4 -4
  174. package/src/apis/index.ts +1 -1
  175. package/src/models/CalcCompare.ts +92 -0
  176. package/src/models/CalcCondition.ts +99 -0
  177. package/src/models/CalcHasNode.ts +84 -0
  178. package/src/models/CalcIsObject.ts +66 -0
  179. package/src/models/CalcRuleRef.ts +14 -1
  180. package/src/models/CalcRuleRefOneOf2.ts +13 -5
  181. package/src/models/CalcRuleRefOneOf3.ts +5 -13
  182. package/src/models/CalcRuleRefOneOf4.ts +11 -11
  183. package/src/models/CalcRuleRefOneOf5.ts +13 -5
  184. package/src/models/CalcRuleRefOneOf6.ts +66 -0
  185. package/src/models/CalcTest.ts +89 -0
  186. package/src/models/CalcTestOneOf.ts +74 -0
  187. package/src/models/CalcTestOneOf1.ts +74 -0
  188. package/src/models/CalcTestOneOf2.ts +74 -0
  189. package/src/models/Group.ts +92 -0
  190. package/src/models/LayerVariablesRes.ts +1 -1
  191. package/src/models/LogicAssignment.ts +76 -0
  192. package/src/models/LogicAssignmentOneOf.ts +66 -0
  193. package/src/models/LogicAssignmentOneOf1.ts +66 -0
  194. package/src/models/LogicDemand.ts +90 -0
  195. package/src/models/LogicLayerConfig.ts +83 -0
  196. package/src/models/LogicPer.ts +92 -0
  197. package/src/models/LogicRule.ts +140 -0
  198. package/src/models/LogicSupply.ts +99 -0
  199. package/src/models/LogicSupplyWeight.ts +66 -0
  200. package/src/models/MaybeVarInt.ts +11 -11
  201. package/src/models/MaybeVarProp.ts +11 -11
  202. package/src/models/MaybeVarStr.ts +11 -11
  203. package/src/models/ModelObject.ts +75 -0
  204. package/src/models/ObjectGroupListEntry.ts +0 -9
  205. package/src/models/SelectObjectsParamsWrapperBody.ts +74 -0
  206. package/src/models/Selection.ts +83 -0
  207. package/src/models/SpaceRuleSetJSON.ts +12 -4
  208. package/src/models/SpaceRulesetCreate.ts +1 -1
  209. package/src/models/index.ts +22 -0
  210. package/dist/apis/SpaceRulesetsApi.d.ts +0 -269
  211. package/dist/esm/apis/SpaceRulesetsApi.d.ts +0 -269
@@ -0,0 +1,74 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { CalcHasNode } from './CalcHasNode';
17
+ import {
18
+ CalcHasNodeFromJSON,
19
+ CalcHasNodeFromJSONTyped,
20
+ CalcHasNodeToJSON,
21
+ CalcHasNodeToJSONTyped,
22
+ } from './CalcHasNode';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CalcTestOneOf1
28
+ */
29
+ export interface CalcTestOneOf1 {
30
+ /**
31
+ *
32
+ * @type {CalcHasNode}
33
+ * @memberof CalcTestOneOf1
34
+ */
35
+ has: CalcHasNode;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the CalcTestOneOf1 interface.
40
+ */
41
+ export function instanceOfCalcTestOneOf1(value: object): value is CalcTestOneOf1 {
42
+ if (!('has' in value) || value['has'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function CalcTestOneOf1FromJSON(json: any): CalcTestOneOf1 {
47
+ return CalcTestOneOf1FromJSONTyped(json, false);
48
+ }
49
+
50
+ export function CalcTestOneOf1FromJSONTyped(json: any, ignoreDiscriminator: boolean): CalcTestOneOf1 {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'has': CalcHasNodeFromJSON(json['has']),
57
+ };
58
+ }
59
+
60
+ export function CalcTestOneOf1ToJSON(json: any): CalcTestOneOf1 {
61
+ return CalcTestOneOf1ToJSONTyped(json, false);
62
+ }
63
+
64
+ export function CalcTestOneOf1ToJSONTyped(value?: CalcTestOneOf1 | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'has': CalcHasNodeToJSON(value['has']),
72
+ };
73
+ }
74
+
@@ -0,0 +1,74 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { CalcIsObject } from './CalcIsObject';
17
+ import {
18
+ CalcIsObjectFromJSON,
19
+ CalcIsObjectFromJSONTyped,
20
+ CalcIsObjectToJSON,
21
+ CalcIsObjectToJSONTyped,
22
+ } from './CalcIsObject';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CalcTestOneOf2
28
+ */
29
+ export interface CalcTestOneOf2 {
30
+ /**
31
+ *
32
+ * @type {CalcIsObject}
33
+ * @memberof CalcTestOneOf2
34
+ */
35
+ isObject: CalcIsObject;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the CalcTestOneOf2 interface.
40
+ */
41
+ export function instanceOfCalcTestOneOf2(value: object): value is CalcTestOneOf2 {
42
+ if (!('isObject' in value) || value['isObject'] === undefined) return false;
43
+ return true;
44
+ }
45
+
46
+ export function CalcTestOneOf2FromJSON(json: any): CalcTestOneOf2 {
47
+ return CalcTestOneOf2FromJSONTyped(json, false);
48
+ }
49
+
50
+ export function CalcTestOneOf2FromJSONTyped(json: any, ignoreDiscriminator: boolean): CalcTestOneOf2 {
51
+ if (json == null) {
52
+ return json;
53
+ }
54
+ return {
55
+
56
+ 'isObject': CalcIsObjectFromJSON(json['isObject']),
57
+ };
58
+ }
59
+
60
+ export function CalcTestOneOf2ToJSON(json: any): CalcTestOneOf2 {
61
+ return CalcTestOneOf2ToJSONTyped(json, false);
62
+ }
63
+
64
+ export function CalcTestOneOf2ToJSONTyped(value?: CalcTestOneOf2 | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'isObject': CalcIsObjectToJSON(value['isObject']),
72
+ };
73
+ }
74
+
@@ -0,0 +1,92 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { ModelObject } from './ModelObject';
17
+ import {
18
+ ModelObjectFromJSON,
19
+ ModelObjectFromJSONTyped,
20
+ ModelObjectToJSON,
21
+ ModelObjectToJSONTyped,
22
+ } from './ModelObject';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface Group
28
+ */
29
+ export interface Group {
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof Group
34
+ */
35
+ id: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof Group
40
+ */
41
+ name: string;
42
+ /**
43
+ *
44
+ * @type {Array<ModelObject>}
45
+ * @memberof Group
46
+ */
47
+ objects: Array<ModelObject>;
48
+ }
49
+
50
+ /**
51
+ * Check if a given object implements the Group interface.
52
+ */
53
+ export function instanceOfGroup(value: object): value is Group {
54
+ if (!('id' in value) || value['id'] === undefined) return false;
55
+ if (!('name' in value) || value['name'] === undefined) return false;
56
+ if (!('objects' in value) || value['objects'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function GroupFromJSON(json: any): Group {
61
+ return GroupFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): Group {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'id': json['id'],
71
+ 'name': json['name'],
72
+ 'objects': ((json['objects'] as Array<any>).map(ModelObjectFromJSON)),
73
+ };
74
+ }
75
+
76
+ export function GroupToJSON(json: any): Group {
77
+ return GroupToJSONTyped(json, false);
78
+ }
79
+
80
+ export function GroupToJSONTyped(value?: Group | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'id': value['id'],
88
+ 'name': value['name'],
89
+ 'objects': ((value['objects'] as Array<any>).map(ModelObjectToJSON)),
90
+ };
91
+ }
92
+
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface LayerVariablesRes {
22
22
  /**
23
- * For each active scenario whose layers' modifier formulas use account variables, those variable ids (account:<id>), including the layers of stacked scenarios.
23
+ * For each active scenario whose layers' modifier or logic layer formulas use account variables, those variable ids (account:<id>), including the layers of stacked scenarios.
24
24
  * @type {{ [key: string]: Array<string>; }}
25
25
  * @memberof LayerVariablesRes
26
26
  */
@@ -0,0 +1,76 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import type { LogicAssignmentOneOf } from './LogicAssignmentOneOf';
16
+ import {
17
+ instanceOfLogicAssignmentOneOf,
18
+ LogicAssignmentOneOfFromJSON,
19
+ LogicAssignmentOneOfFromJSONTyped,
20
+ LogicAssignmentOneOfToJSON,
21
+ } from './LogicAssignmentOneOf';
22
+ import type { LogicAssignmentOneOf1 } from './LogicAssignmentOneOf1';
23
+ import {
24
+ instanceOfLogicAssignmentOneOf1,
25
+ LogicAssignmentOneOf1FromJSON,
26
+ LogicAssignmentOneOf1FromJSONTyped,
27
+ LogicAssignmentOneOf1ToJSON,
28
+ } from './LogicAssignmentOneOf1';
29
+
30
+ /**
31
+ * @type LogicAssignment
32
+ *
33
+ * @export
34
+ */
35
+ export type LogicAssignment = LogicAssignmentOneOf | LogicAssignmentOneOf1;
36
+
37
+ export function LogicAssignmentFromJSON(json: any): LogicAssignment {
38
+ return LogicAssignmentFromJSONTyped(json, false);
39
+ }
40
+
41
+ export function LogicAssignmentFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogicAssignment {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ if (typeof json !== 'object') {
46
+ return json;
47
+ }
48
+ if (instanceOfLogicAssignmentOneOf(json)) {
49
+ return LogicAssignmentOneOfFromJSONTyped(json, true);
50
+ }
51
+ if (instanceOfLogicAssignmentOneOf1(json)) {
52
+ return LogicAssignmentOneOf1FromJSONTyped(json, true);
53
+ }
54
+ return {} as any;
55
+ }
56
+
57
+ export function LogicAssignmentToJSON(json: any): any {
58
+ return LogicAssignmentToJSONTyped(json, false);
59
+ }
60
+
61
+ export function LogicAssignmentToJSONTyped(value?: LogicAssignment | null, ignoreDiscriminator: boolean = false): any {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+ if (typeof value !== 'object') {
66
+ return value;
67
+ }
68
+ if (instanceOfLogicAssignmentOneOf(value)) {
69
+ return LogicAssignmentOneOfToJSON(value as LogicAssignmentOneOf);
70
+ }
71
+ if (instanceOfLogicAssignmentOneOf1(value)) {
72
+ return LogicAssignmentOneOf1ToJSON(value as LogicAssignmentOneOf1);
73
+ }
74
+ return {};
75
+ }
76
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface LogicAssignmentOneOf
20
+ */
21
+ export interface LogicAssignmentOneOf {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof LogicAssignmentOneOf
26
+ */
27
+ link: number;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the LogicAssignmentOneOf interface.
32
+ */
33
+ export function instanceOfLogicAssignmentOneOf(value: object): value is LogicAssignmentOneOf {
34
+ if (!('link' in value) || value['link'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function LogicAssignmentOneOfFromJSON(json: any): LogicAssignmentOneOf {
39
+ return LogicAssignmentOneOfFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function LogicAssignmentOneOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogicAssignmentOneOf {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'link': json['link'],
49
+ };
50
+ }
51
+
52
+ export function LogicAssignmentOneOfToJSON(json: any): LogicAssignmentOneOf {
53
+ return LogicAssignmentOneOfToJSONTyped(json, false);
54
+ }
55
+
56
+ export function LogicAssignmentOneOfToJSONTyped(value?: LogicAssignmentOneOf | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'link': value['link'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface LogicAssignmentOneOf1
20
+ */
21
+ export interface LogicAssignmentOneOf1 {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof LogicAssignmentOneOf1
26
+ */
27
+ node: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the LogicAssignmentOneOf1 interface.
32
+ */
33
+ export function instanceOfLogicAssignmentOneOf1(value: object): value is LogicAssignmentOneOf1 {
34
+ if (!('node' in value) || value['node'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function LogicAssignmentOneOf1FromJSON(json: any): LogicAssignmentOneOf1 {
39
+ return LogicAssignmentOneOf1FromJSONTyped(json, false);
40
+ }
41
+
42
+ export function LogicAssignmentOneOf1FromJSONTyped(json: any, ignoreDiscriminator: boolean): LogicAssignmentOneOf1 {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'node': json['node'],
49
+ };
50
+ }
51
+
52
+ export function LogicAssignmentOneOf1ToJSON(json: any): LogicAssignmentOneOf1 {
53
+ return LogicAssignmentOneOf1ToJSONTyped(json, false);
54
+ }
55
+
56
+ export function LogicAssignmentOneOf1ToJSONTyped(value?: LogicAssignmentOneOf1 | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'node': value['node'],
64
+ };
65
+ }
66
+
@@ -0,0 +1,90 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { CalcRuleRef } from './CalcRuleRef';
17
+ import {
18
+ CalcRuleRefFromJSON,
19
+ CalcRuleRefFromJSONTyped,
20
+ CalcRuleRefToJSON,
21
+ CalcRuleRefToJSONTyped,
22
+ } from './CalcRuleRef';
23
+ import type { FilterGroup } from './FilterGroup';
24
+ import {
25
+ FilterGroupFromJSON,
26
+ FilterGroupFromJSONTyped,
27
+ FilterGroupToJSON,
28
+ FilterGroupToJSONTyped,
29
+ } from './FilterGroup';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface LogicDemand
35
+ */
36
+ export interface LogicDemand {
37
+ /**
38
+ *
39
+ * @type {CalcRuleRef}
40
+ * @memberof LogicDemand
41
+ */
42
+ amount: CalcRuleRef;
43
+ /**
44
+ *
45
+ * @type {Array<FilterGroup>}
46
+ * @memberof LogicDemand
47
+ */
48
+ filters: Array<FilterGroup>;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the LogicDemand interface.
53
+ */
54
+ export function instanceOfLogicDemand(value: object): value is LogicDemand {
55
+ if (!('amount' in value) || value['amount'] === undefined) return false;
56
+ if (!('filters' in value) || value['filters'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function LogicDemandFromJSON(json: any): LogicDemand {
61
+ return LogicDemandFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function LogicDemandFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogicDemand {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'amount': CalcRuleRefFromJSON(json['amount']),
71
+ 'filters': ((json['filters'] as Array<any>).map(FilterGroupFromJSON)),
72
+ };
73
+ }
74
+
75
+ export function LogicDemandToJSON(json: any): LogicDemand {
76
+ return LogicDemandToJSONTyped(json, false);
77
+ }
78
+
79
+ export function LogicDemandToJSONTyped(value?: LogicDemand | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'amount': CalcRuleRefToJSON(value['amount']),
87
+ 'filters': ((value['filters'] as Array<any>).map(FilterGroupToJSON)),
88
+ };
89
+ }
90
+
@@ -0,0 +1,83 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * spaciv API
5
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@spaciv.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { LogicRule } from './LogicRule';
17
+ import {
18
+ LogicRuleFromJSON,
19
+ LogicRuleFromJSONTyped,
20
+ LogicRuleToJSON,
21
+ LogicRuleToJSONTyped,
22
+ } from './LogicRule';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface LogicLayerConfig
28
+ */
29
+ export interface LogicLayerConfig {
30
+ /**
31
+ *
32
+ * @type {Array<LogicRule>}
33
+ * @memberof LogicLayerConfig
34
+ */
35
+ rules: Array<LogicRule>;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof LogicLayerConfig
40
+ */
41
+ type: string;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the LogicLayerConfig interface.
46
+ */
47
+ export function instanceOfLogicLayerConfig(value: object): value is LogicLayerConfig {
48
+ if (!('rules' in value) || value['rules'] === undefined) return false;
49
+ if (!('type' in value) || value['type'] === undefined) return false;
50
+ return true;
51
+ }
52
+
53
+ export function LogicLayerConfigFromJSON(json: any): LogicLayerConfig {
54
+ return LogicLayerConfigFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function LogicLayerConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogicLayerConfig {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'rules': ((json['rules'] as Array<any>).map(LogicRuleFromJSON)),
64
+ 'type': json['type'],
65
+ };
66
+ }
67
+
68
+ export function LogicLayerConfigToJSON(json: any): LogicLayerConfig {
69
+ return LogicLayerConfigToJSONTyped(json, false);
70
+ }
71
+
72
+ export function LogicLayerConfigToJSONTyped(value?: LogicLayerConfig | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'rules': ((value['rules'] as Array<any>).map(LogicRuleToJSON)),
80
+ 'type': value['type'],
81
+ };
82
+ }
83
+