@meeco/svx-api-sdk 1.0.0-stage.20240430145443.1d5661a → 1.0.0-stage.20240624095554.3e253ce

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/lib/esm/apis/ConnectionsApi.js +69 -69
  3. package/lib/esm/apis/HelpersApi.js +14 -8
  4. package/lib/esm/apis/ItemsApi.js +24 -24
  5. package/lib/esm/apis/OrganisationsApi.js +176 -176
  6. package/lib/esm/apis/SecurityRightsApi.js +80 -80
  7. package/lib/esm/apis/SharesApi.js +24 -24
  8. package/lib/esm/apis/TenantsApi.js +174 -174
  9. package/lib/esm/apis/VerifiableCredentialsApi.js +12 -6
  10. package/lib/esm/apis/VerifiablePresentationsApi.js +1 -0
  11. package/lib/esm/models/ATOMBlobInfo.js +8 -0
  12. package/lib/esm/models/ATOMBlobPublicInfo.js +6 -0
  13. package/lib/esm/models/ATOMFileStorageBackend.js +45 -0
  14. package/lib/esm/models/ATOMFileStorageConfiguration.js +46 -0
  15. package/lib/esm/models/VCCredentialTypeModelDtoSchema.js +6 -0
  16. package/lib/esm/models/VCCredentialTypeSchemaDto.js +6 -0
  17. package/lib/esm/models/VCInputDescriptorsDto.js +3 -0
  18. package/lib/esm/models/VCPresentationDefinitionDto.js +0 -3
  19. package/lib/esm/models/VCPresentationDefinitionToSchemaModel.js +3 -0
  20. package/lib/esm/models/VCVerifyPresentationRequestResponseDto.js +3 -2
  21. package/lib/esm/models/index.js +2 -0
  22. package/lib/types/apis/ConnectionsApi.d.ts +36 -36
  23. package/lib/types/apis/HelpersApi.d.ts +8 -7
  24. package/lib/types/apis/ItemsApi.d.ts +18 -18
  25. package/lib/types/apis/OrganisationsApi.d.ts +82 -82
  26. package/lib/types/apis/SecurityRightsApi.d.ts +28 -28
  27. package/lib/types/apis/SharesApi.d.ts +16 -16
  28. package/lib/types/apis/TenantsApi.d.ts +82 -82
  29. package/lib/types/apis/VerifiableCredentialsApi.d.ts +6 -4
  30. package/lib/types/apis/VerifiablePresentationsApi.d.ts +1 -0
  31. package/lib/types/models/ATOMBlobInfo.d.ts +18 -0
  32. package/lib/types/models/ATOMBlobPublicInfo.d.ts +12 -0
  33. package/lib/types/models/ATOMFileStorageBackend.d.ts +37 -0
  34. package/lib/types/models/ATOMFileStorageConfiguration.d.ts +38 -0
  35. package/lib/types/models/VCCredentialTypeModelDtoSchema.d.ts +12 -0
  36. package/lib/types/models/VCCredentialTypeSchemaDto.d.ts +12 -0
  37. package/lib/types/models/VCInputDescriptorsDto.d.ts +7 -0
  38. package/lib/types/models/VCPresentationDefinitionDto.d.ts +0 -7
  39. package/lib/types/models/VCPresentationDefinitionToSchemaModel.d.ts +6 -0
  40. package/lib/types/models/VCVerifyPresentationRequestResponseDto.d.ts +7 -1
  41. package/lib/types/models/index.d.ts +2 -0
  42. package/lib/umd/apis/ConnectionsApi.js +69 -69
  43. package/lib/umd/apis/HelpersApi.js +14 -8
  44. package/lib/umd/apis/ItemsApi.js +24 -24
  45. package/lib/umd/apis/OrganisationsApi.js +176 -176
  46. package/lib/umd/apis/SecurityRightsApi.js +80 -80
  47. package/lib/umd/apis/SharesApi.js +24 -24
  48. package/lib/umd/apis/TenantsApi.js +174 -174
  49. package/lib/umd/apis/VerifiableCredentialsApi.js +12 -6
  50. package/lib/umd/apis/VerifiablePresentationsApi.js +1 -0
  51. package/lib/umd/models/ATOMBlobInfo.js +8 -0
  52. package/lib/umd/models/ATOMBlobPublicInfo.js +6 -0
  53. package/lib/umd/models/ATOMFileStorageBackend.js +52 -0
  54. package/lib/umd/models/ATOMFileStorageConfiguration.js +53 -0
  55. package/lib/umd/models/VCCredentialTypeModelDtoSchema.js +6 -0
  56. package/lib/umd/models/VCCredentialTypeSchemaDto.js +6 -0
  57. package/lib/umd/models/VCInputDescriptorsDto.js +3 -0
  58. package/lib/umd/models/VCPresentationDefinitionDto.js +0 -3
  59. package/lib/umd/models/VCPresentationDefinitionToSchemaModel.js +3 -0
  60. package/lib/umd/models/VCVerifyPresentationRequestResponseDto.js +3 -2
  61. package/lib/umd/models/index.js +2 -0
  62. package/package.json +1 -1
@@ -26,86 +26,6 @@ import { ATOMAdminFromJSON, ATOMAssignSecurityRightsRequestToJSON, ATOMPaginated
26
26
  *
27
27
  */
28
28
  export class SecurityRightsApi extends runtime.BaseAPI {
29
- /**
30
- * Assign global security rights to a user. The user we are assigning security rights to does not need to be known by ATOM. In order to execute this action the current user must have security right `atom:global:assign_global_sr_to_user`.
31
- * Assign global security rights to a user
32
- */
33
- globalAdminsAdminIdSecurityRightsPostRaw(requestParameters, initOverrides) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- if (requestParameters.adminId === null || requestParameters.adminId === undefined) {
36
- throw new runtime.RequiredError('adminId', 'Required parameter requestParameters.adminId was null or undefined when calling globalAdminsAdminIdSecurityRightsPost.');
37
- }
38
- if (requestParameters.aTOMAssignSecurityRightsRequest === null || requestParameters.aTOMAssignSecurityRightsRequest === undefined) {
39
- throw new runtime.RequiredError('aTOMAssignSecurityRightsRequest', 'Required parameter requestParameters.aTOMAssignSecurityRightsRequest was null or undefined when calling globalAdminsAdminIdSecurityRightsPost.');
40
- }
41
- const queryParameters = {};
42
- const headerParameters = {};
43
- headerParameters['Content-Type'] = 'application/json';
44
- if (this.configuration && this.configuration.accessToken) {
45
- const token = this.configuration.accessToken;
46
- const tokenString = yield token("SVX-JWT", []);
47
- if (tokenString) {
48
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
49
- }
50
- }
51
- const response = yield this.request({
52
- path: `/global_admins/{admin_id}/security_rights`.replace(`{${"admin_id"}}`, encodeURIComponent(String(requestParameters.adminId))),
53
- method: 'POST',
54
- headers: headerParameters,
55
- query: queryParameters,
56
- body: ATOMAssignSecurityRightsRequestToJSON(requestParameters.aTOMAssignSecurityRightsRequest),
57
- }, initOverrides);
58
- return new runtime.VoidApiResponse(response);
59
- });
60
- }
61
- /**
62
- * Assign global security rights to a user. The user we are assigning security rights to does not need to be known by ATOM. In order to execute this action the current user must have security right `atom:global:assign_global_sr_to_user`.
63
- * Assign global security rights to a user
64
- */
65
- globalAdminsAdminIdSecurityRightsPost(adminId, aTOMAssignSecurityRightsRequest, initOverrides) {
66
- return __awaiter(this, void 0, void 0, function* () {
67
- yield this.globalAdminsAdminIdSecurityRightsPostRaw({ adminId: adminId, aTOMAssignSecurityRightsRequest: aTOMAssignSecurityRightsRequest }, initOverrides);
68
- });
69
- }
70
- /**
71
- * Remove global security rights from a user. In order to execute this action the current user must have security right `atom:global:assign_global_sr_to_user`.
72
- * Remove global security rights from a user
73
- */
74
- globalAdminsAdminIdSecurityRightsSecurityRightsDeleteRaw(requestParameters, initOverrides) {
75
- return __awaiter(this, void 0, void 0, function* () {
76
- if (requestParameters.adminId === null || requestParameters.adminId === undefined) {
77
- throw new runtime.RequiredError('adminId', 'Required parameter requestParameters.adminId was null or undefined when calling globalAdminsAdminIdSecurityRightsSecurityRightsDelete.');
78
- }
79
- if (requestParameters.securityRights === null || requestParameters.securityRights === undefined) {
80
- throw new runtime.RequiredError('securityRights', 'Required parameter requestParameters.securityRights was null or undefined when calling globalAdminsAdminIdSecurityRightsSecurityRightsDelete.');
81
- }
82
- const queryParameters = {};
83
- const headerParameters = {};
84
- if (this.configuration && this.configuration.accessToken) {
85
- const token = this.configuration.accessToken;
86
- const tokenString = yield token("SVX-JWT", []);
87
- if (tokenString) {
88
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
89
- }
90
- }
91
- const response = yield this.request({
92
- path: `/global_admins/{admin_id}/security_rights/{security_rights}`.replace(`{${"admin_id"}}`, encodeURIComponent(String(requestParameters.adminId))).replace(`{${"security_rights"}}`, encodeURIComponent(String(requestParameters.securityRights))),
93
- method: 'DELETE',
94
- headers: headerParameters,
95
- query: queryParameters,
96
- }, initOverrides);
97
- return new runtime.VoidApiResponse(response);
98
- });
99
- }
100
- /**
101
- * Remove global security rights from a user. In order to execute this action the current user must have security right `atom:global:assign_global_sr_to_user`.
102
- * Remove global security rights from a user
103
- */
104
- globalAdminsAdminIdSecurityRightsSecurityRightsDelete(adminId, securityRights, initOverrides) {
105
- return __awaiter(this, void 0, void 0, function* () {
106
- yield this.globalAdminsAdminIdSecurityRightsSecurityRightsDeleteRaw({ adminId: adminId, securityRights: securityRights }, initOverrides);
107
- });
108
- }
109
29
  /**
110
30
  * List all users with global security rights. It is also possible to request a list of archived global admins, that is, users who used to have global security rights, but do not have them now. In order to execute this action the current user must have \"security right `atom:global:assign_global_sr_to_user`.
111
31
  * List all users with global security rights
@@ -304,6 +224,86 @@ export class SecurityRightsApi extends runtime.BaseAPI {
304
224
  return yield response.value();
305
225
  });
306
226
  }
227
+ /**
228
+ * Assign global security rights to a user. The user we are assigning security rights to does not need to be known by ATOM. In order to execute this action the current user must have security right `atom:global:assign_global_sr_to_user`.
229
+ * Assign global security rights to a user
230
+ */
231
+ globalAdminsIdSecurityRightsPostRaw(requestParameters, initOverrides) {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ if (requestParameters.id === null || requestParameters.id === undefined) {
234
+ throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling globalAdminsIdSecurityRightsPost.');
235
+ }
236
+ if (requestParameters.aTOMAssignSecurityRightsRequest === null || requestParameters.aTOMAssignSecurityRightsRequest === undefined) {
237
+ throw new runtime.RequiredError('aTOMAssignSecurityRightsRequest', 'Required parameter requestParameters.aTOMAssignSecurityRightsRequest was null or undefined when calling globalAdminsIdSecurityRightsPost.');
238
+ }
239
+ const queryParameters = {};
240
+ const headerParameters = {};
241
+ headerParameters['Content-Type'] = 'application/json';
242
+ if (this.configuration && this.configuration.accessToken) {
243
+ const token = this.configuration.accessToken;
244
+ const tokenString = yield token("SVX-JWT", []);
245
+ if (tokenString) {
246
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
247
+ }
248
+ }
249
+ const response = yield this.request({
250
+ path: `/global_admins/{id}/security_rights`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
251
+ method: 'POST',
252
+ headers: headerParameters,
253
+ query: queryParameters,
254
+ body: ATOMAssignSecurityRightsRequestToJSON(requestParameters.aTOMAssignSecurityRightsRequest),
255
+ }, initOverrides);
256
+ return new runtime.VoidApiResponse(response);
257
+ });
258
+ }
259
+ /**
260
+ * Assign global security rights to a user. The user we are assigning security rights to does not need to be known by ATOM. In order to execute this action the current user must have security right `atom:global:assign_global_sr_to_user`.
261
+ * Assign global security rights to a user
262
+ */
263
+ globalAdminsIdSecurityRightsPost(id, aTOMAssignSecurityRightsRequest, initOverrides) {
264
+ return __awaiter(this, void 0, void 0, function* () {
265
+ yield this.globalAdminsIdSecurityRightsPostRaw({ id: id, aTOMAssignSecurityRightsRequest: aTOMAssignSecurityRightsRequest }, initOverrides);
266
+ });
267
+ }
268
+ /**
269
+ * Remove global security rights from a user. In order to execute this action the current user must have security right `atom:global:assign_global_sr_to_user`.
270
+ * Remove global security rights from a user
271
+ */
272
+ globalAdminsIdSecurityRightsSecurityRightsDeleteRaw(requestParameters, initOverrides) {
273
+ return __awaiter(this, void 0, void 0, function* () {
274
+ if (requestParameters.id === null || requestParameters.id === undefined) {
275
+ throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling globalAdminsIdSecurityRightsSecurityRightsDelete.');
276
+ }
277
+ if (requestParameters.securityRights === null || requestParameters.securityRights === undefined) {
278
+ throw new runtime.RequiredError('securityRights', 'Required parameter requestParameters.securityRights was null or undefined when calling globalAdminsIdSecurityRightsSecurityRightsDelete.');
279
+ }
280
+ const queryParameters = {};
281
+ const headerParameters = {};
282
+ if (this.configuration && this.configuration.accessToken) {
283
+ const token = this.configuration.accessToken;
284
+ const tokenString = yield token("SVX-JWT", []);
285
+ if (tokenString) {
286
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
287
+ }
288
+ }
289
+ const response = yield this.request({
290
+ path: `/global_admins/{id}/security_rights/{security_rights}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))).replace(`{${"security_rights"}}`, encodeURIComponent(String(requestParameters.securityRights))),
291
+ method: 'DELETE',
292
+ headers: headerParameters,
293
+ query: queryParameters,
294
+ }, initOverrides);
295
+ return new runtime.VoidApiResponse(response);
296
+ });
297
+ }
298
+ /**
299
+ * Remove global security rights from a user. In order to execute this action the current user must have security right `atom:global:assign_global_sr_to_user`.
300
+ * Remove global security rights from a user
301
+ */
302
+ globalAdminsIdSecurityRightsSecurityRightsDelete(id, securityRights, initOverrides) {
303
+ return __awaiter(this, void 0, void 0, function* () {
304
+ yield this.globalAdminsIdSecurityRightsSecurityRightsDeleteRaw({ id: id, securityRights: securityRights }, initOverrides);
305
+ });
306
+ }
307
307
  /**
308
308
  * Show all security rights of the current user for all active tenants and organizations
309
309
  * All security rights of the current user
@@ -262,10 +262,10 @@ export class SharesApi extends runtime.BaseAPI {
262
262
  * Re-encrypt share data Data in shared slots is initially encrypted with the share DEK. The share DEK is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data as well as `encrypted_value_verification_key` and re-encrypt with them private DEK with this endpoint.
263
263
  * Re-encrypt share data
264
264
  */
265
- itemsIdEncryptPostRaw(requestParameters, initOverrides) {
265
+ itemsItemIdEncryptPostRaw(requestParameters, initOverrides) {
266
266
  return __awaiter(this, void 0, void 0, function* () {
267
- if (requestParameters.id === null || requestParameters.id === undefined) {
268
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling itemsIdEncryptPost.');
267
+ if (requestParameters.itemId === null || requestParameters.itemId === undefined) {
268
+ throw new runtime.RequiredError('itemId', 'Required parameter requestParameters.itemId was null or undefined when calling itemsItemIdEncryptPost.');
269
269
  }
270
270
  const queryParameters = {};
271
271
  const headerParameters = {};
@@ -284,7 +284,7 @@ export class SharesApi extends runtime.BaseAPI {
284
284
  }
285
285
  }
286
286
  const response = yield this.request({
287
- path: `/items/{id}/encrypt`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
287
+ path: `/items/{item_id}/encrypt`.replace(`{${"item_id"}}`, encodeURIComponent(String(requestParameters.itemId))),
288
288
  method: 'POST',
289
289
  headers: headerParameters,
290
290
  query: queryParameters,
@@ -297,9 +297,9 @@ export class SharesApi extends runtime.BaseAPI {
297
297
  * Re-encrypt share data Data in shared slots is initially encrypted with the share DEK. The share DEK is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data as well as `encrypted_value_verification_key` and re-encrypt with them private DEK with this endpoint.
298
298
  * Re-encrypt share data
299
299
  */
300
- itemsIdEncryptPost(id, meecoDelegationId, meecoOrganisationId, postItemEncryptRequest, initOverrides) {
300
+ itemsItemIdEncryptPost(itemId, meecoDelegationId, meecoOrganisationId, postItemEncryptRequest, initOverrides) {
301
301
  return __awaiter(this, void 0, void 0, function* () {
302
- const response = yield this.itemsIdEncryptPostRaw({ id: id, meecoDelegationId: meecoDelegationId, meecoOrganisationId: meecoOrganisationId, postItemEncryptRequest: postItemEncryptRequest }, initOverrides);
302
+ const response = yield this.itemsItemIdEncryptPostRaw({ itemId: itemId, meecoDelegationId: meecoDelegationId, meecoOrganisationId: meecoOrganisationId, postItemEncryptRequest: postItemEncryptRequest }, initOverrides);
303
303
  return yield response.value();
304
304
  });
305
305
  }
@@ -307,10 +307,10 @@ export class SharesApi extends runtime.BaseAPI {
307
307
  * Updating all shares of one item is done by the item owner in one go. A share DEK is encrypted with a public key of the recipient. In order to update shares the owner needs a public key of the recipient of each share. But some shares may be created by users different from the owner, and thus the owner might have no connection to recipients of those shares, and no access to those shares. This problem is solved by * Putting a public key of the recipient and an identification of the keypair to which the public key belongs into each share record. * Providing a list of all public keys and share IDs for all shares of the given item via this endpoint Getting this list is the first step in updating all shares of the item.
308
308
  * Prepare an update of all shares of one item
309
309
  */
310
- itemsIdSharesGetRaw(requestParameters, initOverrides) {
310
+ itemsItemIdSharesGetRaw(requestParameters, initOverrides) {
311
311
  return __awaiter(this, void 0, void 0, function* () {
312
- if (requestParameters.id === null || requestParameters.id === undefined) {
313
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling itemsIdSharesGet.');
312
+ if (requestParameters.itemId === null || requestParameters.itemId === undefined) {
313
+ throw new runtime.RequiredError('itemId', 'Required parameter requestParameters.itemId was null or undefined when calling itemsItemIdSharesGet.');
314
314
  }
315
315
  const queryParameters = {};
316
316
  const headerParameters = {};
@@ -328,7 +328,7 @@ export class SharesApi extends runtime.BaseAPI {
328
328
  }
329
329
  }
330
330
  const response = yield this.request({
331
- path: `/items/{id}/shares`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
331
+ path: `/items/{item_id}/shares`.replace(`{${"item_id"}}`, encodeURIComponent(String(requestParameters.itemId))),
332
332
  method: 'GET',
333
333
  headers: headerParameters,
334
334
  query: queryParameters,
@@ -340,9 +340,9 @@ export class SharesApi extends runtime.BaseAPI {
340
340
  * Updating all shares of one item is done by the item owner in one go. A share DEK is encrypted with a public key of the recipient. In order to update shares the owner needs a public key of the recipient of each share. But some shares may be created by users different from the owner, and thus the owner might have no connection to recipients of those shares, and no access to those shares. This problem is solved by * Putting a public key of the recipient and an identification of the keypair to which the public key belongs into each share record. * Providing a list of all public keys and share IDs for all shares of the given item via this endpoint Getting this list is the first step in updating all shares of the item.
341
341
  * Prepare an update of all shares of one item
342
342
  */
343
- itemsIdSharesGet(id, meecoDelegationId, meecoOrganisationId, initOverrides) {
343
+ itemsItemIdSharesGet(itemId, meecoDelegationId, meecoOrganisationId, initOverrides) {
344
344
  return __awaiter(this, void 0, void 0, function* () {
345
- const response = yield this.itemsIdSharesGetRaw({ id: id, meecoDelegationId: meecoDelegationId, meecoOrganisationId: meecoOrganisationId }, initOverrides);
345
+ const response = yield this.itemsItemIdSharesGetRaw({ itemId: itemId, meecoDelegationId: meecoDelegationId, meecoOrganisationId: meecoOrganisationId }, initOverrides);
346
346
  return yield response.value();
347
347
  });
348
348
  }
@@ -350,10 +350,10 @@ export class SharesApi extends runtime.BaseAPI {
350
350
  * Share your item with connected users. Each share can be a share of all slots of the item, in that case `slot_id` is `NULL`, or it can be a share of just one slot. In this case `slot_id` references one of the slots of the item. There are 3 users involved in each share: * owner - the owner of the shared item * sender - the user who shares data. Can be the owner or one of the recipients * recipient - the user who recieves the shared data. Whether a non-owner may on-share a shared slot is defined in field `onsharing_permitted`. Only the owner of the item can set `onsharing_permitted` to `true`. If `onsharing_permitted` is `false`, the recipient may on-share the item, but when that recipient creates an on-share, `onsharing_permitted` in that on-share is forced to be `false`. In other words, the depth of on-sharing in limited to 3: OWNER ==> RECIPIENT AND SENDER ==> RECIPIENT Some shares require that the recipient accepts the terms of the share. Until the terms are not accepted the share DEK is hidden. Data in slots is initially encrypted with the DEK in field `encrypted_dek`. The DEK in `encrypted_dek` is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data and re-encrypt with the private DEK. A public key of the recipient is needed to encrypt the share DEK. Updating all shares of the same item is performed by the owner in one go. In a situation when a share has been created by a recipient, not the owner, and there is no connection between the owner and the recipient, the owner has no access to a public key of the recipient. In order to address this problem when a share is created we also add fields `public_key` and `keypair_external_id` from the connection record between the recipient and the sender. `keypair_external_id` identifies the keypair that the public key belongs to. When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
351
351
  * Share your item with connected users
352
352
  */
353
- itemsIdSharesPostRaw(requestParameters, initOverrides) {
353
+ itemsItemIdSharesPostRaw(requestParameters, initOverrides) {
354
354
  return __awaiter(this, void 0, void 0, function* () {
355
- if (requestParameters.id === null || requestParameters.id === undefined) {
356
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling itemsIdSharesPost.');
355
+ if (requestParameters.itemId === null || requestParameters.itemId === undefined) {
356
+ throw new runtime.RequiredError('itemId', 'Required parameter requestParameters.itemId was null or undefined when calling itemsItemIdSharesPost.');
357
357
  }
358
358
  const queryParameters = {};
359
359
  const headerParameters = {};
@@ -372,7 +372,7 @@ export class SharesApi extends runtime.BaseAPI {
372
372
  }
373
373
  }
374
374
  const response = yield this.request({
375
- path: `/items/{id}/shares`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
375
+ path: `/items/{item_id}/shares`.replace(`{${"item_id"}}`, encodeURIComponent(String(requestParameters.itemId))),
376
376
  method: 'POST',
377
377
  headers: headerParameters,
378
378
  query: queryParameters,
@@ -385,9 +385,9 @@ export class SharesApi extends runtime.BaseAPI {
385
385
  * Share your item with connected users. Each share can be a share of all slots of the item, in that case `slot_id` is `NULL`, or it can be a share of just one slot. In this case `slot_id` references one of the slots of the item. There are 3 users involved in each share: * owner - the owner of the shared item * sender - the user who shares data. Can be the owner or one of the recipients * recipient - the user who recieves the shared data. Whether a non-owner may on-share a shared slot is defined in field `onsharing_permitted`. Only the owner of the item can set `onsharing_permitted` to `true`. If `onsharing_permitted` is `false`, the recipient may on-share the item, but when that recipient creates an on-share, `onsharing_permitted` in that on-share is forced to be `false`. In other words, the depth of on-sharing in limited to 3: OWNER ==> RECIPIENT AND SENDER ==> RECIPIENT Some shares require that the recipient accepts the terms of the share. Until the terms are not accepted the share DEK is hidden. Data in slots is initially encrypted with the DEK in field `encrypted_dek`. The DEK in `encrypted_dek` is encrypted with the public key of the share recipient. When processing a share the client application is expected to decrypt the slot data and re-encrypt with the private DEK. A public key of the recipient is needed to encrypt the share DEK. Updating all shares of the same item is performed by the owner in one go. In a situation when a share has been created by a recipient, not the owner, and there is no connection between the owner and the recipient, the owner has no access to a public key of the recipient. In order to address this problem when a share is created we also add fields `public_key` and `keypair_external_id` from the connection record between the recipient and the sender. `keypair_external_id` identifies the keypair that the public key belongs to. When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
386
386
  * Share your item with connected users
387
387
  */
388
- itemsIdSharesPost(id, meecoDelegationId, meecoOrganisationId, postItemSharesRequest, initOverrides) {
388
+ itemsItemIdSharesPost(itemId, meecoDelegationId, meecoOrganisationId, postItemSharesRequest, initOverrides) {
389
389
  return __awaiter(this, void 0, void 0, function* () {
390
- const response = yield this.itemsIdSharesPostRaw({ id: id, meecoDelegationId: meecoDelegationId, meecoOrganisationId: meecoOrganisationId, postItemSharesRequest: postItemSharesRequest }, initOverrides);
390
+ const response = yield this.itemsItemIdSharesPostRaw({ itemId: itemId, meecoDelegationId: meecoDelegationId, meecoOrganisationId: meecoOrganisationId, postItemSharesRequest: postItemSharesRequest }, initOverrides);
391
391
  return yield response.value();
392
392
  });
393
393
  }
@@ -395,10 +395,10 @@ export class SharesApi extends runtime.BaseAPI {
395
395
  * Updating all shares of one item is done by the item owner in one go. Before calling this endpoint the client application is expected to retrieve the list of shares IDs and public keys via `GET /items/{id}/shares`. The POST body of this endpoint contains * a list of share DEKs encrypted with public keys of share recipients * a list of slot values for each slot and each share, each encrypted with the DEK of the share that the slot belongs to * Optionally: a list of completed `ClientTask` tasks When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
396
396
  * Update all shares of one item
397
397
  */
398
- itemsIdSharesPutRaw(requestParameters, initOverrides) {
398
+ itemsItemIdSharesPutRaw(requestParameters, initOverrides) {
399
399
  return __awaiter(this, void 0, void 0, function* () {
400
- if (requestParameters.id === null || requestParameters.id === undefined) {
401
- throw new runtime.RequiredError('id', 'Required parameter requestParameters.id was null or undefined when calling itemsIdSharesPut.');
400
+ if (requestParameters.itemId === null || requestParameters.itemId === undefined) {
401
+ throw new runtime.RequiredError('itemId', 'Required parameter requestParameters.itemId was null or undefined when calling itemsItemIdSharesPut.');
402
402
  }
403
403
  const queryParameters = {};
404
404
  const headerParameters = {};
@@ -417,7 +417,7 @@ export class SharesApi extends runtime.BaseAPI {
417
417
  }
418
418
  }
419
419
  const response = yield this.request({
420
- path: `/items/{id}/shares`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters.id))),
420
+ path: `/items/{item_id}/shares`.replace(`{${"item_id"}}`, encodeURIComponent(String(requestParameters.itemId))),
421
421
  method: 'PUT',
422
422
  headers: headerParameters,
423
423
  query: queryParameters,
@@ -430,9 +430,9 @@ export class SharesApi extends runtime.BaseAPI {
430
430
  * Updating all shares of one item is done by the item owner in one go. Before calling this endpoint the client application is expected to retrieve the list of shares IDs and public keys via `GET /items/{id}/shares`. The POST body of this endpoint contains * a list of share DEKs encrypted with public keys of share recipients * a list of slot values for each slot and each share, each encrypted with the DEK of the share that the slot belongs to * Optionally: a list of completed `ClientTask` tasks When a recipient of a share on-shares the data with someone else, nothing prevents him/her to encrypt some other data instead of the original data. We need a way to enforce integrity of on-shares. We do this with help of HMAC - hash-based message authentication code obtained by running a cryptographic hash function over the data and a shared secret key. Two fields in each slot are used for this purpose: * `encrypted_value_verification_key` - is a value verification key encrypted in the same way as the value itself: with the share DEK * `value_verification_hash` - the result of the HMAC function run on the slot value using `encrypted_value_verification_key`. `value_verification_hash` is stored as-is, unencrypted. Only the owner of the data may send `value_verification_hash` when creating or updating the share. When other senders create a share, `value_verification_hash` must be `NULL`. `encrypted_value_verification_key` may and should be sent by every sender, owner or not, because `encrypted_value_verification_key` must be re-encrypted with the share DEK for each share. If the sender replaces `encrypted_value_verification_key` and/or the slot value, this will break the client-side verification against `encrypted_value_verification_key`. Field `encrypted_value` may be `NULL`. If `encrypted_value` is `NULL`, then `encrypted_value_verification_key` and `value_verification_hash` may also be `NULL`. If `encrypted_value` is present, then `encrypted_value_verification_key` and `value_verification_hash` are mandatory.
431
431
  * Update all shares of one item
432
432
  */
433
- itemsIdSharesPut(id, meecoDelegationId, meecoOrganisationId, putItemSharesRequest, initOverrides) {
433
+ itemsItemIdSharesPut(itemId, meecoDelegationId, meecoOrganisationId, putItemSharesRequest, initOverrides) {
434
434
  return __awaiter(this, void 0, void 0, function* () {
435
- const response = yield this.itemsIdSharesPutRaw({ id: id, meecoDelegationId: meecoDelegationId, meecoOrganisationId: meecoOrganisationId, putItemSharesRequest: putItemSharesRequest }, initOverrides);
435
+ const response = yield this.itemsItemIdSharesPutRaw({ itemId: itemId, meecoDelegationId: meecoDelegationId, meecoOrganisationId: meecoOrganisationId, putItemSharesRequest: putItemSharesRequest }, initOverrides);
436
436
  return yield response.value();
437
437
  });
438
438
  }