DVStudioClient class
Studio's calls to the backend it is served by.
Constructors
- DVStudioClient(DVStudioTransport transport)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transport → DVStudioTransport
-
final
Methods
-
access(
) → Future< bool> - Whether this caller has a granted session to open Studio.
-
cacheTags(
) → Future< List< Map< >String, Object?> > - Every cache tag, with the keys under it.
-
create(
String model, Map< String, Object?> values) → Future<DVStudioRecordData> -
delete(
String model, DVStudioRecordData read) → Future< void> -
deleteFunction(
String name) → Future< void> -
deleteModel(
String name) → Future< void> -
Removes the model
namedesigned in Studio. Its records are kept. -
deletePage(
String route) → Future< void> -
discardJob(
String id) → Future< void> - Drops a dead-lettered job for good.
-
functions(
) → Future< List< Map< >String, Object?> > -
Every function built in Studio, as
{name, document}. -
grant(
String account) → Future< void> -
Lets
account, an address or an account id, open Studio. -
grants(
) → Future< List< Map< >String, Object?> > -
manifest(
) → Future< Map< String, Object?> > - The project graph the build wrote beside Studio: models, routes, functions and jobs, with the file each is declared in.
-
me(
) → Future< Map< String, Object?> > -
The signed-in account,
{userId, email}. -
modelCatalog(
) → Future< ({List< DVStudioModel> models, bool sourceWritable})> - Every data model, and whether one designed here can also be written to the project's source -- true only on a development server.
-
models(
) → Future< List< DVStudioModel> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pages(
) → Future< List< DVPageDocument> > -
queues(
) → Future< List< Map< >String, Object?> > - Every queue the build declares, with its pending jobs and dead letters.
-
records(
String model) → Future< List< DVStudioRecordData> > -
retryJob(
String id) → Future< void> - Puts a dead-lettered job back on its queue.
-
revalidateTag(
String tag) → Future< List< String> > -
Drops every key under
tag, and returns the keys dropped. -
revoke(
String userId, {required String tenant, bool confirm = false}) → Future< void> -
Takes
userId's grant ontenantaway. The server refuses the caller's own grant and the last one on a tenant with a 409 unlessconfirmsays the person meant it. -
saveFunction(
Map< String, Object?> document) → Future<void> -
saveModel(
String name, Map< String, Object?> definition) → Future<DVStudioModel> -
Stores
definitionas the modelname, designed in Studio: its key, fields and their rules, indexes and access. Answers the model as it was stored. -
savePage(
DVPageDocument document, {bool force = false}) → Future< void> -
Saves
document. On a development server, where the page is also a file of the project, a file changed in code since Studio last saved it is not written over: DVStudioChangedInCode, unlessforce. -
signOut(
) → Future< void> - Ends this session on the server and clears its cookie.
-
site(
) → Future< List< DVStudioSitePage> > - Every route the site answers, compiled and stored, each marked.
-
structure(
String route) → Future< Object?> -
The structure the build captured for the compiled page at
route, or null when it captured none. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
String model, DVStudioRecordData read, Map< String, Object?> values) → Future<DVStudioRecordData> -
Stores
valuesoverread, refused when the record has moved since. -
writeModelSource(
String name) → Future< String> -
Writes the model
nameto the project's source, and answers the file.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited