Convenience for the various headers and parameters that need to be setup when constructing an API.
It avoids a lot of boilerplate in constructing arguments for an api (api keys, subscription keys etc.)
Basically, instead of
new Keystore.EncryptionSpaceApi({
baseApi: environment.api.url,
apiKey: (key: string) => {
if(key === 'Meeco-Subscription-Key') return environment.keystore.subscription_key;
if(key === 'Authorization) return user.keystore_access_token
}
}).someMethod();
you can create a factory that returns these instances for you:
const factory = keystoreAPIFactory(environment);
const forUser = factory(userAuth);
forUser.EncryptionSpaceApi.getItems();
forUser.KeypairApi.getConnections();
// etc...
Every Slot must have either a non-empty name or label
After decryption all encrypted_X
props are replaced with X
props.
In particular encrypted_value
becomes value
.
Optional attributes which can be specified when creating a new Slot
Convenience for the various headers and parameters that need to be setup when constructing an API.
It avoids a lot of boilerplate in constructing arguments for an api (api keys, subscription keys etc.)
Basically, instead of
new Vault.ItemApi({
baseApi: environment.api.url,
apiKey: (key: string) => {
if(key === 'Meeco-Subscription-Key') return environment.vault.subscription_key;
if(key === 'Authorization) return user.vault_access_token
}
}).someMethod();
you can create a factory that returns these instances for you:
const factory = vaultAPIFactory(environment);
const forUser = factory(userAuth);
forUser.ItemsAPI.getItems();
forUser.ConnectionAPI.getConnections();
// etc...
Results in a factory function that can be passed user auth information and then get arbitrary Keystore api instances to use.
Configure the fetch library to use for API requests
Helper to find connection between two users (if one exists)
Sequentially get all pages in this collection.
This may take a long time, as the cursor is not known until the current query has finished.
If you want to stop partway, use pagedToGenerator
.
If the response is an object of arrays, use reducePages
to flatten the result.
Partially applied API method to collect pages from.
Index an array of Slot-like objects by their name (or label if name is missing).
Optionally transform the values in the resulting map. By default returns the Slot itself.
Results in a factory function that can be passed user auth information and then get arbitrary Keystore api instances to use.
Returns all API calls required to visit all pages in this collection. Use this if you need to process the individual responses before proceeding with the query, e.g. when searching.
Partially applied API method to collect pages from.
Join responses by appending individual components. Any object-valued properties with raise an error. Primitive-typed properties will take the last value.
Join responses by appending individual components. Any non-array properties will have the value of the last response.
Convert API returned Slots to NewSlot creation requests. Renames image_id to image, and removes all props with null value.
Verify integrity of shared Slot Values using message authentication hashing.
Recommended to be 64 bytes long.
Plaintext to hash.
Results in a factory function that can be passed user auth information and then get arbitrary Vault api instances to use.
Generated using TypeDoc
DecryptedItems together with response metadata if needed for paging etc.