feat: 🎸 Add new target field for storage bucket (#133)

✅ Closes: ICU-8077
This commit is contained in:
Zhihe Li authored and GitHub committed 2023-03-22 10:52:33 -04:00
1 parent 1e7268ff54
commit 31b0a57639
5 files changed
+214

No files matched your search

+39
View File
@@ -323,6 +323,45 @@ export default class TargetModel extends GeneratedTargetModel {
options
);
}
/**
* @param {object} options
* @param {object} options.adapterOptions
* @returns {Promise}
*/
setStorageBucket(options = { adapterOptions: {} }) {
const defaultAdapterOptions = {
method: 'set-storage-bucket',
};
return this.save({
...options,
adapterOptions: {
...defaultAdapterOptions,
...options.adapterOptions,
},
});
}
/**
* @param {object} options
* @param {object} options.adapterOptions
* @returns {Promise}
*/
removeStorageBucket(options = { adapterOptions: {} }) {
const defaultAdapterOptions = {
method: 'remove-storage-bucket',
};
return this.save({
...options,
adapterOptions: {
...defaultAdapterOptions,
...options.adapterOptions,
},
});
}
/**
* True if the target type is tcp.
* @type {boolean}