@spaciv/sdk 0.1.18 → 0.1.20

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 (73) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +2 -2
  3. package/dist/apis/FilesApi.d.ts +132 -18
  4. package/dist/apis/FilesApi.js +175 -8
  5. package/dist/apis/FloorPlansApi.d.ts +4 -4
  6. package/dist/apis/FloorPlansApi.js +2 -2
  7. package/dist/apis/ObjectGroupsApi.d.ts +8 -8
  8. package/dist/apis/ObjectGroupsApi.js +4 -4
  9. package/dist/apis/PropertiesApi.d.ts +8 -8
  10. package/dist/apis/PropertiesApi.js +4 -4
  11. package/dist/apis/ScenariosApi.d.ts +4 -4
  12. package/dist/apis/ScenariosApi.js +2 -2
  13. package/dist/apis/SpaceRulesetsApi.d.ts +4 -4
  14. package/dist/apis/SpaceRulesetsApi.js +2 -2
  15. package/dist/esm/apis/FilesApi.d.ts +132 -18
  16. package/dist/esm/apis/FilesApi.js +176 -9
  17. package/dist/esm/apis/FloorPlansApi.d.ts +4 -4
  18. package/dist/esm/apis/FloorPlansApi.js +2 -2
  19. package/dist/esm/apis/ObjectGroupsApi.d.ts +8 -8
  20. package/dist/esm/apis/ObjectGroupsApi.js +4 -4
  21. package/dist/esm/apis/PropertiesApi.d.ts +8 -8
  22. package/dist/esm/apis/PropertiesApi.js +4 -4
  23. package/dist/esm/apis/ScenariosApi.d.ts +4 -4
  24. package/dist/esm/apis/ScenariosApi.js +2 -2
  25. package/dist/esm/apis/SpaceRulesetsApi.d.ts +4 -4
  26. package/dist/esm/apis/SpaceRulesetsApi.js +2 -2
  27. package/dist/esm/models/AccountDirectoryPatchBody.d.ts +38 -0
  28. package/dist/esm/models/AccountDirectoryPatchBody.js +43 -0
  29. package/dist/esm/models/AccountDirectoryPostBody.d.ts +38 -0
  30. package/dist/esm/models/AccountDirectoryPostBody.js +45 -0
  31. package/dist/esm/models/AccountFilePatchBody.d.ts +8 -2
  32. package/dist/esm/models/AccountFilePatchBody.js +3 -3
  33. package/dist/esm/models/Directory.d.ts +56 -0
  34. package/dist/esm/models/Directory.js +57 -0
  35. package/dist/esm/models/DirectoryPage.d.ts +39 -0
  36. package/dist/esm/models/DirectoryPage.js +46 -0
  37. package/dist/esm/models/ListPage.d.ts +7 -0
  38. package/dist/esm/models/ListPage.js +3 -0
  39. package/dist/esm/models/ModelRecord.d.ts +7 -1
  40. package/dist/esm/models/ModelRecord.js +2 -0
  41. package/dist/esm/models/index.d.ts +4 -0
  42. package/dist/esm/models/index.js +4 -0
  43. package/dist/models/AccountDirectoryPatchBody.d.ts +38 -0
  44. package/dist/models/AccountDirectoryPatchBody.js +50 -0
  45. package/dist/models/AccountDirectoryPostBody.d.ts +38 -0
  46. package/dist/models/AccountDirectoryPostBody.js +52 -0
  47. package/dist/models/AccountFilePatchBody.d.ts +8 -2
  48. package/dist/models/AccountFilePatchBody.js +3 -3
  49. package/dist/models/Directory.d.ts +56 -0
  50. package/dist/models/Directory.js +64 -0
  51. package/dist/models/DirectoryPage.d.ts +39 -0
  52. package/dist/models/DirectoryPage.js +53 -0
  53. package/dist/models/ListPage.d.ts +7 -0
  54. package/dist/models/ListPage.js +3 -0
  55. package/dist/models/ModelRecord.d.ts +7 -1
  56. package/dist/models/ModelRecord.js +2 -0
  57. package/dist/models/index.d.ts +4 -0
  58. package/dist/models/index.js +4 -0
  59. package/package.json +1 -1
  60. package/src/apis/FilesApi.ts +319 -17
  61. package/src/apis/FloorPlansApi.ts +4 -4
  62. package/src/apis/ObjectGroupsApi.ts +8 -8
  63. package/src/apis/PropertiesApi.ts +8 -8
  64. package/src/apis/ScenariosApi.ts +4 -4
  65. package/src/apis/SpaceRulesetsApi.ts +4 -4
  66. package/src/models/AccountDirectoryPatchBody.ts +73 -0
  67. package/src/models/AccountDirectoryPostBody.ts +74 -0
  68. package/src/models/AccountFilePatchBody.ts +11 -4
  69. package/src/models/Directory.ts +101 -0
  70. package/src/models/DirectoryPage.ts +82 -0
  71. package/src/models/ListPage.ts +15 -0
  72. package/src/models/ModelRecord.ts +9 -1
  73. package/src/models/index.ts +4 -0
@@ -69,7 +69,7 @@ export class ScenariosApi extends runtime.BaseAPI {
69
69
  });
70
70
  }
71
71
  /**
72
- * Controls the lifecycle of a scenario. Pass `action=archive` to move it to the archive, `action=restore` to bring it back, or `action=purge` (the default when the parameter is omitted) to permanently delete the scenario. Requires the *Edit scenario planning* permission.
72
+ * Controls the lifecycle of a scenario. Pass `action=archive` to move it to the archive, `action=restore` to bring it back, or `action=purge` (the default when the parameter is omitted) to permanently delete the scenario. Purging removes the scenario from every variable\'s allowed `options`; a variable whose value was the scenario moves to its first remaining option. Requires the *Edit scenario planning* permission.
73
73
  * Delete or archive a scenario
74
74
  */
75
75
  deleteRaw(requestParameters, initOverrides) {
@@ -101,7 +101,7 @@ export class ScenariosApi extends runtime.BaseAPI {
101
101
  });
102
102
  }
103
103
  /**
104
- * Controls the lifecycle of a scenario. Pass `action=archive` to move it to the archive, `action=restore` to bring it back, or `action=purge` (the default when the parameter is omitted) to permanently delete the scenario. Requires the *Edit scenario planning* permission.
104
+ * Controls the lifecycle of a scenario. Pass `action=archive` to move it to the archive, `action=restore` to bring it back, or `action=purge` (the default when the parameter is omitted) to permanently delete the scenario. Purging removes the scenario from every variable\'s allowed `options`; a variable whose value was the scenario moves to its first remaining option. Requires the *Edit scenario planning* permission.
105
105
  * Delete or archive a scenario
106
106
  */
107
107
  delete(requestParameters, initOverrides) {
@@ -74,7 +74,7 @@ export interface SpaceRulesetsApiInterface {
74
74
  */
75
75
  createImage(requestParameters: SpaceRulesetsApiCreateImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
76
76
  /**
77
- * Permanently deletes a space ruleset from the current account. Requires the *Edit space rule set details* permission.
77
+ * Permanently deletes a space ruleset from the current account and removes it from every variable\'s allowed `options`; a variable whose value was the ruleset moves to its first remaining option. Requires the *Edit space rule set details* permission.
78
78
  * @summary Delete a space ruleset
79
79
  * @param {string} id
80
80
  * @param {*} [options] Override http request option.
@@ -83,7 +83,7 @@ export interface SpaceRulesetsApiInterface {
83
83
  */
84
84
  deleteRaw(requestParameters: SpaceRulesetsApiDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
85
85
  /**
86
- * Permanently deletes a space ruleset from the current account. Requires the *Edit space rule set details* permission.
86
+ * Permanently deletes a space ruleset from the current account and removes it from every variable\'s allowed `options`; a variable whose value was the ruleset moves to its first remaining option. Requires the *Edit space rule set details* permission.
87
87
  * Delete a space ruleset
88
88
  */
89
89
  delete(requestParameters: SpaceRulesetsApiDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
@@ -197,12 +197,12 @@ export declare class SpaceRulesetsApi extends runtime.BaseAPI implements SpaceRu
197
197
  */
198
198
  createImage(requestParameters: SpaceRulesetsApiCreateImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
199
199
  /**
200
- * Permanently deletes a space ruleset from the current account. Requires the *Edit space rule set details* permission.
200
+ * Permanently deletes a space ruleset from the current account and removes it from every variable\'s allowed `options`; a variable whose value was the ruleset moves to its first remaining option. Requires the *Edit space rule set details* permission.
201
201
  * Delete a space ruleset
202
202
  */
203
203
  deleteRaw(requestParameters: SpaceRulesetsApiDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
204
204
  /**
205
- * Permanently deletes a space ruleset from the current account. Requires the *Edit space rule set details* permission.
205
+ * Permanently deletes a space ruleset from the current account and removes it from every variable\'s allowed `options`; a variable whose value was the ruleset moves to its first remaining option. Requires the *Edit space rule set details* permission.
206
206
  * Delete a space ruleset
207
207
  */
208
208
  delete(requestParameters: SpaceRulesetsApiDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
@@ -128,7 +128,7 @@ export class SpaceRulesetsApi extends runtime.BaseAPI {
128
128
  });
129
129
  }
130
130
  /**
131
- * Permanently deletes a space ruleset from the current account. Requires the *Edit space rule set details* permission.
131
+ * Permanently deletes a space ruleset from the current account and removes it from every variable\'s allowed `options`; a variable whose value was the ruleset moves to its first remaining option. Requires the *Edit space rule set details* permission.
132
132
  * Delete a space ruleset
133
133
  */
134
134
  deleteRaw(requestParameters, initOverrides) {
@@ -157,7 +157,7 @@ export class SpaceRulesetsApi extends runtime.BaseAPI {
157
157
  });
158
158
  }
159
159
  /**
160
- * Permanently deletes a space ruleset from the current account. Requires the *Edit space rule set details* permission.
160
+ * Permanently deletes a space ruleset from the current account and removes it from every variable\'s allowed `options`; a variable whose value was the ruleset moves to its first remaining option. Requires the *Edit space rule set details* permission.
161
161
  * Delete a space ruleset
162
162
  */
163
163
  delete(requestParameters, initOverrides) {
@@ -0,0 +1,38 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface AccountDirectoryPatchBody
16
+ */
17
+ export interface AccountDirectoryPatchBody {
18
+ /**
19
+ * New display name for the directory. At most 255 bytes after normalising to Unicode NFC. Must not contain a forward slash or a backslash, and must not be . or ..
20
+ * @type {string}
21
+ * @memberof AccountDirectoryPatchBody
22
+ */
23
+ name?: string;
24
+ /**
25
+ * Identifier of the directory to move this one into, or an empty string to move it to the root.
26
+ * @type {string}
27
+ * @memberof AccountDirectoryPatchBody
28
+ */
29
+ parentId?: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the AccountDirectoryPatchBody interface.
33
+ */
34
+ export declare function instanceOfAccountDirectoryPatchBody(value: object): value is AccountDirectoryPatchBody;
35
+ export declare function AccountDirectoryPatchBodyFromJSON(json: any): AccountDirectoryPatchBody;
36
+ export declare function AccountDirectoryPatchBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountDirectoryPatchBody;
37
+ export declare function AccountDirectoryPatchBodyToJSON(json: any): AccountDirectoryPatchBody;
38
+ export declare function AccountDirectoryPatchBodyToJSONTyped(value?: AccountDirectoryPatchBody | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,43 @@
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
+ * Check if a given object implements the AccountDirectoryPatchBody interface.
16
+ */
17
+ export function instanceOfAccountDirectoryPatchBody(value) {
18
+ return true;
19
+ }
20
+ export function AccountDirectoryPatchBodyFromJSON(json) {
21
+ return AccountDirectoryPatchBodyFromJSONTyped(json, false);
22
+ }
23
+ export function AccountDirectoryPatchBodyFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'name': json['name'] == null ? undefined : json['name'],
29
+ 'parentId': json['parentId'] == null ? undefined : json['parentId'],
30
+ };
31
+ }
32
+ export function AccountDirectoryPatchBodyToJSON(json) {
33
+ return AccountDirectoryPatchBodyToJSONTyped(json, false);
34
+ }
35
+ export function AccountDirectoryPatchBodyToJSONTyped(value, ignoreDiscriminator = false) {
36
+ if (value == null) {
37
+ return value;
38
+ }
39
+ return {
40
+ 'name': value['name'],
41
+ 'parentId': value['parentId'],
42
+ };
43
+ }
@@ -0,0 +1,38 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface AccountDirectoryPostBody
16
+ */
17
+ export interface AccountDirectoryPostBody {
18
+ /**
19
+ * Display name of the directory. At most 255 bytes after normalising to Unicode NFC. Must not contain a forward slash or a backslash, and must not be . or ..
20
+ * @type {string}
21
+ * @memberof AccountDirectoryPostBody
22
+ */
23
+ name: string;
24
+ /**
25
+ * Identifier of the directory to create this one in. Leave it out to create it at the root.
26
+ * @type {string}
27
+ * @memberof AccountDirectoryPostBody
28
+ */
29
+ parentId?: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the AccountDirectoryPostBody interface.
33
+ */
34
+ export declare function instanceOfAccountDirectoryPostBody(value: object): value is AccountDirectoryPostBody;
35
+ export declare function AccountDirectoryPostBodyFromJSON(json: any): AccountDirectoryPostBody;
36
+ export declare function AccountDirectoryPostBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountDirectoryPostBody;
37
+ export declare function AccountDirectoryPostBodyToJSON(json: any): AccountDirectoryPostBody;
38
+ export declare function AccountDirectoryPostBodyToJSONTyped(value?: AccountDirectoryPostBody | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,45 @@
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
+ * Check if a given object implements the AccountDirectoryPostBody interface.
16
+ */
17
+ export function instanceOfAccountDirectoryPostBody(value) {
18
+ if (!('name' in value) || value['name'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function AccountDirectoryPostBodyFromJSON(json) {
23
+ return AccountDirectoryPostBodyFromJSONTyped(json, false);
24
+ }
25
+ export function AccountDirectoryPostBodyFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'name': json['name'],
31
+ 'parentId': json['parentId'] == null ? undefined : json['parentId'],
32
+ };
33
+ }
34
+ export function AccountDirectoryPostBodyToJSON(json) {
35
+ return AccountDirectoryPostBodyToJSONTyped(json, false);
36
+ }
37
+ export function AccountDirectoryPostBodyToJSONTyped(value, ignoreDiscriminator = false) {
38
+ if (value == null) {
39
+ return value;
40
+ }
41
+ return {
42
+ 'name': value['name'],
43
+ 'parentId': value['parentId'],
44
+ };
45
+ }
@@ -16,11 +16,17 @@
16
16
  */
17
17
  export interface AccountFilePatchBody {
18
18
  /**
19
- * New display name for the file. Must not contain a forward slash or a backslash.
19
+ * New display name for the file. At most 255 bytes after normalising to Unicode NFC. Must not contain a forward slash or a backslash.
20
20
  * @type {string}
21
21
  * @memberof AccountFilePatchBody
22
22
  */
23
- name: string;
23
+ name?: string;
24
+ /**
25
+ * Identifier of the directory to move the file into, or an empty string to move it to the root.
26
+ * @type {string}
27
+ * @memberof AccountFilePatchBody
28
+ */
29
+ parentId?: string;
24
30
  }
25
31
  /**
26
32
  * Check if a given object implements the AccountFilePatchBody interface.
@@ -15,8 +15,6 @@
15
15
  * Check if a given object implements the AccountFilePatchBody interface.
16
16
  */
17
17
  export function instanceOfAccountFilePatchBody(value) {
18
- if (!('name' in value) || value['name'] === undefined)
19
- return false;
20
18
  return true;
21
19
  }
22
20
  export function AccountFilePatchBodyFromJSON(json) {
@@ -27,7 +25,8 @@ export function AccountFilePatchBodyFromJSONTyped(json, ignoreDiscriminator) {
27
25
  return json;
28
26
  }
29
27
  return {
30
- 'name': json['name'],
28
+ 'name': json['name'] == null ? undefined : json['name'],
29
+ 'parentId': json['parentId'] == null ? undefined : json['parentId'],
31
30
  };
32
31
  }
33
32
  export function AccountFilePatchBodyToJSON(json) {
@@ -39,5 +38,6 @@ export function AccountFilePatchBodyToJSONTyped(value, ignoreDiscriminator = fal
39
38
  }
40
39
  return {
41
40
  'name': value['name'],
41
+ 'parentId': value['parentId'],
42
42
  };
43
43
  }
@@ -0,0 +1,56 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface Directory
16
+ */
17
+ export interface Directory {
18
+ /**
19
+ * When the directory was created (RFC 3339).
20
+ * @type {Date}
21
+ * @memberof Directory
22
+ */
23
+ createdAt: Date;
24
+ /**
25
+ * Identifier of the user who created the directory.
26
+ * @type {number}
27
+ * @memberof Directory
28
+ */
29
+ createdBy: number;
30
+ /**
31
+ * Opaque identifier of the directory.
32
+ * @type {string}
33
+ * @memberof Directory
34
+ */
35
+ id: string;
36
+ /**
37
+ * Display name of the directory. Nothing else in the same parent has the same name, compared exactly and after normalising to Unicode NFC.
38
+ * @type {string}
39
+ * @memberof Directory
40
+ */
41
+ name: string;
42
+ /**
43
+ * Identifier of the directory this one is in. Absent for a directory at the root.
44
+ * @type {string}
45
+ * @memberof Directory
46
+ */
47
+ parentId?: string;
48
+ }
49
+ /**
50
+ * Check if a given object implements the Directory interface.
51
+ */
52
+ export declare function instanceOfDirectory(value: object): value is Directory;
53
+ export declare function DirectoryFromJSON(json: any): Directory;
54
+ export declare function DirectoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): Directory;
55
+ export declare function DirectoryToJSON(json: any): Directory;
56
+ export declare function DirectoryToJSONTyped(value?: Directory | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
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
+ * Check if a given object implements the Directory interface.
16
+ */
17
+ export function instanceOfDirectory(value) {
18
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
19
+ return false;
20
+ if (!('createdBy' in value) || value['createdBy'] === undefined)
21
+ return false;
22
+ if (!('id' in value) || value['id'] === undefined)
23
+ return false;
24
+ if (!('name' in value) || value['name'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function DirectoryFromJSON(json) {
29
+ return DirectoryFromJSONTyped(json, false);
30
+ }
31
+ export function DirectoryFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'createdAt': (new Date(json['createdAt'])),
37
+ 'createdBy': json['createdBy'],
38
+ 'id': json['id'],
39
+ 'name': json['name'],
40
+ 'parentId': json['parentId'] == null ? undefined : json['parentId'],
41
+ };
42
+ }
43
+ export function DirectoryToJSON(json) {
44
+ return DirectoryToJSONTyped(json, false);
45
+ }
46
+ export function DirectoryToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'createdAt': ((value['createdAt']).toISOString()),
52
+ 'createdBy': value['createdBy'],
53
+ 'id': value['id'],
54
+ 'name': value['name'],
55
+ 'parentId': value['parentId'],
56
+ };
57
+ }
@@ -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 { Directory } from './Directory';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface DirectoryPage
17
+ */
18
+ export interface DirectoryPage {
19
+ /**
20
+ *
21
+ * @type {Array<Directory>}
22
+ * @memberof DirectoryPage
23
+ */
24
+ directories: Array<Directory>;
25
+ /**
26
+ * Pass back as cursor to fetch the following page. Absent on the last page.
27
+ * @type {string}
28
+ * @memberof DirectoryPage
29
+ */
30
+ nextCursor?: string;
31
+ }
32
+ /**
33
+ * Check if a given object implements the DirectoryPage interface.
34
+ */
35
+ export declare function instanceOfDirectoryPage(value: object): value is DirectoryPage;
36
+ export declare function DirectoryPageFromJSON(json: any): DirectoryPage;
37
+ export declare function DirectoryPageFromJSONTyped(json: any, ignoreDiscriminator: boolean): DirectoryPage;
38
+ export declare function DirectoryPageToJSON(json: any): DirectoryPage;
39
+ export declare function DirectoryPageToJSONTyped(value?: DirectoryPage | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,46 @@
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
+ import { DirectoryFromJSON, DirectoryToJSON, } from './Directory';
15
+ /**
16
+ * Check if a given object implements the DirectoryPage interface.
17
+ */
18
+ export function instanceOfDirectoryPage(value) {
19
+ if (!('directories' in value) || value['directories'] === undefined)
20
+ return false;
21
+ return true;
22
+ }
23
+ export function DirectoryPageFromJSON(json) {
24
+ return DirectoryPageFromJSONTyped(json, false);
25
+ }
26
+ export function DirectoryPageFromJSONTyped(json, ignoreDiscriminator) {
27
+ if (json == null) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'directories': (json['directories'].map(DirectoryFromJSON)),
32
+ 'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
33
+ };
34
+ }
35
+ export function DirectoryPageToJSON(json) {
36
+ return DirectoryPageToJSONTyped(json, false);
37
+ }
38
+ export function DirectoryPageToJSONTyped(value, ignoreDiscriminator = false) {
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'directories': (value['directories'].map(DirectoryToJSON)),
44
+ 'nextCursor': value['nextCursor'],
45
+ };
46
+ }
@@ -10,12 +10,19 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { ModelRecord } from './ModelRecord';
13
+ import type { Directory } from './Directory';
13
14
  /**
14
15
  *
15
16
  * @export
16
17
  * @interface ListPage
17
18
  */
18
19
  export interface ListPage {
20
+ /**
21
+ * Directories directly inside the listed directory. Returned only when a parent is given, and only on the pages that hold some.
22
+ * @type {Array<Directory>}
23
+ * @memberof ListPage
24
+ */
25
+ directories?: Array<Directory>;
19
26
  /**
20
27
  *
21
28
  * @type {Array<ModelRecord>}
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { ModelRecordFromJSON, ModelRecordToJSON, } from './ModelRecord';
15
+ import { DirectoryFromJSON, DirectoryToJSON, } from './Directory';
15
16
  /**
16
17
  * Check if a given object implements the ListPage interface.
17
18
  */
@@ -28,6 +29,7 @@ export function ListPageFromJSONTyped(json, ignoreDiscriminator) {
28
29
  return json;
29
30
  }
30
31
  return {
32
+ 'directories': json['directories'] == null ? undefined : (json['directories'].map(DirectoryFromJSON)),
31
33
  'files': (json['files'].map(ModelRecordFromJSON)),
32
34
  'nextCursor': json['nextCursor'] == null ? undefined : json['nextCursor'],
33
35
  };
@@ -40,6 +42,7 @@ export function ListPageToJSONTyped(value, ignoreDiscriminator = false) {
40
42
  return value;
41
43
  }
42
44
  return {
45
+ 'directories': value['directories'] == null ? undefined : (value['directories'].map(DirectoryToJSON)),
43
46
  'files': (value['files'].map(ModelRecordToJSON)),
44
47
  'nextCursor': value['nextCursor'],
45
48
  };
@@ -34,11 +34,17 @@ export interface ModelRecord {
34
34
  */
35
35
  mimeType: string;
36
36
  /**
37
- * Display name of the file, taken from the uploaded file name and changeable afterwards.
37
+ * Display name of the file, taken from the uploaded file name and changeable afterwards. Nothing else in the same directory has the same name, compared exactly and after normalising to Unicode NFC.
38
38
  * @type {string}
39
39
  * @memberof ModelRecord
40
40
  */
41
41
  name: string;
42
+ /**
43
+ * Identifier of the directory the file is in. Absent for a file at the root.
44
+ * @type {string}
45
+ * @memberof ModelRecord
46
+ */
47
+ parentId?: string;
42
48
  /**
43
49
  * Name of the virus signature the file matched when it was quarantined.
44
50
  * @type {string}
@@ -41,6 +41,7 @@ export function ModelRecordFromJSONTyped(json, ignoreDiscriminator) {
41
41
  'id': json['id'],
42
42
  'mimeType': json['mimeType'],
43
43
  'name': json['name'],
44
+ 'parentId': json['parentId'] == null ? undefined : json['parentId'],
44
45
  'quarantineSignature': json['quarantineSignature'] == null ? undefined : json['quarantineSignature'],
45
46
  'quarantinedAt': json['quarantinedAt'] == null ? undefined : (new Date(json['quarantinedAt'])),
46
47
  'size': json['size'],
@@ -59,6 +60,7 @@ export function ModelRecordToJSONTyped(value, ignoreDiscriminator = false) {
59
60
  'id': value['id'],
60
61
  'mimeType': value['mimeType'],
61
62
  'name': value['name'],
63
+ 'parentId': value['parentId'],
62
64
  'quarantineSignature': value['quarantineSignature'],
63
65
  'quarantinedAt': value['quarantinedAt'] == null ? undefined : ((value['quarantinedAt']).toISOString()),
64
66
  'size': value['size'],
@@ -4,6 +4,8 @@ export * from './AccountAuthOption';
4
4
  export * from './AccountCalculationUsageBody';
5
5
  export * from './AccountCalculationUsageDay';
6
6
  export * from './AccountDetailsResBody';
7
+ export * from './AccountDirectoryPatchBody';
8
+ export * from './AccountDirectoryPostBody';
7
9
  export * from './AccountFilePatchBody';
8
10
  export * from './AccountGetAuthOptionsResBody';
9
11
  export * from './AccountOIDCProvider';
@@ -167,6 +169,8 @@ export * from './DatasetDataOneOf2';
167
169
  export * from './DatasetModify';
168
170
  export * from './DatasetRes';
169
171
  export * from './DaysOffData';
172
+ export * from './Directory';
173
+ export * from './DirectoryPage';
170
174
  export * from './EntityChangeActor';
171
175
  export * from './EntityChangedEvent';
172
176
  export * from './EntryPatch';
@@ -6,6 +6,8 @@ export * from './AccountAuthOption';
6
6
  export * from './AccountCalculationUsageBody';
7
7
  export * from './AccountCalculationUsageDay';
8
8
  export * from './AccountDetailsResBody';
9
+ export * from './AccountDirectoryPatchBody';
10
+ export * from './AccountDirectoryPostBody';
9
11
  export * from './AccountFilePatchBody';
10
12
  export * from './AccountGetAuthOptionsResBody';
11
13
  export * from './AccountOIDCProvider';
@@ -169,6 +171,8 @@ export * from './DatasetDataOneOf2';
169
171
  export * from './DatasetModify';
170
172
  export * from './DatasetRes';
171
173
  export * from './DaysOffData';
174
+ export * from './Directory';
175
+ export * from './DirectoryPage';
172
176
  export * from './EntityChangeActor';
173
177
  export * from './EntityChangedEvent';
174
178
  export * from './EntryPatch';