weave-python 0.57.0__tar.gz → 0.58.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {weave_python-0.57.0 → weave_python-0.58.0}/PKG-INFO +1 -1
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/auth_identity.py +59 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/organization.py +130 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/.github/runs-on.yml +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/.github/workflows/format-lint.yaml +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/.github/workflows/generate.yaml +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/.github/workflows/gh-actions-lint.yaml +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/.github/workflows/release.yaml +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/.gitignore +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/.python-version +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/LICENSE +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/README.md +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/Taskfile.yaml +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/buf.gen.yaml +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/pyproject.toml +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/renovate.json +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/tools/sqlcgen/README.md +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/tools/sqlcgen/sqlcgen.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/tools/sqlcgen/test_sqlcgen.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/uv.lock +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/agent/v1/agent_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/agent/v1/agent_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/agent/v1/agent_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/agent/v1/agent_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/agent/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/agent/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/agent/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/agent/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/event_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/event_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/event_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/event_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/message_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/message_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/message_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/message_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/process_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/process_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/process_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/process_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/run_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/run_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/run_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/run_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/atc/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/auth/v1/auth_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/auth/v1/auth_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/auth/v1/auth_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/auth/v1/auth_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/auth/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/auth/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/auth/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/auth/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/chat/v1/chat_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/chat/v1/chat_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/chat/v1/chat_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/chat/v1/chat_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/chat/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/chat/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/chat/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/chat/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/consolidation_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/consolidation_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/consolidation_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/consolidation_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/gateway/v1/gateway_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/gateway/v1/gateway_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/gateway/v1/gateway_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/gateway/v1/gateway_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/gateway/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/gateway/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/gateway/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/gateway/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/ingestion_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/ingestion_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/ingestion_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/ingestion_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/model/v1/model_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/model/v1/model_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/model/v1/model_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/model/v1/model_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/model/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/model/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/model/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/model/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/organization_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/organization_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/organization_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/organization_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/project/v1/project_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/project/v1/project_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/project/v1/project_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/project/v1/project_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/project/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/project/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/project/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/project/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/provider/v1/provider_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/provider/v1/provider_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/provider/v1/provider_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/provider/v1/provider_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/provider/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/provider/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/provider/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/provider/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/retrieval_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/retrieval_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/retrieval_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/retrieval_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/task/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/task/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/task/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/task/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/task/v1/task_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/task/v1/task_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/task/v1/task_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/task/v1/task_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/workflow/v1/service_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/workflow/v1/service_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/workflow/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/workflow/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/workflow/v1/workflow_pb2.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/workflow/v1/workflow_pb2.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/workflow/v1/workflow_pb2_grpc.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/workflow/v1/workflow_pb2_grpc.pyi +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/atcdb/event.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/atcdb/inspection.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/atcdb/mailbox.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/atcdb/models.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/atcdb/run_template.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/atcdb/snapshot.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/atcdb/team.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/agent.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/chat.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/consolidation.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/document_security.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/ingestion.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/model_catalog.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/models.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/project.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/provider.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/retrieval.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/task.py +0 -0
- {weave_python-0.57.0 → weave_python-0.58.0}/weave/weavesql/weavedb/workflow.py +0 -0
|
@@ -276,6 +276,33 @@ class CreateUserRow:
|
|
|
276
276
|
updated_at: datetime.datetime
|
|
277
277
|
|
|
278
278
|
|
|
279
|
+
CREATE_USER_WITH_ID = """-- name: create_user_with_id \\:one
|
|
280
|
+
INSERT INTO weave.users (
|
|
281
|
+
id,
|
|
282
|
+
status
|
|
283
|
+
) VALUES (
|
|
284
|
+
:p1,
|
|
285
|
+
:p2
|
|
286
|
+
)
|
|
287
|
+
ON CONFLICT (id) DO NOTHING
|
|
288
|
+
RETURNING id, status, created_at, updated_at
|
|
289
|
+
"""
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
@dataclasses.dataclass()
|
|
293
|
+
class CreateUserWithIDParams:
|
|
294
|
+
id: uuid.UUID
|
|
295
|
+
status: str
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
@dataclasses.dataclass()
|
|
299
|
+
class CreateUserWithIDRow:
|
|
300
|
+
id: uuid.UUID
|
|
301
|
+
status: str
|
|
302
|
+
created_at: datetime.datetime
|
|
303
|
+
updated_at: datetime.datetime
|
|
304
|
+
|
|
305
|
+
|
|
279
306
|
DELETE_EXPIRED_APPLICATION_SESSIONS = """-- name: delete_expired_application_sessions \\:execrows
|
|
280
307
|
DELETE FROM weave.application_sessions
|
|
281
308
|
WHERE expires_at <= now()
|
|
@@ -2075,6 +2102,21 @@ class Querier:
|
|
|
2075
2102
|
updated_at=row[3],
|
|
2076
2103
|
)
|
|
2077
2104
|
|
|
2105
|
+
def create_user_with_id(
|
|
2106
|
+
self, arg: CreateUserWithIDParams
|
|
2107
|
+
) -> Optional[CreateUserWithIDRow]:
|
|
2108
|
+
row = self._conn.execute(
|
|
2109
|
+
sqlalchemy.text(CREATE_USER_WITH_ID), {"p1": arg.id, "p2": arg.status}
|
|
2110
|
+
).first()
|
|
2111
|
+
if row is None:
|
|
2112
|
+
return None
|
|
2113
|
+
return CreateUserWithIDRow(
|
|
2114
|
+
id=row[0],
|
|
2115
|
+
status=row[1],
|
|
2116
|
+
created_at=row[2],
|
|
2117
|
+
updated_at=row[3],
|
|
2118
|
+
)
|
|
2119
|
+
|
|
2078
2120
|
def delete_expired_application_sessions(
|
|
2079
2121
|
self, arg: DeleteExpiredApplicationSessionsParams
|
|
2080
2122
|
) -> int:
|
|
@@ -3358,6 +3400,23 @@ class AsyncQuerier:
|
|
|
3358
3400
|
updated_at=row[3],
|
|
3359
3401
|
)
|
|
3360
3402
|
|
|
3403
|
+
async def create_user_with_id(
|
|
3404
|
+
self, arg: CreateUserWithIDParams
|
|
3405
|
+
) -> Optional[CreateUserWithIDRow]:
|
|
3406
|
+
row = (
|
|
3407
|
+
await self._conn.execute(
|
|
3408
|
+
sqlalchemy.text(CREATE_USER_WITH_ID), {"p1": arg.id, "p2": arg.status}
|
|
3409
|
+
)
|
|
3410
|
+
).first()
|
|
3411
|
+
if row is None:
|
|
3412
|
+
return None
|
|
3413
|
+
return CreateUserWithIDRow(
|
|
3414
|
+
id=row[0],
|
|
3415
|
+
status=row[1],
|
|
3416
|
+
created_at=row[2],
|
|
3417
|
+
updated_at=row[3],
|
|
3418
|
+
)
|
|
3419
|
+
|
|
3361
3420
|
async def delete_expired_application_sessions(
|
|
3362
3421
|
self, arg: DeleteExpiredApplicationSessionsParams
|
|
3363
3422
|
) -> int:
|
|
@@ -84,6 +84,70 @@ class CreateOrganizationRow:
|
|
|
84
84
|
updated_at: datetime.datetime
|
|
85
85
|
|
|
86
86
|
|
|
87
|
+
CREATE_ORGANIZATION_WITH_ID = """-- name: create_organization_with_id \\:one
|
|
88
|
+
INSERT INTO weave.organizations (
|
|
89
|
+
id,
|
|
90
|
+
slug,
|
|
91
|
+
name,
|
|
92
|
+
description,
|
|
93
|
+
primary_color,
|
|
94
|
+
logo,
|
|
95
|
+
logo_content_type,
|
|
96
|
+
timezone,
|
|
97
|
+
location
|
|
98
|
+
) VALUES (
|
|
99
|
+
:p1,
|
|
100
|
+
:p2,
|
|
101
|
+
:p3,
|
|
102
|
+
:p4,
|
|
103
|
+
:p5,
|
|
104
|
+
:p6,
|
|
105
|
+
:p7,
|
|
106
|
+
:p8,
|
|
107
|
+
:p9
|
|
108
|
+
)
|
|
109
|
+
ON CONFLICT (slug) DO NOTHING
|
|
110
|
+
RETURNING
|
|
111
|
+
id,
|
|
112
|
+
slug,
|
|
113
|
+
name,
|
|
114
|
+
description,
|
|
115
|
+
primary_color,
|
|
116
|
+
(logo IS NOT NULL) AS has_logo,
|
|
117
|
+
timezone,
|
|
118
|
+
location,
|
|
119
|
+
created_at,
|
|
120
|
+
updated_at
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@dataclasses.dataclass()
|
|
125
|
+
class CreateOrganizationWithIDParams:
|
|
126
|
+
id: uuid.UUID
|
|
127
|
+
slug: str
|
|
128
|
+
name: str
|
|
129
|
+
description: str
|
|
130
|
+
primary_color: str
|
|
131
|
+
logo: Optional[memoryview]
|
|
132
|
+
logo_content_type: Optional[str]
|
|
133
|
+
timezone: str
|
|
134
|
+
location: str
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
@dataclasses.dataclass()
|
|
138
|
+
class CreateOrganizationWithIDRow:
|
|
139
|
+
id: uuid.UUID
|
|
140
|
+
slug: str
|
|
141
|
+
name: str
|
|
142
|
+
description: str
|
|
143
|
+
primary_color: str
|
|
144
|
+
has_logo: Optional[Any]
|
|
145
|
+
timezone: str
|
|
146
|
+
location: str
|
|
147
|
+
created_at: datetime.datetime
|
|
148
|
+
updated_at: datetime.datetime
|
|
149
|
+
|
|
150
|
+
|
|
87
151
|
DELETE_ORGANIZATION = """-- name: delete_organization \\:execrows
|
|
88
152
|
DELETE FROM weave.organizations
|
|
89
153
|
WHERE id = :p1
|
|
@@ -325,6 +389,38 @@ class Querier:
|
|
|
325
389
|
updated_at=row[9],
|
|
326
390
|
)
|
|
327
391
|
|
|
392
|
+
def create_organization_with_id(
|
|
393
|
+
self, arg: CreateOrganizationWithIDParams
|
|
394
|
+
) -> Optional[CreateOrganizationWithIDRow]:
|
|
395
|
+
row = self._conn.execute(
|
|
396
|
+
sqlalchemy.text(CREATE_ORGANIZATION_WITH_ID),
|
|
397
|
+
{
|
|
398
|
+
"p1": arg.id,
|
|
399
|
+
"p2": arg.slug,
|
|
400
|
+
"p3": arg.name,
|
|
401
|
+
"p4": arg.description,
|
|
402
|
+
"p5": arg.primary_color,
|
|
403
|
+
"p6": arg.logo,
|
|
404
|
+
"p7": arg.logo_content_type,
|
|
405
|
+
"p8": arg.timezone,
|
|
406
|
+
"p9": arg.location,
|
|
407
|
+
},
|
|
408
|
+
).first()
|
|
409
|
+
if row is None:
|
|
410
|
+
return None
|
|
411
|
+
return CreateOrganizationWithIDRow(
|
|
412
|
+
id=row[0],
|
|
413
|
+
slug=row[1],
|
|
414
|
+
name=row[2],
|
|
415
|
+
description=row[3],
|
|
416
|
+
primary_color=row[4],
|
|
417
|
+
has_logo=row[5],
|
|
418
|
+
timezone=row[6],
|
|
419
|
+
location=row[7],
|
|
420
|
+
created_at=row[8],
|
|
421
|
+
updated_at=row[9],
|
|
422
|
+
)
|
|
423
|
+
|
|
328
424
|
def delete_organization(self, arg: DeleteOrganizationParams) -> int:
|
|
329
425
|
result = self._conn.execute(
|
|
330
426
|
sqlalchemy.text(DELETE_ORGANIZATION), {"p1": arg.id}
|
|
@@ -485,6 +581,40 @@ class AsyncQuerier:
|
|
|
485
581
|
updated_at=row[9],
|
|
486
582
|
)
|
|
487
583
|
|
|
584
|
+
async def create_organization_with_id(
|
|
585
|
+
self, arg: CreateOrganizationWithIDParams
|
|
586
|
+
) -> Optional[CreateOrganizationWithIDRow]:
|
|
587
|
+
row = (
|
|
588
|
+
await self._conn.execute(
|
|
589
|
+
sqlalchemy.text(CREATE_ORGANIZATION_WITH_ID),
|
|
590
|
+
{
|
|
591
|
+
"p1": arg.id,
|
|
592
|
+
"p2": arg.slug,
|
|
593
|
+
"p3": arg.name,
|
|
594
|
+
"p4": arg.description,
|
|
595
|
+
"p5": arg.primary_color,
|
|
596
|
+
"p6": arg.logo,
|
|
597
|
+
"p7": arg.logo_content_type,
|
|
598
|
+
"p8": arg.timezone,
|
|
599
|
+
"p9": arg.location,
|
|
600
|
+
},
|
|
601
|
+
)
|
|
602
|
+
).first()
|
|
603
|
+
if row is None:
|
|
604
|
+
return None
|
|
605
|
+
return CreateOrganizationWithIDRow(
|
|
606
|
+
id=row[0],
|
|
607
|
+
slug=row[1],
|
|
608
|
+
name=row[2],
|
|
609
|
+
description=row[3],
|
|
610
|
+
primary_color=row[4],
|
|
611
|
+
has_logo=row[5],
|
|
612
|
+
timezone=row[6],
|
|
613
|
+
location=row[7],
|
|
614
|
+
created_at=row[8],
|
|
615
|
+
updated_at=row[9],
|
|
616
|
+
)
|
|
617
|
+
|
|
488
618
|
async def delete_organization(self, arg: DeleteOrganizationParams) -> int:
|
|
489
619
|
result = await self._conn.execute(
|
|
490
620
|
sqlalchemy.text(DELETE_ORGANIZATION), {"p1": arg.id}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/consolidation_pb2.py
RENAMED
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/consolidation_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/service_pb2_grpc.py
RENAMED
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/consolidation/v1/service_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/ingestion_pb2_grpc.py
RENAMED
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/ingestion_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/ingestion/v1/service_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/organization_pb2.py
RENAMED
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/organization_pb2.pyi
RENAMED
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/organization_pb2_grpc.py
RENAMED
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/organization_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/service_pb2_grpc.py
RENAMED
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/organization/v1/service_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/provider/v1/provider_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/retrieval_pb2_grpc.py
RENAMED
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/retrieval_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/retrieval/v1/service_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.57.0 → weave_python-0.58.0}/weave/weaveapi/workflow/v1/workflow_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|