@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.
@@ -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. Unless the template is `blank`, the account is seeded from a prebuilt one. Seeding runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account. Account names are unique; reusing one returns `400 account-name-in-use`. Requires the *Manage my account* permission.
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. Unless the template is `blank`, the account is seeded from a prebuilt one. Seeding runs in the background, so poll `GET /v1/accounts/{id}/setup-status` until it succeeds before sending the user into the new account. Account names are unique; reusing one returns `400 account-name-in-use`. Requires the *Manage my account* permission.
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 from its template, then returns `200`. The request is held open for up to 90 seconds and returns `408` if setup has not completed by then; call it again to keep waiting. The caller must be a member of the account and hold the *Manage my account* permission.
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 from its template, then returns `200`. The request is held open for up to 90 seconds and returns `408` if setup has not completed by then; call it again to keep waiting. The caller must be a member of the account and hold the *Manage my account* permission.
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) {
@@ -252,7 +252,7 @@ export interface ObjectGroupsApiInterface {
252
252
  */
253
253
  listEntries(requestParameters: ObjectGroupsApiListEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectGroupEntriesRes>;
254
254
  /**
255
- * 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.
255
+ * 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.
256
256
  * @summary Upsert entries in an object group
257
257
  * @param {string} id
258
258
  * @param {Array<ObjectGroupEntryUpdate>} objectGroupEntryUpdate
@@ -262,7 +262,7 @@ export interface ObjectGroupsApiInterface {
262
262
  */
263
263
  replaceEntriesRaw(requestParameters: ObjectGroupsApiReplaceEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
264
264
  /**
265
- * 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.
265
+ * 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.
266
266
  * Upsert entries in an object group
267
267
  */
268
268
  replaceEntries(requestParameters: ObjectGroupsApiReplaceEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -300,7 +300,7 @@ export interface ObjectGroupsApiInterface {
300
300
  */
301
301
  update(requestParameters: ObjectGroupsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
302
302
  /**
303
- * 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.
303
+ * 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.
304
304
  * @summary Partially update entries in an object group
305
305
  * @param {string} id
306
306
  * @param {Array<EntryPatch>} entryPatch
@@ -310,7 +310,7 @@ export interface ObjectGroupsApiInterface {
310
310
  */
311
311
  updateEntriesRaw(requestParameters: ObjectGroupsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
312
312
  /**
313
- * 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.
313
+ * 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.
314
314
  * Partially update entries in an object group
315
315
  */
316
316
  updateEntries(requestParameters: ObjectGroupsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -463,12 +463,12 @@ export declare class ObjectGroupsApi extends runtime.BaseAPI implements ObjectGr
463
463
  */
464
464
  listEntries(requestParameters: ObjectGroupsApiListEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ObjectGroupEntriesRes>;
465
465
  /**
466
- * 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.
466
+ * 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.
467
467
  * Upsert entries in an object group
468
468
  */
469
469
  replaceEntriesRaw(requestParameters: ObjectGroupsApiReplaceEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
470
470
  /**
471
- * 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.
471
+ * 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.
472
472
  * Upsert entries in an object group
473
473
  */
474
474
  replaceEntries(requestParameters: ObjectGroupsApiReplaceEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -493,12 +493,12 @@ export declare class ObjectGroupsApi extends runtime.BaseAPI implements ObjectGr
493
493
  */
494
494
  update(requestParameters: ObjectGroupsApiUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
495
495
  /**
496
- * 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.
496
+ * 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.
497
497
  * Partially update entries in an object group
498
498
  */
499
499
  updateEntriesRaw(requestParameters: ObjectGroupsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
500
500
  /**
501
- * 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.
501
+ * 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.
502
502
  * Partially update entries in an object group
503
503
  */
504
504
  updateEntries(requestParameters: ObjectGroupsApiUpdateEntriesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -501,7 +501,7 @@ export class ObjectGroupsApi extends runtime.BaseAPI {
501
501
  });
502
502
  }
503
503
  /**
504
- * 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.
504
+ * 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.
505
505
  * Upsert entries in an object group
506
506
  */
507
507
  replaceEntriesRaw(requestParameters, initOverrides) {
@@ -535,7 +535,7 @@ export class ObjectGroupsApi extends runtime.BaseAPI {
535
535
  });
536
536
  }
537
537
  /**
538
- * 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.
538
+ * 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.
539
539
  * Upsert entries in an object group
540
540
  */
541
541
  replaceEntries(requestParameters, initOverrides) {
@@ -635,7 +635,7 @@ export class ObjectGroupsApi extends runtime.BaseAPI {
635
635
  });
636
636
  }
637
637
  /**
638
- * 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.
638
+ * 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.
639
639
  * Partially update entries in an object group
640
640
  */
641
641
  updateEntriesRaw(requestParameters, initOverrides) {
@@ -669,7 +669,7 @@ export class ObjectGroupsApi extends runtime.BaseAPI {
669
669
  });
670
670
  }
671
671
  /**
672
- * 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.
672
+ * 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.
673
673
  * Partially update entries in an object group
674
674
  */
675
675
  updateEntries(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';
@@ -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
+ }
@@ -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';
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaciv/sdk",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "OpenAPI client for @spaciv/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {