:tocdepth: 3 :py:mod:`gws.plugin.qfieldcloud.action` ======================================= .. py:module:: gws.plugin.qfieldcloud.action **Source code:** :source:`gws.plugin.qfieldcloud.action` Module Contents --------------- .. py:class:: AuthMethod Bases: :py:obj:`gws.AuthMethod` Dummy auth method for API sessions. .. py:method:: configure() Configuration hook. .. py:class:: Config(*args, **kwargs) Bases: :py:obj:`gws.ConfigWithAccess` Basic config with permissions. .. py:attribute:: projects :type: list[gws.plugin.qfieldcloud.core.ProjectConfig] QField Cloud projects. .. py:class:: Object Bases: :py:obj:`gws.base.action.Object` QField Cloud API action. .. py:attribute:: capsCache :type: dict[str, gws.plugin.qfieldcloud.caps.Caps] .. py:attribute:: method :type: gws.AuthMethod .. py:attribute:: qfcProjects :type: list[gws.plugin.qfieldcloud.core.QfcProject] .. py:method:: authorize_from_credentials(credentials: gws.Data, rx: Request) .. py:method:: authorize_from_token(rx: Request) .. py:method:: configure() .. py:method:: create_package_from_cli(qfc_project_uid: str, target_dir: str, project: gws.Project, user: gws.User) .. py:method:: create_package_from_worker(worker: PackageWorker, pa: WorkerPayload) .. py:method:: create_package_job(rx: Request) -> gws.Job .. py:method:: fs_cleanup_old_deltas(qfc_project: gws.plugin.qfieldcloud.core.QfcProject, keep_seconds: int = 3600) .. py:method:: fs_cleanup_old_packages(qfc_project: gws.plugin.qfieldcloud.core.QfcProject, keep_seconds: int = 3600) .. py:method:: fs_delta_payload_path(qfc_project: gws.plugin.qfieldcloud.core.QfcProject, payload_id: str) -> str .. py:method:: fs_latest_package_dir(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) -> Optional[str] .. py:method:: fs_new_package_dir(qfc_project: gws.plugin.qfieldcloud.core.QfcProject, uid: str) -> str .. py:method:: fs_project_base_dir(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) -> str .. py:method:: fs_project_cache_dir(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) -> str .. py:method:: fs_project_deltas_dir(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) -> str .. py:method:: get_cached_caps(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) -> Optional[gws.plugin.qfieldcloud.caps.Caps] .. py:method:: get_caps(qfc_project: gws.plugin.qfieldcloud.core.QfcProject) -> gws.plugin.qfieldcloud.caps.Caps .. py:method:: get_delta_payload(payload_id: str, rx: Request) -> Optional[list[gws.plugin.qfieldcloud.api.StoredDelta]] .. py:method:: get_job(job_id: str, project: gws.Project, user: gws.User) -> Optional[gws.Job] .. py:method:: get_latest_package_path_map(rx: Request) -> dict[str, str] .. py:method:: get_packager() -> gws.plugin.qfieldcloud.packager.Object .. py:method:: get_patcher() -> gws.plugin.qfieldcloud.patcher.Object .. py:method:: get_qfc_project(qfc_project_uid: str, project: gws.Project, user: gws.User) -> Optional[gws.plugin.qfieldcloud.core.QfcProject] .. py:method:: get_qfc_projects(project: gws.Project, user: gws.User) -> list[gws.plugin.qfieldcloud.core.QfcProject] .. py:method:: on_get_auth_providers(rx: Request) -> list[gws.plugin.qfieldcloud.api.AuthProvider] .. py:method:: on_get_auth_user(rx: Request) -> gws.plugin.qfieldcloud.api.CompleteUser .. py:method:: on_get_deltas(rx: Request) -> list[gws.plugin.qfieldcloud.api.StoredDelta] .. py:method:: on_get_files(rx: Request) -> list[gws.plugin.qfieldcloud.api.PackageFile] .. py:method:: on_get_jobs_id(rx: Request) -> gws.plugin.qfieldcloud.api.Job .. py:method:: on_get_package(rx: Request) -> gws.plugin.qfieldcloud.api.Package .. py:method:: on_get_package_file(rx: Request) -> gws.ContentResponse .. py:method:: on_get_projects(rx: Request) -> list[gws.plugin.qfieldcloud.api.Project] .. py:method:: on_get_projects_id(rx: Request) -> gws.plugin.qfieldcloud.api.Project .. py:method:: on_post_auth_logout(rx: Request) .. py:method:: on_post_auth_token(rx: Request) -> gws.plugin.qfieldcloud.api.AuthToken .. py:method:: on_post_deltas(rx: Request) .. py:method:: on_post_file(rx: Request) .. py:method:: on_post_jobs(rx: Request) -> gws.plugin.qfieldcloud.api.Job .. py:method:: raw_request(req: gws.WebRequester, p: gws.Request) -> gws.ContentResponse .. py:method:: set_delta_payload_applied(payload_id: str, rx: Request) .. py:method:: set_qfc_project(uid: str, rx: Request) .. py:method:: set_qfc_project_from_parts(rx: Request) .. py:method:: store_delta_payload(payload: gws.plugin.qfieldcloud.api.DeltasPayload, rx: Request) .. py:class:: PackageWorker Bases: :py:obj:`gws.base.job.worker.Object` .. py:method:: run(root: gws.Root, job: gws.Job) :classmethod: .. py:method:: work() .. py:class:: Props Bases: :py:obj:`gws.base.action.Props` .. py:class:: Request(*args, **kwargs) Bases: :py:obj:`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. .. py:attribute:: parts :type: dict Variables from the path. .. py:attribute:: post :type: dict POST payload. .. py:attribute:: project :type: gws.Project GWS Project context. .. py:attribute:: qfcProject :type: gws.plugin.qfieldcloud.core.QfcProject QField Cloud Project context. .. py:attribute:: qs :type: dict Query string parameters. .. py:attribute:: req :type: gws.WebRequester The original web request. .. py:attribute:: route :type: str Request method and path. .. py:attribute:: sess :type: gws.AuthSession Authentication session. .. py:attribute:: token :type: str Authentication token. .. py:attribute:: user :type: gws.User Authenticated user. .. py:function:: route(pattern: str) .. py:class:: WorkerPayload(*args, **kwargs) Bases: :py:obj:`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. .. py:attribute:: actionUid :type: str .. py:attribute:: jobType :type: str .. py:attribute:: projectUid :type: str .. py:attribute:: qfcProjectUid :type: str