1
0
Fork 0
mirror of synced 2024-06-14 00:34:51 +12:00

feat(ui): add collection enable/disable

This commit is contained in:
Torsten Dittmann 2021-12-13 13:42:17 +01:00
parent 6c6992a3f7
commit 66710cebc2
2 changed files with 38 additions and 13 deletions

View file

@ -456,6 +456,9 @@ $logs = $this->getParam('logs', null);
<label for="collection-name">Name</label>
<input name="name" id="collection-name" type="text" autocomplete="off" data-ls-bind="{{project-collection.name}}" data-forms-text-direction required placeholder="Collection Name" maxlength="128" />
<div class="margin-bottom">
<input name="enabled" type="hidden" data-forms-switch data-cast-to="boolean" data-ls-bind="{{project-collection.enabled}}" /> &nbsp; Enabled <span class="tooltip" data-tooltip="Mark whether collection is enabled"><i class="icon-info-circled"></i></span>
</div>
<label class="margin-bottom-small">Permissions</label>

View file

@ -199,7 +199,7 @@
*
* Use this endpoint to allow a new user to register a new account in your
* project. After the user registration completes successfully, you can use
* the [/account/verification](/docs/client/account#accountCreateVerification)
* the [/account/verfication](/docs/client/account#accountCreateVerification)
* route to start verifying the user email address. To allow the new user to
* login to their new account, you need to create a new [account
* session](/docs/client/account#accountCreateSession).
@ -264,12 +264,14 @@
* Update Account Email
*
* Update currently logged in user account email address. After changing user
* address, user confirmation status is being reset and a new confirmation
* mail is sent. For security measures, user password is required to complete
* this request.
* address, the user confirmation status will get reset. A new confirmation
* email is not sent automatically however you can use the send confirmation
* email endpoint again to send the confirmation email. For security measures,
* user password is required to complete this request.
* This endpoint can also be used to convert an anonymous account to a normal
* one, by passing an email address and a new password.
*
*
* @param {string} email
* @param {string} password
* @throws {AppwriteException}
@ -1165,8 +1167,8 @@
* @param {string} collectionId
* @param {string} name
* @param {string} permission
* @param {string} read
* @param {string} write
* @param {string[]} read
* @param {string[]} write
* @throws {AppwriteException}
* @returns {Promise}
*/
@ -1237,12 +1239,13 @@
* @param {string} collectionId
* @param {string} name
* @param {string} permission
* @param {string} read
* @param {string} write
* @param {string[]} read
* @param {string[]} write
* @param {boolean} enabled
* @throws {AppwriteException}
* @returns {Promise}
*/
updateCollection: (collectionId, name, permission, read, write) => __awaiter(this, void 0, void 0, function* () {
updateCollection: (collectionId, name, permission, read, write, enabled) => __awaiter(this, void 0, void 0, function* () {
if (typeof collectionId === 'undefined') {
throw new AppwriteException('Missing required parameter: "collectionId"');
}
@ -1266,6 +1269,9 @@
if (typeof write !== 'undefined') {
payload['write'] = write;
}
if (typeof enabled !== 'undefined') {
payload['enabled'] = enabled;
}
const uri = new URL(this.config.endpoint + path);
return yield this.call('put', uri, {
'content-type': 'application/json',
@ -1793,8 +1799,8 @@
* @param {string} collectionId
* @param {string} documentId
* @param {object} data
* @param {string} read
* @param {string} write
* @param {string[]} read
* @param {string[]} write
* @throws {AppwriteException}
* @returns {Promise}
*/
@ -1861,8 +1867,8 @@
* @param {string} collectionId
* @param {string} documentId
* @param {object} data
* @param {string} read
* @param {string} write
* @param {string[]} read
* @param {string[]} write
* @throws {AppwriteException}
* @returns {Promise}
*/
@ -2234,6 +2240,22 @@
'content-type': 'application/json',
}, payload);
}),
/**
* List the currently active function runtimes.
*
* Get a list of all runtimes that are currently active in your project.
*
* @throws {AppwriteException}
* @returns {Promise}
*/
listRuntimes: () => __awaiter(this, void 0, void 0, function* () {
let path = '/functions/runtimes';
let payload = {};
const uri = new URL(this.config.endpoint + path);
return yield this.call('get', uri, {
'content-type': 'application/json',
}, payload);
}),
/**
* Get Function
*