TrashItem
The trash: what was deleted and can still be put back.
Deleting an app, database, bucket, dict, queue, repo, volume, inbox or agent
moves it here, restorable for 30 days, then purged for good. delete() on each of
them returns its TrashItem:
item = noclick.Dict.from_name("rates-cache").delete()
item.restore() # back under its name, every key with itWhile it's in the trash its name is free and its storage is billed as before;
restoring is free. purge() deletes it for good now: the one deletion that
can't be undone, so through MCP it waits for a person.
class TrashItemSomething deleted, restorable until purgeAfter.
- Like every live object, it also has hydrate(), refresh() and raw.
| id | string | |
| kind | TrashKind | What it is. |
| resourceId | string | Its id as it was, and will be again once restored. |
| name | string | null | |
| userId | string | null | The user it was deleted from (null for the account's). |
| trashedAt | Date | null | |
| purgeAfter | Date | null | When it's purged for good unless restored first. |
| operationId | string | null | The deletion's operation (on the item a |
fromIdstatic
static fromId(trashId: string, options?: CallOptions): TrashItemA lazy reference to an item in the trash by its id.
The item; it loads the first time it's used.
liststatic
static list(
options?: TrashListOptions & { limit?: number },
): Promise<TrashItem[]>What's in the trash, newest first.
One kind; omitted, every kind.
Return at most this many.
undefined = the ambient user (asUser), null = the account itself.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
Which users the read covers (user_id query), instead of acting as one (user).
Each item, with when it's purged unless restored first.
listPagestatic
static listPage(
options?: TrashListOptions & PageOptions,
): Promise<Page<TrashItem>>One page of the trash; pass nextCursor back as cursor.
One kind; omitted, every kind.
The next_cursor of the page before; omit it for the first page.
Return at most this many.
undefined = the ambient user (asUser), null = the account itself.
The client to send with; defaults to the module client built from NOCLICK_API_KEY.
Which users the read covers (user_id query), instead of acting as one (user).
A page whose data holds the items and whose next_cursor is None on the last page.
restore
restore(): Promise<JsonObject>Put it back where it was, under its name, with everything in it; throws Conflict when
something new has taken its name since. Returns the restored resource as its own API shows it.
The restored resource as its own API shows it, with restored: True.
purge
purge(): Promise<void>Delete it for good now: the one deletion that can't be undone.