@spaciv/sdk 0.1.25 → 0.1.26
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.
- package/.openapi-generator/FILES +1 -0
- package/README.md +2 -2
- package/dist/apis/AccountsApi.d.ts +37 -10
- package/dist/apis/AccountsApi.js +49 -4
- package/dist/apis/InternalApi.d.ts +4 -4
- package/dist/apis/InternalApi.js +2 -2
- package/dist/esm/apis/AccountsApi.d.ts +37 -10
- package/dist/esm/apis/AccountsApi.js +50 -5
- package/dist/esm/apis/InternalApi.d.ts +4 -4
- package/dist/esm/apis/InternalApi.js +2 -2
- package/dist/esm/models/AccountDuplicateReqBody.d.ts +32 -0
- package/dist/esm/models/AccountDuplicateReqBody.js +43 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/AccountDuplicateReqBody.d.ts +32 -0
- package/dist/models/AccountDuplicateReqBody.js +50 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
- package/src/apis/AccountsApi.ts +85 -9
- package/src/apis/InternalApi.ts +4 -4
- package/src/models/AccountDuplicateReqBody.ts +66 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -42,6 +42,7 @@ src/models/AccountCalculationUsageDay.ts
|
|
|
42
42
|
src/models/AccountDetailsResBody.ts
|
|
43
43
|
src/models/AccountDirectoryPatchBody.ts
|
|
44
44
|
src/models/AccountDirectoryPostBody.ts
|
|
45
|
+
src/models/AccountDuplicateReqBody.ts
|
|
45
46
|
src/models/AccountFilePatchBody.ts
|
|
46
47
|
src/models/AccountGetAuthOptionsResBody.ts
|
|
47
48
|
src/models/AccountOIDCProvider.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @spaciv/sdk@0.1.
|
|
1
|
+
## @spaciv/sdk@0.1.26
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @spaciv/sdk@0.1.
|
|
39
|
+
npm install @spaciv/sdk@0.1.26 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -10,13 +10,16 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { Account, AccountAuthOption, AccountCalculationUsageBody, AccountDetailsResBody, AccountGetAuthOptionsResBody, AccountOIDCProvider, AccountOIDCProviderPatch, AccountPatchAuthOptionsReqBody, AccountPostOIDCProviderReqBody, AccountPostReqBody, AccountPutOIDCClientSecretReqBody, AccountPutReqBody, AccountUsageResBody, ListAccountsForUserRow } from '../models/index';
|
|
13
|
+
import type { Account, AccountAuthOption, AccountCalculationUsageBody, AccountDetailsResBody, AccountDuplicateReqBody, AccountGetAuthOptionsResBody, AccountOIDCProvider, AccountOIDCProviderPatch, AccountPatchAuthOptionsReqBody, AccountPostOIDCProviderReqBody, AccountPostReqBody, AccountPutOIDCClientSecretReqBody, AccountPutReqBody, AccountUsageResBody, ListAccountsForUserRow } from '../models/index';
|
|
14
14
|
export interface AccountsApiCreateRequest {
|
|
15
15
|
accountPostReqBody: AccountPostReqBody;
|
|
16
16
|
}
|
|
17
17
|
export interface AccountsApiCreateOidcProviderRequest {
|
|
18
18
|
accountPostOIDCProviderReqBody: AccountPostOIDCProviderReqBody;
|
|
19
19
|
}
|
|
20
|
+
export interface AccountsApiDuplicateRequest {
|
|
21
|
+
accountDuplicateReqBody: AccountDuplicateReqBody;
|
|
22
|
+
}
|
|
20
23
|
export interface AccountsApiGetAuthOptionsRequest {
|
|
21
24
|
hostname: string;
|
|
22
25
|
}
|
|
@@ -49,7 +52,7 @@ export interface AccountsApiUpdateOidcProviderClientSecretRequest {
|
|
|
49
52
|
*/
|
|
50
53
|
export interface AccountsApiInterface {
|
|
51
54
|
/**
|
|
52
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
55
|
+
* 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.
|
|
53
56
|
* @summary Create an account
|
|
54
57
|
* @param {AccountPostReqBody} accountPostReqBody
|
|
55
58
|
* @param {*} [options] Override http request option.
|
|
@@ -58,7 +61,7 @@ export interface AccountsApiInterface {
|
|
|
58
61
|
*/
|
|
59
62
|
createRaw(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>>;
|
|
60
63
|
/**
|
|
61
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
64
|
+
* 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.
|
|
62
65
|
* Create an account
|
|
63
66
|
*/
|
|
64
67
|
create(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number>;
|
|
@@ -102,6 +105,20 @@ export interface AccountsApiInterface {
|
|
|
102
105
|
* Delete the current account\'s OIDC provider
|
|
103
106
|
*/
|
|
104
107
|
deleteOidcProvider(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* 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.
|
|
110
|
+
* @summary Duplicate the current account
|
|
111
|
+
* @param {AccountDuplicateReqBody} accountDuplicateReqBody
|
|
112
|
+
* @param {*} [options] Override http request option.
|
|
113
|
+
* @throws {RequiredError}
|
|
114
|
+
* @memberof AccountsApiInterface
|
|
115
|
+
*/
|
|
116
|
+
duplicateRaw(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>>;
|
|
117
|
+
/**
|
|
118
|
+
* 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.
|
|
119
|
+
* Duplicate the current account
|
|
120
|
+
*/
|
|
121
|
+
duplicate(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number>;
|
|
105
122
|
/**
|
|
106
123
|
* 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.
|
|
107
124
|
* @summary Get the current account
|
|
@@ -170,16 +187,16 @@ export interface AccountsApiInterface {
|
|
|
170
187
|
*/
|
|
171
188
|
getProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountDetailsResBody>;
|
|
172
189
|
/**
|
|
173
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
190
|
+
* 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.
|
|
174
191
|
* @summary Wait for account setup to finish
|
|
175
|
-
* @param {number} id Identifier returned by POST /v1/accounts.
|
|
192
|
+
* @param {number} id Identifier returned by POST /v1/accounts or POST /v1/account/duplicate.
|
|
176
193
|
* @param {*} [options] Override http request option.
|
|
177
194
|
* @throws {RequiredError}
|
|
178
195
|
* @memberof AccountsApiInterface
|
|
179
196
|
*/
|
|
180
197
|
getSetupStatusRaw(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
181
198
|
/**
|
|
182
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
199
|
+
* 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.
|
|
183
200
|
* Wait for account setup to finish
|
|
184
201
|
*/
|
|
185
202
|
getSetupStatus(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -298,12 +315,12 @@ export interface AccountsApiInterface {
|
|
|
298
315
|
*/
|
|
299
316
|
export declare class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface {
|
|
300
317
|
/**
|
|
301
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
318
|
+
* 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.
|
|
302
319
|
* Create an account
|
|
303
320
|
*/
|
|
304
321
|
createRaw(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>>;
|
|
305
322
|
/**
|
|
306
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
323
|
+
* 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.
|
|
307
324
|
* Create an account
|
|
308
325
|
*/
|
|
309
326
|
create(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number>;
|
|
@@ -337,6 +354,16 @@ export declare class AccountsApi extends runtime.BaseAPI implements AccountsApiI
|
|
|
337
354
|
* Delete the current account\'s OIDC provider
|
|
338
355
|
*/
|
|
339
356
|
deleteOidcProvider(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
357
|
+
/**
|
|
358
|
+
* 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.
|
|
359
|
+
* Duplicate the current account
|
|
360
|
+
*/
|
|
361
|
+
duplicateRaw(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>>;
|
|
362
|
+
/**
|
|
363
|
+
* 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.
|
|
364
|
+
* Duplicate the current account
|
|
365
|
+
*/
|
|
366
|
+
duplicate(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number>;
|
|
340
367
|
/**
|
|
341
368
|
* 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.
|
|
342
369
|
* Get the current account
|
|
@@ -388,12 +415,12 @@ export declare class AccountsApi extends runtime.BaseAPI implements AccountsApiI
|
|
|
388
415
|
*/
|
|
389
416
|
getProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountDetailsResBody>;
|
|
390
417
|
/**
|
|
391
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
418
|
+
* 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.
|
|
392
419
|
* Wait for account setup to finish
|
|
393
420
|
*/
|
|
394
421
|
getSetupStatusRaw(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
395
422
|
/**
|
|
396
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
423
|
+
* 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.
|
|
397
424
|
* Wait for account setup to finish
|
|
398
425
|
*/
|
|
399
426
|
getSetupStatus(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
package/dist/apis/AccountsApi.js
CHANGED
|
@@ -30,7 +30,7 @@ const index_1 = require("../models/index");
|
|
|
30
30
|
*/
|
|
31
31
|
class AccountsApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
33
|
+
* 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.
|
|
34
34
|
* Create an account
|
|
35
35
|
*/
|
|
36
36
|
createRaw(requestParameters, initOverrides) {
|
|
@@ -65,7 +65,7 @@ class AccountsApi extends runtime.BaseAPI {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
68
|
+
* 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.
|
|
69
69
|
* Create an account
|
|
70
70
|
*/
|
|
71
71
|
create(requestParameters, initOverrides) {
|
|
@@ -182,6 +182,51 @@ class AccountsApi extends runtime.BaseAPI {
|
|
|
182
182
|
yield this.deleteOidcProviderRaw(initOverrides);
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
+
/**
|
|
186
|
+
* 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.
|
|
187
|
+
* Duplicate the current account
|
|
188
|
+
*/
|
|
189
|
+
duplicateRaw(requestParameters, initOverrides) {
|
|
190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
if (requestParameters['accountDuplicateReqBody'] == null) {
|
|
192
|
+
throw new runtime.RequiredError('accountDuplicateReqBody', 'Required parameter "accountDuplicateReqBody" was null or undefined when calling duplicate().');
|
|
193
|
+
}
|
|
194
|
+
const queryParameters = {};
|
|
195
|
+
const headerParameters = {};
|
|
196
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
197
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
198
|
+
const token = this.configuration.accessToken;
|
|
199
|
+
const tokenString = yield token("accessToken", []);
|
|
200
|
+
if (tokenString) {
|
|
201
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
let urlPath = `/v1/account/duplicate`;
|
|
205
|
+
const response = yield this.request({
|
|
206
|
+
path: urlPath,
|
|
207
|
+
method: 'POST',
|
|
208
|
+
headers: headerParameters,
|
|
209
|
+
query: queryParameters,
|
|
210
|
+
body: (0, index_1.AccountDuplicateReqBodyToJSON)(requestParameters['accountDuplicateReqBody']),
|
|
211
|
+
}, initOverrides);
|
|
212
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
213
|
+
return new runtime.JSONApiResponse(response);
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
return new runtime.TextApiResponse(response);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* 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.
|
|
222
|
+
* Duplicate the current account
|
|
223
|
+
*/
|
|
224
|
+
duplicate(requestParameters, initOverrides) {
|
|
225
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
226
|
+
const response = yield this.duplicateRaw(requestParameters, initOverrides);
|
|
227
|
+
return yield response.value();
|
|
228
|
+
});
|
|
229
|
+
}
|
|
185
230
|
/**
|
|
186
231
|
* 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.
|
|
187
232
|
* Get the current account
|
|
@@ -357,7 +402,7 @@ class AccountsApi extends runtime.BaseAPI {
|
|
|
357
402
|
});
|
|
358
403
|
}
|
|
359
404
|
/**
|
|
360
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
405
|
+
* 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.
|
|
361
406
|
* Wait for account setup to finish
|
|
362
407
|
*/
|
|
363
408
|
getSetupStatusRaw(requestParameters, initOverrides) {
|
|
@@ -386,7 +431,7 @@ class AccountsApi extends runtime.BaseAPI {
|
|
|
386
431
|
});
|
|
387
432
|
}
|
|
388
433
|
/**
|
|
389
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
434
|
+
* 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.
|
|
390
435
|
* Wait for account setup to finish
|
|
391
436
|
*/
|
|
392
437
|
getSetupStatus(requestParameters, initOverrides) {
|
|
@@ -68,7 +68,7 @@ export interface InternalApiInterface {
|
|
|
68
68
|
*/
|
|
69
69
|
createAdminFlushDeadLetters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
70
70
|
/**
|
|
71
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
71
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
72
72
|
* @summary Populate account from template
|
|
73
73
|
* @param {number} body
|
|
74
74
|
* @param {*} [options] Override http request option.
|
|
@@ -77,7 +77,7 @@ export interface InternalApiInterface {
|
|
|
77
77
|
*/
|
|
78
78
|
createAdminPopulateRaw(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
79
79
|
/**
|
|
80
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
80
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
81
81
|
* Populate account from template
|
|
82
82
|
*/
|
|
83
83
|
createAdminPopulate(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -245,12 +245,12 @@ export declare class InternalApi extends runtime.BaseAPI implements InternalApiI
|
|
|
245
245
|
*/
|
|
246
246
|
createAdminFlushDeadLetters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
247
247
|
/**
|
|
248
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
248
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
249
249
|
* Populate account from template
|
|
250
250
|
*/
|
|
251
251
|
createAdminPopulateRaw(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
252
252
|
/**
|
|
253
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
253
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
254
254
|
* Populate account from template
|
|
255
255
|
*/
|
|
256
256
|
createAdminPopulate(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
package/dist/apis/InternalApi.js
CHANGED
|
@@ -105,7 +105,7 @@ class InternalApi extends runtime.BaseAPI {
|
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
108
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
109
109
|
* Populate account from template
|
|
110
110
|
*/
|
|
111
111
|
createAdminPopulateRaw(requestParameters, initOverrides) {
|
|
@@ -135,7 +135,7 @@ class InternalApi extends runtime.BaseAPI {
|
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
138
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
139
139
|
* Populate account from template
|
|
140
140
|
*/
|
|
141
141
|
createAdminPopulate(requestParameters, initOverrides) {
|
|
@@ -10,13 +10,16 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { Account, AccountAuthOption, AccountCalculationUsageBody, AccountDetailsResBody, AccountGetAuthOptionsResBody, AccountOIDCProvider, AccountOIDCProviderPatch, AccountPatchAuthOptionsReqBody, AccountPostOIDCProviderReqBody, AccountPostReqBody, AccountPutOIDCClientSecretReqBody, AccountPutReqBody, AccountUsageResBody, ListAccountsForUserRow } from '../models/index';
|
|
13
|
+
import type { Account, AccountAuthOption, AccountCalculationUsageBody, AccountDetailsResBody, AccountDuplicateReqBody, AccountGetAuthOptionsResBody, AccountOIDCProvider, AccountOIDCProviderPatch, AccountPatchAuthOptionsReqBody, AccountPostOIDCProviderReqBody, AccountPostReqBody, AccountPutOIDCClientSecretReqBody, AccountPutReqBody, AccountUsageResBody, ListAccountsForUserRow } from '../models/index';
|
|
14
14
|
export interface AccountsApiCreateRequest {
|
|
15
15
|
accountPostReqBody: AccountPostReqBody;
|
|
16
16
|
}
|
|
17
17
|
export interface AccountsApiCreateOidcProviderRequest {
|
|
18
18
|
accountPostOIDCProviderReqBody: AccountPostOIDCProviderReqBody;
|
|
19
19
|
}
|
|
20
|
+
export interface AccountsApiDuplicateRequest {
|
|
21
|
+
accountDuplicateReqBody: AccountDuplicateReqBody;
|
|
22
|
+
}
|
|
20
23
|
export interface AccountsApiGetAuthOptionsRequest {
|
|
21
24
|
hostname: string;
|
|
22
25
|
}
|
|
@@ -49,7 +52,7 @@ export interface AccountsApiUpdateOidcProviderClientSecretRequest {
|
|
|
49
52
|
*/
|
|
50
53
|
export interface AccountsApiInterface {
|
|
51
54
|
/**
|
|
52
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
55
|
+
* 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.
|
|
53
56
|
* @summary Create an account
|
|
54
57
|
* @param {AccountPostReqBody} accountPostReqBody
|
|
55
58
|
* @param {*} [options] Override http request option.
|
|
@@ -58,7 +61,7 @@ export interface AccountsApiInterface {
|
|
|
58
61
|
*/
|
|
59
62
|
createRaw(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>>;
|
|
60
63
|
/**
|
|
61
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
64
|
+
* 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.
|
|
62
65
|
* Create an account
|
|
63
66
|
*/
|
|
64
67
|
create(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number>;
|
|
@@ -102,6 +105,20 @@ export interface AccountsApiInterface {
|
|
|
102
105
|
* Delete the current account\'s OIDC provider
|
|
103
106
|
*/
|
|
104
107
|
deleteOidcProvider(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* 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.
|
|
110
|
+
* @summary Duplicate the current account
|
|
111
|
+
* @param {AccountDuplicateReqBody} accountDuplicateReqBody
|
|
112
|
+
* @param {*} [options] Override http request option.
|
|
113
|
+
* @throws {RequiredError}
|
|
114
|
+
* @memberof AccountsApiInterface
|
|
115
|
+
*/
|
|
116
|
+
duplicateRaw(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>>;
|
|
117
|
+
/**
|
|
118
|
+
* 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.
|
|
119
|
+
* Duplicate the current account
|
|
120
|
+
*/
|
|
121
|
+
duplicate(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number>;
|
|
105
122
|
/**
|
|
106
123
|
* 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.
|
|
107
124
|
* @summary Get the current account
|
|
@@ -170,16 +187,16 @@ export interface AccountsApiInterface {
|
|
|
170
187
|
*/
|
|
171
188
|
getProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountDetailsResBody>;
|
|
172
189
|
/**
|
|
173
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
190
|
+
* 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.
|
|
174
191
|
* @summary Wait for account setup to finish
|
|
175
|
-
* @param {number} id Identifier returned by POST /v1/accounts.
|
|
192
|
+
* @param {number} id Identifier returned by POST /v1/accounts or POST /v1/account/duplicate.
|
|
176
193
|
* @param {*} [options] Override http request option.
|
|
177
194
|
* @throws {RequiredError}
|
|
178
195
|
* @memberof AccountsApiInterface
|
|
179
196
|
*/
|
|
180
197
|
getSetupStatusRaw(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
181
198
|
/**
|
|
182
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
199
|
+
* 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.
|
|
183
200
|
* Wait for account setup to finish
|
|
184
201
|
*/
|
|
185
202
|
getSetupStatus(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -298,12 +315,12 @@ export interface AccountsApiInterface {
|
|
|
298
315
|
*/
|
|
299
316
|
export declare class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface {
|
|
300
317
|
/**
|
|
301
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
318
|
+
* 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.
|
|
302
319
|
* Create an account
|
|
303
320
|
*/
|
|
304
321
|
createRaw(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>>;
|
|
305
322
|
/**
|
|
306
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
323
|
+
* 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.
|
|
307
324
|
* Create an account
|
|
308
325
|
*/
|
|
309
326
|
create(requestParameters: AccountsApiCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number>;
|
|
@@ -337,6 +354,16 @@ export declare class AccountsApi extends runtime.BaseAPI implements AccountsApiI
|
|
|
337
354
|
* Delete the current account\'s OIDC provider
|
|
338
355
|
*/
|
|
339
356
|
deleteOidcProvider(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
357
|
+
/**
|
|
358
|
+
* 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.
|
|
359
|
+
* Duplicate the current account
|
|
360
|
+
*/
|
|
361
|
+
duplicateRaw(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<number>>;
|
|
362
|
+
/**
|
|
363
|
+
* 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.
|
|
364
|
+
* Duplicate the current account
|
|
365
|
+
*/
|
|
366
|
+
duplicate(requestParameters: AccountsApiDuplicateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<number>;
|
|
340
367
|
/**
|
|
341
368
|
* 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.
|
|
342
369
|
* Get the current account
|
|
@@ -388,12 +415,12 @@ export declare class AccountsApi extends runtime.BaseAPI implements AccountsApiI
|
|
|
388
415
|
*/
|
|
389
416
|
getProfile(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountDetailsResBody>;
|
|
390
417
|
/**
|
|
391
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
418
|
+
* 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.
|
|
392
419
|
* Wait for account setup to finish
|
|
393
420
|
*/
|
|
394
421
|
getSetupStatusRaw(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
395
422
|
/**
|
|
396
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
423
|
+
* 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.
|
|
397
424
|
* Wait for account setup to finish
|
|
398
425
|
*/
|
|
399
426
|
getSetupStatus(requestParameters: AccountsApiGetSetupStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -21,13 +21,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { AccountFromJSON, AccountAuthOptionFromJSON, AccountCalculationUsageBodyFromJSON, AccountDetailsResBodyFromJSON, AccountGetAuthOptionsResBodyFromJSON, AccountOIDCProviderFromJSON, AccountOIDCProviderPatchToJSON, AccountPatchAuthOptionsReqBodyToJSON, AccountPostOIDCProviderReqBodyToJSON, AccountPostReqBodyToJSON, AccountPutOIDCClientSecretReqBodyToJSON, AccountPutReqBodyToJSON, AccountUsageResBodyFromJSON, ListAccountsForUserRowFromJSON, } from '../models/index';
|
|
24
|
+
import { AccountFromJSON, AccountAuthOptionFromJSON, AccountCalculationUsageBodyFromJSON, AccountDetailsResBodyFromJSON, AccountDuplicateReqBodyToJSON, AccountGetAuthOptionsResBodyFromJSON, AccountOIDCProviderFromJSON, AccountOIDCProviderPatchToJSON, AccountPatchAuthOptionsReqBodyToJSON, AccountPostOIDCProviderReqBodyToJSON, AccountPostReqBodyToJSON, AccountPutOIDCClientSecretReqBodyToJSON, AccountPutReqBodyToJSON, AccountUsageResBodyFromJSON, ListAccountsForUserRowFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class AccountsApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
30
|
+
* 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.
|
|
31
31
|
* Create an account
|
|
32
32
|
*/
|
|
33
33
|
createRaw(requestParameters, initOverrides) {
|
|
@@ -62,7 +62,7 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
* Creates an account owned by the authenticated user and returns its identifier.
|
|
65
|
+
* 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.
|
|
66
66
|
* Create an account
|
|
67
67
|
*/
|
|
68
68
|
create(requestParameters, initOverrides) {
|
|
@@ -179,6 +179,51 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
179
179
|
yield this.deleteOidcProviderRaw(initOverrides);
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* 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.
|
|
184
|
+
* Duplicate the current account
|
|
185
|
+
*/
|
|
186
|
+
duplicateRaw(requestParameters, initOverrides) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
if (requestParameters['accountDuplicateReqBody'] == null) {
|
|
189
|
+
throw new runtime.RequiredError('accountDuplicateReqBody', 'Required parameter "accountDuplicateReqBody" was null or undefined when calling duplicate().');
|
|
190
|
+
}
|
|
191
|
+
const queryParameters = {};
|
|
192
|
+
const headerParameters = {};
|
|
193
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
194
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
195
|
+
const token = this.configuration.accessToken;
|
|
196
|
+
const tokenString = yield token("accessToken", []);
|
|
197
|
+
if (tokenString) {
|
|
198
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
let urlPath = `/v1/account/duplicate`;
|
|
202
|
+
const response = yield this.request({
|
|
203
|
+
path: urlPath,
|
|
204
|
+
method: 'POST',
|
|
205
|
+
headers: headerParameters,
|
|
206
|
+
query: queryParameters,
|
|
207
|
+
body: AccountDuplicateReqBodyToJSON(requestParameters['accountDuplicateReqBody']),
|
|
208
|
+
}, initOverrides);
|
|
209
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
210
|
+
return new runtime.JSONApiResponse(response);
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
return new runtime.TextApiResponse(response);
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* 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.
|
|
219
|
+
* Duplicate the current account
|
|
220
|
+
*/
|
|
221
|
+
duplicate(requestParameters, initOverrides) {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
const response = yield this.duplicateRaw(requestParameters, initOverrides);
|
|
224
|
+
return yield response.value();
|
|
225
|
+
});
|
|
226
|
+
}
|
|
182
227
|
/**
|
|
183
228
|
* 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.
|
|
184
229
|
* Get the current account
|
|
@@ -354,7 +399,7 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
354
399
|
});
|
|
355
400
|
}
|
|
356
401
|
/**
|
|
357
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
402
|
+
* 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.
|
|
358
403
|
* Wait for account setup to finish
|
|
359
404
|
*/
|
|
360
405
|
getSetupStatusRaw(requestParameters, initOverrides) {
|
|
@@ -383,7 +428,7 @@ export class AccountsApi extends runtime.BaseAPI {
|
|
|
383
428
|
});
|
|
384
429
|
}
|
|
385
430
|
/**
|
|
386
|
-
* Long-polls until the account created by `POST /v1/accounts` has finished being seeded
|
|
431
|
+
* 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.
|
|
387
432
|
* Wait for account setup to finish
|
|
388
433
|
*/
|
|
389
434
|
getSetupStatus(requestParameters, initOverrides) {
|
|
@@ -68,7 +68,7 @@ export interface InternalApiInterface {
|
|
|
68
68
|
*/
|
|
69
69
|
createAdminFlushDeadLetters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
70
70
|
/**
|
|
71
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
71
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
72
72
|
* @summary Populate account from template
|
|
73
73
|
* @param {number} body
|
|
74
74
|
* @param {*} [options] Override http request option.
|
|
@@ -77,7 +77,7 @@ export interface InternalApiInterface {
|
|
|
77
77
|
*/
|
|
78
78
|
createAdminPopulateRaw(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
79
79
|
/**
|
|
80
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
80
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
81
81
|
* Populate account from template
|
|
82
82
|
*/
|
|
83
83
|
createAdminPopulate(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -245,12 +245,12 @@ export declare class InternalApi extends runtime.BaseAPI implements InternalApiI
|
|
|
245
245
|
*/
|
|
246
246
|
createAdminFlushDeadLetters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
247
247
|
/**
|
|
248
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
248
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
249
249
|
* Populate account from template
|
|
250
250
|
*/
|
|
251
251
|
createAdminPopulateRaw(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
252
252
|
/**
|
|
253
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
253
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
254
254
|
* Populate account from template
|
|
255
255
|
*/
|
|
256
256
|
createAdminPopulate(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -102,7 +102,7 @@ export class InternalApi extends runtime.BaseAPI {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
105
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
106
106
|
* Populate account from template
|
|
107
107
|
*/
|
|
108
108
|
createAdminPopulateRaw(requestParameters, initOverrides) {
|
|
@@ -132,7 +132,7 @@ export class InternalApi extends runtime.BaseAPI {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
135
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
136
136
|
* Populate account from template
|
|
137
137
|
*/
|
|
138
138
|
createAdminPopulate(requestParameters, initOverrides) {
|
|
@@ -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
|
+
}
|
|
@@ -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';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -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';
|
|
@@ -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
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/models/index.js
CHANGED
|
@@ -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);
|
package/package.json
CHANGED
package/src/apis/AccountsApi.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
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> {
|
package/src/apis/InternalApi.ts
CHANGED
|
@@ -117,7 +117,7 @@ export interface InternalApiInterface {
|
|
|
117
117
|
createAdminFlushDeadLetters(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
120
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
121
121
|
* @summary Populate account from template
|
|
122
122
|
* @param {number} body
|
|
123
123
|
* @param {*} [options] Override http request option.
|
|
@@ -127,7 +127,7 @@ export interface InternalApiInterface {
|
|
|
127
127
|
createAdminPopulateRaw(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
130
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
131
131
|
* Populate account from template
|
|
132
132
|
*/
|
|
133
133
|
createAdminPopulate(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -380,7 +380,7 @@ export class InternalApi extends runtime.BaseAPI implements InternalApiInterface
|
|
|
380
380
|
}
|
|
381
381
|
|
|
382
382
|
/**
|
|
383
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
383
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
384
384
|
* Populate account from template
|
|
385
385
|
*/
|
|
386
386
|
async createAdminPopulateRaw(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
@@ -420,7 +420,7 @@ export class InternalApi extends runtime.BaseAPI implements InternalApiInterface
|
|
|
420
420
|
}
|
|
421
421
|
|
|
422
422
|
/**
|
|
423
|
-
* Copies all scenarios, properties, object groups, top-down models, datasets, space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
423
|
+
* Copies all files and their folders, scenarios, properties, object groups and their images, top-down models, datasets, data collections (as drafts without contributors), space rulesets, projects, dashboards, floor plans, and account variables from a named template account into the caller\'s account. Local development uses the seeded local template account for both data and files, and returns 409 until its data and available files are imported. Populating an account from itself is rejected. Requires the *Project admin controls* and *Sys admin* permissions.
|
|
424
424
|
* Populate account from template
|
|
425
425
|
*/
|
|
426
426
|
async createAdminPopulate(requestParameters: InternalApiCreateAdminPopulateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* spaciv API
|
|
5
|
+
* The spaciv API powers workplace planning: modelling how many people an organisation has, how they work, and how much space that requires. ## Getting started 1. Exchange credentials for an access token using one of the operations under **Authentication**. 2. Send that token on every subsequent request as `Authorization: Bearer <token>`. 3. Access tokens are short lived. Call `POST /v1/auth/refresh-token` to obtain a new one before the old one expires. ## Conventions Every operation is versioned under `/v1`. Collections are plural (`GET /v1/dashboards` lists, `POST /v1/dashboards` creates) and individual records live beneath them (`/v1/dashboards/{id}`). Singular paths such as `/v1/account`, `/v1/project` and `/v1/user` refer to the record the access token was issued for. Request and response bodies are JSON. Timestamps are RFC 3339. Identifiers are opaque strings unless documented otherwise, and collection operations return the records visible to the account the token was issued for. Failures return an [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem document with a `detail` field describing what went wrong.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@spaciv.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface AccountDuplicateReqBody
|
|
20
|
+
*/
|
|
21
|
+
export interface AccountDuplicateReqBody {
|
|
22
|
+
/**
|
|
23
|
+
* Display name of the new account. Must not already be in use.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AccountDuplicateReqBody
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the AccountDuplicateReqBody interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfAccountDuplicateReqBody(value: object): value is AccountDuplicateReqBody {
|
|
34
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function AccountDuplicateReqBodyFromJSON(json: any): AccountDuplicateReqBody {
|
|
39
|
+
return AccountDuplicateReqBodyFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function AccountDuplicateReqBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountDuplicateReqBody {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'name': json['name'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function AccountDuplicateReqBodyToJSON(json: any): AccountDuplicateReqBody {
|
|
53
|
+
return AccountDuplicateReqBodyToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AccountDuplicateReqBodyToJSONTyped(value?: AccountDuplicateReqBody | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'name': value['name'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -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';
|