@simplito/privmx-webendpoint 2.5.1 → 2.5.2
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/Types.d.ts +1 -1
- package/package.json +1 -1
- package/service/KvdbApi.d.ts +16 -16
- package/service/KvdbApi.js +16 -16
package/Types.d.ts
CHANGED
|
@@ -361,7 +361,7 @@ export interface FilesConfig {
|
|
|
361
361
|
* @param {Uint8Array} publicMeta KVDB's public meta data
|
|
362
362
|
* @param {Uint8Array} privateMeta KVDB's private mata data
|
|
363
363
|
* @param {ContainerPolicy} policy KVDB's policies
|
|
364
|
-
* @param {number} entries total number of
|
|
364
|
+
* @param {number} entries total number of entries in the KVDB
|
|
365
365
|
* @param {number} statusCode status code of retrival and decryption of the KVDB
|
|
366
366
|
* @param {number} schemaVersion Version of the KVDB data structure and how it is encoded/encrypted
|
|
367
367
|
*/
|
package/package.json
CHANGED
package/service/KvdbApi.d.ts
CHANGED
|
@@ -18,28 +18,28 @@ export declare class KvdbApi extends BaseApi {
|
|
|
18
18
|
* Creates a new KVDB in given Context.
|
|
19
19
|
*
|
|
20
20
|
* @param {string} contextId ID of the Context to create the KVDB in
|
|
21
|
-
* @param {UserWithPubKey[]} users array of UserWithPubKey structs which indicates who will have access to the created
|
|
21
|
+
* @param {UserWithPubKey[]} users array of UserWithPubKey structs which indicates who will have access to the created KVDB
|
|
22
22
|
* @param {UserWithPubKey[]} managers array of UserWithPubKey structs which indicates who will have access (and management rights) to
|
|
23
|
-
* the created
|
|
23
|
+
* the created KVDB
|
|
24
24
|
* @param {Uint8Array} publicMeta public (unencrypted) metadata
|
|
25
25
|
* @param {Uint8Array} privateMeta private (encrypted) metadata
|
|
26
|
-
* @param {ContainerPolicy} policies
|
|
27
|
-
* @returns {string} ID of the created
|
|
26
|
+
* @param {ContainerPolicy} policies KVDB's policies
|
|
27
|
+
* @returns {string} ID of the created KVDB
|
|
28
28
|
*/
|
|
29
29
|
createKvdb(contextId: string, users: UserWithPubKey[], managers: UserWithPubKey[], publicMeta: Uint8Array, privateMeta: Uint8Array, policies?: ContainerPolicy): Promise<string>;
|
|
30
30
|
/**
|
|
31
|
-
* Updates an existing
|
|
31
|
+
* Updates an existing KVDB.
|
|
32
32
|
*
|
|
33
33
|
* @param {string} kvdbId ID of the KVDB to update
|
|
34
|
-
* @param {UserWithPubKey[]} users array of UserWithPubKey structs which indicates who will have access to the created
|
|
34
|
+
* @param {UserWithPubKey[]} users array of UserWithPubKey structs which indicates who will have access to the created KVDB
|
|
35
35
|
* @param {UserWithPubKey[]} managers array of UserWithPubKey structs which indicates who will have access (and management rights) to
|
|
36
|
-
* the created
|
|
36
|
+
* the created KVDB
|
|
37
37
|
* @param {Uint8Array} publicMeta public (unencrypted) metadata
|
|
38
38
|
* @param {Uint8Array} privateMeta private (encrypted) metadata
|
|
39
|
-
* @param {number} version current version of the updated
|
|
39
|
+
* @param {number} version current version of the updated KVDB
|
|
40
40
|
* @param {boolean} force force update (without checking version)
|
|
41
|
-
* @param {boolean} forceGenerateNewKey force to regenerate a key for the
|
|
42
|
-
* @param {ContainerPolicy} policies
|
|
41
|
+
* @param {boolean} forceGenerateNewKey force to regenerate a key for the KVDB
|
|
42
|
+
* @param {ContainerPolicy} policies KVDB's policies
|
|
43
43
|
*/
|
|
44
44
|
updateKvdb(kvdbId: string, users: UserWithPubKey[], managers: UserWithPubKey[], publicMeta: Uint8Array, privateMeta: Uint8Array, version: number, force: boolean, forceGenerateNewKey: boolean, policies?: ContainerPolicy): Promise<void>;
|
|
45
45
|
/**
|
|
@@ -52,7 +52,7 @@ export declare class KvdbApi extends BaseApi {
|
|
|
52
52
|
* Gets a KVDB by given KVDB ID.
|
|
53
53
|
*
|
|
54
54
|
* @param {string} kvdbId ID of KVDB to get
|
|
55
|
-
* @returns {Kvdb} containing info about the
|
|
55
|
+
* @returns {Kvdb} containing info about the KVDB
|
|
56
56
|
*/
|
|
57
57
|
getKvdb(kvdbId: string): Promise<Kvdb>;
|
|
58
58
|
/**
|
|
@@ -80,7 +80,7 @@ export declare class KvdbApi extends BaseApi {
|
|
|
80
80
|
*/
|
|
81
81
|
hasEntry(kvdbId: string, key: string): Promise<boolean>;
|
|
82
82
|
/**
|
|
83
|
-
* Gets a list of KVDB entries keys from a
|
|
83
|
+
* Gets a list of KVDB entries keys from a KVDB.
|
|
84
84
|
*
|
|
85
85
|
* @param {string} kvdbId ID of the KVDB to list KVDB entries from
|
|
86
86
|
* @param {PagingQuery} pagingQuery with list query parameters
|
|
@@ -88,7 +88,7 @@ export declare class KvdbApi extends BaseApi {
|
|
|
88
88
|
*/
|
|
89
89
|
listEntriesKeys(kvdbId: string, pagingQuery: PagingQuery): Promise<PagingList<string>>;
|
|
90
90
|
/**
|
|
91
|
-
* Gets a list of KVDB entries from a
|
|
91
|
+
* Gets a list of KVDB entries from a KVDB.
|
|
92
92
|
*
|
|
93
93
|
* @param {string} kvdbId ID of the KVDB to list KVDB entries from
|
|
94
94
|
* @param {PagingQuery} pagingQuery with list query parameters
|
|
@@ -96,7 +96,7 @@ export declare class KvdbApi extends BaseApi {
|
|
|
96
96
|
*/
|
|
97
97
|
listEntries(kvdbId: string, pagingQuery: PagingQuery): Promise<PagingList<KvdbEntry>>;
|
|
98
98
|
/**
|
|
99
|
-
* Sets a KVDB entry in the given
|
|
99
|
+
* Sets a KVDB entry in the given KVDB.
|
|
100
100
|
* @param {string} kvdbId ID of the KVDB to set the entry to
|
|
101
101
|
* @param {string} key KVDB entry key
|
|
102
102
|
* @param {Uint8Array} publicMeta public KVDB entry metadata
|
|
@@ -130,12 +130,12 @@ export declare class KvdbApi extends BaseApi {
|
|
|
130
130
|
*/
|
|
131
131
|
unsubscribeFromKvdbEvents(): Promise<void>;
|
|
132
132
|
/**
|
|
133
|
-
* Subscribes for events in given
|
|
133
|
+
* Subscribes for events in given KVDB.
|
|
134
134
|
* @param {string} kvdbId ID of the KVDB to subscribe
|
|
135
135
|
*/
|
|
136
136
|
subscribeForEntryEvents(kvdbId: string): Promise<void>;
|
|
137
137
|
/**
|
|
138
|
-
* Unsubscribes from events in given
|
|
138
|
+
* Unsubscribes from events in given KVDB.
|
|
139
139
|
* @param {string} kvdbId ID of the KVDB to unsubscribe
|
|
140
140
|
*/
|
|
141
141
|
unsubscribeFromEntryEvents(kvdbId: string): Promise<void>;
|
package/service/KvdbApi.js
CHANGED
|
@@ -22,13 +22,13 @@ class KvdbApi extends BaseApi_1.BaseApi {
|
|
|
22
22
|
* Creates a new KVDB in given Context.
|
|
23
23
|
*
|
|
24
24
|
* @param {string} contextId ID of the Context to create the KVDB in
|
|
25
|
-
* @param {UserWithPubKey[]} users array of UserWithPubKey structs which indicates who will have access to the created
|
|
25
|
+
* @param {UserWithPubKey[]} users array of UserWithPubKey structs which indicates who will have access to the created KVDB
|
|
26
26
|
* @param {UserWithPubKey[]} managers array of UserWithPubKey structs which indicates who will have access (and management rights) to
|
|
27
|
-
* the created
|
|
27
|
+
* the created KVDB
|
|
28
28
|
* @param {Uint8Array} publicMeta public (unencrypted) metadata
|
|
29
29
|
* @param {Uint8Array} privateMeta private (encrypted) metadata
|
|
30
|
-
* @param {ContainerPolicy} policies
|
|
31
|
-
* @returns {string} ID of the created
|
|
30
|
+
* @param {ContainerPolicy} policies KVDB's policies
|
|
31
|
+
* @returns {string} ID of the created KVDB
|
|
32
32
|
*/
|
|
33
33
|
async createKvdb(contextId, users, managers, publicMeta, privateMeta, policies) {
|
|
34
34
|
return this.native.createKvdb(this.servicePtr, [
|
|
@@ -41,18 +41,18 @@ class KvdbApi extends BaseApi_1.BaseApi {
|
|
|
41
41
|
]);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
|
-
* Updates an existing
|
|
44
|
+
* Updates an existing KVDB.
|
|
45
45
|
*
|
|
46
46
|
* @param {string} kvdbId ID of the KVDB to update
|
|
47
|
-
* @param {UserWithPubKey[]} users array of UserWithPubKey structs which indicates who will have access to the created
|
|
47
|
+
* @param {UserWithPubKey[]} users array of UserWithPubKey structs which indicates who will have access to the created KVDB
|
|
48
48
|
* @param {UserWithPubKey[]} managers array of UserWithPubKey structs which indicates who will have access (and management rights) to
|
|
49
|
-
* the created
|
|
49
|
+
* the created KVDB
|
|
50
50
|
* @param {Uint8Array} publicMeta public (unencrypted) metadata
|
|
51
51
|
* @param {Uint8Array} privateMeta private (encrypted) metadata
|
|
52
|
-
* @param {number} version current version of the updated
|
|
52
|
+
* @param {number} version current version of the updated KVDB
|
|
53
53
|
* @param {boolean} force force update (without checking version)
|
|
54
|
-
* @param {boolean} forceGenerateNewKey force to regenerate a key for the
|
|
55
|
-
* @param {ContainerPolicy} policies
|
|
54
|
+
* @param {boolean} forceGenerateNewKey force to regenerate a key for the KVDB
|
|
55
|
+
* @param {ContainerPolicy} policies KVDB's policies
|
|
56
56
|
*/
|
|
57
57
|
async updateKvdb(kvdbId, users, managers, publicMeta, privateMeta, version, force, forceGenerateNewKey, policies) {
|
|
58
58
|
return this.native.updateKvdb(this.servicePtr, [
|
|
@@ -79,7 +79,7 @@ class KvdbApi extends BaseApi_1.BaseApi {
|
|
|
79
79
|
* Gets a KVDB by given KVDB ID.
|
|
80
80
|
*
|
|
81
81
|
* @param {string} kvdbId ID of KVDB to get
|
|
82
|
-
* @returns {Kvdb} containing info about the
|
|
82
|
+
* @returns {Kvdb} containing info about the KVDB
|
|
83
83
|
*/
|
|
84
84
|
async getKvdb(kvdbId) {
|
|
85
85
|
return this.native.getKvdb(this.servicePtr, [kvdbId]);
|
|
@@ -115,7 +115,7 @@ class KvdbApi extends BaseApi_1.BaseApi {
|
|
|
115
115
|
return this.native.hasEntry(this.servicePtr, [kvdbId, key]);
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
|
-
* Gets a list of KVDB entries keys from a
|
|
118
|
+
* Gets a list of KVDB entries keys from a KVDB.
|
|
119
119
|
*
|
|
120
120
|
* @param {string} kvdbId ID of the KVDB to list KVDB entries from
|
|
121
121
|
* @param {PagingQuery} pagingQuery with list query parameters
|
|
@@ -125,7 +125,7 @@ class KvdbApi extends BaseApi_1.BaseApi {
|
|
|
125
125
|
return this.native.listEntriesKeys(this.servicePtr, [kvdbId, pagingQuery]);
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
|
-
* Gets a list of KVDB entries from a
|
|
128
|
+
* Gets a list of KVDB entries from a KVDB.
|
|
129
129
|
*
|
|
130
130
|
* @param {string} kvdbId ID of the KVDB to list KVDB entries from
|
|
131
131
|
* @param {PagingQuery} pagingQuery with list query parameters
|
|
@@ -135,7 +135,7 @@ class KvdbApi extends BaseApi_1.BaseApi {
|
|
|
135
135
|
return this.native.listEntries(this.servicePtr, [kvdbId, pagingQuery]);
|
|
136
136
|
}
|
|
137
137
|
/**
|
|
138
|
-
* Sets a KVDB entry in the given
|
|
138
|
+
* Sets a KVDB entry in the given KVDB.
|
|
139
139
|
* @param {string} kvdbId ID of the KVDB to set the entry to
|
|
140
140
|
* @param {string} key KVDB entry key
|
|
141
141
|
* @param {Uint8Array} publicMeta public KVDB entry metadata
|
|
@@ -189,14 +189,14 @@ class KvdbApi extends BaseApi_1.BaseApi {
|
|
|
189
189
|
return this.native.unsubscribeFromKvdbEvents(this.servicePtr, []);
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
192
|
-
* Subscribes for events in given
|
|
192
|
+
* Subscribes for events in given KVDB.
|
|
193
193
|
* @param {string} kvdbId ID of the KVDB to subscribe
|
|
194
194
|
*/
|
|
195
195
|
async subscribeForEntryEvents(kvdbId) {
|
|
196
196
|
return this.native.subscribeForEntryEvents(this.servicePtr, [kvdbId]);
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
|
-
* Unsubscribes from events in given
|
|
199
|
+
* Unsubscribes from events in given KVDB.
|
|
200
200
|
* @param {string} kvdbId ID of the KVDB to unsubscribe
|
|
201
201
|
*/
|
|
202
202
|
async unsubscribeFromEntryEvents(kvdbId) {
|