gws.plugin.qfieldcloud.action

Source code: gws.plugin.qfieldcloud.action

Module Contents

class gws.plugin.qfieldcloud.action.AuthMethod

Bases: gws.AuthMethod

Dummy auth method for API sessions.

configure()

Configuration hook.

class gws.plugin.qfieldcloud.action.Config(*args, **kwargs)

Bases: gws.ConfigWithAccess

Basic config with permissions.

projects: list[gws.plugin.qfieldcloud.core.ProjectConfig]

QField Cloud projects.

class gws.plugin.qfieldcloud.action.Object

Bases: gws.base.action.Object

QField Cloud API action.

capsCache: dict[str, gws.plugin.qfieldcloud.caps.Caps]
method: gws.AuthMethod
qfcProjects: list[gws.plugin.qfieldcloud.core.QfcProject]
authorize_from_credentials(credentials: gws.Data, rx: Request)
authorize_from_token(rx: Request)
configure()
create_package_from_cli(qfc_project_uid: str, target_dir: str, project: gws.Project, user: gws.User)
create_package_from_worker(worker: PackageWorker, pa: WorkerPayload)
create_package_job(rx: Request) gws.Job
fs_cleanup_old_deltas(qfc_project: gws.plugin.qfieldcloud.core.QfcProject, keep_seconds: int = 3600)
fs_cleanup_old_packages(qfc_project: gws.plugin.qfieldcloud.core.QfcProject, keep_seconds: int = 3600)
fs_delta_payload_path(qfc_project: gws.plugin.qfieldcloud.core.QfcProject, payload_id: str) str
fs_latest_package_dir(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) str | None
fs_new_package_dir(qfc_project: gws.plugin.qfieldcloud.core.QfcProject, uid: str) str
fs_project_base_dir(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) str
fs_project_cache_dir(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) str
fs_project_deltas_dir(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) str
get_cached_caps(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) gws.plugin.qfieldcloud.caps.Caps | None
get_caps(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) gws.plugin.qfieldcloud.caps.Caps
get_delta_payload(payload_id: str, rx: Request) list[gws.plugin.qfieldcloud.api.StoredDelta] | None
get_job(job_id: str, project: gws.Project, user: gws.User) gws.Job | None
get_latest_package_path_map(rx: Request) dict[str, str]
get_packager() gws.plugin.qfieldcloud.packager.Object
get_patcher() gws.plugin.qfieldcloud.patcher.Object
get_qfc_project(qfc_project_uid: str, project: gws.Project, user: gws.User) gws.plugin.qfieldcloud.core.QfcProject | None
get_qfc_projects(project: gws.Project, user: gws.User) list[gws.plugin.qfieldcloud.core.QfcProject]
on_get_auth_providers(rx: Request) list[gws.plugin.qfieldcloud.api.AuthProvider]
on_get_auth_user(rx: Request) gws.plugin.qfieldcloud.api.CompleteUser
on_get_deltas(rx: Request) list[gws.plugin.qfieldcloud.api.StoredDelta]
on_get_files(rx: Request) list[gws.plugin.qfieldcloud.api.PackageFile]
on_get_jobs_id(rx: Request) gws.plugin.qfieldcloud.api.Job
on_get_package(rx: Request) gws.plugin.qfieldcloud.api.Package
on_get_package_file(rx: Request) gws.ContentResponse
on_get_projects(rx: Request) list[gws.plugin.qfieldcloud.api.Project]
on_get_projects_id(rx: Request) gws.plugin.qfieldcloud.api.Project
on_post_auth_logout(rx: Request)
on_post_auth_token(rx: Request) gws.plugin.qfieldcloud.api.AuthToken
on_post_deltas(rx: Request)
on_post_file(rx: Request)
on_post_jobs(rx: Request) gws.plugin.qfieldcloud.api.Job
raw_request(req: gws.WebRequester, p: gws.Request) gws.ContentResponse
set_delta_payload_applied(payload_id: str, rx: Request)
set_qfc_project(uid: str, rx: Request)
set_qfc_project_from_parts(rx: Request)
store_delta_payload(payload: gws.plugin.qfieldcloud.api.DeltasPayload, rx: Request)
class gws.plugin.qfieldcloud.action.PackageWorker

Bases: gws.base.job.worker.Object

classmethod run(root: gws.Root, job: gws.Job)
work()
class gws.plugin.qfieldcloud.action.Props

Bases: gws.base.action.Props

class gws.plugin.qfieldcloud.action.Request(*args, **kwargs)

Bases: gws.Data

Basic data object.

This object can be instantiated by passing one or or dict arguments and/or keyword args. All dicts keys and keywords become attributes of the object.

Accessing an undefined attribute returns None and no error is raised, unless the attribute name starts with an underscore.

parts: dict

Variables from the path.

post: dict

POST payload.

project: gws.Project

GWS Project context.

qfcProject: gws.plugin.qfieldcloud.core.QfcProject

QField Cloud Project context.

qs: dict

Query string parameters.

req: gws.WebRequester

The original web request.

route: str

Request method and path.

sess: gws.AuthSession

Authentication session.

token: str

Authentication token.

user: gws.User

Authenticated user.

gws.plugin.qfieldcloud.action.route(pattern: str)
class gws.plugin.qfieldcloud.action.WorkerPayload(*args, **kwargs)

Bases: gws.Data

Basic data object.

This object can be instantiated by passing one or or dict arguments and/or keyword args. All dicts keys and keywords become attributes of the object.

Accessing an undefined attribute returns None and no error is raised, unless the attribute name starts with an underscore.

actionUid: str
jobType: str
projectUid: str
qfcProjectUid: str