@spaciv/sdk 0.1.25 → 0.1.27

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 (61) hide show
  1. package/.openapi-generator/FILES +3 -0
  2. package/README.md +2 -2
  3. package/dist/apis/AccountsApi.d.ts +37 -10
  4. package/dist/apis/AccountsApi.js +49 -4
  5. package/dist/apis/FilesApi.d.ts +52 -27
  6. package/dist/apis/FilesApi.js +50 -12
  7. package/dist/apis/InternalApi.d.ts +4 -4
  8. package/dist/apis/InternalApi.js +2 -2
  9. package/dist/esm/apis/AccountsApi.d.ts +37 -10
  10. package/dist/esm/apis/AccountsApi.js +50 -5
  11. package/dist/esm/apis/FilesApi.d.ts +52 -27
  12. package/dist/esm/apis/FilesApi.js +51 -13
  13. package/dist/esm/apis/InternalApi.d.ts +4 -4
  14. package/dist/esm/apis/InternalApi.js +2 -2
  15. package/dist/esm/models/AccountDirectoryPatchBody.d.ts +12 -0
  16. package/dist/esm/models/AccountDirectoryPatchBody.js +4 -0
  17. package/dist/esm/models/AccountDuplicateReqBody.d.ts +32 -0
  18. package/dist/esm/models/AccountDuplicateReqBody.js +43 -0
  19. package/dist/esm/models/AccountFilePatchBody.d.ts +12 -0
  20. package/dist/esm/models/AccountFilePatchBody.js +4 -0
  21. package/dist/esm/models/Directory.d.ts +14 -0
  22. package/dist/esm/models/Directory.js +4 -0
  23. package/dist/esm/models/ListPage.d.ts +1 -1
  24. package/dist/esm/models/ModelRecord.d.ts +14 -0
  25. package/dist/esm/models/ModelRecord.js +4 -0
  26. package/dist/esm/models/ReservedTagInfo.d.ts +46 -0
  27. package/dist/esm/models/ReservedTagInfo.js +54 -0
  28. package/dist/esm/models/TagList.d.ts +39 -0
  29. package/dist/esm/models/TagList.js +48 -0
  30. package/dist/esm/models/index.d.ts +3 -0
  31. package/dist/esm/models/index.js +3 -0
  32. package/dist/models/AccountDirectoryPatchBody.d.ts +12 -0
  33. package/dist/models/AccountDirectoryPatchBody.js +4 -0
  34. package/dist/models/AccountDuplicateReqBody.d.ts +32 -0
  35. package/dist/models/AccountDuplicateReqBody.js +50 -0
  36. package/dist/models/AccountFilePatchBody.d.ts +12 -0
  37. package/dist/models/AccountFilePatchBody.js +4 -0
  38. package/dist/models/Directory.d.ts +14 -0
  39. package/dist/models/Directory.js +4 -0
  40. package/dist/models/ListPage.d.ts +1 -1
  41. package/dist/models/ModelRecord.d.ts +14 -0
  42. package/dist/models/ModelRecord.js +4 -0
  43. package/dist/models/ReservedTagInfo.d.ts +46 -0
  44. package/dist/models/ReservedTagInfo.js +62 -0
  45. package/dist/models/TagList.d.ts +39 -0
  46. package/dist/models/TagList.js +55 -0
  47. package/dist/models/index.d.ts +3 -0
  48. package/dist/models/index.js +3 -0
  49. package/package.json +1 -1
  50. package/src/apis/AccountsApi.ts +85 -9
  51. package/src/apis/FilesApi.ts +89 -26
  52. package/src/apis/InternalApi.ts +4 -4
  53. package/src/models/AccountDirectoryPatchBody.ts +16 -0
  54. package/src/models/AccountDuplicateReqBody.ts +66 -0
  55. package/src/models/AccountFilePatchBody.ts +16 -0
  56. package/src/models/Directory.ts +16 -0
  57. package/src/models/ListPage.ts +1 -1
  58. package/src/models/ModelRecord.ts +16 -0
  59. package/src/models/ReservedTagInfo.ts +86 -0
  60. package/src/models/TagList.ts +83 -0
  61. package/src/models/index.ts +3 -0
@@ -0,0 +1,32 @@
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 AccountDuplicateReqBody
16
+ */
17
+ export interface AccountDuplicateReqBody {
18
+ /**
19
+ * Display name of the new account. Must not already be in use.
20
+ * @type {string}
21
+ * @memberof AccountDuplicateReqBody
22
+ */
23
+ name: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AccountDuplicateReqBody interface.
27
+ */
28
+ export declare function instanceOfAccountDuplicateReqBody(value: object): value is AccountDuplicateReqBody;
29
+ export declare function AccountDuplicateReqBodyFromJSON(json: any): AccountDuplicateReqBody;
30
+ export declare function AccountDuplicateReqBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountDuplicateReqBody;
31
+ export declare function AccountDuplicateReqBodyToJSON(json: any): AccountDuplicateReqBody;
32
+ export declare function AccountDuplicateReqBodyToJSONTyped(value?: AccountDuplicateReqBody | 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 AccountDuplicateReqBody interface.
16
+ */
17
+ export function instanceOfAccountDuplicateReqBody(value) {
18
+ if (!('name' in value) || value['name'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function AccountDuplicateReqBodyFromJSON(json) {
23
+ return AccountDuplicateReqBodyFromJSONTyped(json, false);
24
+ }
25
+ export function AccountDuplicateReqBodyFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'name': json['name'],
31
+ };
32
+ }
33
+ export function AccountDuplicateReqBodyToJSON(json) {
34
+ return AccountDuplicateReqBodyToJSONTyped(json, false);
35
+ }
36
+ export function AccountDuplicateReqBodyToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'name': value['name'],
42
+ };
43
+ }
@@ -15,6 +15,12 @@
15
15
  * @interface AccountFilePatchBody
16
16
  */
17
17
  export interface AccountFilePatchBody {
18
+ /**
19
+ * Tags to add to the file. Each is lowercased and must then be at most 32 letters, digits and hyphens, starting with a letter or digit. A file can have at most 20 tags.
20
+ * @type {Array<string>}
21
+ * @memberof AccountFilePatchBody
22
+ */
23
+ addTags?: Array<string>;
18
24
  /**
19
25
  * 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
26
  * @type {string}
@@ -27,6 +33,12 @@ export interface AccountFilePatchBody {
27
33
  * @memberof AccountFilePatchBody
28
34
  */
29
35
  parentId?: string;
36
+ /**
37
+ * Tags to remove from the file. Removing a tag the file does not have changes nothing.
38
+ * @type {Array<string>}
39
+ * @memberof AccountFilePatchBody
40
+ */
41
+ removeTags?: Array<string>;
30
42
  }
31
43
  /**
32
44
  * Check if a given object implements the AccountFilePatchBody interface.
@@ -25,8 +25,10 @@ export function AccountFilePatchBodyFromJSONTyped(json, ignoreDiscriminator) {
25
25
  return json;
26
26
  }
27
27
  return {
28
+ 'addTags': json['addTags'] == null ? undefined : json['addTags'],
28
29
  'name': json['name'] == null ? undefined : json['name'],
29
30
  'parentId': json['parentId'] == null ? undefined : json['parentId'],
31
+ 'removeTags': json['removeTags'] == null ? undefined : json['removeTags'],
30
32
  };
31
33
  }
32
34
  export function AccountFilePatchBodyToJSON(json) {
@@ -37,7 +39,9 @@ export function AccountFilePatchBodyToJSONTyped(value, ignoreDiscriminator = fal
37
39
  return value;
38
40
  }
39
41
  return {
42
+ 'addTags': value['addTags'],
40
43
  'name': value['name'],
41
44
  'parentId': value['parentId'],
45
+ 'removeTags': value['removeTags'],
42
46
  };
43
47
  }
@@ -45,6 +45,20 @@ export interface Directory {
45
45
  * @memberof Directory
46
46
  */
47
47
  parentId?: string;
48
+ /**
49
+ * Problems found with the directory by its reserved tags' checks, by tag. Absent when there are none.
50
+ * @type {{ [key: string]: Array<string>; }}
51
+ * @memberof Directory
52
+ */
53
+ tagProblems?: {
54
+ [key: string]: Array<string>;
55
+ };
56
+ /**
57
+ * The directory's tags, in alphabetical order. Absent when the directory has none.
58
+ * @type {Array<string>}
59
+ * @memberof Directory
60
+ */
61
+ tags?: Array<string>;
48
62
  }
49
63
  /**
50
64
  * Check if a given object implements the Directory interface.
@@ -38,6 +38,8 @@ export function DirectoryFromJSONTyped(json, ignoreDiscriminator) {
38
38
  'id': json['id'],
39
39
  'name': json['name'],
40
40
  'parentId': json['parentId'] == null ? undefined : json['parentId'],
41
+ 'tagProblems': json['tagProblems'] == null ? undefined : json['tagProblems'],
42
+ 'tags': json['tags'] == null ? undefined : json['tags'],
41
43
  };
42
44
  }
43
45
  export function DirectoryToJSON(json) {
@@ -53,5 +55,7 @@ export function DirectoryToJSONTyped(value, ignoreDiscriminator = false) {
53
55
  'id': value['id'],
54
56
  'name': value['name'],
55
57
  'parentId': value['parentId'],
58
+ 'tagProblems': value['tagProblems'],
59
+ 'tags': value['tags'],
56
60
  };
57
61
  }
@@ -18,7 +18,7 @@ import type { Directory } from './Directory';
18
18
  */
19
19
  export interface ListPage {
20
20
  /**
21
- * Directories directly inside the listed directory. Returned only when a parent is given, and only on the pages that hold some.
21
+ * With a parent, the directories directly inside it; with a tag, the directories that have it. Returned only on the pages that hold some.
22
22
  * @type {Array<Directory>}
23
23
  * @memberof ListPage
24
24
  */
@@ -63,6 +63,20 @@ export interface ModelRecord {
63
63
  * @memberof ModelRecord
64
64
  */
65
65
  size: number;
66
+ /**
67
+ * Problems found with the file by its reserved tags' checks, by tag. Absent when there are none.
68
+ * @type {{ [key: string]: Array<string>; }}
69
+ * @memberof ModelRecord
70
+ */
71
+ tagProblems?: {
72
+ [key: string]: Array<string>;
73
+ };
74
+ /**
75
+ * The file's tags, in alphabetical order. Absent when the file has none.
76
+ * @type {Array<string>}
77
+ * @memberof ModelRecord
78
+ */
79
+ tags?: Array<string>;
66
80
  /**
67
81
  * Identifier of the user who uploaded the file.
68
82
  * @type {number}
@@ -45,6 +45,8 @@ export function ModelRecordFromJSONTyped(json, ignoreDiscriminator) {
45
45
  'quarantineSignature': json['quarantineSignature'] == null ? undefined : json['quarantineSignature'],
46
46
  'quarantinedAt': json['quarantinedAt'] == null ? undefined : (new Date(json['quarantinedAt'])),
47
47
  'size': json['size'],
48
+ 'tagProblems': json['tagProblems'] == null ? undefined : json['tagProblems'],
49
+ 'tags': json['tags'] == null ? undefined : json['tags'],
48
50
  'uploadedBy': json['uploadedBy'],
49
51
  };
50
52
  }
@@ -64,6 +66,8 @@ export function ModelRecordToJSONTyped(value, ignoreDiscriminator = false) {
64
66
  'quarantineSignature': value['quarantineSignature'],
65
67
  'quarantinedAt': value['quarantinedAt'] == null ? undefined : ((value['quarantinedAt']).toISOString()),
66
68
  'size': value['size'],
69
+ 'tagProblems': value['tagProblems'],
70
+ 'tags': value['tags'],
67
71
  'uploadedBy': value['uploadedBy'],
68
72
  };
69
73
  }
@@ -0,0 +1,46 @@
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 ReservedTagInfo
16
+ */
17
+ export interface ReservedTagInfo {
18
+ /**
19
+ * The kinds of item the tag can be applied to.
20
+ * @type {Array<string>}
21
+ * @memberof ReservedTagInfo
22
+ */
23
+ kinds: Array<ReservedTagInfoKindsEnum>;
24
+ /**
25
+ * The reserved tag.
26
+ * @type {string}
27
+ * @memberof ReservedTagInfo
28
+ */
29
+ name: string;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const ReservedTagInfoKindsEnum: {
35
+ readonly File: "file";
36
+ readonly Directory: "directory";
37
+ };
38
+ export type ReservedTagInfoKindsEnum = typeof ReservedTagInfoKindsEnum[keyof typeof ReservedTagInfoKindsEnum];
39
+ /**
40
+ * Check if a given object implements the ReservedTagInfo interface.
41
+ */
42
+ export declare function instanceOfReservedTagInfo(value: object): value is ReservedTagInfo;
43
+ export declare function ReservedTagInfoFromJSON(json: any): ReservedTagInfo;
44
+ export declare function ReservedTagInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReservedTagInfo;
45
+ export declare function ReservedTagInfoToJSON(json: any): ReservedTagInfo;
46
+ export declare function ReservedTagInfoToJSONTyped(value?: ReservedTagInfo | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
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
+ * @export
16
+ */
17
+ export const ReservedTagInfoKindsEnum = {
18
+ File: 'file',
19
+ Directory: 'directory'
20
+ };
21
+ /**
22
+ * Check if a given object implements the ReservedTagInfo interface.
23
+ */
24
+ export function instanceOfReservedTagInfo(value) {
25
+ if (!('kinds' in value) || value['kinds'] === undefined)
26
+ return false;
27
+ if (!('name' in value) || value['name'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ export function ReservedTagInfoFromJSON(json) {
32
+ return ReservedTagInfoFromJSONTyped(json, false);
33
+ }
34
+ export function ReservedTagInfoFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'kinds': json['kinds'],
40
+ 'name': json['name'],
41
+ };
42
+ }
43
+ export function ReservedTagInfoToJSON(json) {
44
+ return ReservedTagInfoToJSONTyped(json, false);
45
+ }
46
+ export function ReservedTagInfoToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'kinds': value['kinds'],
52
+ 'name': value['name'],
53
+ };
54
+ }
@@ -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 { ReservedTagInfo } from './ReservedTagInfo';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface TagList
17
+ */
18
+ export interface TagList {
19
+ /**
20
+ * The tags that give an item a meaning Spaciv acts on. Adding or removing one, or changing anything in an item that has one, needs a particular permission.
21
+ * @type {Array<ReservedTagInfo>}
22
+ * @memberof TagList
23
+ */
24
+ reserved: Array<ReservedTagInfo>;
25
+ /**
26
+ * Every tag on the account's files and directories, in alphabetical order.
27
+ * @type {Array<string>}
28
+ * @memberof TagList
29
+ */
30
+ tags: Array<string>;
31
+ }
32
+ /**
33
+ * Check if a given object implements the TagList interface.
34
+ */
35
+ export declare function instanceOfTagList(value: object): value is TagList;
36
+ export declare function TagListFromJSON(json: any): TagList;
37
+ export declare function TagListFromJSONTyped(json: any, ignoreDiscriminator: boolean): TagList;
38
+ export declare function TagListToJSON(json: any): TagList;
39
+ export declare function TagListToJSONTyped(value?: TagList | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
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 { ReservedTagInfoFromJSON, ReservedTagInfoToJSON, } from './ReservedTagInfo';
15
+ /**
16
+ * Check if a given object implements the TagList interface.
17
+ */
18
+ export function instanceOfTagList(value) {
19
+ if (!('reserved' in value) || value['reserved'] === undefined)
20
+ return false;
21
+ if (!('tags' in value) || value['tags'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function TagListFromJSON(json) {
26
+ return TagListFromJSONTyped(json, false);
27
+ }
28
+ export function TagListFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'reserved': (json['reserved'].map(ReservedTagInfoFromJSON)),
34
+ 'tags': json['tags'],
35
+ };
36
+ }
37
+ export function TagListToJSON(json) {
38
+ return TagListToJSONTyped(json, false);
39
+ }
40
+ export function TagListToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'reserved': (value['reserved'].map(ReservedTagInfoToJSON)),
46
+ 'tags': value['tags'],
47
+ };
48
+ }
@@ -6,6 +6,7 @@ export * from './AccountCalculationUsageDay';
6
6
  export * from './AccountDetailsResBody';
7
7
  export * from './AccountDirectoryPatchBody';
8
8
  export * from './AccountDirectoryPostBody';
9
+ export * from './AccountDuplicateReqBody';
9
10
  export * from './AccountFilePatchBody';
10
11
  export * from './AccountGetAuthOptionsResBody';
11
12
  export * from './AccountOIDCProvider';
@@ -306,6 +307,7 @@ export * from './ReferencesRes';
306
307
  export * from './RelationshipData';
307
308
  export * from './RepairFloorplansResBody';
308
309
  export * from './ReportParamsWrapperBody';
310
+ export * from './ReservedTagInfo';
309
311
  export * from './RetriesResBody';
310
312
  export * from './RetryBody';
311
313
  export * from './RoleTagsData';
@@ -367,6 +369,7 @@ export * from './SpaceRulesetListEntry';
367
369
  export * from './SpaceRulesetUpdate';
368
370
  export * from './Step';
369
371
  export * from './SysAdminUpdateFeatureGroupsParamsWrapperBody';
372
+ export * from './TagList';
370
373
  export * from './TopDownModelChangelogBody';
371
374
  export * from './TopDownModelEntry';
372
375
  export * from './TopDownModelEntryChangelogBody';
@@ -8,6 +8,7 @@ export * from './AccountCalculationUsageDay';
8
8
  export * from './AccountDetailsResBody';
9
9
  export * from './AccountDirectoryPatchBody';
10
10
  export * from './AccountDirectoryPostBody';
11
+ export * from './AccountDuplicateReqBody';
11
12
  export * from './AccountFilePatchBody';
12
13
  export * from './AccountGetAuthOptionsResBody';
13
14
  export * from './AccountOIDCProvider';
@@ -308,6 +309,7 @@ export * from './ReferencesRes';
308
309
  export * from './RelationshipData';
309
310
  export * from './RepairFloorplansResBody';
310
311
  export * from './ReportParamsWrapperBody';
312
+ export * from './ReservedTagInfo';
311
313
  export * from './RetriesResBody';
312
314
  export * from './RetryBody';
313
315
  export * from './RoleTagsData';
@@ -369,6 +371,7 @@ export * from './SpaceRulesetListEntry';
369
371
  export * from './SpaceRulesetUpdate';
370
372
  export * from './Step';
371
373
  export * from './SysAdminUpdateFeatureGroupsParamsWrapperBody';
374
+ export * from './TagList';
372
375
  export * from './TopDownModelChangelogBody';
373
376
  export * from './TopDownModelEntry';
374
377
  export * from './TopDownModelEntryChangelogBody';
@@ -15,6 +15,12 @@
15
15
  * @interface AccountDirectoryPatchBody
16
16
  */
17
17
  export interface AccountDirectoryPatchBody {
18
+ /**
19
+ * Tags to add to the directory. Each is lowercased and must then be at most 32 letters, digits and hyphens, starting with a letter or digit. A directory can have at most 20 tags.
20
+ * @type {Array<string>}
21
+ * @memberof AccountDirectoryPatchBody
22
+ */
23
+ addTags?: Array<string>;
18
24
  /**
19
25
  * 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
26
  * @type {string}
@@ -27,6 +33,12 @@ export interface AccountDirectoryPatchBody {
27
33
  * @memberof AccountDirectoryPatchBody
28
34
  */
29
35
  parentId?: string;
36
+ /**
37
+ * Tags to remove from the directory. Removing a tag the directory does not have changes nothing.
38
+ * @type {Array<string>}
39
+ * @memberof AccountDirectoryPatchBody
40
+ */
41
+ removeTags?: Array<string>;
30
42
  }
31
43
  /**
32
44
  * Check if a given object implements the AccountDirectoryPatchBody interface.
@@ -32,8 +32,10 @@ function AccountDirectoryPatchBodyFromJSONTyped(json, ignoreDiscriminator) {
32
32
  return json;
33
33
  }
34
34
  return {
35
+ 'addTags': json['addTags'] == null ? undefined : json['addTags'],
35
36
  'name': json['name'] == null ? undefined : json['name'],
36
37
  'parentId': json['parentId'] == null ? undefined : json['parentId'],
38
+ 'removeTags': json['removeTags'] == null ? undefined : json['removeTags'],
37
39
  };
38
40
  }
39
41
  function AccountDirectoryPatchBodyToJSON(json) {
@@ -44,7 +46,9 @@ function AccountDirectoryPatchBodyToJSONTyped(value, ignoreDiscriminator = false
44
46
  return value;
45
47
  }
46
48
  return {
49
+ 'addTags': value['addTags'],
47
50
  'name': value['name'],
48
51
  'parentId': value['parentId'],
52
+ 'removeTags': value['removeTags'],
49
53
  };
50
54
  }
@@ -0,0 +1,32 @@
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 AccountDuplicateReqBody
16
+ */
17
+ export interface AccountDuplicateReqBody {
18
+ /**
19
+ * Display name of the new account. Must not already be in use.
20
+ * @type {string}
21
+ * @memberof AccountDuplicateReqBody
22
+ */
23
+ name: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AccountDuplicateReqBody interface.
27
+ */
28
+ export declare function instanceOfAccountDuplicateReqBody(value: object): value is AccountDuplicateReqBody;
29
+ export declare function AccountDuplicateReqBodyFromJSON(json: any): AccountDuplicateReqBody;
30
+ export declare function AccountDuplicateReqBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountDuplicateReqBody;
31
+ export declare function AccountDuplicateReqBodyToJSON(json: any): AccountDuplicateReqBody;
32
+ export declare function AccountDuplicateReqBodyToJSONTyped(value?: AccountDuplicateReqBody | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfAccountDuplicateReqBody = instanceOfAccountDuplicateReqBody;
17
+ exports.AccountDuplicateReqBodyFromJSON = AccountDuplicateReqBodyFromJSON;
18
+ exports.AccountDuplicateReqBodyFromJSONTyped = AccountDuplicateReqBodyFromJSONTyped;
19
+ exports.AccountDuplicateReqBodyToJSON = AccountDuplicateReqBodyToJSON;
20
+ exports.AccountDuplicateReqBodyToJSONTyped = AccountDuplicateReqBodyToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AccountDuplicateReqBody interface.
23
+ */
24
+ function instanceOfAccountDuplicateReqBody(value) {
25
+ if (!('name' in value) || value['name'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function AccountDuplicateReqBodyFromJSON(json) {
30
+ return AccountDuplicateReqBodyFromJSONTyped(json, false);
31
+ }
32
+ function AccountDuplicateReqBodyFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'name': json['name'],
38
+ };
39
+ }
40
+ function AccountDuplicateReqBodyToJSON(json) {
41
+ return AccountDuplicateReqBodyToJSONTyped(json, false);
42
+ }
43
+ function AccountDuplicateReqBodyToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'name': value['name'],
49
+ };
50
+ }
@@ -15,6 +15,12 @@
15
15
  * @interface AccountFilePatchBody
16
16
  */
17
17
  export interface AccountFilePatchBody {
18
+ /**
19
+ * Tags to add to the file. Each is lowercased and must then be at most 32 letters, digits and hyphens, starting with a letter or digit. A file can have at most 20 tags.
20
+ * @type {Array<string>}
21
+ * @memberof AccountFilePatchBody
22
+ */
23
+ addTags?: Array<string>;
18
24
  /**
19
25
  * 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
26
  * @type {string}
@@ -27,6 +33,12 @@ export interface AccountFilePatchBody {
27
33
  * @memberof AccountFilePatchBody
28
34
  */
29
35
  parentId?: string;
36
+ /**
37
+ * Tags to remove from the file. Removing a tag the file does not have changes nothing.
38
+ * @type {Array<string>}
39
+ * @memberof AccountFilePatchBody
40
+ */
41
+ removeTags?: Array<string>;
30
42
  }
31
43
  /**
32
44
  * Check if a given object implements the AccountFilePatchBody interface.
@@ -32,8 +32,10 @@ function AccountFilePatchBodyFromJSONTyped(json, ignoreDiscriminator) {
32
32
  return json;
33
33
  }
34
34
  return {
35
+ 'addTags': json['addTags'] == null ? undefined : json['addTags'],
35
36
  'name': json['name'] == null ? undefined : json['name'],
36
37
  'parentId': json['parentId'] == null ? undefined : json['parentId'],
38
+ 'removeTags': json['removeTags'] == null ? undefined : json['removeTags'],
37
39
  };
38
40
  }
39
41
  function AccountFilePatchBodyToJSON(json) {
@@ -44,7 +46,9 @@ function AccountFilePatchBodyToJSONTyped(value, ignoreDiscriminator = false) {
44
46
  return value;
45
47
  }
46
48
  return {
49
+ 'addTags': value['addTags'],
47
50
  'name': value['name'],
48
51
  'parentId': value['parentId'],
52
+ 'removeTags': value['removeTags'],
49
53
  };
50
54
  }