@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
@@ -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.
@@ -45,6 +45,8 @@ function DirectoryFromJSONTyped(json, ignoreDiscriminator) {
45
45
  'id': json['id'],
46
46
  'name': json['name'],
47
47
  'parentId': json['parentId'] == null ? undefined : json['parentId'],
48
+ 'tagProblems': json['tagProblems'] == null ? undefined : json['tagProblems'],
49
+ 'tags': json['tags'] == null ? undefined : json['tags'],
48
50
  };
49
51
  }
50
52
  function DirectoryToJSON(json) {
@@ -60,5 +62,7 @@ function DirectoryToJSONTyped(value, ignoreDiscriminator = false) {
60
62
  'id': value['id'],
61
63
  'name': value['name'],
62
64
  'parentId': value['parentId'],
65
+ 'tagProblems': value['tagProblems'],
66
+ 'tags': value['tags'],
63
67
  };
64
68
  }
@@ -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}
@@ -52,6 +52,8 @@ function ModelRecordFromJSONTyped(json, ignoreDiscriminator) {
52
52
  'quarantineSignature': json['quarantineSignature'] == null ? undefined : json['quarantineSignature'],
53
53
  'quarantinedAt': json['quarantinedAt'] == null ? undefined : (new Date(json['quarantinedAt'])),
54
54
  'size': json['size'],
55
+ 'tagProblems': json['tagProblems'] == null ? undefined : json['tagProblems'],
56
+ 'tags': json['tags'] == null ? undefined : json['tags'],
55
57
  'uploadedBy': json['uploadedBy'],
56
58
  };
57
59
  }
@@ -71,6 +73,8 @@ function ModelRecordToJSONTyped(value, ignoreDiscriminator = false) {
71
73
  'quarantineSignature': value['quarantineSignature'],
72
74
  'quarantinedAt': value['quarantinedAt'] == null ? undefined : ((value['quarantinedAt']).toISOString()),
73
75
  'size': value['size'],
76
+ 'tagProblems': value['tagProblems'],
77
+ 'tags': value['tags'],
74
78
  'uploadedBy': value['uploadedBy'],
75
79
  };
76
80
  }
@@ -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,62 @@
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.ReservedTagInfoKindsEnum = void 0;
17
+ exports.instanceOfReservedTagInfo = instanceOfReservedTagInfo;
18
+ exports.ReservedTagInfoFromJSON = ReservedTagInfoFromJSON;
19
+ exports.ReservedTagInfoFromJSONTyped = ReservedTagInfoFromJSONTyped;
20
+ exports.ReservedTagInfoToJSON = ReservedTagInfoToJSON;
21
+ exports.ReservedTagInfoToJSONTyped = ReservedTagInfoToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.ReservedTagInfoKindsEnum = {
26
+ File: 'file',
27
+ Directory: 'directory'
28
+ };
29
+ /**
30
+ * Check if a given object implements the ReservedTagInfo interface.
31
+ */
32
+ function instanceOfReservedTagInfo(value) {
33
+ if (!('kinds' in value) || value['kinds'] === undefined)
34
+ return false;
35
+ if (!('name' in value) || value['name'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ function ReservedTagInfoFromJSON(json) {
40
+ return ReservedTagInfoFromJSONTyped(json, false);
41
+ }
42
+ function ReservedTagInfoFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'kinds': json['kinds'],
48
+ 'name': json['name'],
49
+ };
50
+ }
51
+ function ReservedTagInfoToJSON(json) {
52
+ return ReservedTagInfoToJSONTyped(json, false);
53
+ }
54
+ function ReservedTagInfoToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'kinds': value['kinds'],
60
+ 'name': value['name'],
61
+ };
62
+ }
@@ -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,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * spaciv API
6
+ * The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: support@spaciv.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfTagList = instanceOfTagList;
17
+ exports.TagListFromJSON = TagListFromJSON;
18
+ exports.TagListFromJSONTyped = TagListFromJSONTyped;
19
+ exports.TagListToJSON = TagListToJSON;
20
+ exports.TagListToJSONTyped = TagListToJSONTyped;
21
+ const ReservedTagInfo_1 = require("./ReservedTagInfo");
22
+ /**
23
+ * Check if a given object implements the TagList interface.
24
+ */
25
+ function instanceOfTagList(value) {
26
+ if (!('reserved' in value) || value['reserved'] === undefined)
27
+ return false;
28
+ if (!('tags' in value) || value['tags'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function TagListFromJSON(json) {
33
+ return TagListFromJSONTyped(json, false);
34
+ }
35
+ function TagListFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'reserved': (json['reserved'].map(ReservedTagInfo_1.ReservedTagInfoFromJSON)),
41
+ 'tags': json['tags'],
42
+ };
43
+ }
44
+ function TagListToJSON(json) {
45
+ return TagListToJSONTyped(json, false);
46
+ }
47
+ function TagListToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'reserved': (value['reserved'].map(ReservedTagInfo_1.ReservedTagInfoToJSON)),
53
+ 'tags': value['tags'],
54
+ };
55
+ }
@@ -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';
@@ -24,6 +24,7 @@ __exportStar(require("./AccountCalculationUsageDay"), exports);
24
24
  __exportStar(require("./AccountDetailsResBody"), exports);
25
25
  __exportStar(require("./AccountDirectoryPatchBody"), exports);
26
26
  __exportStar(require("./AccountDirectoryPostBody"), exports);
27
+ __exportStar(require("./AccountDuplicateReqBody"), exports);
27
28
  __exportStar(require("./AccountFilePatchBody"), exports);
28
29
  __exportStar(require("./AccountGetAuthOptionsResBody"), exports);
29
30
  __exportStar(require("./AccountOIDCProvider"), exports);
@@ -324,6 +325,7 @@ __exportStar(require("./ReferencesRes"), exports);
324
325
  __exportStar(require("./RelationshipData"), exports);
325
326
  __exportStar(require("./RepairFloorplansResBody"), exports);
326
327
  __exportStar(require("./ReportParamsWrapperBody"), exports);
328
+ __exportStar(require("./ReservedTagInfo"), exports);
327
329
  __exportStar(require("./RetriesResBody"), exports);
328
330
  __exportStar(require("./RetryBody"), exports);
329
331
  __exportStar(require("./RoleTagsData"), exports);
@@ -385,6 +387,7 @@ __exportStar(require("./SpaceRulesetListEntry"), exports);
385
387
  __exportStar(require("./SpaceRulesetUpdate"), exports);
386
388
  __exportStar(require("./Step"), exports);
387
389
  __exportStar(require("./SysAdminUpdateFeatureGroupsParamsWrapperBody"), exports);
390
+ __exportStar(require("./TagList"), exports);
388
391
  __exportStar(require("./TopDownModelChangelogBody"), exports);
389
392
  __exportStar(require("./TopDownModelEntry"), exports);
390
393
  __exportStar(require("./TopDownModelEntryChangelogBody"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaciv/sdk",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "OpenAPI client for @spaciv/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -19,6 +19,7 @@ import type {
19
19
  AccountAuthOption,
20
20
  AccountCalculationUsageBody,
21
21
  AccountDetailsResBody,
22
+ AccountDuplicateReqBody,
22
23
  AccountGetAuthOptionsResBody,
23
24
  AccountOIDCProvider,
24
25
  AccountOIDCProviderPatch,
@@ -40,6 +41,8 @@ import {
40
41
  AccountCalculationUsageBodyToJSON,
41
42
  AccountDetailsResBodyFromJSON,
42
43
  AccountDetailsResBodyToJSON,
44
+ AccountDuplicateReqBodyFromJSON,
45
+ AccountDuplicateReqBodyToJSON,
43
46
  AccountGetAuthOptionsResBodyFromJSON,
44
47
  AccountGetAuthOptionsResBodyToJSON,
45
48
  AccountOIDCProviderFromJSON,
@@ -72,6 +75,10 @@ export interface AccountsApiCreateOidcProviderRequest {
72
75
  accountPostOIDCProviderReqBody: AccountPostOIDCProviderReqBody;
73
76
  }
74
77
 
78
+ export interface AccountsApiDuplicateRequest {
79
+ accountDuplicateReqBody: AccountDuplicateReqBody;
80
+ }
81
+
75
82
  export interface AccountsApiGetAuthOptionsRequest {
76
83
  hostname: string;
77
84
  }
@@ -112,7 +119,7 @@ export interface AccountsApiUpdateOidcProviderClientSecretRequest {
112
119
  */
113
120
  export interface AccountsApiInterface {
114
121
  /**
115
- * Creates an account owned by the authenticated user and returns its identifier. Unless the template is `blank`, the account is seeded from a prebuilt one. Seeding runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account. Account names are unique; reusing one returns `400 account-name-in-use`. Requires the *Manage my account* permission.
122
+ * Creates an account owned by the authenticated user and returns its identifier. The account is seeded from the prebuilt account for the chosen template (`blank` starts almost empty). Seeding runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account. Account names are unique; reusing one returns `400 account-name-in-use`. Requires the *Manage my account* permission.
116
123
  * @summary Create an account
117
124
  * @param {AccountPostReqBody} accountPostReqBody
118
125
  * @param {*} [options] Override http request option.
@@ -122,7 +129,7 @@ export interface AccountsApiInterface {
122
129
  createRaw(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>>;
123
130
 
124
131
  /**
125
- * Creates an account owned by the authenticated user and returns its identifier. Unless the template is `blank`, the account is seeded from a prebuilt one. Seeding runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account. Account names are unique; reusing one returns `400 account-name-in-use`. Requires the *Manage my account* permission.
132
+ * Creates an account owned by the authenticated user and returns its identifier. The account is seeded from the prebuilt account for the chosen template (`blank` starts almost empty). Seeding runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account. Account names are unique; reusing one returns `400 account-name-in-use`. Requires the *Manage my account* permission.
126
133
  * Create an account
127
134
  */
128
135
  create(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number>;
@@ -173,6 +180,22 @@ export interface AccountsApiInterface {
173
180
  */
174
181
  deleteOidcProvider(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
175
182
 
183
+ /**
184
+ * Creates a new account owned by the authenticated user and copies the current account\'s content into it: projects, dashboards, floor plans, properties, object groups, top-down models, scenarios, datasets, space rulesets, variables, and files with their folders. Archived projects, object groups, scenarios and top-down models are copied and stay archived. Data collections are copied as drafts without their contributors. Members and their roles, sign-in settings, API keys, scripts, assistant conversations and the audit log are not copied; the caller is the new account\'s only member. Returns the new account\'s identifier. Copying runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account; it returns `500 account-setup-failed` if the content could not be copied, and the incomplete account is then deleted, after which polling it returns `403`. Account names are unique; reusing one returns `400 account-name-in-use`. Requires a token for the account being duplicated, holding the *Manage my account* permission; a token for no account returns `400`. A script\'s own API key cannot duplicate an account.
185
+ * @summary Duplicate the current account
186
+ * @param {AccountDuplicateReqBody} accountDuplicateReqBody
187
+ * @param {*} [options] Override http request option.
188
+ * @throws {RequiredError}
189
+ * @memberof AccountsApiInterface
190
+ */
191
+ duplicateRaw(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>>;
192
+
193
+ /**
194
+ * Creates a new account owned by the authenticated user and copies the current account\'s content into it: projects, dashboards, floor plans, properties, object groups, top-down models, scenarios, datasets, space rulesets, variables, and files with their folders. Archived projects, object groups, scenarios and top-down models are copied and stay archived. Data collections are copied as drafts without their contributors. Members and their roles, sign-in settings, API keys, scripts, assistant conversations and the audit log are not copied; the caller is the new account\'s only member. Returns the new account\'s identifier. Copying runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account; it returns `500 account-setup-failed` if the content could not be copied, and the incomplete account is then deleted, after which polling it returns `403`. Account names are unique; reusing one returns `400 account-name-in-use`. Requires a token for the account being duplicated, holding the *Manage my account* permission; a token for no account returns `400`. A script\'s own API key cannot duplicate an account.
195
+ * Duplicate the current account
196
+ */
197
+ duplicate(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number>;
198
+
176
199
  /**
177
200
  * Returns the account the access token was issued for. Use `GET /v1/account/profile` for the full profile, including address and notification preferences. Requires the *View account overview* permission.
178
201
  * @summary Get the current account
@@ -251,9 +274,9 @@ export interface AccountsApiInterface {
251
274
  getProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountDetailsResBody>;
252
275
 
253
276
  /**
254
- * Long-polls until the account created by `POST /v1/accounts` has finished being seeded from its template, then returns `200`. The request is held open for up to 90 seconds and returns `408` if setup has not completed by then; call it again to keep waiting. The caller must be a member of the account and hold the *Manage my account* permission.
277
+ * Long-polls until the account created by `POST /v1/accounts` or `POST /v1/account/duplicate` has finished being seeded with its starting content, then returns `204`. The request is held open for up to 90 seconds and returns `408` if setup has not completed by then; call it again to keep waiting. Returns `500 account-setup-failed` if the content could not be copied; the account exists but is incomplete. The caller must be a member of the account and hold the *Manage my account* permission.
255
278
  * @summary Wait for account setup to finish
256
- * @param {number} id Identifier returned by POST /v1/accounts.
279
+ * @param {number} id Identifier returned by POST /v1/accounts or POST /v1/account/duplicate.
257
280
  * @param {*} [options] Override http request option.
258
281
  * @throws {RequiredError}
259
282
  * @memberof AccountsApiInterface
@@ -261,7 +284,7 @@ export interface AccountsApiInterface {
261
284
  getSetupStatusRaw(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
262
285
 
263
286
  /**
264
- * Long-polls until the account created by `POST /v1/accounts` has finished being seeded from its template, then returns `200`. The request is held open for up to 90 seconds and returns `408` if setup has not completed by then; call it again to keep waiting. The caller must be a member of the account and hold the *Manage my account* permission.
287
+ * Long-polls until the account created by `POST /v1/accounts` or `POST /v1/account/duplicate` has finished being seeded with its starting content, then returns `204`. The request is held open for up to 90 seconds and returns `408` if setup has not completed by then; call it again to keep waiting. Returns `500 account-setup-failed` if the content could not be copied; the account exists but is incomplete. The caller must be a member of the account and hold the *Manage my account* permission.
265
288
  * Wait for account setup to finish
266
289
  */
267
290
  getSetupStatus(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -399,7 +422,7 @@ export interface AccountsApiInterface {
399
422
  export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface {
400
423
 
401
424
  /**
402
- * Creates an account owned by the authenticated user and returns its identifier. Unless the template is `blank`, the account is seeded from a prebuilt one. Seeding runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account. Account names are unique; reusing one returns `400 account-name-in-use`. Requires the *Manage my account* permission.
425
+ * Creates an account owned by the authenticated user and returns its identifier. The account is seeded from the prebuilt account for the chosen template (`blank` starts almost empty). Seeding runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account. Account names are unique; reusing one returns `400 account-name-in-use`. Requires the *Manage my account* permission.
403
426
  * Create an account
404
427
  */
405
428
  async createRaw(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>> {
@@ -443,7 +466,7 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface
443
466
  }
444
467
 
445
468
  /**
446
- * Creates an account owned by the authenticated user and returns its identifier. Unless the template is `blank`, the account is seeded from a prebuilt one. Seeding runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account. Account names are unique; reusing one returns `400 account-name-in-use`. Requires the *Manage my account* permission.
469
+ * Creates an account owned by the authenticated user and returns its identifier. The account is seeded from the prebuilt account for the chosen template (`blank` starts almost empty). Seeding runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account. Account names are unique; reusing one returns `400 account-name-in-use`. Requires the *Manage my account* permission.
447
470
  * Create an account
448
471
  */
449
472
  async create(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number> {
@@ -576,6 +599,59 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface
576
599
  await this.deleteOidcProviderRaw(initOverrides);
577
600
  }
578
601
 
602
+ /**
603
+ * Creates a new account owned by the authenticated user and copies the current account\'s content into it: projects, dashboards, floor plans, properties, object groups, top-down models, scenarios, datasets, space rulesets, variables, and files with their folders. Archived projects, object groups, scenarios and top-down models are copied and stay archived. Data collections are copied as drafts without their contributors. Members and their roles, sign-in settings, API keys, scripts, assistant conversations and the audit log are not copied; the caller is the new account\'s only member. Returns the new account\'s identifier. Copying runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account; it returns `500 account-setup-failed` if the content could not be copied, and the incomplete account is then deleted, after which polling it returns `403`. Account names are unique; reusing one returns `400 account-name-in-use`. Requires a token for the account being duplicated, holding the *Manage my account* permission; a token for no account returns `400`. A script\'s own API key cannot duplicate an account.
604
+ * Duplicate the current account
605
+ */
606
+ async duplicateRaw(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>> {
607
+ if (requestParameters['accountDuplicateReqBody'] == null) {
608
+ throw new runtime.RequiredError(
609
+ 'accountDuplicateReqBody',
610
+ 'Required parameter "accountDuplicateReqBody" was null or undefined when calling duplicate().'
611
+ );
612
+ }
613
+
614
+ const queryParameters: any = {};
615
+
616
+ const headerParameters: runtime.HTTPHeaders = {};
617
+
618
+ headerParameters['Content-Type'] = 'application/json';
619
+
620
+ if (this.configuration && this.configuration.accessToken) {
621
+ const token = this.configuration.accessToken;
622
+ const tokenString = await token("accessToken", []);
623
+
624
+ if (tokenString) {
625
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
626
+ }
627
+ }
628
+
629
+ let urlPath = `/v1/account/duplicate`;
630
+
631
+ const response = await this.request({
632
+ path: urlPath,
633
+ method: 'POST',
634
+ headers: headerParameters,
635
+ query: queryParameters,
636
+ body: AccountDuplicateReqBodyToJSON(requestParameters['accountDuplicateReqBody']),
637
+ }, initOverrides);
638
+
639
+ if (this.isJsonMime(response.headers.get('content-type'))) {
640
+ return new runtime.JSONApiResponse<number>(response);
641
+ } else {
642
+ return new runtime.TextApiResponse(response) as any;
643
+ }
644
+ }
645
+
646
+ /**
647
+ * Creates a new account owned by the authenticated user and copies the current account\'s content into it: projects, dashboards, floor plans, properties, object groups, top-down models, scenarios, datasets, space rulesets, variables, and files with their folders. Archived projects, object groups, scenarios and top-down models are copied and stay archived. Data collections are copied as drafts without their contributors. Members and their roles, sign-in settings, API keys, scripts, assistant conversations and the audit log are not copied; the caller is the new account\'s only member. Returns the new account\'s identifier. Copying runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account; it returns `500 account-setup-failed` if the content could not be copied, and the incomplete account is then deleted, after which polling it returns `403`. Account names are unique; reusing one returns `400 account-name-in-use`. Requires a token for the account being duplicated, holding the *Manage my account* permission; a token for no account returns `400`. A script\'s own API key cannot duplicate an account.
648
+ * Duplicate the current account
649
+ */
650
+ async duplicate(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number> {
651
+ const response = await this.duplicateRaw(requestParameters, initOverrides);
652
+ return await response.value();
653
+ }
654
+
579
655
  /**
580
656
  * Returns the account the access token was issued for. Use `GET /v1/account/profile` for the full profile, including address and notification preferences. Requires the *View account overview* permission.
581
657
  * Get the current account
@@ -776,7 +852,7 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface
776
852
  }
777
853
 
778
854
  /**
779
- * Long-polls until the account created by `POST /v1/accounts` has finished being seeded from its template, then returns `200`. The request is held open for up to 90 seconds and returns `408` if setup has not completed by then; call it again to keep waiting. The caller must be a member of the account and hold the *Manage my account* permission.
855
+ * Long-polls until the account created by `POST /v1/accounts` or `POST /v1/account/duplicate` has finished being seeded with its starting content, then returns `204`. The request is held open for up to 90 seconds and returns `408` if setup has not completed by then; call it again to keep waiting. Returns `500 account-setup-failed` if the content could not be copied; the account exists but is incomplete. The caller must be a member of the account and hold the *Manage my account* permission.
780
856
  * Wait for account setup to finish
781
857
  */
782
858
  async getSetupStatusRaw(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
@@ -814,7 +890,7 @@ export class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface
814
890
  }
815
891
 
816
892
  /**
817
- * Long-polls until the account created by `POST /v1/accounts` has finished being seeded from its template, then returns `200`. The request is held open for up to 90 seconds and returns `408` if setup has not completed by then; call it again to keep waiting. The caller must be a member of the account and hold the *Manage my account* permission.
893
+ * Long-polls until the account created by `POST /v1/accounts` or `POST /v1/account/duplicate` has finished being seeded with its starting content, then returns `204`. The request is held open for up to 90 seconds and returns `408` if setup has not completed by then; call it again to keep waiting. Returns `500 account-setup-failed` if the content could not be copied; the account exists but is incomplete. The caller must be a member of the account and hold the *Manage my account* permission.
818
894
  * Wait for account setup to finish
819
895
  */
820
896
  async getSetupStatus(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {