@spaciv/sdk 0.1.24 → 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/apis/ObjectGroupsApi.d.ts +8 -8
- package/dist/apis/ObjectGroupsApi.js +4 -4
- 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/apis/ObjectGroupsApi.d.ts +8 -8
- package/dist/esm/apis/ObjectGroupsApi.js +4 -4
- 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/apis/ObjectGroupsApi.ts +8 -8
- package/src/models/AccountDuplicateReqBody.ts +66 -0
- package/src/models/index.ts +1 -0
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> {
|
|
@@ -326,7 +326,7 @@ export interface ObjectGroupsApiInterface {
|
|
|
326
326
|
listEntries(requestParameters: ObjectGroupsApiListEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectGroupEntriesRes>;
|
|
327
327
|
|
|
328
328
|
/**
|
|
329
|
-
* Creates or updates one or more entries within the specified object group in a single request. Each item in the body must include an `id`; if an entry with that ID already exists it is updated, otherwise a new entry is created. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely; entries are written one at a time, so a failure part way through leaves the earlier ones written. Requires the *Edit objects* permission.
|
|
329
|
+
* Creates or updates one or more entries within the specified object group in a single request. Each item in the body must include an `id`; if an entry with that ID already exists it is updated, otherwise a new entry is created. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely; entries are written one at a time, so a failure part way through leaves the earlier ones written. Requires the *Edit objects* permission, and *View file storage* to link a File property to a file it was not already linked to.
|
|
330
330
|
* @summary Upsert entries in an object group
|
|
331
331
|
* @param {string} id
|
|
332
332
|
* @param {Array<ObjectGroupEntryUpdate>} objectGroupEntryUpdate
|
|
@@ -337,7 +337,7 @@ export interface ObjectGroupsApiInterface {
|
|
|
337
337
|
replaceEntriesRaw(requestParameters: ObjectGroupsApiReplaceEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
338
338
|
|
|
339
339
|
/**
|
|
340
|
-
* Creates or updates one or more entries within the specified object group in a single request. Each item in the body must include an `id`; if an entry with that ID already exists it is updated, otherwise a new entry is created. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely; entries are written one at a time, so a failure part way through leaves the earlier ones written. Requires the *Edit objects* permission.
|
|
340
|
+
* Creates or updates one or more entries within the specified object group in a single request. Each item in the body must include an `id`; if an entry with that ID already exists it is updated, otherwise a new entry is created. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely; entries are written one at a time, so a failure part way through leaves the earlier ones written. Requires the *Edit objects* permission, and *View file storage* to link a File property to a file it was not already linked to.
|
|
341
341
|
* Upsert entries in an object group
|
|
342
342
|
*/
|
|
343
343
|
replaceEntries(requestParameters: ObjectGroupsApiReplaceEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -380,7 +380,7 @@ export interface ObjectGroupsApiInterface {
|
|
|
380
380
|
update(requestParameters: ObjectGroupsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
381
381
|
|
|
382
382
|
/**
|
|
383
|
-
* Applies a partial update to one or more existing entries within the specified object group. Each item in the body must include the `id` of an entry that already exists, and the same `id` cannot be listed twice; use `PUT` to create entries and `DELETE` to remove them. Only the fields present in an item are changed, and `properties` merges one property at a time: a property named in the request replaces that property\'s nodes, a property named with a `null` value or an empty `nodes` map is removed from the entry, and a property the request does not name is left as-is. Every entry is resolved before any of them is written, so a `404` means nothing was changed; an entry deleted after that point reports as a `409` instead. Writing is one transaction per entry rather than a single atomic batch, so a failure once writing has begun leaves the earlier entries updated; the error names them. Re-sending the same request finishes the job, since applying a patch twice is a no-op. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely. Requires the *Edit objects* permission.
|
|
383
|
+
* Applies a partial update to one or more existing entries within the specified object group. Each item in the body must include the `id` of an entry that already exists, and the same `id` cannot be listed twice; use `PUT` to create entries and `DELETE` to remove them. Only the fields present in an item are changed, and `properties` merges one property at a time: a property named in the request replaces that property\'s nodes, a property named with a `null` value or an empty `nodes` map is removed from the entry, and a property the request does not name is left as-is. Every entry is resolved before any of them is written, so a `404` means nothing was changed; an entry deleted after that point reports as a `409` instead. Writing is one transaction per entry rather than a single atomic batch, so a failure once writing has begun leaves the earlier entries updated; the error names them. Re-sending the same request finishes the job, since applying a patch twice is a no-op. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely. Requires the *Edit objects* permission, and *View file storage* to link a File property to a file it was not already linked to.
|
|
384
384
|
* @summary Partially update entries in an object group
|
|
385
385
|
* @param {string} id
|
|
386
386
|
* @param {Array<EntryPatch>} entryPatch
|
|
@@ -391,7 +391,7 @@ export interface ObjectGroupsApiInterface {
|
|
|
391
391
|
updateEntriesRaw(requestParameters: ObjectGroupsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
392
392
|
|
|
393
393
|
/**
|
|
394
|
-
* Applies a partial update to one or more existing entries within the specified object group. Each item in the body must include the `id` of an entry that already exists, and the same `id` cannot be listed twice; use `PUT` to create entries and `DELETE` to remove them. Only the fields present in an item are changed, and `properties` merges one property at a time: a property named in the request replaces that property\'s nodes, a property named with a `null` value or an empty `nodes` map is removed from the entry, and a property the request does not name is left as-is. Every entry is resolved before any of them is written, so a `404` means nothing was changed; an entry deleted after that point reports as a `409` instead. Writing is one transaction per entry rather than a single atomic batch, so a failure once writing has begun leaves the earlier entries updated; the error names them. Re-sending the same request finishes the job, since applying a patch twice is a no-op. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely. Requires the *Edit objects* permission.
|
|
394
|
+
* Applies a partial update to one or more existing entries within the specified object group. Each item in the body must include the `id` of an entry that already exists, and the same `id` cannot be listed twice; use `PUT` to create entries and `DELETE` to remove them. Only the fields present in an item are changed, and `properties` merges one property at a time: a property named in the request replaces that property\'s nodes, a property named with a `null` value or an empty `nodes` map is removed from the entry, and a property the request does not name is left as-is. Every entry is resolved before any of them is written, so a `404` means nothing was changed; an entry deleted after that point reports as a `409` instead. Writing is one transaction per entry rather than a single atomic batch, so a failure once writing has begun leaves the earlier entries updated; the error names them. Re-sending the same request finishes the job, since applying a patch twice is a no-op. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely. Requires the *Edit objects* permission, and *View file storage* to link a File property to a file it was not already linked to.
|
|
395
395
|
* Partially update entries in an object group
|
|
396
396
|
*/
|
|
397
397
|
updateEntries(requestParameters: ObjectGroupsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
@@ -1012,7 +1012,7 @@ export class ObjectGroupsApi extends runtime.BaseAPI implements ObjectGroupsApiI
|
|
|
1012
1012
|
}
|
|
1013
1013
|
|
|
1014
1014
|
/**
|
|
1015
|
-
* Creates or updates one or more entries within the specified object group in a single request. Each item in the body must include an `id`; if an entry with that ID already exists it is updated, otherwise a new entry is created. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely; entries are written one at a time, so a failure part way through leaves the earlier ones written. Requires the *Edit objects* permission.
|
|
1015
|
+
* Creates or updates one or more entries within the specified object group in a single request. Each item in the body must include an `id`; if an entry with that ID already exists it is updated, otherwise a new entry is created. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely; entries are written one at a time, so a failure part way through leaves the earlier ones written. Requires the *Edit objects* permission, and *View file storage* to link a File property to a file it was not already linked to.
|
|
1016
1016
|
* Upsert entries in an object group
|
|
1017
1017
|
*/
|
|
1018
1018
|
async replaceEntriesRaw(requestParameters: ObjectGroupsApiReplaceEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
@@ -1060,7 +1060,7 @@ export class ObjectGroupsApi extends runtime.BaseAPI implements ObjectGroupsApiI
|
|
|
1060
1060
|
}
|
|
1061
1061
|
|
|
1062
1062
|
/**
|
|
1063
|
-
* Creates or updates one or more entries within the specified object group in a single request. Each item in the body must include an `id`; if an entry with that ID already exists it is updated, otherwise a new entry is created. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely; entries are written one at a time, so a failure part way through leaves the earlier ones written. Requires the *Edit objects* permission.
|
|
1063
|
+
* Creates or updates one or more entries within the specified object group in a single request. Each item in the body must include an `id`; if an entry with that ID already exists it is updated, otherwise a new entry is created. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely; entries are written one at a time, so a failure part way through leaves the earlier ones written. Requires the *Edit objects* permission, and *View file storage* to link a File property to a file it was not already linked to.
|
|
1064
1064
|
* Upsert entries in an object group
|
|
1065
1065
|
*/
|
|
1066
1066
|
async replaceEntries(requestParameters: ObjectGroupsApiReplaceEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
@@ -1180,7 +1180,7 @@ export class ObjectGroupsApi extends runtime.BaseAPI implements ObjectGroupsApiI
|
|
|
1180
1180
|
}
|
|
1181
1181
|
|
|
1182
1182
|
/**
|
|
1183
|
-
* Applies a partial update to one or more existing entries within the specified object group. Each item in the body must include the `id` of an entry that already exists, and the same `id` cannot be listed twice; use `PUT` to create entries and `DELETE` to remove them. Only the fields present in an item are changed, and `properties` merges one property at a time: a property named in the request replaces that property\'s nodes, a property named with a `null` value or an empty `nodes` map is removed from the entry, and a property the request does not name is left as-is. Every entry is resolved before any of them is written, so a `404` means nothing was changed; an entry deleted after that point reports as a `409` instead. Writing is one transaction per entry rather than a single atomic batch, so a failure once writing has begun leaves the earlier entries updated; the error names them. Re-sending the same request finishes the job, since applying a patch twice is a no-op. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely. Requires the *Edit objects* permission.
|
|
1183
|
+
* Applies a partial update to one or more existing entries within the specified object group. Each item in the body must include the `id` of an entry that already exists, and the same `id` cannot be listed twice; use `PUT` to create entries and `DELETE` to remove them. Only the fields present in an item are changed, and `properties` merges one property at a time: a property named in the request replaces that property\'s nodes, a property named with a `null` value or an empty `nodes` map is removed from the entry, and a property the request does not name is left as-is. Every entry is resolved before any of them is written, so a `404` means nothing was changed; an entry deleted after that point reports as a `409` instead. Writing is one transaction per entry rather than a single atomic batch, so a failure once writing has begun leaves the earlier entries updated; the error names them. Re-sending the same request finishes the job, since applying a patch twice is a no-op. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely. Requires the *Edit objects* permission, and *View file storage* to link a File property to a file it was not already linked to.
|
|
1184
1184
|
* Partially update entries in an object group
|
|
1185
1185
|
*/
|
|
1186
1186
|
async updateEntriesRaw(requestParameters: ObjectGroupsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
@@ -1228,7 +1228,7 @@ export class ObjectGroupsApi extends runtime.BaseAPI implements ObjectGroupsApiI
|
|
|
1228
1228
|
}
|
|
1229
1229
|
|
|
1230
1230
|
/**
|
|
1231
|
-
* Applies a partial update to one or more existing entries within the specified object group. Each item in the body must include the `id` of an entry that already exists, and the same `id` cannot be listed twice; use `PUT` to create entries and `DELETE` to remove them. Only the fields present in an item are changed, and `properties` merges one property at a time: a property named in the request replaces that property\'s nodes, a property named with a `null` value or an empty `nodes` map is removed from the entry, and a property the request does not name is left as-is. Every entry is resolved before any of them is written, so a `404` means nothing was changed; an entry deleted after that point reports as a `409` instead. Writing is one transaction per entry rather than a single atomic batch, so a failure once writing has begun leaves the earlier entries updated; the error names them. Re-sending the same request finishes the job, since applying a patch twice is a no-op. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely. Requires the *Edit objects* permission.
|
|
1231
|
+
* Applies a partial update to one or more existing entries within the specified object group. Each item in the body must include the `id` of an entry that already exists, and the same `id` cannot be listed twice; use `PUT` to create entries and `DELETE` to remove them. Only the fields present in an item are changed, and `properties` merges one property at a time: a property named in the request replaces that property\'s nodes, a property named with a `null` value or an empty `nodes` map is removed from the entry, and a property the request does not name is left as-is. Every entry is resolved before any of them is written, so a `404` means nothing was changed; an entry deleted after that point reports as a `409` instead. Writing is one transaction per entry rather than a single atomic batch, so a failure once writing has begun leaves the earlier entries updated; the error names them. Re-sending the same request finishes the job, since applying a patch twice is a no-op. Returns `409` if an entry is being changed concurrently and the write cannot be retried safely. Requires the *Edit objects* permission, and *View file storage* to link a File property to a file it was not already linked to.
|
|
1232
1232
|
* Partially update entries in an object group
|
|
1233
1233
|
*/
|
|
1234
1234
|
async updateEntries(requestParameters: ObjectGroupsApiUpdateEntriesRequest, 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';
|