Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(proto): package personhog bindings without import rewriting (#99350)

Raúl Negrón-Oterocbcab395efb4
diff --git a/.depot/workflows/ci-backend.yml b/.depot/workflows/ci-backend.yml
index 145dd1fdde48..704d669d80ae 100644
--- a/.depot/workflows/ci-backend.yml
+++ b/.depot/workflows/ci-backend.yml
@@ -366,6 +366,8 @@ jobs:
- 'common/ingestion/**'
- 'common/migration_utils/**'
- 'common/plugin_transpiler/**'
+ # The personhog gRPC stubs that posthog/personhog_client imports
+ - 'packages/personhog-proto/**'
- 'posthog/**/*'
- 'products/**/backend/**/*'
# Python outside backend/ — products like logs and
@@ -472,6 +474,8 @@ jobs:
- 'common/ingestion/**'
- 'common/migration_utils/**'
- 'common/plugin_transpiler/**'
+ # The personhog gRPC stubs that posthog/personhog_client imports
+ - 'packages/personhog-proto/**'
- 'posthog/**/*'
- bin/build-schema-latest-versions.py
- bin/build-taxonomy-json.py
diff --git a/.dockerignore b/.dockerignore
index 6623185cc3d1..1e16ccfe0559 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -12,6 +12,7 @@
!common/plugin_transpiler/*.*
!common/plugin_transpiler/src
!common/tailwind
+!packages/personhog-proto
!packages/quill
!packages/llm-normalizer
!packages/owners-yaml
diff --git a/.gitattributes b/.gitattributes
index fe075f24f4f6..21205ef49695 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -21,7 +21,7 @@ services/mcp/src/api/generated.ts linguist-generated
services/mcp/src/generated/** linguist-generated
services/mcp/src/tools/generated/** linguist-generated
-posthog/personhog_client/proto/generated/** linguist-generated
+packages/personhog-proto/personhog/** linguist-generated
posthog/schema.py linguist-generated
products/warehouse_sources/backend/temporal/data_imports/sources/generated_configs.py linguist-generated
posthog/temporal/proxy_service/proto/*_pb2*.py linguist-generated
diff --git a/.github/scripts/trunk-impacted-targets.js b/.github/scripts/trunk-impacted-targets.js
index 901231b4d17e..b1a5ce1e240e 100644
--- a/.github/scripts/trunk-impacted-targets.js
+++ b/.github/scripts/trunk-impacted-targets.js
@@ -608,6 +608,10 @@ const TRIPWIRE_RULES = [
['Dockerfile*', APP_IMAGE],
['.dockerignore', APP_IMAGE],
['proto/**', PROTO],
+ // The checked-in python stubs. They sit under packages/, which the
+ // directory rules read as frontend, but every importer is python under
+ // posthog/.
+ ['packages/personhog-proto/**', PYTHON],
['frontend/src/queries/schema.json', PRODUCT_SURFACE],
['posthog/schema.py', PRODUCT_SURFACE],
// A manifest publishes its product's urls, routes, and tree items into
@@ -1751,8 +1755,8 @@ function addAppImageLanes(targets, context) {
// The nodejs half takes the node domain rather than the javascript one because
// the stubs land only in nodejs/src/common/generated; no frontend or services
// package imports them. The python half cannot narrow below every python lane:
-// the stubs are checked into posthog/, which is py:core, and py:core covers
-// every product lane by construction.
+// posthog/personhog_client imports the stubs, that is py:core, and py:core
+// covers every product lane by construction.
// stubDir names the checked-in stub directory when it differs from the tree
// name; the consistency test reads it. ingestion's node stubs land in
// nodejs/src/common/generated/ingestion-worker, not .../ingestion.
diff --git a/.github/scripts/trunk-impacted-targets.test.js b/.github/scripts/trunk-impacted-targets.test.js
index 03d3602e03d2..45ed80213f1b 100644
--- a/.github/scripts/trunk-impacted-targets.test.js
+++ b/.github/scripts/trunk-impacted-targets.test.js
@@ -210,13 +210,21 @@ test('a proto claims the consumers that generate from it rather than every lane'
assert.equal(targets.includes(target), false, target)
}
+ // A stub tree claims its consumer's lane whichever top-level directory
+ // holds it: packages/ reads as frontend unless a rule says otherwise.
const generatedDirs = [
- 'posthog/personhog_client/proto/generated',
- 'nodejs/src/common/generated/personhog',
- 'rust/personhog-proto',
+ ['packages/personhog-proto', 'py:core'],
+ ['nodejs/src/common/generated/personhog', 'node:ingestion'],
+ ['rust/personhog-proto', 'rust:crate:personhog-proto'],
]
- for (const dir of generatedDirs) {
+ for (const [dir, lane] of generatedDirs) {
assert.equal(fs.existsSync(path.join(REPO_ROOT, dir)), true, `${dir} is the stub tree its lane stands for`)
+ const stubTargets = computeTargets([`${dir}/stub`], {
+ ...PROTO_CONTEXT,
+ rustAffectedCrates: ['personhog-proto'],
+ })
+ assert.equal(stubTargets.includes(lane), true, `${dir} claims ${lane}`)
+ assert.equal(stubTargets.includes('fe:core'), false, `${dir} claims no frontend lane`)
}
})
@@ -337,7 +345,7 @@ test('every proto tree is declared, with the crate that compiles it', () => {
// stubs" and agrees with an empty domain list. The directory side catches that.
test('every proto tree declaring a stub consumer has stubs there, and no other tree does', () => {
const stubRoots = [
- ['posthog/personhog_client/proto/generated', PYTHON],
+ ['packages/personhog-proto', PYTHON],
['nodejs/src/common/generated', NODE],
]
for (const [root, domain] of stubRoots) {
diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml
index 9b34e299e7bf..1e8cb92c8bca 100644
--- a/.github/workflows/ci-backend.yml
+++ b/.github/workflows/ci-backend.yml
@@ -230,6 +230,8 @@ jobs:
- 'common/ingestion/**'
- 'common/migration_utils/**'
- 'common/plugin_transpiler/**'
+ # The personhog gRPC stubs that posthog/personhog_client imports
+ - 'packages/personhog-proto/**'
- 'posthog/**/*'
- 'products/**/backend/**/*'
# Python outside backend/ — products like logs and
@@ -336,6 +338,8 @@ jobs:
- 'common/ingestion/**'
- 'common/migration_utils/**'
- 'common/plugin_transpiler/**'
+ # The personhog gRPC stubs that posthog/personhog_client imports
+ - 'packages/personhog-proto/**'
- 'posthog/**/*'
- bin/build-schema-latest-versions.py
- bin/build-taxonomy-json.py
diff --git a/.github/workflows/ci-dagster.yml b/.github/workflows/ci-dagster.yml
index be84de5107a2..2f5099b8b7b8 100644
--- a/.github/workflows/ci-dagster.yml
+++ b/.github/workflows/ci-dagster.yml
@@ -179,6 +179,9 @@ jobs:
- 'posthog/person_db_router.py'
- 'posthog/persons_db.py'
- 'posthog/personhog_client/**'
+ # The gRPC stubs personhog_client imports. check-dagster-paths.py reads
+ # `personhog` as third-party, so it cannot flag this entry as missing.
+ - 'packages/personhog-proto/**'
- 'posthog/redis.py'
- 'posthog/storage/**'
- 'posthog/event_usage.py'
diff --git a/.github/workflows/ci-e2e-playwright.yml b/.github/workflows/ci-e2e-playwright.yml
index 47688b5bc636..a93aa197327c 100644
--- a/.github/workflows/ci-e2e-playwright.yml
+++ b/.github/workflows/ci-e2e-playwright.yml
@@ -166,6 +166,8 @@ jobs:
- .github/workflows/ci-e2e-playwright.yml
- 'ee/**'
- 'posthog/!(temporal/**)/**'
+ # The personhog gRPC stubs the backend's person reads go through
+ - 'packages/personhog-proto/**'
- 'bin/*'
- frontend/**/*
- package.json
diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.yml
index 834fb5a5693e..f902d31866b0 100644
--- a/.github/workflows/ci-frontend.yml
+++ b/.github/workflows/ci-frontend.yml
@@ -162,6 +162,8 @@ jobs:
- '!.github/workflows/desktop-*.yml'
- '!.github/actions/desktop-*/**'
- '!.github/scripts/desktop/**'
+ # The personhog Python stubs sit under packages/ but no frontend code reads them
+ - '!packages/personhog-proto/**'
- 'playwright/**'
- 'docs/**/*.tsx'
# Make sure we run if someone is explicitly change the workflow
@@ -205,6 +207,8 @@ jobs:
# products/desktop is the imported desktop app; it has its own
# desktop-* CI and must not drag this suite onto its PRs
- '!products/desktop/**'
+ # The personhog Python stubs sit under packages/ but no frontend code reads them
+ - '!packages/personhog-proto/**'
- 'playwright/**'
# The onboarding step components compile into the app and sit in the
# frontend tsconfig program, so they are code, not docs.
diff --git a/.github/workflows/ci-mcp.yml b/.github/workflows/ci-mcp.yml
index fcfb0e0442c6..de81e494c215 100644
--- a/.github/workflows/ci-mcp.yml
+++ b/.github/workflows/ci-mcp.yml
@@ -86,6 +86,8 @@ jobs:
- 'packages/llm-normalizer/**'
# MCP integration tests exercise the full PostHog backend
- 'posthog/**/*.py'
+ # The personhog gRPC stubs the backend's person reads go through
+ - 'packages/personhog-proto/**'
- 'ee/**/*.py'
- 'common/**/*.py'
- 'products/*/backend/**/*.py'
diff --git a/.github/workflows/ci-proto.yml b/.github/workflows/ci-proto.yml
index fdab7362c6ee..4e00a8dbc665 100644
--- a/.github/workflows/ci-proto.yml
+++ b/.github/workflows/ci-proto.yml
@@ -41,7 +41,9 @@ jobs:
filters: |
proto:
- 'proto/**'
- - 'posthog/personhog_client/proto/generated/**'
+ - 'packages/personhog-proto/**'
+ - 'pyproject.toml'
+ - 'uv.lock'
- 'bin/generate_personhog_proto.sh'
- 'nodejs/src/common/generated/personhog/**'
- 'nodejs/src/common/generated/ingestion-worker/**'
@@ -119,8 +121,12 @@ jobs:
python-version: '3.13.13'
token: ${{ steps.setup-gh-token.outputs.token || github.token }}
- - name: Install codegen tools
- run: pip install grpcio-tools protoletariat ruff
+ - uses: ./.github/actions/setup-uv
+ with:
+ enable-cache: 'false'
+
+ - name: Install codegen tools from the lock
+ run: UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --frozen --no-install-project --only-group proto-codegen
- name: Regenerate Python proto stubs
run: bash bin/generate_personhog_proto.sh
@@ -128,8 +134,8 @@ jobs:
- name: Check for diff
run: |
# Intent-to-add so brand-new generated files show up in git diff
- git add -N posthog/personhog_client/proto/generated/
- if ! git diff --exit-code posthog/personhog_client/proto/generated/; then
+ git add -N packages/personhog-proto/
+ if ! git diff --exit-code packages/personhog-proto/; then
echo ""
echo "ERROR: Generated Python proto stubs are out of date."
echo "Run 'bash bin/generate_personhog_proto.sh' and commit the result."
diff --git a/.github/workflows/ci-scripts.yml b/.github/workflows/ci-scripts.yml
index 9fc99fadf3ab..b612191b06cf 100644
--- a/.github/workflows/ci-scripts.yml
+++ b/.github/workflows/ci-scripts.yml
@@ -59,7 +59,7 @@ jobs:
/proto/
/rust/
/nodejs/
- /posthog/personhog_client/
+ /packages/personhog-proto/
/.semgrep/
/frontend/bin/ci-report/
/products/README.md
diff --git a/.github/workflows/container-images-cd.yml b/.github/workflows/container-images-cd.yml
index eb1adaf2b717..c2505fd3adc4 100644
--- a/.github/workflows/container-images-cd.yml
+++ b/.github/workflows/container-images-cd.yml
@@ -548,6 +548,9 @@ jobs:
- pyproject.toml
- bin/temporal-django-worker
- 'posthog/clickhouse/migrations/**'
+ # The personhog gRPC stubs are an installed package, outside the
+ # local packages the import analysis graphs.
+ - 'packages/personhog-proto/**'
llmAnalyticsEvals:
- 'posthog/temporal/ai_observability/**'
diff --git a/Dockerfile b/Dockerfile
index 4d93948b3ba8..f273a346cbd7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -204,6 +204,7 @@ RUN --mount=type=cache,id=uv-libxmlsec1.2.37-2,target=/root/.cache/uv \
# is a runtime dependency (stamphog's digest reads owners.yaml through it), and --no-editable
# copies it into the venv so the image never depends on this bind mount's path surviving.
--mount=type=bind,source=packages/owners-yaml,target=packages/owners-yaml \
+ --mount=type=bind,source=packages/personhog-proto,target=packages/personhog-proto \
uv sync --locked --no-dev --no-editable --no-install-project --no-binary-package lxml --no-binary-package xmlsec
ENV PATH=/python-runtime/bin:$PATH \
diff --git a/Dockerfile.llm-analytics b/Dockerfile.llm-analytics
index cb95d5253feb..a78ed00a4c9d 100644
--- a/Dockerfile.llm-analytics
+++ b/Dockerfile.llm-analytics
@@ -49,6 +49,7 @@ RUN --mount=type=cache,id=uv-libxmlsec1.2.37-2,target=/root/.cache/uv \
# through it, and posthog/urls.py imports that chain unconditionally), and --no-editable copies
# it into the venv so the image never depends on this bind mount's path surviving.
--mount=type=bind,source=packages/owners-yaml,target=packages/owners-yaml \
+ --mount=type=bind,source=packages/personhog-proto,target=packages/personhog-proto \
uv sync --locked --no-dev --no-editable --no-install-project --group sentiment --no-binary-package lxml --no-binary-package xmlsec
ENV PATH=/python-runtime/bin:$PATH \
@@ -60,8 +61,11 @@ ENV PATH=/python-runtime/bin:$PATH \
# --no-editable above leaves an editable install pointing at /code/packages/owners-yaml and every Django
# entrypoint dies on `import owners_yaml` at runtime instead of here. The root Dockerfile asserts
# the same invariant with `test -d packages/owners-yaml/owners_yaml`; this image never copies that source
-# tree, so assert importability instead of presence.
-RUN python -c "import owners_yaml"
+# tree, so assert importability instead of presence. personhog-proto is installed from a bind mount
+# the same way. Django loads posthog.models at startup, which imports posthog.personhog_client and
+# through it the generated personhog package, so a stale or editable install breaks every Django
+# entrypoint.
+RUN python -c "import owners_yaml, personhog.service.v1.service_pb2_grpc"
# Pre-warm the tiktoken BPE encoding cache into the image so runtime token counting reads the
# blobs from disk instead of fetching them from OpenAI's blob host on first use, which fails under
diff --git a/bin/generate_personhog_proto.sh b/bin/generate_personhog_proto.sh
index 5f27f5e008de..6d6275d30db8 100755
--- a/bin/generate_personhog_proto.sh
+++ b/bin/generate_personhog_proto.sh
@@ -4,18 +4,12 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
PROTO_DIR="$REPO_ROOT/proto"
-OUT_DIR="$REPO_ROOT/posthog/personhog_client/proto/generated"
+OUT_DIR="$REPO_ROOT/packages/personhog-proto"
-for cmd in grpc_tools protoletariat; do
- if ! python -c "import $cmd" &>/dev/null; then
- echo "Error: $cmd is not installed. Run: uv sync" >&2
- exit 1
- fi
-done
+python -c "import grpc_tools" 2>/dev/null || { echo "Error: grpcio-tools is not installed. Run: uv sync" >&2; exit 1; }
echo "Cleaning old generated files..."
-rm -rf "$OUT_DIR"
-mkdir -p "$OUT_DIR"
+rm -rf "$OUT_DIR/personhog"
mapfile -d '' PROTO_FILES < <(find "$PROTO_DIR/personhog/service" "$PROTO_DIR/personhog/types" -name '*.proto' -print0)
@@ -27,19 +21,10 @@ python -m grpc_tools.protoc \
--grpc_python_out="$OUT_DIR" \
"${PROTO_FILES[@]}"
-echo "Rewriting imports with protoletariat..."
-FDSET=$(mktemp)
-python -m grpc_tools.protoc \
- --proto_path="$PROTO_DIR" \
- --descriptor_set_out="$FDSET" \
- --include_imports \
- "${PROTO_FILES[@]}"
-protol \
- --create-package \
- --in-place \
- --python-out "$OUT_DIR" \
- raw "$FDSET"
-rm -f "$FDSET"
+# protoc emits no package markers; type checkers and wheel builds want regular packages, and
+# PEP 561 needs py.typed before a type checker reads the .pyi stubs of an installed package.
+find "$OUT_DIR/personhog" -type d -exec touch {}/__init__.py \;
+touch "$OUT_DIR/personhog/py.typed"
echo "Linting and formatting generated files..."
ruff check --fix --quiet "$OUT_DIR"
diff --git a/docs/internal/person-data-access.md b/docs/internal/person-data-access.md
index f801f148789f..5d3fe3f080d1 100644
--- a/docs/internal/person-data-access.md
+++ b/docs/internal/person-data-access.md
@@ -60,5 +60,6 @@ Do not copy these patterns into new code: bulk hydration of persons with propert
## Related docs
+- [Personhog Python bindings](../../packages/personhog-proto/README.md) are installed by `uv sync`; regenerate them after changing the proto definitions.
- [`posthog/personhog_client/README.md`](../../posthog/personhog_client/README.md) — client usage, routed helpers, testing with the fake client.
- Direct ORM or raw SQL access to person tables is banned entirely; the personhog client README lists the covered tables.
diff --git a/package.json b/package.json
index 6c79d3c7b71e..9f915390842d 100644
--- a/package.json
+++ b/package.json
@@ -101,7 +101,7 @@
"products/desktop/**/*.{js,mjs,ts,tsx,json,jsonc,css}": "pnpm --dir products/desktop exec biome check --write --no-errors-on-unmatched --files-ignore-unknown=true",
"nodejs/**/*.{js,jsx,mjs,mts,ts,tsx}": "bin/hogli format:nodejs",
"funnel-udf/**/*.rs": "bin/hogli format:rust",
- "!(posthog/hogql/grammar/*|posthog/personhog_client/proto/generated/*|products/*/skills/*/scripts/*|products/stamphog/packages/*/*)*.{py,pyi}": [
+ "!(posthog/hogql/grammar/*|products/*/skills/*/scripts/*|products/stamphog/packages/*/*)*.{py,pyi}": [
"bin/hogli lint:python:fix",
"bin/hogli format:python",
"uv run --no-sync ty check"
diff --git a/packages/personhog-proto/README.md b/packages/personhog-proto/README.md
new file mode 100644
index 000000000000..808991d9b899
--- /dev/null
+++ b/packages/personhog-proto/README.md
@@ -0,0 +1,8 @@
+# personhog-proto
+
+Python bindings for `proto/personhog`, installed locally by `uv sync` and included in the application image.
+The package exposes `personhog.*` because protoc derives Python imports from the paths in proto imports.
+This keeps generated code usable without rewriting its imports.
+
+Edit the proto definitions and run `bin/generate_personhog_proto.sh` to regenerate the checked-in bindings.
+The `proto-codegen` dependency group pins the generator and formatter for development and CI.
diff --git a/posthog/personhog_client/proto/generated/__init__.py b/packages/personhog-proto/personhog/__init__.py
similarity index 100%
rename from posthog/personhog_client/proto/generated/__init__.py
rename to packages/personhog-proto/personhog/__init__.py
diff --git a/posthog/personhog_client/proto/generated/personhog/__init__.py b/packages/personhog-proto/personhog/py.typed
similarity index 100%
rename from posthog/personhog_client/proto/generated/personhog/__init__.py
rename to packages/personhog-proto/personhog/py.typed
diff --git a/posthog/personhog_client/proto/generated/personhog/service/__init__.py b/packages/personhog-proto/personhog/service/__init__.py
similarity index 100%
rename from posthog/personhog_client/proto/generated/personhog/service/__init__.py
rename to packages/personhog-proto/personhog/service/__init__.py
diff --git a/posthog/personhog_client/proto/generated/personhog/service/v1/__init__.py b/packages/personhog-proto/personhog/service/v1/__init__.py
similarity index 100%
rename from posthog/personhog_client/proto/generated/personhog/service/v1/__init__.py
rename to packages/personhog-proto/personhog/service/v1/__init__.py
diff --git a/packages/personhog-proto/personhog/service/v1/service_pb2.py b/packages/personhog-proto/personhog/service/v1/service_pb2.py
new file mode 100644
index 000000000000..24ba450f337a
--- /dev/null
+++ b/packages/personhog-proto/personhog/service/v1/service_pb2.py
@@ -0,0 +1,41 @@
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: personhog/service/v1/service.proto
+# Protobuf Python Version: 5.29.0
+"""Generated protocol buffer code."""
+
+from google.protobuf import (
+ descriptor as _descriptor,
+ descriptor_pool as _descriptor_pool,
+ runtime_version as _runtime_version,
+ symbol_database as _symbol_database,
+)
+from google.protobuf.internal import builder as _builder
+
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC, 5, 29, 0, "", "personhog/service/v1/service.proto"
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from personhog.types.v1 import (
+ cohort_pb2 as personhog_dot_types_dot_v1_dot_cohort__pb2,
+ feature_flag_pb2 as personhog_dot_types_dot_v1_dot_feature__flag__pb2,
+ group_pb2 as personhog_dot_types_dot_v1_dot_group__pb2,
+ person_pb2 as personhog_dot_types_dot_v1_dot_person__pb2,
+)
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+ b"\n\"personhog/service/v1/service.proto\x12\x14personhog.service.v1\x1a\x1fpersonhog/types/v1/person.proto\x1a\x1epersonhog/types/v1/group.proto\x1a\x1fpersonhog/types/v1/cohort.proto\x1a%personhog/types/v1/feature_flag.proto2\xdc+\n\x10PersonHogService\x12X\n\tGetPerson\x12$.personhog.types.v1.GetPersonRequest\x1a%.personhog.types.v1.GetPersonResponse\x12X\n\nGetPersons\x12%.personhog.types.v1.GetPersonsRequest\x1a#.personhog.types.v1.PersonsResponse\x12\x64\n\x0fGetPersonByUuid\x12*.personhog.types.v1.GetPersonByUuidRequest\x1a%.personhog.types.v1.GetPersonResponse\x12\x66\n\x11GetPersonsByUuids\x12,.personhog.types.v1.GetPersonsByUuidsRequest\x1a#.personhog.types.v1.PersonsResponse\x12p\n\x15GetPersonByDistinctId\x12\x30.personhog.types.v1.GetPersonByDistinctIdRequest\x1a%.personhog.types.v1.GetPersonResponse\x12\x91\x01\n\x1dGetPersonsByDistinctIdsInTeam\x12\x38.personhog.types.v1.GetPersonsByDistinctIdsInTeamRequest\x1a\x36.personhog.types.v1.PersonsByDistinctIdsInTeamResponse\x12\x7f\n\x17GetPersonsByDistinctIds\x12\x32.personhog.types.v1.GetPersonsByDistinctIdsRequest\x1a\x30.personhog.types.v1.PersonsByDistinctIdsResponse\x12\x82\x01\n\x17GetDistinctIdsForPerson\x12\x32.personhog.types.v1.GetDistinctIdsForPersonRequest\x1a\x33.personhog.types.v1.GetDistinctIdsForPersonResponse\x12\x85\x01\n\x18GetDistinctIdsForPersons\x12\x33.personhog.types.v1.GetDistinctIdsForPersonsRequest\x1a\x34.personhog.types.v1.GetDistinctIdsForPersonsResponse\x12\x88\x01\n\x19GetHashKeyOverrideContext\x12\x34.personhog.types.v1.GetHashKeyOverrideContextRequest\x1a\x35.personhog.types.v1.GetHashKeyOverrideContextResponse\x12\x7f\n\x16UpsertHashKeyOverrides\x12\x31.personhog.types.v1.UpsertHashKeyOverridesRequest\x1a\x32.personhog.types.v1.UpsertHashKeyOverridesResponse\x12\x94\x01\n\x1d\x44\x65leteHashKeyOverridesByTeams\x12\x38.personhog.types.v1.DeleteHashKeyOverridesByTeamsRequest\x1a\x39.personhog.types.v1.DeleteHashKeyOverridesByTeamsResponse\x12w\n\x15\x43heckCohortMembership\x12\x30.personhog.types.v1.CheckCohortMembershipRequest\x1a,.personhog.types.v1.CohortMembershipResponse\x12s\n\x12\x43ountCohortMembers\x12-.personhog.types.v1.CountCohortMembersRequest\x1a..personhog.types.v1.CountCohortMembersResponse\x12s\n\x12\x44\x65leteCohortMember\x12-.personhog.types.v1.DeleteCohortMemberRequest\x1a..personhog.types.v1.DeleteCohortMemberResponse\x12\x82\x01\n\x17\x44\x65leteCohortMembersBulk\x12\x32.personhog.types.v1.DeleteCohortMembersBulkRequest\x1a\x33.personhog.types.v1.DeleteCohortMembersBulkResponse\x12v\n\x13InsertCohortMembers\x12..personhog.types.v1.InsertCohortMembersRequest\x1a/.personhog.types.v1.InsertCohortMembersResponse\x12v\n\x13ListCohortMemberIds\x12..personhog.types.v1.ListCohortMemberIdsRequest\x1a/.personhog.types.v1.ListCohortMemberIdsResponse\x12U\n\x08GetGroup\x12#.personhog.types.v1.GetGroupRequest\x1a$.personhog.types.v1.GetGroupResponse\x12U\n\tGetGroups\x12$.personhog.types.v1.GetGroupsRequest\x1a\".personhog.types.v1.GroupsResponse\x12g\n\x0eGetGroupsBatch\x12).personhog.types.v1.GetGroupsBatchRequest\x1a*.personhog.types.v1.GetGroupsBatchResponse\x12[\n\nListGroups\x12%.personhog.types.v1.ListGroupsRequest\x1a&.personhog.types.v1.ListGroupsResponse\x12\x86\x01\n\x1cGetGroupTypeMappingsByTeamId\x12\x37.personhog.types.v1.GetGroupTypeMappingsByTeamIdRequest\x1a-.personhog.types.v1.GroupTypeMappingsResponse\x12\x8d\x01\n\x1dGetGroupTypeMappingsByTeamIds\x12\x38.personhog.types.v1.GetGroupTypeMappingsByTeamIdsRequest\x1a\x32.personhog.types.v1.GroupTypeMappingsBatchResponse\x12\x8c\x01\n\x1fGetGroupTypeMappingsByProjectId\x12:.personhog.types.v1.GetGroupTypeMappingsByProjectIdRequest\x1a-.personhog.types.v1.GroupTypeMappingsResponse\x12\x93\x01\n GetGroupTypeMappingsByProjectIds\x12;.personhog.types.v1.GetGroupTypeMappingsByProjectIdsRequest\x1a\x32.personhog.types.v1.GroupTypeMappingsBatchResponse\x12\x9d\x01\n GetGroupTypeMappingByDashboardId\x12;.personhog.types.v1.GetGroupTypeMappingByDashboardIdRequest\x1a<.personhog.types.v1.GetGroupTypeMappingByDashboardIdResponse\x12\x7f\n\x16\x43ountGroupTypeMappings\x12\x31.personhog.types.v1.CountGroupTypeMappingsRequest\x1a\x32.personhog.types.v1.CountGroupTypeMappingsResponse\x12^\n\x0b\x43reateGroup\x12&.personhog.types.v1.CreateGroupRequest\x1a'.personhog.types.v1.CreateGroupResponse\x12^\n\x0bUpdateGroup\x12&.personhog.types.v1.UpdateGroupRequest\x1a'.personhog.types.v1.UpdateGroupResponse\x12\x85\x01\n\x18\x44\x65leteGroupsBatchForTeam\x12\x33.personhog.types.v1.DeleteGroupsBatchForTeamRequest\x1a\x34.personhog.types.v1.DeleteGroupsBatchForTeamResponse\x12\x7f\n\x16UpdateGroupTypeMapping\x12\x31.personhog.types.v1.UpdateGroupTypeMappingRequest\x1a\x32.personhog.types.v1.UpdateGroupTypeMappingResponse\x12\x7f\n\x16\x44\x65leteGroupTypeMapping\x12\x31.personhog.types.v1.DeleteGroupTypeMappingRequest\x1a\x32.personhog.types.v1.DeleteGroupTypeMappingResponse\x12\xa6\x01\n#DeleteGroupTypeMappingsBatchForTeam\x12>.personhog.types.v1.DeleteGroupTypeMappingsBatchForTeamRequest\x1a?.personhog.types.v1.DeleteGroupTypeMappingsBatchForTeamResponse\x12\x7f\n\x16UpdatePersonProperties\x12\x31.personhog.types.v1.UpdatePersonPropertiesRequest\x1a\x32.personhog.types.v1.UpdatePersonPropertiesResponse\x12^\n\x0b\x46\x65ncePerson\x12&.personhog.types.v1.FencePersonRequest\x1a'.personhog.types.v1.FencePersonResponse\x12\x61\n\x0c\x46\x65ncePersons\x12'.personhog.types.v1.FencePersonsRequest\x1a(.personhog.types.v1.FencePersonsResponse\x12\x61\n\x0cReleaseFence\x12'.personhog.types.v1.ReleaseFenceRequest\x1a(.personhog.types.v1.ReleaseFenceResponse\x12\x64\n\rReleaseFences\x12(.personhog.types.v1.ReleaseFencesRequest\x1a).personhog.types.v1.ReleaseFencesResponse\x12s\n\x12\x46oldPersonDocument\x12-.personhog.types.v1.FoldPersonDocumentRequest\x1a..personhog.types.v1.FoldPersonDocumentResponse\x12\x64\n\rDeletePersons\x12(.personhog.types.v1.DeletePersonsRequest\x1a).personhog.types.v1.DeletePersonsResponse\x12\x88\x01\n\x19\x44\x65letePersonsBatchForTeam\x12\x34.personhog.types.v1.DeletePersonsBatchForTeamRequest\x1a\x35.personhog.types.v1.DeletePersonsBatchForTeamResponse\x12\x82\x01\n\x17\x44\x65leteTombstonedPersons\x12\x32.personhog.types.v1.DeleteTombstonedPersonsRequest\x1a\x33.personhog.types.v1.DeleteTombstonedPersonsResponse\x12^\n\x0bSplitPerson\x12&.personhog.types.v1.SplitPersonRequest\x1a'.personhog.types.v1.SplitPersonResponse\x12\x9a\x01\n\x1fSetPersonDistinctIdVersionFloor\x12:.personhog.types.v1.SetPersonDistinctIdVersionFloorRequest\x1a;.personhog.types.v1.SetPersonDistinctIdVersionFloorResponse\x12|\n\x15SetPersonVersionFloor\x12\x30.personhog.types.v1.SetPersonVersionFloorRequest\x1a\x31.personhog.types.v1.SetPersonVersionFloorResponseb\x06proto3"
+)
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "personhog.service.v1.service_pb2", _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals["_PERSONHOGSERVICE"]._serialized_start = 198
+ _globals["_PERSONHOGSERVICE"]._serialized_end = 5794
+# @@protoc_insertion_point(module_scope)
diff --git a/packages/personhog-proto/personhog/service/v1/service_pb2.pyi b/packages/personhog-proto/personhog/service/v1/service_pb2.pyi
new file mode 100644
index 000000000000..c1ee748ee7d3
--- /dev/null
+++ b/packages/personhog-proto/personhog/service/v1/service_pb2.pyi
@@ -0,0 +1,3 @@
+from google.protobuf import descriptor as _descriptor
+
+DESCRIPTOR: _descriptor.FileDescriptor
diff --git a/posthog/personhog_client/proto/generated/personhog/service/v1/service_pb2_grpc.py b/packages/personhog-proto/personhog/service/v1/service_pb2_grpc.py
similarity index 99%
rename from posthog/personhog_client/proto/generated/personhog/service/v1/service_pb2_grpc.py
rename to packages/personhog-proto/personhog/service/v1/service_pb2_grpc.py
index 07350dad7447..a450ace3f921 100644
--- a/posthog/personhog_client/proto/generated/personhog/service/v1/service_pb2_grpc.py
+++ b/packages/personhog-proto/personhog/service/v1/service_pb2_grpc.py
@@ -1,8 +1,9 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
-from ....personhog.types.v1 import (
+from personhog.types.v1 import (
cohort_pb2 as personhog_dot_types_dot_v1_dot_cohort__pb2,
feature_flag_pb2 as personhog_dot_types_dot_v1_dot_feature__flag__pb2,
group_pb2 as personhog_dot_types_dot_v1_dot_group__pb2,
@@ -12,12 +13,14 @@ from ....personhog.types.v1 import (
GRPC_GENERATED_VERSION = "1.71.2"
GRPC_VERSION = grpc.__version__
_version_not_supported = False
+
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
+
if _version_not_supported:
raise RuntimeError(
f"The grpc package installed is at version {GRPC_VERSION},"
@@ -854,6 +857,7 @@ def add_PersonHogServiceServicer_to_server(servicer, server):
server.add_registered_method_handlers("personhog.service.v1.PersonHogService", rpc_method_handlers)
+# This class is part of an EXPERIMENTAL API.
class PersonHogService:
"""PersonHogService is the public API exposed by the router.
Clients call this service; the router handles backend selection and routing.
diff --git a/posthog/personhog_client/proto/generated/personhog/types/__init__.py b/packages/personhog-proto/personhog/types/__init__.py
similarity index 100%
rename from posthog/personhog_client/proto/generated/personhog/types/__init__.py
rename to packages/personhog-proto/personhog/types/__init__.py
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/__init__.py b/packages/personhog-proto/personhog/types/v1/__init__.py
similarity index 100%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/__init__.py
rename to packages/personhog-proto/personhog/types/v1/__init__.py
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/cohort_pb2.py b/packages/personhog-proto/personhog/types/v1/cohort_pb2.py
similarity index 55%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/cohort_pb2.py
rename to packages/personhog-proto/personhog/types/v1/cohort_pb2.py
index 5d6c9b63e128..75183a3b27fc 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/cohort_pb2.py
+++ b/packages/personhog-proto/personhog/types/v1/cohort_pb2.py
@@ -1,3 +1,7 @@
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: personhog/types/v1/cohort.proto
+# Protobuf Python Version: 5.29.0
"""Generated protocol buffer code."""
from google.protobuf import (
@@ -11,12 +15,17 @@ from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(
_runtime_version.Domain.PUBLIC, 5, 29, 0, "", "personhog/types/v1/cohort.proto"
)
+# @@protoc_insertion_point(imports)
+
_sym_db = _symbol_database.Default()
-from ....personhog.types.v1 import common_pb2 as personhog_dot_types_dot_v1_dot_common__pb2
+
+
+from personhog.types.v1 import common_pb2 as personhog_dot_types_dot_v1_dot_common__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
- b'\n\x1fpersonhog/types/v1/cohort.proto\x12\x12personhog.types.v1\x1a\x1fpersonhog/types/v1/common.proto"8\n\x10CohortMembership\x12\x11\n\tcohort_id\x18\x01 \x01(\x03\x12\x11\n\tis_member\x18\x02 \x01(\x08"|\n\x1cCheckCohortMembershipRequest\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x12\n\ncohort_ids\x18\x02 \x03(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"U\n\x18CohortMembershipResponse\x129\n\x0bmemberships\x18\x01 \x03(\x0b2$.personhog.types.v1.CohortMembership"f\n\x19CountCohortMembersRequest\x12\x12\n\ncohort_ids\x18\x01 \x03(\x03\x125\n\x0cread_options\x18\x02 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"+\n\x1aCountCohortMembersResponse\x12\r\n\x05count\x18\x01 \x01(\x03"A\n\x19DeleteCohortMemberRequest\x12\x11\n\tcohort_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03"-\n\x1aDeleteCohortMemberResponse\x12\x0f\n\x07deleted\x18\x01 \x01(\x08"H\n\x1eDeleteCohortMembersBulkRequest\x12\x12\n\ncohort_ids\x18\x01 \x03(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x05"8\n\x1fDeleteCohortMembersBulkResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"e\n\x1aInsertCohortMembersRequest\x12\x11\n\tcohort_id\x18\x01 \x01(\x03\x12\x12\n\nperson_ids\x18\x02 \x03(\x03\x12\x14\n\x07version\x18\x03 \x01(\x05H\x00\x88\x01\x01B\n\n\x08_version"5\n\x1bInsertCohortMembersResponse\x12\x16\n\x0einserted_count\x18\x01 \x01(\x03"\x85\x01\n\x1aListCohortMemberIdsRequest\x12\x11\n\tcohort_id\x18\x01 \x01(\x03\x12\x0e\n\x06cursor\x18\x02 \x01(\x03\x12\r\n\x05limit\x18\x03 \x01(\x05\x125\n\x0cread_options\x18\x04 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"F\n\x1bListCohortMemberIdsResponse\x12\x12\n\nperson_ids\x18\x01 \x03(\x03\x12\x13\n\x0bnext_cursor\x18\x02 \x01(\x03b\x06proto3'
+ b'\n\x1fpersonhog/types/v1/cohort.proto\x12\x12personhog.types.v1\x1a\x1fpersonhog/types/v1/common.proto"8\n\x10\x43ohortMembership\x12\x11\n\tcohort_id\x18\x01 \x01(\x03\x12\x11\n\tis_member\x18\x02 \x01(\x08"|\n\x1c\x43heckCohortMembershipRequest\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x12\n\ncohort_ids\x18\x02 \x03(\x03\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"U\n\x18\x43ohortMembershipResponse\x12\x39\n\x0bmemberships\x18\x01 \x03(\x0b\x32$.personhog.types.v1.CohortMembership"f\n\x19\x43ountCohortMembersRequest\x12\x12\n\ncohort_ids\x18\x01 \x03(\x03\x12\x35\n\x0cread_options\x18\x02 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"+\n\x1a\x43ountCohortMembersResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x03"A\n\x19\x44\x65leteCohortMemberRequest\x12\x11\n\tcohort_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03"-\n\x1a\x44\x65leteCohortMemberResponse\x12\x0f\n\x07\x64\x65leted\x18\x01 \x01(\x08"H\n\x1e\x44\x65leteCohortMembersBulkRequest\x12\x12\n\ncohort_ids\x18\x01 \x03(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x05"8\n\x1f\x44\x65leteCohortMembersBulkResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"e\n\x1aInsertCohortMembersRequest\x12\x11\n\tcohort_id\x18\x01 \x01(\x03\x12\x12\n\nperson_ids\x18\x02 \x03(\x03\x12\x14\n\x07version\x18\x03 \x01(\x05H\x00\x88\x01\x01\x42\n\n\x08_version"5\n\x1bInsertCohortMembersResponse\x12\x16\n\x0einserted_count\x18\x01 \x01(\x03"\x85\x01\n\x1aListCohortMemberIdsRequest\x12\x11\n\tcohort_id\x18\x01 \x01(\x03\x12\x0e\n\x06\x63ursor\x18\x02 \x01(\x03\x12\r\n\x05limit\x18\x03 \x01(\x05\x12\x35\n\x0cread_options\x18\x04 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"F\n\x1bListCohortMemberIdsResponse\x12\x12\n\nperson_ids\x18\x01 \x03(\x03\x12\x13\n\x0bnext_cursor\x18\x02 \x01(\x03\x62\x06proto3'
)
+
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "personhog.types.v1.cohort_pb2", _globals)
@@ -48,3 +57,4 @@ if not _descriptor._USE_C_DESCRIPTORS:
_globals["_LISTCOHORTMEMBERIDSREQUEST"]._serialized_end = 1046
_globals["_LISTCOHORTMEMBERIDSRESPONSE"]._serialized_start = 1048
_globals["_LISTCOHORTMEMBERIDSRESPONSE"]._serialized_end = 1118
+# @@protoc_insertion_point(module_scope)
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/cohort_pb2.pyi b/packages/personhog-proto/personhog/types/v1/cohort_pb2.pyi
similarity index 99%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/cohort_pb2.pyi
rename to packages/personhog-proto/personhog/types/v1/cohort_pb2.pyi
index f72a57344e41..cba069ba31e8 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/cohort_pb2.pyi
+++ b/packages/personhog-proto/personhog/types/v1/cohort_pb2.pyi
@@ -13,6 +13,7 @@ from google.protobuf import (
message as _message,
)
from google.protobuf.internal import containers as _containers
+
from personhog.types.v1 import common_pb2 as _common_pb2
DESCRIPTOR: _descriptor.FileDescriptor
@@ -23,7 +24,6 @@ class CohortMembership(_message.Message):
IS_MEMBER_FIELD_NUMBER: _ClassVar[int]
cohort_id: int
is_member: bool
-
def __init__(self, cohort_id: _Optional[int] = ..., is_member: bool = ...) -> None: ...
class CheckCohortMembershipRequest(_message.Message):
@@ -34,7 +34,6 @@ class CheckCohortMembershipRequest(_message.Message):
person_id: int
cohort_ids: _containers.RepeatedScalarFieldContainer[int]
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
person_id: _Optional[int] = ...,
@@ -46,7 +45,6 @@ class CohortMembershipResponse(_message.Message):
__slots__ = ("memberships",)
MEMBERSHIPS_FIELD_NUMBER: _ClassVar[int]
memberships: _containers.RepeatedCompositeFieldContainer[CohortMembership]
-
def __init__(self, memberships: _Optional[_Iterable[_Union[CohortMembership, _Mapping]]] = ...) -> None: ...
class CountCohortMembersRequest(_message.Message):
@@ -55,7 +53,6 @@ class CountCohortMembersRequest(_message.Message):
READ_OPTIONS_FIELD_NUMBER: _ClassVar[int]
cohort_ids: _containers.RepeatedScalarFieldContainer[int]
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
cohort_ids: _Optional[_Iterable[int]] = ...,
@@ -66,7 +63,6 @@ class CountCohortMembersResponse(_message.Message):
__slots__ = ("count",)
COUNT_FIELD_NUMBER: _ClassVar[int]
count: int
-
def __init__(self, count: _Optional[int] = ...) -> None: ...
class DeleteCohortMemberRequest(_message.Message):
@@ -75,14 +71,12 @@ class DeleteCohortMemberRequest(_message.Message):
PERSON_ID_FIELD_NUMBER: _ClassVar[int]
cohort_id: int
person_id: int
-
def __init__(self, cohort_id: _Optional[int] = ..., person_id: _Optional[int] = ...) -> None: ...
class DeleteCohortMemberResponse(_message.Message):
__slots__ = ("deleted",)
DELETED_FIELD_NUMBER: _ClassVar[int]
deleted: bool
-
def __init__(self, deleted: bool = ...) -> None: ...
class DeleteCohortMembersBulkRequest(_message.Message):
@@ -91,14 +85,12 @@ class DeleteCohortMembersBulkRequest(_message.Message):
BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
cohort_ids: _containers.RepeatedScalarFieldContainer[int]
batch_size: int
-
def __init__(self, cohort_ids: _Optional[_Iterable[int]] = ..., batch_size: _Optional[int] = ...) -> None: ...
class DeleteCohortMembersBulkResponse(_message.Message):
__slots__ = ("deleted_count",)
DELETED_COUNT_FIELD_NUMBER: _ClassVar[int]
deleted_count: int
-
def __init__(self, deleted_count: _Optional[int] = ...) -> None: ...
class InsertCohortMembersRequest(_message.Message):
@@ -109,7 +101,6 @@ class InsertCohortMembersRequest(_message.Message):
cohort_id: int
person_ids: _containers.RepeatedScalarFieldContainer[int]
version: int
-
def __init__(
self,
cohort_id: _Optional[int] = ...,
@@ -121,7 +112,6 @@ class InsertCohortMembersResponse(_message.Message):
__slots__ = ("inserted_count",)
INSERTED_COUNT_FIELD_NUMBER: _ClassVar[int]
inserted_count: int
-
def __init__(self, inserted_count: _Optional[int] = ...) -> None: ...
class ListCohortMemberIdsRequest(_message.Message):
@@ -134,7 +124,6 @@ class ListCohortMemberIdsRequest(_message.Message):
cursor: int
limit: int
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
cohort_id: _Optional[int] = ...,
@@ -149,5 +138,4 @@ class ListCohortMemberIdsResponse(_message.Message):
NEXT_CURSOR_FIELD_NUMBER: _ClassVar[int]
person_ids: _containers.RepeatedScalarFieldContainer[int]
next_cursor: int
-
def __init__(self, person_ids: _Optional[_Iterable[int]] = ..., next_cursor: _Optional[int] = ...) -> None: ...
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/cohort_pb2_grpc.py b/packages/personhog-proto/personhog/types/v1/cohort_pb2_grpc.py
similarity index 91%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/cohort_pb2_grpc.py
rename to packages/personhog-proto/personhog/types/v1/cohort_pb2_grpc.py
index be3562f696d5..dd80dbeb5e61 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/cohort_pb2_grpc.py
+++ b/packages/personhog-proto/personhog/types/v1/cohort_pb2_grpc.py
@@ -1,3 +1,4 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
@@ -5,12 +6,14 @@ import grpc
GRPC_GENERATED_VERSION = "1.71.2"
GRPC_VERSION = grpc.__version__
_version_not_supported = False
+
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
+
if _version_not_supported:
raise RuntimeError(
f"The grpc package installed is at version {GRPC_VERSION},"
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/common_pb2.py b/packages/personhog-proto/personhog/types/v1/common_pb2.py
similarity index 59%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/common_pb2.py
rename to packages/personhog-proto/personhog/types/v1/common_pb2.py
index 09f650c34a07..d443ab1c65d2 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/common_pb2.py
+++ b/packages/personhog-proto/personhog/types/v1/common_pb2.py
@@ -1,3 +1,7 @@
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: personhog/types/v1/common.proto
+# Protobuf Python Version: 5.29.0
"""Generated protocol buffer code."""
from google.protobuf import (
@@ -11,10 +15,15 @@ from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(
_runtime_version.Domain.PUBLIC, 5, 29, 0, "", "personhog/types/v1/common.proto"
)
+# @@protoc_insertion_point(imports)
+
_sym_db = _symbol_database.Default()
+
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
- b'\n\x1fpersonhog/types/v1/common.proto\x12\x12personhog.types.v1"\\\n\x0bReadOptions\x129\n\x0bconsistency\x18\x01 \x01(\x0e2$.personhog.types.v1.ConsistencyLevel\x12\x12\n\nfield_mask\x18\x02 \x03(\t"6\n\x0eTeamDistinctId\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x13\n\x0bdistinct_id\x18\x02 \x01(\t"H\n\x08GroupKey\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x11\n\tgroup_key\x18\x03 \x01(\t">\n\x0fGroupIdentifier\x12\x18\n\x10group_type_index\x18\x01 \x01(\x05\x12\x11\n\tgroup_key\x18\x02 \x01(\t*s\n\x10ConsistencyLevel\x12!\n\x1dCONSISTENCY_LEVEL_UNSPECIFIED\x10\x00\x12\x1e\n\x1aCONSISTENCY_LEVEL_EVENTUAL\x10\x01\x12\x1c\n\x18CONSISTENCY_LEVEL_STRONG\x10\x02b\x06proto3'
+ b'\n\x1fpersonhog/types/v1/common.proto\x12\x12personhog.types.v1"\\\n\x0bReadOptions\x12\x39\n\x0b\x63onsistency\x18\x01 \x01(\x0e\x32$.personhog.types.v1.ConsistencyLevel\x12\x12\n\nfield_mask\x18\x02 \x03(\t"6\n\x0eTeamDistinctId\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x13\n\x0b\x64istinct_id\x18\x02 \x01(\t"H\n\x08GroupKey\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x11\n\tgroup_key\x18\x03 \x01(\t">\n\x0fGroupIdentifier\x12\x18\n\x10group_type_index\x18\x01 \x01(\x05\x12\x11\n\tgroup_key\x18\x02 \x01(\t*s\n\x10\x43onsistencyLevel\x12!\n\x1d\x43ONSISTENCY_LEVEL_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x43ONSISTENCY_LEVEL_EVENTUAL\x10\x01\x12\x1c\n\x18\x43ONSISTENCY_LEVEL_STRONG\x10\x02\x62\x06proto3'
)
+
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "personhog.types.v1.common_pb2", _globals)
@@ -30,3 +39,4 @@ if not _descriptor._USE_C_DESCRIPTORS:
_globals["_GROUPKEY"]._serialized_end = 277
_globals["_GROUPIDENTIFIER"]._serialized_start = 279
_globals["_GROUPIDENTIFIER"]._serialized_end = 341
+# @@protoc_insertion_point(module_scope)
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/common_pb2.pyi b/packages/personhog-proto/personhog/types/v1/common_pb2.pyi
similarity index 99%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/common_pb2.pyi
rename to packages/personhog-proto/personhog/types/v1/common_pb2.pyi
index 30dda91c6770..b3fd829c8e16 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/common_pb2.pyi
+++ b/packages/personhog-proto/personhog/types/v1/common_pb2.pyi
@@ -32,7 +32,6 @@ class ReadOptions(_message.Message):
FIELD_MASK_FIELD_NUMBER: _ClassVar[int]
consistency: ConsistencyLevel
field_mask: _containers.RepeatedScalarFieldContainer[str]
-
def __init__(
self, consistency: _Optional[_Union[ConsistencyLevel, str]] = ..., field_mask: _Optional[_Iterable[str]] = ...
) -> None: ...
@@ -43,7 +42,6 @@ class TeamDistinctId(_message.Message):
DISTINCT_ID_FIELD_NUMBER: _ClassVar[int]
team_id: int
distinct_id: str
-
def __init__(self, team_id: _Optional[int] = ..., distinct_id: _Optional[str] = ...) -> None: ...
class GroupKey(_message.Message):
@@ -54,7 +52,6 @@ class GroupKey(_message.Message):
team_id: int
group_type_index: int
group_key: str
-
def __init__(
self, team_id: _Optional[int] = ..., group_type_index: _Optional[int] = ..., group_key: _Optional[str] = ...
) -> None: ...
@@ -65,5 +62,4 @@ class GroupIdentifier(_message.Message):
GROUP_KEY_FIELD_NUMBER: _ClassVar[int]
group_type_index: int
group_key: str
-
def __init__(self, group_type_index: _Optional[int] = ..., group_key: _Optional[str] = ...) -> None: ...
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/common_pb2_grpc.py b/packages/personhog-proto/personhog/types/v1/common_pb2_grpc.py
similarity index 91%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/common_pb2_grpc.py
rename to packages/personhog-proto/personhog/types/v1/common_pb2_grpc.py
index 8560a73a5316..0f34055160ba 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/common_pb2_grpc.py
+++ b/packages/personhog-proto/personhog/types/v1/common_pb2_grpc.py
@@ -1,3 +1,4 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
@@ -5,12 +6,14 @@ import grpc
GRPC_GENERATED_VERSION = "1.71.2"
GRPC_VERSION = grpc.__version__
_version_not_supported = False
+
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
+
if _version_not_supported:
raise RuntimeError(
f"The grpc package installed is at version {GRPC_VERSION},"
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/feature_flag_pb2.py b/packages/personhog-proto/personhog/types/v1/feature_flag_pb2.py
similarity index 55%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/feature_flag_pb2.py
rename to packages/personhog-proto/personhog/types/v1/feature_flag_pb2.py
index d347750fa0f0..4ca912a128c9 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/feature_flag_pb2.py
+++ b/packages/personhog-proto/personhog/types/v1/feature_flag_pb2.py
@@ -1,3 +1,7 @@
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: personhog/types/v1/feature_flag.proto
+# Protobuf Python Version: 5.29.0
"""Generated protocol buffer code."""
from google.protobuf import (
@@ -11,12 +15,17 @@ from google.protobuf.internal import builder as _builder
_runtime_version.ValidateProtobufRuntimeVersion(
_runtime_version.Domain.PUBLIC, 5, 29, 0, "", "personhog/types/v1/feature_flag.proto"
)
+# @@protoc_insertion_point(imports)
+
_sym_db = _symbol_database.Default()
-from ....personhog.types.v1 import common_pb2 as personhog_dot_types_dot_v1_dot_common__pb2
+
+
+from personhog.types.v1 import common_pb2 as personhog_dot_types_dot_v1_dot_common__pb2
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
- b'\n%personhog/types/v1/feature_flag.proto\x12\x12personhog.types.v1\x1a\x1fpersonhog/types/v1/common.proto"=\n\x0fHashKeyOverride\x12\x18\n\x10feature_flag_key\x18\x01 \x01(\t\x12\x10\n\x08hash_key\x18\x02 \x01(\t"\x9c\x01\n\x16HashKeyOverrideContext\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x13\n\x0bdistinct_id\x18\x02 \x01(\t\x126\n\toverrides\x18\x03 \x03(\x0b2#.personhog.types.v1.HashKeyOverride\x12"\n\x1aexisting_feature_flag_keys\x18\x04 \x03(\t"\x9d\x01\n GetHashKeyOverrideContextRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cdistinct_ids\x18\x02 \x03(\t\x12\x1b\n\x13check_person_exists\x18\x03 \x01(\x08\x125\n\x0cread_options\x18\x04 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"`\n!GetHashKeyOverrideContextResponse\x12;\n\x07results\x18\x01 \x03(\x0b2*.personhog.types.v1.HashKeyOverrideContext"s\n\x1dUpsertHashKeyOverridesRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cdistinct_ids\x18\x02 \x03(\t\x12\x10\n\x08hash_key\x18\x03 \x01(\t\x12\x19\n\x11feature_flag_keys\x18\x04 \x03(\t"8\n\x1eUpsertHashKeyOverridesResponse\x12\x16\n\x0einserted_count\x18\x01 \x01(\x03"L\n$DeleteHashKeyOverridesByTeamsRequest\x12\x10\n\x08team_ids\x18\x01 \x03(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x03">\n%DeleteHashKeyOverridesByTeamsResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03b\x06proto3'
+ b'\n%personhog/types/v1/feature_flag.proto\x12\x12personhog.types.v1\x1a\x1fpersonhog/types/v1/common.proto"=\n\x0fHashKeyOverride\x12\x18\n\x10\x66\x65\x61ture_flag_key\x18\x01 \x01(\t\x12\x10\n\x08hash_key\x18\x02 \x01(\t"\x9c\x01\n\x16HashKeyOverrideContext\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x13\n\x0b\x64istinct_id\x18\x02 \x01(\t\x12\x36\n\toverrides\x18\x03 \x03(\x0b\x32#.personhog.types.v1.HashKeyOverride\x12"\n\x1a\x65xisting_feature_flag_keys\x18\x04 \x03(\t"\x9d\x01\n GetHashKeyOverrideContextRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0c\x64istinct_ids\x18\x02 \x03(\t\x12\x1b\n\x13\x63heck_person_exists\x18\x03 \x01(\x08\x12\x35\n\x0cread_options\x18\x04 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"`\n!GetHashKeyOverrideContextResponse\x12;\n\x07results\x18\x01 \x03(\x0b\x32*.personhog.types.v1.HashKeyOverrideContext"s\n\x1dUpsertHashKeyOverridesRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0c\x64istinct_ids\x18\x02 \x03(\t\x12\x10\n\x08hash_key\x18\x03 \x01(\t\x12\x19\n\x11\x66\x65\x61ture_flag_keys\x18\x04 \x03(\t"8\n\x1eUpsertHashKeyOverridesResponse\x12\x16\n\x0einserted_count\x18\x01 \x01(\x03"L\n$DeleteHashKeyOverridesByTeamsRequest\x12\x10\n\x08team_ids\x18\x01 \x03(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x03">\n%DeleteHashKeyOverridesByTeamsResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03\x62\x06proto3'
)
+
_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "personhog.types.v1.feature_flag_pb2", _globals)
@@ -38,3 +47,4 @@ if not _descriptor._USE_C_DESCRIPTORS:
_globals["_DELETEHASHKEYOVERRIDESBYTEAMSREQUEST"]._serialized_end = 825
_globals["_DELETEHASHKEYOVERRIDESBYTEAMSRESPONSE"]._serialized_start = 827
_globals["_DELETEHASHKEYOVERRIDESBYTEAMSRESPONSE"]._serialized_end = 889
+# @@protoc_insertion_point(module_scope)
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/feature_flag_pb2.pyi b/packages/personhog-proto/personhog/types/v1/feature_flag_pb2.pyi
similarity index 99%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/feature_flag_pb2.pyi
rename to packages/personhog-proto/personhog/types/v1/feature_flag_pb2.pyi
index 9be2d55ccbf4..c052a5b3b9f4 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/feature_flag_pb2.pyi
+++ b/packages/personhog-proto/personhog/types/v1/feature_flag_pb2.pyi
@@ -13,6 +13,7 @@ from google.protobuf import (
message as _message,
)
from google.protobuf.internal import containers as _containers
+
from personhog.types.v1 import common_pb2 as _common_pb2
DESCRIPTOR: _descriptor.FileDescriptor
@@ -23,7 +24,6 @@ class HashKeyOverride(_message.Message):
HASH_KEY_FIELD_NUMBER: _ClassVar[int]
feature_flag_key: str
hash_key: str
-
def __init__(self, feature_flag_key: _Optional[str] = ..., hash_key: _Optional[str] = ...) -> None: ...
class HashKeyOverrideContext(_message.Message):
@@ -36,7 +36,6 @@ class HashKeyOverrideContext(_message.Message):
distinct_id: str
overrides: _containers.RepeatedCompositeFieldContainer[HashKeyOverride]
existing_feature_flag_keys: _containers.RepeatedScalarFieldContainer[str]
-
def __init__(
self,
person_id: _Optional[int] = ...,
@@ -55,7 +54,6 @@ class GetHashKeyOverrideContextRequest(_message.Message):
distinct_ids: _containers.RepeatedScalarFieldContainer[str]
check_person_exists: bool
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -68,7 +66,6 @@ class GetHashKeyOverrideContextResponse(_message.Message):
__slots__ = ("results",)
RESULTS_FIELD_NUMBER: _ClassVar[int]
results: _containers.RepeatedCompositeFieldContainer[HashKeyOverrideContext]
-
def __init__(self, results: _Optional[_Iterable[_Union[HashKeyOverrideContext, _Mapping]]] = ...) -> None: ...
class UpsertHashKeyOverridesRequest(_message.Message):
@@ -81,7 +78,6 @@ class UpsertHashKeyOverridesRequest(_message.Message):
distinct_ids: _containers.RepeatedScalarFieldContainer[str]
hash_key: str
feature_flag_keys: _containers.RepeatedScalarFieldContainer[str]
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -94,7 +90,6 @@ class UpsertHashKeyOverridesResponse(_message.Message):
__slots__ = ("inserted_count",)
INSERTED_COUNT_FIELD_NUMBER: _ClassVar[int]
inserted_count: int
-
def __init__(self, inserted_count: _Optional[int] = ...) -> None: ...
class DeleteHashKeyOverridesByTeamsRequest(_message.Message):
@@ -103,12 +98,10 @@ class DeleteHashKeyOverridesByTeamsRequest(_message.Message):
BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
team_ids: _containers.RepeatedScalarFieldContainer[int]
batch_size: int
-
def __init__(self, team_ids: _Optional[_Iterable[int]] = ..., batch_size: _Optional[int] = ...) -> None: ...
class DeleteHashKeyOverridesByTeamsResponse(_message.Message):
__slots__ = ("deleted_count",)
DELETED_COUNT_FIELD_NUMBER: _ClassVar[int]
deleted_count: int
-
def __init__(self, deleted_count: _Optional[int] = ...) -> None: ...
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/feature_flag_pb2_grpc.py b/packages/personhog-proto/personhog/types/v1/feature_flag_pb2_grpc.py
similarity index 91%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/feature_flag_pb2_grpc.py
rename to packages/personhog-proto/personhog/types/v1/feature_flag_pb2_grpc.py
index 1f54cffdd1f7..f8bbfc9bf693 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/feature_flag_pb2_grpc.py
+++ b/packages/personhog-proto/personhog/types/v1/feature_flag_pb2_grpc.py
@@ -1,3 +1,4 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
@@ -5,12 +6,14 @@ import grpc
GRPC_GENERATED_VERSION = "1.71.2"
GRPC_VERSION = grpc.__version__
_version_not_supported = False
+
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
+
if _version_not_supported:
raise RuntimeError(
f"The grpc package installed is at version {GRPC_VERSION},"
diff --git a/packages/personhog-proto/personhog/types/v1/group_pb2.py b/packages/personhog-proto/personhog/types/v1/group_pb2.py
new file mode 100644
index 000000000000..a6a996fda865
--- /dev/null
+++ b/packages/personhog-proto/personhog/types/v1/group_pb2.py
@@ -0,0 +1,104 @@
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: personhog/types/v1/group.proto
+# Protobuf Python Version: 5.29.0
+"""Generated protocol buffer code."""
+
+from google.protobuf import (
+ descriptor as _descriptor,
+ descriptor_pool as _descriptor_pool,
+ runtime_version as _runtime_version,
+ symbol_database as _symbol_database,
+)
+from google.protobuf.internal import builder as _builder
+
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC, 5, 29, 0, "", "personhog/types/v1/group.proto"
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from personhog.types.v1 import common_pb2 as personhog_dot_types_dot_v1_dot_common__pb2
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+ b'\n\x1epersonhog/types/v1/group.proto\x12\x12personhog.types.v1\x1a\x1fpersonhog/types/v1/common.proto"\xd7\x01\n\x05Group\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0f\n\x07team_id\x18\x02 \x01(\x03\x12\x18\n\x10group_type_index\x18\x03 \x01(\x05\x12\x11\n\tgroup_key\x18\x04 \x01(\t\x12\x18\n\x10group_properties\x18\x05 \x01(\x0c\x12\x12\n\ncreated_at\x18\x06 \x01(\x03\x12"\n\x1aproperties_last_updated_at\x18\x07 \x01(\x0c\x12!\n\x19properties_last_operation\x18\x08 \x01(\x0c\x12\x0f\n\x07version\x18\t \x01(\x03"\xdd\x02\n\x10GroupTypeMapping\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0f\n\x07team_id\x18\x02 \x01(\x03\x12\x12\n\nproject_id\x18\x03 \x01(\x03\x12\x12\n\ngroup_type\x18\x04 \x01(\t\x12\x18\n\x10group_type_index\x18\x05 \x01(\x05\x12\x1a\n\rname_singular\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bname_plural\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0f\x64\x65\x66\x61ult_columns\x18\x08 \x01(\x0cH\x02\x88\x01\x01\x12 \n\x13\x64\x65tail_dashboard_id\x18\t \x01(\x03H\x03\x88\x01\x01\x12\x17\n\ncreated_at\x18\n \x01(\x03H\x04\x88\x01\x01\x42\x10\n\x0e_name_singularB\x0e\n\x0c_name_pluralB\x12\n\x10_default_columnsB\x16\n\x14_detail_dashboard_idB\r\n\x0b_created_at"r\n\x0cGroupWithKey\x12)\n\x03key\x18\x01 \x01(\x0b\x32\x1c.personhog.types.v1.GroupKey\x12-\n\x05group\x18\x02 \x01(\x0b\x32\x19.personhog.types.v1.GroupH\x00\x88\x01\x01\x42\x08\n\x06_group"]\n\x16GroupTypeMappingsByKey\x12\x0b\n\x03key\x18\x01 \x01(\x03\x12\x36\n\x08mappings\x18\x02 \x03(\x0b\x32$.personhog.types.v1.GroupTypeMapping"\xe1\x01\n\x11ListGroupsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x1a\n\x12group_key_contains\x18\x03 \x01(\t\x12\x0e\n\x06search\x18\x04 \x01(\t\x12\x1c\n\x14\x63ursor_created_at_ms\x18\x05 \x01(\x03\x12\x11\n\tcursor_id\x18\x06 \x01(\x03\x12\r\n\x05limit\x18\x07 \x01(\x05\x12\x35\n\x0cread_options\x18\x08 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"Q\n\x12ListGroupsResponse\x12)\n\x06groups\x18\x01 \x03(\x0b\x32\x19.personhog.types.v1.Group\x12\x10\n\x08has_more\x18\x02 \x01(\x08"\x86\x01\n\x0fGetGroupRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x11\n\tgroup_key\x18\x03 \x01(\t\x12\x35\n\x0cread_options\x18\x04 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"K\n\x10GetGroupResponse\x12-\n\x05group\x18\x01 \x01(\x0b\x32\x19.personhog.types.v1.GroupH\x00\x88\x01\x01\x42\x08\n\x06_group"\x9a\x01\n\x10GetGroupsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12>\n\x11group_identifiers\x18\x02 \x03(\x0b\x32#.personhog.types.v1.GroupIdentifier\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"x\n\x0eGroupsResponse\x12)\n\x06groups\x18\x01 \x03(\x0b\x32\x19.personhog.types.v1.Group\x12;\n\x0emissing_groups\x18\x02 \x03(\x0b\x32#.personhog.types.v1.GroupIdentifier"z\n\x15GetGroupsBatchRequest\x12*\n\x04keys\x18\x01 \x03(\x0b\x32\x1c.personhog.types.v1.GroupKey\x12\x35\n\x0cread_options\x18\x02 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"K\n\x16GetGroupsBatchResponse\x12\x31\n\x07results\x18\x01 \x03(\x0b\x32 .personhog.types.v1.GroupWithKey"m\n#GetGroupTypeMappingsByTeamIdRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x35\n\x0cread_options\x18\x02 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"o\n$GetGroupTypeMappingsByTeamIdsRequest\x12\x10\n\x08team_ids\x18\x01 \x03(\x03\x12\x35\n\x0cread_options\x18\x02 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"s\n&GetGroupTypeMappingsByProjectIdRequest\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x35\n\x0cread_options\x18\x02 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"u\n\'GetGroupTypeMappingsByProjectIdsRequest\x12\x13\n\x0bproject_ids\x18\x01 \x03(\x03\x12\x35\n\x0cread_options\x18\x02 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"S\n\x19GroupTypeMappingsResponse\x12\x36\n\x08mappings\x18\x01 \x03(\x0b\x32$.personhog.types.v1.GroupTypeMapping"]\n\x1eGroupTypeMappingsBatchResponse\x12;\n\x07results\x18\x01 \x03(\x0b\x32*.personhog.types.v1.GroupTypeMappingsByKey"V\n\x1d\x43ountGroupTypeMappingsRequest\x12\x35\n\x0cread_options\x18\x01 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"7\n\x15GroupTypeMappingCount\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05\x63ount\x18\x02 \x01(\x03"[\n\x1e\x43ountGroupTypeMappingsResponse\x12\x39\n\x06\x63ounts\x18\x01 \x03(\x0b\x32).personhog.types.v1.GroupTypeMappingCount"\x94\x01\n\x12\x43reateGroupRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x11\n\tgroup_key\x18\x03 \x01(\t\x12\x18\n\x10group_properties\x18\x04 \x01(\x0c\x12\x17\n\ncreated_at\x18\x05 \x01(\x03H\x00\x88\x01\x01\x42\r\n\x0b_created_at"?\n\x13\x43reateGroupResponse\x12(\n\x05group\x18\x01 \x01(\x0b\x32\x19.personhog.types.v1.Group"\xd1\x02\n\x12UpdateGroupRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x11\n\tgroup_key\x18\x03 \x01(\t\x12\x13\n\x0bupdate_mask\x18\x04 \x03(\t\x12\x1d\n\x10group_properties\x18\x05 \x01(\x0cH\x00\x88\x01\x01\x12\'\n\x1aproperties_last_updated_at\x18\x06 \x01(\x0cH\x01\x88\x01\x01\x12&\n\x19properties_last_operation\x18\x07 \x01(\x0cH\x02\x88\x01\x01\x12\x17\n\ncreated_at\x18\x08 \x01(\x03H\x03\x88\x01\x01\x42\x13\n\x11_group_propertiesB\x1d\n\x1b_properties_last_updated_atB\x1c\n\x1a_properties_last_operationB\r\n\x0b_created_at"P\n\x13UpdateGroupResponse\x12(\n\x05group\x18\x01 \x01(\x0b\x32\x19.personhog.types.v1.Group\x12\x0f\n\x07updated\x18\x02 \x01(\x08"F\n\x1f\x44\x65leteGroupsBatchForTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x03"9\n DeleteGroupsBatchForTeamResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"\xce\x02\n\x1dUpdateGroupTypeMappingRequest\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x13\n\x0bupdate_mask\x18\x03 \x03(\t\x12\x1a\n\rname_singular\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bname_plural\x18\x05 \x01(\tH\x01\x88\x01\x01\x12 \n\x13\x64\x65tail_dashboard_id\x18\x06 \x01(\x03H\x02\x88\x01\x01\x12\x1c\n\x0f\x64\x65\x66\x61ult_columns\x18\x07 \x01(\x0cH\x03\x88\x01\x01\x12\x17\n\ncreated_at\x18\x08 \x01(\x03H\x04\x88\x01\x01\x42\x10\n\x0e_name_singularB\x0e\n\x0c_name_pluralB\x16\n\x14_detail_dashboard_idB\x12\n\x10_default_columnsB\r\n\x0b_created_at"W\n\x1eUpdateGroupTypeMappingResponse\x12\x35\n\x07mapping\x18\x01 \x01(\x0b\x32$.personhog.types.v1.GroupTypeMapping"\x87\x01\n\'GetGroupTypeMappingByDashboardIdRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0c\x64\x61shboard_id\x18\x02 \x01(\x03\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"r\n(GetGroupTypeMappingByDashboardIdResponse\x12:\n\x07mapping\x18\x01 \x01(\x0b\x32$.personhog.types.v1.GroupTypeMappingH\x00\x88\x01\x01\x42\n\n\x08_mapping"M\n\x1d\x44\x65leteGroupTypeMappingRequest\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05"1\n\x1e\x44\x65leteGroupTypeMappingResponse\x12\x0f\n\x07\x64\x65leted\x18\x01 \x01(\x08"Q\n*DeleteGroupTypeMappingsBatchForTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x03"D\n+DeleteGroupTypeMappingsBatchForTeamResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03\x62\x06proto3'
+)
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "personhog.types.v1.group_pb2", _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals["_GROUP"]._serialized_start = 88
+ _globals["_GROUP"]._serialized_end = 303
+ _globals["_GROUPTYPEMAPPING"]._serialized_start = 306
+ _globals["_GROUPTYPEMAPPING"]._serialized_end = 655
+ _globals["_GROUPWITHKEY"]._serialized_start = 657
+ _globals["_GROUPWITHKEY"]._serialized_end = 771
+ _globals["_GROUPTYPEMAPPINGSBYKEY"]._serialized_start = 773
+ _globals["_GROUPTYPEMAPPINGSBYKEY"]._serialized_end = 866
+ _globals["_LISTGROUPSREQUEST"]._serialized_start = 869
+ _globals["_LISTGROUPSREQUEST"]._serialized_end = 1094
+ _globals["_LISTGROUPSRESPONSE"]._serialized_start = 1096
+ _globals["_LISTGROUPSRESPONSE"]._serialized_end = 1177
+ _globals["_GETGROUPREQUEST"]._serialized_start = 1180
+ _globals["_GETGROUPREQUEST"]._serialized_end = 1314
+ _globals["_GETGROUPRESPONSE"]._serialized_start = 1316
+ _globals["_GETGROUPRESPONSE"]._serialized_end = 1391
+ _globals["_GETGROUPSREQUEST"]._serialized_start = 1394
+ _globals["_GETGROUPSREQUEST"]._serialized_end = 1548
+ _globals["_GROUPSRESPONSE"]._serialized_start = 1550
+ _globals["_GROUPSRESPONSE"]._serialized_end = 1670
+ _globals["_GETGROUPSBATCHREQUEST"]._serialized_start = 1672
+ _globals["_GETGROUPSBATCHREQUEST"]._serialized_end = 1794
+ _globals["_GETGROUPSBATCHRESPONSE"]._serialized_start = 1796
+ _globals["_GETGROUPSBATCHRESPONSE"]._serialized_end = 1871
+ _globals["_GETGROUPTYPEMAPPINGSBYTEAMIDREQUEST"]._serialized_start = 1873
+ _globals["_GETGROUPTYPEMAPPINGSBYTEAMIDREQUEST"]._serialized_end = 1982
+ _globals["_GETGROUPTYPEMAPPINGSBYTEAMIDSREQUEST"]._serialized_start = 1984
+ _globals["_GETGROUPTYPEMAPPINGSBYTEAMIDSREQUEST"]._serialized_end = 2095
+ _globals["_GETGROUPTYPEMAPPINGSBYPROJECTIDREQUEST"]._serialized_start = 2097
+ _globals["_GETGROUPTYPEMAPPINGSBYPROJECTIDREQUEST"]._serialized_end = 2212
+ _globals["_GETGROUPTYPEMAPPINGSBYPROJECTIDSREQUEST"]._serialized_start = 2214
+ _globals["_GETGROUPTYPEMAPPINGSBYPROJECTIDSREQUEST"]._serialized_end = 2331
+ _globals["_GROUPTYPEMAPPINGSRESPONSE"]._serialized_start = 2333
+ _globals["_GROUPTYPEMAPPINGSRESPONSE"]._serialized_end = 2416
+ _globals["_GROUPTYPEMAPPINGSBATCHRESPONSE"]._serialized_start = 2418
+ _globals["_GROUPTYPEMAPPINGSBATCHRESPONSE"]._serialized_end = 2511
+ _globals["_COUNTGROUPTYPEMAPPINGSREQUEST"]._serialized_start = 2513
+ _globals["_COUNTGROUPTYPEMAPPINGSREQUEST"]._serialized_end = 2599
+ _globals["_GROUPTYPEMAPPINGCOUNT"]._serialized_start = 2601
+ _globals["_GROUPTYPEMAPPINGCOUNT"]._serialized_end = 2656
+ _globals["_COUNTGROUPTYPEMAPPINGSRESPONSE"]._serialized_start = 2658
+ _globals["_COUNTGROUPTYPEMAPPINGSRESPONSE"]._serialized_end = 2749
+ _globals["_CREATEGROUPREQUEST"]._serialized_start = 2752
+ _globals["_CREATEGROUPREQUEST"]._serialized_end = 2900
+ _globals["_CREATEGROUPRESPONSE"]._serialized_start = 2902
+ _globals["_CREATEGROUPRESPONSE"]._serialized_end = 2965
+ _globals["_UPDATEGROUPREQUEST"]._serialized_start = 2968
+ _globals["_UPDATEGROUPREQUEST"]._serialized_end = 3305
+ _globals["_UPDATEGROUPRESPONSE"]._serialized_start = 3307
+ _globals["_UPDATEGROUPRESPONSE"]._serialized_end = 3387
+ _globals["_DELETEGROUPSBATCHFORTEAMREQUEST"]._serialized_start = 3389
+ _globals["_DELETEGROUPSBATCHFORTEAMREQUEST"]._serialized_end = 3459
+ _globals["_DELETEGROUPSBATCHFORTEAMRESPONSE"]._serialized_start = 3461
+ _globals["_DELETEGROUPSBATCHFORTEAMRESPONSE"]._serialized_end = 3518
+ _globals["_UPDATEGROUPTYPEMAPPINGREQUEST"]._serialized_start = 3521
+ _globals["_UPDATEGROUPTYPEMAPPINGREQUEST"]._serialized_end = 3855
+ _globals["_UPDATEGROUPTYPEMAPPINGRESPONSE"]._serialized_start = 3857
+ _globals["_UPDATEGROUPTYPEMAPPINGRESPONSE"]._serialized_end = 3944
+ _globals["_GETGROUPTYPEMAPPINGBYDASHBOARDIDREQUEST"]._serialized_start = 3947
+ _globals["_GETGROUPTYPEMAPPINGBYDASHBOARDIDREQUEST"]._serialized_end = 4082
+ _globals["_GETGROUPTYPEMAPPINGBYDASHBOARDIDRESPONSE"]._serialized_start = 4084
+ _globals["_GETGROUPTYPEMAPPINGBYDASHBOARDIDRESPONSE"]._serialized_end = 4198
+ _globals["_DELETEGROUPTYPEMAPPINGREQUEST"]._serialized_start = 4200
+ _globals["_DELETEGROUPTYPEMAPPINGREQUEST"]._serialized_end = 4277
+ _globals["_DELETEGROUPTYPEMAPPINGRESPONSE"]._serialized_start = 4279
+ _globals["_DELETEGROUPTYPEMAPPINGRESPONSE"]._serialized_end = 4328
+ _globals["_DELETEGROUPTYPEMAPPINGSBATCHFORTEAMREQUEST"]._serialized_start = 4330
+ _globals["_DELETEGROUPTYPEMAPPINGSBATCHFORTEAMREQUEST"]._serialized_end = 4411
+ _globals["_DELETEGROUPTYPEMAPPINGSBATCHFORTEAMRESPONSE"]._serialized_start = 4413
+ _globals["_DELETEGROUPTYPEMAPPINGSBATCHFORTEAMRESPONSE"]._serialized_end = 4481
+# @@protoc_insertion_point(module_scope)
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/group_pb2.pyi b/packages/personhog-proto/personhog/types/v1/group_pb2.pyi
similarity index 99%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/group_pb2.pyi
rename to packages/personhog-proto/personhog/types/v1/group_pb2.pyi
index db508abf38cd..d23c8da527c9 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/group_pb2.pyi
+++ b/packages/personhog-proto/personhog/types/v1/group_pb2.pyi
@@ -13,6 +13,7 @@ from google.protobuf import (
message as _message,
)
from google.protobuf.internal import containers as _containers
+
from personhog.types.v1 import common_pb2 as _common_pb2
DESCRIPTOR: _descriptor.FileDescriptor
@@ -47,7 +48,6 @@ class Group(_message.Message):
properties_last_updated_at: bytes
properties_last_operation: bytes
version: int
-
def __init__(
self,
id: _Optional[int] = ...,
@@ -94,7 +94,6 @@ class GroupTypeMapping(_message.Message):
default_columns: bytes
detail_dashboard_id: int
created_at: int
-
def __init__(
self,
id: _Optional[int] = ...,
@@ -115,7 +114,6 @@ class GroupWithKey(_message.Message):
GROUP_FIELD_NUMBER: _ClassVar[int]
key: _common_pb2.GroupKey
group: Group
-
def __init__(
self,
key: _Optional[_Union[_common_pb2.GroupKey, _Mapping]] = ...,
@@ -128,7 +126,6 @@ class GroupTypeMappingsByKey(_message.Message):
MAPPINGS_FIELD_NUMBER: _ClassVar[int]
key: int
mappings: _containers.RepeatedCompositeFieldContainer[GroupTypeMapping]
-
def __init__(
self, key: _Optional[int] = ..., mappings: _Optional[_Iterable[_Union[GroupTypeMapping, _Mapping]]] = ...
) -> None: ...
@@ -160,7 +157,6 @@ class ListGroupsRequest(_message.Message):
cursor_id: int
limit: int
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -179,7 +175,6 @@ class ListGroupsResponse(_message.Message):
HAS_MORE_FIELD_NUMBER: _ClassVar[int]
groups: _containers.RepeatedCompositeFieldContainer[Group]
has_more: bool
-
def __init__(self, groups: _Optional[_Iterable[_Union[Group, _Mapping]]] = ..., has_more: bool = ...) -> None: ...
class GetGroupRequest(_message.Message):
@@ -192,7 +187,6 @@ class GetGroupRequest(_message.Message):
group_type_index: int
group_key: str
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -205,7 +199,6 @@ class GetGroupResponse(_message.Message):
__slots__ = ("group",)
GROUP_FIELD_NUMBER: _ClassVar[int]
group: Group
-
def __init__(self, group: _Optional[_Union[Group, _Mapping]] = ...) -> None: ...
class GetGroupsRequest(_message.Message):
@@ -216,7 +209,6 @@ class GetGroupsRequest(_message.Message):
team_id: int
group_identifiers: _containers.RepeatedCompositeFieldContainer[_common_pb2.GroupIdentifier]
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -230,7 +222,6 @@ class GroupsResponse(_message.Message):
MISSING_GROUPS_FIELD_NUMBER: _ClassVar[int]
groups: _containers.RepeatedCompositeFieldContainer[Group]
missing_groups: _containers.RepeatedCompositeFieldContainer[_common_pb2.GroupIdentifier]
-
def __init__(
self,
groups: _Optional[_Iterable[_Union[Group, _Mapping]]] = ...,
@@ -243,7 +234,6 @@ class GetGroupsBatchRequest(_message.Message):
READ_OPTIONS_FIELD_NUMBER: _ClassVar[int]
keys: _containers.RepeatedCompositeFieldContainer[_common_pb2.GroupKey]
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
keys: _Optional[_Iterable[_Union[_common_pb2.GroupKey, _Mapping]]] = ...,
@@ -254,7 +244,6 @@ class GetGroupsBatchResponse(_message.Message):
__slots__ = ("results",)
RESULTS_FIELD_NUMBER: _ClassVar[int]
results: _containers.RepeatedCompositeFieldContainer[GroupWithKey]
-
def __init__(self, results: _Optional[_Iterable[_Union[GroupWithKey, _Mapping]]] = ...) -> None: ...
class GetGroupTypeMappingsByTeamIdRequest(_message.Message):
@@ -263,7 +252,6 @@ class GetGroupTypeMappingsByTeamIdRequest(_message.Message):
READ_OPTIONS_FIELD_NUMBER: _ClassVar[int]
team_id: int
read_options: _common_pb2.ReadOptions
-
def __init__(
self, team_id: _Optional[int] = ..., read_options: _Optional[_Union[_common_pb2.ReadOptions, _Mapping]] = ...
) -> None: ...
@@ -274,7 +262,6 @@ class GetGroupTypeMappingsByTeamIdsRequest(_message.Message):
READ_OPTIONS_FIELD_NUMBER: _ClassVar[int]
team_ids: _containers.RepeatedScalarFieldContainer[int]
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_ids: _Optional[_Iterable[int]] = ...,
@@ -287,7 +274,6 @@ class GetGroupTypeMappingsByProjectIdRequest(_message.Message):
READ_OPTIONS_FIELD_NUMBER: _ClassVar[int]
project_id: int
read_options: _common_pb2.ReadOptions
-
def __init__(
self, project_id: _Optional[int] = ..., read_options: _Optional[_Union[_common_pb2.ReadOptions, _Mapping]] = ...
) -> None: ...
@@ -298,7 +284,6 @@ class GetGroupTypeMappingsByProjectIdsRequest(_message.Message):
READ_OPTIONS_FIELD_NUMBER: _ClassVar[int]
project_ids: _containers.RepeatedScalarFieldContainer[int]
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
project_ids: _Optional[_Iterable[int]] = ...,
@@ -309,21 +294,18 @@ class GroupTypeMappingsResponse(_message.Message):
__slots__ = ("mappings",)
MAPPINGS_FIELD_NUMBER: _ClassVar[int]
mappings: _containers.RepeatedCompositeFieldContainer[GroupTypeMapping]
-
def __init__(self, mappings: _Optional[_Iterable[_Union[GroupTypeMapping, _Mapping]]] = ...) -> None: ...
class GroupTypeMappingsBatchResponse(_message.Message):
__slots__ = ("results",)
RESULTS_FIELD_NUMBER: _ClassVar[int]
results: _containers.RepeatedCompositeFieldContainer[GroupTypeMappingsByKey]
-
def __init__(self, results: _Optional[_Iterable[_Union[GroupTypeMappingsByKey, _Mapping]]] = ...) -> None: ...
class CountGroupTypeMappingsRequest(_message.Message):
__slots__ = ("read_options",)
READ_OPTIONS_FIELD_NUMBER: _ClassVar[int]
read_options: _common_pb2.ReadOptions
-
def __init__(self, read_options: _Optional[_Union[_common_pb2.ReadOptions, _Mapping]] = ...) -> None: ...
class GroupTypeMappingCount(_message.Message):
@@ -332,14 +314,12 @@ class GroupTypeMappingCount(_message.Message):
COUNT_FIELD_NUMBER: _ClassVar[int]
team_id: int
count: int
-
def __init__(self, team_id: _Optional[int] = ..., count: _Optional[int] = ...) -> None: ...
class CountGroupTypeMappingsResponse(_message.Message):
__slots__ = ("counts",)
COUNTS_FIELD_NUMBER: _ClassVar[int]
counts: _containers.RepeatedCompositeFieldContainer[GroupTypeMappingCount]
-
def __init__(self, counts: _Optional[_Iterable[_Union[GroupTypeMappingCount, _Mapping]]] = ...) -> None: ...
class CreateGroupRequest(_message.Message):
@@ -354,7 +334,6 @@ class CreateGroupRequest(_message.Message):
group_key: str
group_properties: bytes
created_at: int
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -368,7 +347,6 @@ class CreateGroupResponse(_message.Message):
__slots__ = ("group",)
GROUP_FIELD_NUMBER: _ClassVar[int]
group: Group
-
def __init__(self, group: _Optional[_Union[Group, _Mapping]] = ...) -> None: ...
class UpdateGroupRequest(_message.Message):
@@ -398,7 +376,6 @@ class UpdateGroupRequest(_message.Message):
properties_last_updated_at: bytes
properties_last_operation: bytes
created_at: int
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -417,7 +394,6 @@ class UpdateGroupResponse(_message.Message):
UPDATED_FIELD_NUMBER: _ClassVar[int]
group: Group
updated: bool
-
def __init__(self, group: _Optional[_Union[Group, _Mapping]] = ..., updated: bool = ...) -> None: ...
class DeleteGroupsBatchForTeamRequest(_message.Message):
@@ -426,14 +402,12 @@ class DeleteGroupsBatchForTeamRequest(_message.Message):
BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
team_id: int
batch_size: int
-
def __init__(self, team_id: _Optional[int] = ..., batch_size: _Optional[int] = ...) -> None: ...
class DeleteGroupsBatchForTeamResponse(_message.Message):
__slots__ = ("deleted_count",)
DELETED_COUNT_FIELD_NUMBER: _ClassVar[int]
deleted_count: int
-
def __init__(self, deleted_count: _Optional[int] = ...) -> None: ...
class UpdateGroupTypeMappingRequest(_message.Message):
@@ -463,7 +437,6 @@ class UpdateGroupTypeMappingRequest(_message.Message):
detail_dashboard_id: int
default_columns: bytes
created_at: int
-
def __init__(
self,
project_id: _Optional[int] = ...,
@@ -480,7 +453,6 @@ class UpdateGroupTypeMappingResponse(_message.Message):
__slots__ = ("mapping",)
MAPPING_FIELD_NUMBER: _ClassVar[int]
mapping: GroupTypeMapping
-
def __init__(self, mapping: _Optional[_Union[GroupTypeMapping, _Mapping]] = ...) -> None: ...
class GetGroupTypeMappingByDashboardIdRequest(_message.Message):
@@ -491,7 +463,6 @@ class GetGroupTypeMappingByDashboardIdRequest(_message.Message):
team_id: int
dashboard_id: int
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -503,7 +474,6 @@ class GetGroupTypeMappingByDashboardIdResponse(_message.Message):
__slots__ = ("mapping",)
MAPPING_FIELD_NUMBER: _ClassVar[int]
mapping: GroupTypeMapping
-
def __init__(self, mapping: _Optional[_Union[GroupTypeMapping, _Mapping]] = ...) -> None: ...
class DeleteGroupTypeMappingRequest(_message.Message):
@@ -512,14 +482,12 @@ class DeleteGroupTypeMappingRequest(_message.Message):
GROUP_TYPE_INDEX_FIELD_NUMBER: _ClassVar[int]
project_id: int
group_type_index: int
-
def __init__(self, project_id: _Optional[int] = ..., group_type_index: _Optional[int] = ...) -> None: ...
class DeleteGroupTypeMappingResponse(_message.Message):
__slots__ = ("deleted",)
DELETED_FIELD_NUMBER: _ClassVar[int]
deleted: bool
-
def __init__(self, deleted: bool = ...) -> None: ...
class DeleteGroupTypeMappingsBatchForTeamRequest(_message.Message):
@@ -528,12 +496,10 @@ class DeleteGroupTypeMappingsBatchForTeamRequest(_message.Message):
BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
team_id: int
batch_size: int
-
def __init__(self, team_id: _Optional[int] = ..., batch_size: _Optional[int] = ...) -> None: ...
class DeleteGroupTypeMappingsBatchForTeamResponse(_message.Message):
__slots__ = ("deleted_count",)
DELETED_COUNT_FIELD_NUMBER: _ClassVar[int]
deleted_count: int
-
def __init__(self, deleted_count: _Optional[int] = ...) -> None: ...
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/group_pb2_grpc.py b/packages/personhog-proto/personhog/types/v1/group_pb2_grpc.py
similarity index 91%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/group_pb2_grpc.py
rename to packages/personhog-proto/personhog/types/v1/group_pb2_grpc.py
index f515fe61ff67..34d18dd24078 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/group_pb2_grpc.py
+++ b/packages/personhog-proto/personhog/types/v1/group_pb2_grpc.py
@@ -1,3 +1,4 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
@@ -5,12 +6,14 @@ import grpc
GRPC_GENERATED_VERSION = "1.71.2"
GRPC_VERSION = grpc.__version__
_version_not_supported = False
+
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
+
if _version_not_supported:
raise RuntimeError(
f"The grpc package installed is at version {GRPC_VERSION},"
diff --git a/packages/personhog-proto/personhog/types/v1/person_pb2.py b/packages/personhog-proto/personhog/types/v1/person_pb2.py
new file mode 100644
index 000000000000..4898e13e6d76
--- /dev/null
+++ b/packages/personhog-proto/personhog/types/v1/person_pb2.py
@@ -0,0 +1,134 @@
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
+# source: personhog/types/v1/person.proto
+# Protobuf Python Version: 5.29.0
+"""Generated protocol buffer code."""
+
+from google.protobuf import (
+ descriptor as _descriptor,
+ descriptor_pool as _descriptor_pool,
+ runtime_version as _runtime_version,
+ symbol_database as _symbol_database,
+)
+from google.protobuf.internal import builder as _builder
+
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC, 5, 29, 0, "", "personhog/types/v1/person.proto"
+)
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from personhog.types.v1 import common_pb2 as personhog_dot_types_dot_v1_dot_common__pb2
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
+ b'\n\x1fpersonhog/types/v1/person.proto\x12\x12personhog.types.v1\x1a\x1fpersonhog/types/v1/common.proto"\xb2\x02\n\x06Person\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x12\x0f\n\x07team_id\x18\x03 \x01(\x03\x12\x12\n\nproperties\x18\x04 \x01(\x0c\x12"\n\x1aproperties_last_updated_at\x18\x05 \x01(\x0c\x12!\n\x19properties_last_operation\x18\x06 \x01(\x0c\x12\x12\n\ncreated_at\x18\x07 \x01(\x03\x12\x0f\n\x07version\x18\x08 \x01(\x03\x12\x15\n\ris_identified\x18\t \x01(\x08\x12\x17\n\nis_user_id\x18\n \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0clast_seen_at\x18\x0b \x01(\x03H\x01\x88\x01\x01\x12\x12\n\nis_deleted\x18\x0c \x01(\x08\x42\r\n\x0b_is_user_idB\x0f\n\r_last_seen_at"f\n\x15\x44istinctIdWithVersion\x12\x13\n\x0b\x64istinct_id\x18\x01 \x01(\t\x12\x14\n\x07version\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x03 \x01(\x03H\x01\x88\x01\x01\x42\n\n\x08_versionB\x05\n\x03_id"h\n\x15PersonWithDistinctIds\x12\x13\n\x0b\x64istinct_id\x18\x01 \x01(\t\x12/\n\x06person\x18\x02 \x01(\x0b\x32\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01\x42\t\n\x07_person"g\n\x11PersonDistinctIds\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12?\n\x0c\x64istinct_ids\x18\x02 \x03(\x0b\x32).personhog.types.v1.DistinctIdWithVersion"\x87\x01\n\x18PersonWithTeamDistinctId\x12/\n\x03key\x18\x01 \x01(\x0b\x32".personhog.types.v1.TeamDistinctId\x12/\n\x06person\x18\x02 \x01(\x0b\x32\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01\x42\t\n\x07_person"m\n\x10GetPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"O\n\x11GetPersonResponse\x12/\n\x06person\x18\x01 \x01(\x0b\x32\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01\x42\t\n\x07_person"o\n\x11GetPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nperson_ids\x18\x02 \x03(\x03\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"S\n\x0fPersonsResponse\x12+\n\x07persons\x18\x01 \x03(\x0b\x32\x1a.personhog.types.v1.Person\x12\x13\n\x0bmissing_ids\x18\x02 \x03(\x03"n\n\x16GetPersonByUuidRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"q\n\x18GetPersonsByUuidsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05uuids\x18\x02 \x03(\t\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"{\n\x1cGetPersonByDistinctIdRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x13\n\x0b\x64istinct_id\x18\x02 \x01(\t\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"\x84\x01\n$GetPersonsByDistinctIdsInTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0c\x64istinct_ids\x18\x02 \x03(\t\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"`\n"PersonsByDistinctIdsInTeamResponse\x12:\n\x07results\x18\x01 \x03(\x0b\x32).personhog.types.v1.PersonWithDistinctIds"\x96\x01\n\x1eGetPersonsByDistinctIdsRequest\x12=\n\x11team_distinct_ids\x18\x01 \x03(\x0b\x32".personhog.types.v1.TeamDistinctId\x12\x35\n\x0cread_options\x18\x02 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions"]\n\x1cPersonsByDistinctIdsResponse\x12=\n\x07results\x18\x01 \x03(\x0b\x32,.personhog.types.v1.PersonWithTeamDistinctId"\xbf\x01\n\x1eGetDistinctIdsForPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions\x12\x12\n\x05limit\x18\x04 \x01(\x03H\x00\x88\x01\x01\x12\x16\n\tcursor_id\x18\x05 \x01(\x03H\x01\x88\x01\x01\x42\x08\n\x06_limitB\x0c\n\n_cursor_id"\x92\x01\n\x1fGetDistinctIdsForPersonResponse\x12?\n\x0c\x64istinct_ids\x18\x01 \x03(\x0b\x32).personhog.types.v1.DistinctIdWithVersion\x12\x1b\n\x0enext_cursor_id\x18\x02 \x01(\x03H\x00\x88\x01\x01\x42\x11\n\x0f_next_cursor_id"\xb1\x01\n\x1fGetDistinctIdsForPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nperson_ids\x18\x02 \x03(\x03\x12\x35\n\x0cread_options\x18\x03 \x01(\x0b\x32\x1f.personhog.types.v1.ReadOptions\x12\x1d\n\x10limit_per_person\x18\x04 \x01(\x03H\x00\x88\x01\x01\x42\x13\n\x11_limit_per_person"f\n GetDistinctIdsForPersonsResponse\x12\x42\n\x13person_distinct_ids\x18\x01 \x03(\x0b\x32%.personhog.types.v1.PersonDistinctIds"\x96\x02\n\x1dUpdatePersonPropertiesRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x12\n\nevent_name\x18\x03 \x01(\t\x12\x16\n\x0eset_properties\x18\x04 \x01(\x0c\x12\x1b\n\x13set_once_properties\x18\x05 \x01(\x0c\x12\x18\n\x10unset_properties\x18\x06 \x03(\t\x12\x1a\n\ris_identified\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0clast_seen_at\x18\x08 \x01(\x03H\x01\x88\x01\x01\x12\x14\n\x0c\x66orce_update\x18\t \x01(\x08\x42\x10\n\x0e_is_identifiedB\x0f\n\r_last_seen_at"m\n\x1eUpdatePersonPropertiesResponse\x12/\n\x06person\x18\x01 \x01(\x0b\x32\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01\x12\x0f\n\x07updated\x18\x02 \x01(\x08\x42\t\n\x07_person"=\n\x14\x44\x65letePersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cperson_uuids\x18\x02 \x03(\t".\n\x15\x44\x65letePersonsResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"G\n DeletePersonsBatchForTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x03":\n!DeletePersonsBatchForTeamResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"Y\n\x1e\x44\x65leteTombstonedPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cperson_uuids\x18\x02 \x03(\t\x12\x10\n\x08max_rows\x18\x03 \x01(\x03"\xa6\x01\n\x1f\x44\x65leteTombstonedPersonsResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03\x12\x1a\n\x12skipped_live_count\x18\x02 \x01(\x03\x12\x1c\n\x14\x62locked_person_uuids\x18\x03 \x03(\t\x12\x1c\n\x14pending_person_uuids\x18\x04 \x03(\t\x12\x14\n\x0crows_deleted\x18\x05 \x01(\x03"W\n\x12SplitPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x1d\n\x15\x64istinct_ids_to_split\x18\x03 \x03(\t"\x8e\x01\n\x0bSplitResult\x12\x13\n\x0b\x64istinct_id\x18\x01 \x01(\t\x12\x17\n\x0fnew_person_uuid\x18\x02 \x01(\t\x12\x1a\n\x12new_person_version\x18\x03 \x01(\x03\x12\x13\n\x0bpdi_version\x18\x04 \x01(\x03\x12 \n\x18new_person_created_at_ms\x18\x05 \x01(\x03"F\n\x13SplitPersonResponse\x12/\n\x06splits\x18\x01 \x03(\x0b\x32\x1f.personhog.types.v1.SplitResult"c\n&SetPersonDistinctIdVersionFloorRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x13\n\x0b\x64istinct_id\x18\x02 \x01(\t\x12\x13\n\x0bmin_version\x18\x03 \x01(\x03"e\n\'SetPersonDistinctIdVersionFloorResponse\x12/\n\x06person\x18\x01 \x01(\x0b\x32\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01\x42\t\n\x07_person"W\n\x1cSetPersonVersionFloorRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x13\n\x0bmin_version\x18\x03 \x01(\x03"0\n\x1dSetPersonVersionFloorResponse\x12\x0f\n\x07updated\x18\x01 \x01(\x08"}\n\x12\x46\x65ncePersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\r\n\x05op_id\x18\x03 \x01(\t\x12\x34\n\x07op_type\x18\x04 \x01(\x0e\x32#.personhog.types.v1.LifecycleOpType"A\n\x13\x46\x65ncePersonResponse\x12*\n\x06sealed\x18\x01 \x01(\x0b\x32\x1a.personhog.types.v1.Person"\x7f\n\x13\x46\x65ncePersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05op_id\x18\x02 \x01(\t\x12\x34\n\x07op_type\x18\x03 \x01(\x0e\x32#.personhog.types.v1.LifecycleOpType\x12\x12\n\nperson_ids\x18\x04 \x03(\x03"_\n\x14\x46\x65ncePersonsResponse\x12\x34\n\x06sealed\x18\x01 \x03(\x0b\x32$.personhog.types.v1.FencedPersonSeal\x12\x11\n\tnot_found\x18\x02 \x03(\x03"J\n\x10\x46\x65ncedPersonSeal\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x0f\n\x07version\x18\x02 \x01(\x03\x12\x12\n\ncreated_at\x18\x03 \x01(\x03"\xd6\x01\n\x13ReleaseFenceRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x13\n\x0bperson_uuid\x18\x03 \x01(\t\x12\r\n\x05op_id\x18\x04 \x01(\t\x12\x33\n\x07outcome\x18\x05 \x01(\x0e\x32".personhog.types.v1.ReleaseOutcome\x12\x1b\n\x0esealed_version\x18\x06 \x01(\x03H\x00\x88\x01\x01\x12\x12\n\ncreated_at\x18\x07 \x01(\x03\x42\x11\n\x0f_sealed_version"\x16\n\x14ReleaseFenceResponse"\xa2\x01\n\x14ReleaseFencesRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05op_id\x18\x02 \x01(\t\x12\x33\n\x07outcome\x18\x03 \x01(\x0e\x32".personhog.types.v1.ReleaseOutcome\x12\x35\n\x07persons\x18\x04 \x03(\x0b\x32$.personhog.types.v1.ReleaseFenceItem"~\n\x10ReleaseFenceItem\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x13\n\x0bperson_uuid\x18\x02 \x01(\t\x12\x1b\n\x0esealed_version\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x12\n\ncreated_at\x18\x04 \x01(\x03\x42\x11\n\x0f_sealed_version"\x17\n\x15ReleaseFencesResponse"S\n\x14SealedSourceSnapshot\x12*\n\x06person\x18\x01 \x01(\x0b\x32\x1a.personhog.types.v1.Person\x12\x0f\n\x07ordinal\x18\x02 \x01(\x05"\xbd\x01\n\x19\x46oldPersonDocumentRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x42\n\x10sealed_snapshots\x18\x03 \x03(\x0b\x32(.personhog.types.v1.SealedSourceSnapshot\x12\x11\n\tevent_set\x18\x04 \x01(\x0c\x12\x16\n\x0e\x65vent_set_once\x18\x05 \x01(\x0c\x12\r\n\x05op_id\x18\x06 \x01(\t"H\n\x1a\x46oldPersonDocumentResponse\x12*\n\x06person\x18\x01 \x01(\x0b\x32\x1a.personhog.types.v1.Person*o\n\x0fLifecycleOpType\x12!\n\x1dLIFECYCLE_OP_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18LIFECYCLE_OP_TYPE_DELETE\x10\x01\x12\x1b\n\x17LIFECYCLE_OP_TYPE_MERGE\x10\x02*m\n\x0eReleaseOutcome\x12\x1f\n\x1bRELEASE_OUTCOME_UNSPECIFIED\x10\x00\x12\x1d\n\x19RELEASE_OUTCOME_COMMITTED\x10\x01\x12\x1b\n\x17RELEASE_OUTCOME_ABORTED\x10\x02\x62\x06proto3'
+)
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "personhog.types.v1.person_pb2", _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ DESCRIPTOR._loaded_options = None
+ _globals["_LIFECYCLEOPTYPE"]._serialized_start = 5651
+ _globals["_LIFECYCLEOPTYPE"]._serialized_end = 5762
+ _globals["_RELEASEOUTCOME"]._serialized_start = 5764
+ _globals["_RELEASEOUTCOME"]._serialized_end = 5873
+ _globals["_PERSON"]._serialized_start = 89
+ _globals["_PERSON"]._serialized_end = 395
+ _globals["_DISTINCTIDWITHVERSION"]._serialized_start = 397
+ _globals["_DISTINCTIDWITHVERSION"]._serialized_end = 499
+ _globals["_PERSONWITHDISTINCTIDS"]._serialized_start = 501
+ _globals["_PERSONWITHDISTINCTIDS"]._serialized_end = 605
+ _globals["_PERSONDISTINCTIDS"]._serialized_start = 607
+ _globals["_PERSONDISTINCTIDS"]._serialized_end = 710
+ _globals["_PERSONWITHTEAMDISTINCTID"]._serialized_start = 713
+ _globals["_PERSONWITHTEAMDISTINCTID"]._serialized_end = 848
+ _globals["_GETPERSONREQUEST"]._serialized_start = 850
+ _globals["_GETPERSONREQUEST"]._serialized_end = 959
+ _globals["_GETPERSONRESPONSE"]._serialized_start = 961
+ _globals["_GETPERSONRESPONSE"]._serialized_end = 1040
+ _globals["_GETPERSONSREQUEST"]._serialized_start = 1042
+ _globals["_GETPERSONSREQUEST"]._serialized_end = 1153
+ _globals["_PERSONSRESPONSE"]._serialized_start = 1155
+ _globals["_PERSONSRESPONSE"]._serialized_end = 1238
+ _globals["_GETPERSONBYUUIDREQUEST"]._serialized_start = 1240
+ _globals["_GETPERSONBYUUIDREQUEST"]._serialized_end = 1350
+ _globals["_GETPERSONSBYUUIDSREQUEST"]._serialized_start = 1352
+ _globals["_GETPERSONSBYUUIDSREQUEST"]._serialized_end = 1465
+ _globals["_GETPERSONBYDISTINCTIDREQUEST"]._serialized_start = 1467
+ _globals["_GETPERSONBYDISTINCTIDREQUEST"]._serialized_end = 1590
+ _globals["_GETPERSONSBYDISTINCTIDSINTEAMREQUEST"]._serialized_start = 1593
+ _globals["_GETPERSONSBYDISTINCTIDSINTEAMREQUEST"]._serialized_end = 1725
+ _globals["_PERSONSBYDISTINCTIDSINTEAMRESPONSE"]._serialized_start = 1727
+ _globals["_PERSONSBYDISTINCTIDSINTEAMRESPONSE"]._serialized_end = 1823
+ _globals["_GETPERSONSBYDISTINCTIDSREQUEST"]._serialized_start = 1826
+ _globals["_GETPERSONSBYDISTINCTIDSREQUEST"]._serialized_end = 1976
+ _globals["_PERSONSBYDISTINCTIDSRESPONSE"]._serialized_start = 1978
+ _globals["_PERSONSBYDISTINCTIDSRESPONSE"]._serialized_end = 2071
+ _globals["_GETDISTINCTIDSFORPERSONREQUEST"]._serialized_start = 2074
+ _globals["_GETDISTINCTIDSFORPERSONREQUEST"]._serialized_end = 2265
+ _globals["_GETDISTINCTIDSFORPERSONRESPONSE"]._serialized_start = 2268
+ _globals["_GETDISTINCTIDSFORPERSONRESPONSE"]._serialized_end = 2414
+ _globals["_GETDISTINCTIDSFORPERSONSREQUEST"]._serialized_start = 2417
+ _globals["_GETDISTINCTIDSFORPERSONSREQUEST"]._serialized_end = 2594
+ _globals["_GETDISTINCTIDSFORPERSONSRESPONSE"]._serialized_start = 2596
+ _globals["_GETDISTINCTIDSFORPERSONSRESPONSE"]._serialized_end = 2698
+ _globals["_UPDATEPERSONPROPERTIESREQUEST"]._serialized_start = 2701
+ _globals["_UPDATEPERSONPROPERTIESREQUEST"]._serialized_end = 2979
+ _globals["_UPDATEPERSONPROPERTIESRESPONSE"]._serialized_start = 2981
+ _globals["_UPDATEPERSONPROPERTIESRESPONSE"]._serialized_end = 3090
+ _globals["_DELETEPERSONSREQUEST"]._serialized_start = 3092
+ _globals["_DELETEPERSONSREQUEST"]._serialized_end = 3153
+ _globals["_DELETEPERSONSRESPONSE"]._serialized_start = 3155
+ _globals["_DELETEPERSONSRESPONSE"]._serialized_end = 3201
+ _globals["_DELETEPERSONSBATCHFORTEAMREQUEST"]._serialized_start = 3203
+ _globals["_DELETEPERSONSBATCHFORTEAMREQUEST"]._serialized_end = 3274
+ _globals["_DELETEPERSONSBATCHFORTEAMRESPONSE"]._serialized_start = 3276
+ _globals["_DELETEPERSONSBATCHFORTEAMRESPONSE"]._serialized_end = 3334
+ _globals["_DELETETOMBSTONEDPERSONSREQUEST"]._serialized_start = 3336
+ _globals["_DELETETOMBSTONEDPERSONSREQUEST"]._serialized_end = 3425
+ _globals["_DELETETOMBSTONEDPERSONSRESPONSE"]._serialized_start = 3428
+ _globals["_DELETETOMBSTONEDPERSONSRESPONSE"]._serialized_end = 3594
+ _globals["_SPLITPERSONREQUEST"]._serialized_start = 3596
+ _globals["_SPLITPERSONREQUEST"]._serialized_end = 3683
+ _globals["_SPLITRESULT"]._serialized_start = 3686
+ _globals["_SPLITRESULT"]._serialized_end = 3828
+ _globals["_SPLITPERSONRESPONSE"]._serialized_start = 3830
+ _globals["_SPLITPERSONRESPONSE"]._serialized_end = 3900
+ _globals["_SETPERSONDISTINCTIDVERSIONFLOORREQUEST"]._serialized_start = 3902
+ _globals["_SETPERSONDISTINCTIDVERSIONFLOORREQUEST"]._serialized_end = 4001
+ _globals["_SETPERSONDISTINCTIDVERSIONFLOORRESPONSE"]._serialized_start = 4003
+ _globals["_SETPERSONDISTINCTIDVERSIONFLOORRESPONSE"]._serialized_end = 4104
+ _globals["_SETPERSONVERSIONFLOORREQUEST"]._serialized_start = 4106
+ _globals["_SETPERSONVERSIONFLOORREQUEST"]._serialized_end = 4193
+ _globals["_SETPERSONVERSIONFLOORRESPONSE"]._serialized_start = 4195
+ _globals["_SETPERSONVERSIONFLOORRESPONSE"]._serialized_end = 4243
+ _globals["_FENCEPERSONREQUEST"]._serialized_start = 4245
+ _globals["_FENCEPERSONREQUEST"]._serialized_end = 4370
+ _globals["_FENCEPERSONRESPONSE"]._serialized_start = 4372
+ _globals["_FENCEPERSONRESPONSE"]._serialized_end = 4437
+ _globals["_FENCEPERSONSREQUEST"]._serialized_start = 4439
+ _globals["_FENCEPERSONSREQUEST"]._serialized_end = 4566
+ _globals["_FENCEPERSONSRESPONSE"]._serialized_start = 4568
+ _globals["_FENCEPERSONSRESPONSE"]._serialized_end = 4663
+ _globals["_FENCEDPERSONSEAL"]._serialized_start = 4665
+ _globals["_FENCEDPERSONSEAL"]._serialized_end = 4739
+ _globals["_RELEASEFENCEREQUEST"]._serialized_start = 4742
+ _globals["_RELEASEFENCEREQUEST"]._serialized_end = 4956
+ _globals["_RELEASEFENCERESPONSE"]._serialized_start = 4958
+ _globals["_RELEASEFENCERESPONSE"]._serialized_end = 4980
+ _globals["_RELEASEFENCESREQUEST"]._serialized_start = 4983
+ _globals["_RELEASEFENCESREQUEST"]._serialized_end = 5145
+ _globals["_RELEASEFENCEITEM"]._serialized_start = 5147
+ _globals["_RELEASEFENCEITEM"]._serialized_end = 5273
+ _globals["_RELEASEFENCESRESPONSE"]._serialized_start = 5275
+ _globals["_RELEASEFENCESRESPONSE"]._serialized_end = 5298
+ _globals["_SEALEDSOURCESNAPSHOT"]._serialized_start = 5300
+ _globals["_SEALEDSOURCESNAPSHOT"]._serialized_end = 5383
+ _globals["_FOLDPERSONDOCUMENTREQUEST"]._serialized_start = 5386
+ _globals["_FOLDPERSONDOCUMENTREQUEST"]._serialized_end = 5575
+ _globals["_FOLDPERSONDOCUMENTRESPONSE"]._serialized_start = 5577
+ _globals["_FOLDPERSONDOCUMENTRESPONSE"]._serialized_end = 5649
+# @@protoc_insertion_point(module_scope)
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.pyi b/packages/personhog-proto/personhog/types/v1/person_pb2.pyi
similarity index 99%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.pyi
rename to packages/personhog-proto/personhog/types/v1/person_pb2.pyi
index 5bfdfeee1104..b78f1ddaa490 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.pyi
+++ b/packages/personhog-proto/personhog/types/v1/person_pb2.pyi
@@ -16,6 +16,7 @@ from google.protobuf.internal import (
containers as _containers,
enum_type_wrapper as _enum_type_wrapper,
)
+
from personhog.types.v1 import common_pb2 as _common_pb2
DESCRIPTOR: _descriptor.FileDescriptor
@@ -78,7 +79,6 @@ class Person(_message.Message):
is_user_id: bool
last_seen_at: int
is_deleted: bool
-
def __init__(
self,
id: _Optional[int] = ...,
@@ -103,7 +103,6 @@ class DistinctIdWithVersion(_message.Message):
distinct_id: str
version: int
id: int
-
def __init__(
self, distinct_id: _Optional[str] = ..., version: _Optional[int] = ..., id: _Optional[int] = ...
) -> None: ...
@@ -114,7 +113,6 @@ class PersonWithDistinctIds(_message.Message):
PERSON_FIELD_NUMBER: _ClassVar[int]
distinct_id: str
person: Person
-
def __init__(
self, distinct_id: _Optional[str] = ..., person: _Optional[_Union[Person, _Mapping]] = ...
) -> None: ...
@@ -125,7 +123,6 @@ class PersonDistinctIds(_message.Message):
DISTINCT_IDS_FIELD_NUMBER: _ClassVar[int]
person_id: int
distinct_ids: _containers.RepeatedCompositeFieldContainer[DistinctIdWithVersion]
-
def __init__(
self,
person_id: _Optional[int] = ...,
@@ -138,7 +135,6 @@ class PersonWithTeamDistinctId(_message.Message):
PERSON_FIELD_NUMBER: _ClassVar[int]
key: _common_pb2.TeamDistinctId
person: Person
-
def __init__(
self,
key: _Optional[_Union[_common_pb2.TeamDistinctId, _Mapping]] = ...,
@@ -153,7 +149,6 @@ class GetPersonRequest(_message.Message):
team_id: int
person_id: int
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -165,7 +160,6 @@ class GetPersonResponse(_message.Message):
__slots__ = ("person",)
PERSON_FIELD_NUMBER: _ClassVar[int]
person: Person
-
def __init__(self, person: _Optional[_Union[Person, _Mapping]] = ...) -> None: ...
class GetPersonsRequest(_message.Message):
@@ -176,7 +170,6 @@ class GetPersonsRequest(_message.Message):
team_id: int
person_ids: _containers.RepeatedScalarFieldContainer[int]
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -190,7 +183,6 @@ class PersonsResponse(_message.Message):
MISSING_IDS_FIELD_NUMBER: _ClassVar[int]
persons: _containers.RepeatedCompositeFieldContainer[Person]
missing_ids: _containers.RepeatedScalarFieldContainer[int]
-
def __init__(
self,
persons: _Optional[_Iterable[_Union[Person, _Mapping]]] = ...,
@@ -205,7 +197,6 @@ class GetPersonByUuidRequest(_message.Message):
team_id: int
uuid: str
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -221,7 +212,6 @@ class GetPersonsByUuidsRequest(_message.Message):
team_id: int
uuids: _containers.RepeatedScalarFieldContainer[str]
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -237,7 +227,6 @@ class GetPersonByDistinctIdRequest(_message.Message):
team_id: int
distinct_id: str
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -253,7 +242,6 @@ class GetPersonsByDistinctIdsInTeamRequest(_message.Message):
team_id: int
distinct_ids: _containers.RepeatedScalarFieldContainer[str]
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -265,7 +253,6 @@ class PersonsByDistinctIdsInTeamResponse(_message.Message):
__slots__ = ("results",)
RESULTS_FIELD_NUMBER: _ClassVar[int]
results: _containers.RepeatedCompositeFieldContainer[PersonWithDistinctIds]
-
def __init__(self, results: _Optional[_Iterable[_Union[PersonWithDistinctIds, _Mapping]]] = ...) -> None: ...
class GetPersonsByDistinctIdsRequest(_message.Message):
@@ -274,7 +261,6 @@ class GetPersonsByDistinctIdsRequest(_message.Message):
READ_OPTIONS_FIELD_NUMBER: _ClassVar[int]
team_distinct_ids: _containers.RepeatedCompositeFieldContainer[_common_pb2.TeamDistinctId]
read_options: _common_pb2.ReadOptions
-
def __init__(
self,
team_distinct_ids: _Optional[_Iterable[_Union[_common_pb2.TeamDistinctId, _Mapping]]] = ...,
@@ -285,7 +271,6 @@ class PersonsByDistinctIdsResponse(_message.Message):
__slots__ = ("results",)
RESULTS_FIELD_NUMBER: _ClassVar[int]
results: _containers.RepeatedCompositeFieldContainer[PersonWithTeamDistinctId]
-
def __init__(self, results: _Optional[_Iterable[_Union[PersonWithTeamDistinctId, _Mapping]]] = ...) -> None: ...
class GetDistinctIdsForPersonRequest(_message.Message):
@@ -300,7 +285,6 @@ class GetDistinctIdsForPersonRequest(_message.Message):
read_options: _common_pb2.ReadOptions
limit: int
cursor_id: int
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -316,7 +300,6 @@ class GetDistinctIdsForPersonResponse(_message.Message):
NEXT_CURSOR_ID_FIELD_NUMBER: _ClassVar[int]
distinct_ids: _containers.RepeatedCompositeFieldContainer[DistinctIdWithVersion]
next_cursor_id: int
-
def __init__(
self,
distinct_ids: _Optional[_Iterable[_Union[DistinctIdWithVersion, _Mapping]]] = ...,
@@ -333,7 +316,6 @@ class GetDistinctIdsForPersonsRequest(_message.Message):
person_ids: _containers.RepeatedScalarFieldContainer[int]
read_options: _common_pb2.ReadOptions
limit_per_person: int
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -346,7 +328,6 @@ class GetDistinctIdsForPersonsResponse(_message.Message):
__slots__ = ("person_distinct_ids",)
PERSON_DISTINCT_IDS_FIELD_NUMBER: _ClassVar[int]
person_distinct_ids: _containers.RepeatedCompositeFieldContainer[PersonDistinctIds]
-
def __init__(
self, person_distinct_ids: _Optional[_Iterable[_Union[PersonDistinctIds, _Mapping]]] = ...
) -> None: ...
@@ -381,7 +362,6 @@ class UpdatePersonPropertiesRequest(_message.Message):
is_identified: bool
last_seen_at: int
force_update: bool
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -401,7 +381,6 @@ class UpdatePersonPropertiesResponse(_message.Message):
UPDATED_FIELD_NUMBER: _ClassVar[int]
person: Person
updated: bool
-
def __init__(self, person: _Optional[_Union[Person, _Mapping]] = ..., updated: bool = ...) -> None: ...
class DeletePersonsRequest(_message.Message):
@@ -410,14 +389,12 @@ class DeletePersonsRequest(_message.Message):
PERSON_UUIDS_FIELD_NUMBER: _ClassVar[int]
team_id: int
person_uuids: _containers.RepeatedScalarFieldContainer[str]
-
def __init__(self, team_id: _Optional[int] = ..., person_uuids: _Optional[_Iterable[str]] = ...) -> None: ...
class DeletePersonsResponse(_message.Message):
__slots__ = ("deleted_count",)
DELETED_COUNT_FIELD_NUMBER: _ClassVar[int]
deleted_count: int
-
def __init__(self, deleted_count: _Optional[int] = ...) -> None: ...
class DeletePersonsBatchForTeamRequest(_message.Message):
@@ -426,14 +403,12 @@ class DeletePersonsBatchForTeamRequest(_message.Message):
BATCH_SIZE_FIELD_NUMBER: _ClassVar[int]
team_id: int
batch_size: int
-
def __init__(self, team_id: _Optional[int] = ..., batch_size: _Optional[int] = ...) -> None: ...
class DeletePersonsBatchForTeamResponse(_message.Message):
__slots__ = ("deleted_count",)
DELETED_COUNT_FIELD_NUMBER: _ClassVar[int]
deleted_count: int
-
def __init__(self, deleted_count: _Optional[int] = ...) -> None: ...
class DeleteTombstonedPersonsRequest(_message.Message):
@@ -444,7 +419,6 @@ class DeleteTombstonedPersonsRequest(_message.Message):
team_id: int
person_uuids: _containers.RepeatedScalarFieldContainer[str]
max_rows: int
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -464,7 +438,6 @@ class DeleteTombstonedPersonsResponse(_message.Message):
blocked_person_uuids: _containers.RepeatedScalarFieldContainer[str]
pending_person_uuids: _containers.RepeatedScalarFieldContainer[str]
rows_deleted: int
-
def __init__(
self,
deleted_count: _Optional[int] = ...,
@@ -482,7 +455,6 @@ class SplitPersonRequest(_message.Message):
team_id: int
person_id: int
distinct_ids_to_split: _containers.RepeatedScalarFieldContainer[str]
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -502,7 +474,6 @@ class SplitResult(_message.Message):
new_person_version: int
pdi_version: int
new_person_created_at_ms: int
-
def __init__(
self,
distinct_id: _Optional[str] = ...,
@@ -516,7 +487,6 @@ class SplitPersonResponse(_message.Message):
__slots__ = ("splits",)
SPLITS_FIELD_NUMBER: _ClassVar[int]
splits: _containers.RepeatedCompositeFieldContainer[SplitResult]
-
def __init__(self, splits: _Optional[_Iterable[_Union[SplitResult, _Mapping]]] = ...) -> None: ...
class SetPersonDistinctIdVersionFloorRequest(_message.Message):
@@ -527,7 +497,6 @@ class SetPersonDistinctIdVersionFloorRequest(_message.Message):
team_id: int
distinct_id: str
min_version: int
-
def __init__(
self, team_id: _Optional[int] = ..., distinct_id: _Optional[str] = ..., min_version: _Optional[int] = ...
) -> None: ...
@@ -536,7 +505,6 @@ class SetPersonDistinctIdVersionFloorResponse(_message.Message):
__slots__ = ("person",)
PERSON_FIELD_NUMBER: _ClassVar[int]
person: Person
-
def __init__(self, person: _Optional[_Union[Person, _Mapping]] = ...) -> None: ...
class SetPersonVersionFloorRequest(_message.Message):
@@ -547,7 +515,6 @@ class SetPersonVersionFloorRequest(_message.Message):
team_id: int
person_id: int
min_version: int
-
def __init__(
self, team_id: _Optional[int] = ..., person_id: _Optional[int] = ..., min_version: _Optional[int] = ...
) -> None: ...
@@ -556,7 +523,6 @@ class SetPersonVersionFloorResponse(_message.Message):
__slots__ = ("updated",)
UPDATED_FIELD_NUMBER: _ClassVar[int]
updated: bool
-
def __init__(self, updated: bool = ...) -> None: ...
class FencePersonRequest(_message.Message):
@@ -569,7 +535,6 @@ class FencePersonRequest(_message.Message):
person_id: int
op_id: str
op_type: LifecycleOpType
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -582,7 +547,6 @@ class FencePersonResponse(_message.Message):
__slots__ = ("sealed",)
SEALED_FIELD_NUMBER: _ClassVar[int]
sealed: Person
-
def __init__(self, sealed: _Optional[_Union[Person, _Mapping]] = ...) -> None: ...
class FencePersonsRequest(_message.Message):
@@ -595,7 +559,6 @@ class FencePersonsRequest(_message.Message):
op_id: str
op_type: LifecycleOpType
person_ids: _containers.RepeatedScalarFieldContainer[int]
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -610,7 +573,6 @@ class FencePersonsResponse(_message.Message):
NOT_FOUND_FIELD_NUMBER: _ClassVar[int]
sealed: _containers.RepeatedCompositeFieldContainer[FencedPersonSeal]
not_found: _containers.RepeatedScalarFieldContainer[int]
-
def __init__(
self,
sealed: _Optional[_Iterable[_Union[FencedPersonSeal, _Mapping]]] = ...,
@@ -625,7 +587,6 @@ class FencedPersonSeal(_message.Message):
person_id: int
version: int
created_at: int
-
def __init__(
self, person_id: _Optional[int] = ..., version: _Optional[int] = ..., created_at: _Optional[int] = ...
) -> None: ...
@@ -646,7 +607,6 @@ class ReleaseFenceRequest(_message.Message):
outcome: ReleaseOutcome
sealed_version: int
created_at: int
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -660,7 +620,6 @@ class ReleaseFenceRequest(_message.Message):
class ReleaseFenceResponse(_message.Message):
__slots__ = ()
-
def __init__(self) -> None: ...
class ReleaseFencesRequest(_message.Message):
@@ -673,7 +632,6 @@ class ReleaseFencesRequest(_message.Message):
op_id: str
outcome: ReleaseOutcome
persons: _containers.RepeatedCompositeFieldContainer[ReleaseFenceItem]
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -692,7 +650,6 @@ class ReleaseFenceItem(_message.Message):
person_uuid: str
sealed_version: int
created_at: int
-
def __init__(
self,
person_id: _Optional[int] = ...,
@@ -703,7 +660,6 @@ class ReleaseFenceItem(_message.Message):
class ReleaseFencesResponse(_message.Message):
__slots__ = ()
-
def __init__(self) -> None: ...
class SealedSourceSnapshot(_message.Message):
@@ -712,7 +668,6 @@ class SealedSourceSnapshot(_message.Message):
ORDINAL_FIELD_NUMBER: _ClassVar[int]
person: Person
ordinal: int
-
def __init__(self, person: _Optional[_Union[Person, _Mapping]] = ..., ordinal: _Optional[int] = ...) -> None: ...
class FoldPersonDocumentRequest(_message.Message):
@@ -729,7 +684,6 @@ class FoldPersonDocumentRequest(_message.Message):
event_set: bytes
event_set_once: bytes
op_id: str
-
def __init__(
self,
team_id: _Optional[int] = ...,
@@ -744,5 +698,4 @@ class FoldPersonDocumentResponse(_message.Message):
__slots__ = ("person",)
PERSON_FIELD_NUMBER: _ClassVar[int]
person: Person
-
def __init__(self, person: _Optional[_Union[Person, _Mapping]] = ...) -> None: ...
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2_grpc.py b/packages/personhog-proto/personhog/types/v1/person_pb2_grpc.py
similarity index 91%
rename from posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2_grpc.py
rename to packages/personhog-proto/personhog/types/v1/person_pb2_grpc.py
index 8d0468064eca..c58cdb841f23 100644
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2_grpc.py
+++ b/packages/personhog-proto/personhog/types/v1/person_pb2_grpc.py
@@ -1,3 +1,4 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
@@ -5,12 +6,14 @@ import grpc
GRPC_GENERATED_VERSION = "1.71.2"
GRPC_VERSION = grpc.__version__
_version_not_supported = False
+
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
+
if _version_not_supported:
raise RuntimeError(
f"The grpc package installed is at version {GRPC_VERSION},"
diff --git a/packages/personhog-proto/pyproject.toml b/packages/personhog-proto/pyproject.toml
new file mode 100644
index 000000000000..eeeae5ec810e
--- /dev/null
+++ b/packages/personhog-proto/pyproject.toml
@@ -0,0 +1,24 @@
+[build-system]
+requires = ["hatchling"]
+build-backend = "hatchling.build"
+
+[project]
+name = "personhog-proto"
+version = "0.1.0"
+description = "Python stubs generated from proto/personhog"
+requires-python = ">=3.13"
+dependencies = ["grpcio", "protobuf"]
+
+[tool.hatch.build.targets.wheel]
+packages = ["personhog"]
+
+[tool.uv]
+exclude-newer = "7 days"
+# uv keys the built wheel on pyproject.toml alone by default, so a regeneration that changes only
+# the stubs leaves the stale wheel in the cache and uv installs it again. List the stubs to key on
+# them too.
+cache-keys = [
+ { file = "pyproject.toml" },
+ { file = "personhog/**/*.py" },
+ { file = "personhog/**/*.pyi" },
+]
diff --git a/posthog/models/person/test/test_batched_personhog_helpers.py b/posthog/models/person/test/test_batched_personhog_helpers.py
index 822697cd19c2..fb8ede59dee2 100644
--- a/posthog/models/person/test/test_batched_personhog_helpers.py
+++ b/posthog/models/person/test/test_batched_personhog_helpers.py
@@ -3,6 +3,7 @@ from unittest.mock import ANY, MagicMock, patch
from django.test import SimpleTestCase
from parameterized import parameterized
+from personhog.types.v1 import person_pb2
from posthog.models.person.util import (
_batched_get_distinct_ids_for_persons,
@@ -12,7 +13,6 @@ from posthog.models.person.util import (
)
from posthog.personhog_client.fake_client import fake_personhog_client
from posthog.personhog_client.proto import ReadOptions
-from posthog.personhog_client.proto.generated.personhog.types.v1 import person_pb2
class TestBatchedGetPersonsByUuids(SimpleTestCase):
diff --git a/posthog/models/person/util.py b/posthog/models/person/util.py
index 6c2d4df71ecb..0c5d7c178b7f 100644
--- a/posthog/models/person/util.py
+++ b/posthog/models/person/util.py
@@ -48,8 +48,9 @@ PERSONHOG_BATCH_SIZE: int = settings.PERSONHOG_BATCH_SIZE
if TYPE_CHECKING:
+ from personhog.types.v1 import person_pb2
+
from posthog.personhog_client.client import PersonHogClient
- from posthog.personhog_client.proto.generated.personhog.types.v1 import person_pb2
_get_client = require_personhog_client
diff --git a/posthog/personhog_client/README.md b/posthog/personhog_client/README.md
index 4d3228754037..0da08ebfb871 100644
--- a/posthog/personhog_client/README.md
+++ b/posthog/personhog_client/README.md
@@ -138,7 +138,9 @@ The client emits Prometheus metrics at multiple layers:
- `fake_client.py` — `FakePersonHogClient` for tests
- `interceptor.py` — gRPC interceptors for client name headers and request metrics
- `metrics.py` — Prometheus counters for routing decisions
-- `proto/generated/` — auto-generated protobuf stubs (do not edit)
- `proto/__init__.py` — convenience re-exports of proto types
+The auto-generated protobuf stubs live outside this directory, in [`packages/personhog-proto`](/packages/personhog-proto/README.md).
+They install as the top-level `personhog` package. Do not edit them by hand.
+
For updating proto definitions, see [`proto/README.md`](/proto/README.md).
diff --git a/posthog/personhog_client/converters.py b/posthog/personhog_client/converters.py
index b39bca53d73e..efc9e634009e 100644
--- a/posthog/personhog_client/converters.py
+++ b/posthog/personhog_client/converters.py
@@ -7,9 +7,10 @@ from datetime import UTC, datetime
from typing import TYPE_CHECKING, Any
if TYPE_CHECKING:
+ from personhog.types.v1 import group_pb2, person_pb2
+
from posthog.models.group.group import Group
from posthog.models.person import Person
- from posthog.personhog_client.proto.generated.personhog.types.v1 import group_pb2, person_pb2
def proto_group_type_mapping_to_dict(mapping: group_pb2.GroupTypeMapping) -> dict[str, Any]:
diff --git a/posthog/personhog_client/fake_client.py b/posthog/personhog_client/fake_client.py
index e1c68a6787d5..a866cf573470 100644
--- a/posthog/personhog_client/fake_client.py
+++ b/posthog/personhog_client/fake_client.py
@@ -25,13 +25,9 @@ from typing import Any
from unittest.mock import patch
+from personhog.types.v1 import cohort_pb2, feature_flag_pb2, group_pb2, person_pb2
+
from posthog.models.person.missing_person import uuidFromDistinctId
-from posthog.personhog_client.proto.generated.personhog.types.v1 import (
- cohort_pb2,
- feature_flag_pb2,
- group_pb2,
- person_pb2,
-)
from posthog.utils import is_anonymous_id
diff --git a/posthog/personhog_client/proto/__init__.py b/posthog/personhog_client/proto/__init__.py
index a772265b0cb0..8ad36deddb5f 100644
--- a/posthog/personhog_client/proto/__init__.py
+++ b/posthog/personhog_client/proto/__init__.py
@@ -2,15 +2,15 @@
# isort: skip_file
# common_pb2 must be imported before any proto that depends on common.proto
# (cohort, group, person all reference it in their serialized descriptors)
-from posthog.personhog_client.proto.generated.personhog.types.v1.common_pb2 import (
+from personhog.types.v1.common_pb2 import (
CONSISTENCY_LEVEL_EVENTUAL,
CONSISTENCY_LEVEL_STRONG,
GroupIdentifier,
GroupKey,
ReadOptions,
)
-from posthog.personhog_client.proto.generated.personhog.service.v1.service_pb2_grpc import PersonHogServiceStub
-from posthog.personhog_client.proto.generated.personhog.types.v1.cohort_pb2 import (
+from personhog.service.v1.service_pb2_grpc import PersonHogServiceStub
+from personhog.types.v1.cohort_pb2 import (
CheckCohortMembershipRequest,
CohortMembership,
CohortMembershipResponse,
@@ -25,11 +25,11 @@ from posthog.personhog_client.proto.generated.personhog.types.v1.cohort_pb2 impo
ListCohortMemberIdsRequest,
ListCohortMemberIdsResponse,
)
-from posthog.personhog_client.proto.generated.personhog.types.v1.feature_flag_pb2 import (
+from personhog.types.v1.feature_flag_pb2 import (
DeleteHashKeyOverridesByTeamsRequest,
DeleteHashKeyOverridesByTeamsResponse,
)
-from posthog.personhog_client.proto.generated.personhog.types.v1.group_pb2 import (
+from personhog.types.v1.group_pb2 import (
CountGroupTypeMappingsRequest,
CountGroupTypeMappingsResponse,
CreateGroupRequest,
@@ -65,7 +65,7 @@ from posthog.personhog_client.proto.generated.personhog.types.v1.group_pb2 impor
UpdateGroupTypeMappingRequest,
UpdateGroupTypeMappingResponse,
)
-from posthog.personhog_client.proto.generated.personhog.types.v1.person_pb2 import (
+from personhog.types.v1.person_pb2 import (
DeletePersonsBatchForTeamRequest,
DeletePersonsBatchForTeamResponse,
DeletePersonsRequest,
diff --git a/posthog/personhog_client/proto/generated/__init__.pyi b/posthog/personhog_client/proto/generated/__init__.pyi
deleted file mode 100644
index 59496a2e063f..000000000000
--- a/posthog/personhog_client/proto/generated/__init__.pyi
+++ /dev/null
@@ -1 +0,0 @@
-from . import personhog
diff --git a/posthog/personhog_client/proto/generated/personhog/__init__.pyi b/posthog/personhog_client/proto/generated/personhog/__init__.pyi
deleted file mode 100644
index dca1849f32f9..000000000000
--- a/posthog/personhog_client/proto/generated/personhog/__init__.pyi
+++ /dev/null
@@ -1 +0,0 @@
-from . import service, types
diff --git a/posthog/personhog_client/proto/generated/personhog/service/__init__.pyi b/posthog/personhog_client/proto/generated/personhog/service/__init__.pyi
deleted file mode 100644
index 326cdf49b6df..000000000000
--- a/posthog/personhog_client/proto/generated/personhog/service/__init__.pyi
+++ /dev/null
@@ -1 +0,0 @@
-from . import v1
diff --git a/posthog/personhog_client/proto/generated/personhog/service/v1/__init__.pyi b/posthog/personhog_client/proto/generated/personhog/service/v1/__init__.pyi
deleted file mode 100644
index ae7fd7c93769..000000000000
--- a/posthog/personhog_client/proto/generated/personhog/service/v1/__init__.pyi
+++ /dev/null
@@ -1 +0,0 @@
-from . import service_pb2
diff --git a/posthog/personhog_client/proto/generated/personhog/service/v1/service_pb2.py b/posthog/personhog_client/proto/generated/personhog/service/v1/service_pb2.py
deleted file mode 100644
index 116d1b041cb8..000000000000
--- a/posthog/personhog_client/proto/generated/personhog/service/v1/service_pb2.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Generated protocol buffer code."""
-
-from google.protobuf import (
- descriptor as _descriptor,
- descriptor_pool as _descriptor_pool,
- runtime_version as _runtime_version,
- symbol_database as _symbol_database,
-)
-from google.protobuf.internal import builder as _builder
-
-_runtime_version.ValidateProtobufRuntimeVersion(
- _runtime_version.Domain.PUBLIC, 5, 29, 0, "", "personhog/service/v1/service.proto"
-)
-_sym_db = _symbol_database.Default()
-from ....personhog.types.v1 import (
- cohort_pb2 as personhog_dot_types_dot_v1_dot_cohort__pb2,
- feature_flag_pb2 as personhog_dot_types_dot_v1_dot_feature__flag__pb2,
- group_pb2 as personhog_dot_types_dot_v1_dot_group__pb2,
- person_pb2 as personhog_dot_types_dot_v1_dot_person__pb2,
-)
-
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
- b"\n\"personhog/service/v1/service.proto\x12\x14personhog.service.v1\x1a\x1fpersonhog/types/v1/person.proto\x1a\x1epersonhog/types/v1/group.proto\x1a\x1fpersonhog/types/v1/cohort.proto\x1a%personhog/types/v1/feature_flag.proto2\xdc+\n\x10PersonHogService\x12X\n\tGetPerson\x12$.personhog.types.v1.GetPersonRequest\x1a%.personhog.types.v1.GetPersonResponse\x12X\n\nGetPersons\x12%.personhog.types.v1.GetPersonsRequest\x1a#.personhog.types.v1.PersonsResponse\x12d\n\x0fGetPersonByUuid\x12*.personhog.types.v1.GetPersonByUuidRequest\x1a%.personhog.types.v1.GetPersonResponse\x12f\n\x11GetPersonsByUuids\x12,.personhog.types.v1.GetPersonsByUuidsRequest\x1a#.personhog.types.v1.PersonsResponse\x12p\n\x15GetPersonByDistinctId\x120.personhog.types.v1.GetPersonByDistinctIdRequest\x1a%.personhog.types.v1.GetPersonResponse\x12\x91\x01\n\x1dGetPersonsByDistinctIdsInTeam\x128.personhog.types.v1.GetPersonsByDistinctIdsInTeamRequest\x1a6.personhog.types.v1.PersonsByDistinctIdsInTeamResponse\x12\x7f\n\x17GetPersonsByDistinctIds\x122.personhog.types.v1.GetPersonsByDistinctIdsRequest\x1a0.personhog.types.v1.PersonsByDistinctIdsResponse\x12\x82\x01\n\x17GetDistinctIdsForPerson\x122.personhog.types.v1.GetDistinctIdsForPersonRequest\x1a3.personhog.types.v1.GetDistinctIdsForPersonResponse\x12\x85\x01\n\x18GetDistinctIdsForPersons\x123.personhog.types.v1.GetDistinctIdsForPersonsRequest\x1a4.personhog.types.v1.GetDistinctIdsForPersonsResponse\x12\x88\x01\n\x19GetHashKeyOverrideContext\x124.personhog.types.v1.GetHashKeyOverrideContextRequest\x1a5.personhog.types.v1.GetHashKeyOverrideContextResponse\x12\x7f\n\x16UpsertHashKeyOverrides\x121.personhog.types.v1.UpsertHashKeyOverridesRequest\x1a2.personhog.types.v1.UpsertHashKeyOverridesResponse\x12\x94\x01\n\x1dDeleteHashKeyOverridesByTeams\x128.personhog.types.v1.DeleteHashKeyOverridesByTeamsRequest\x1a9.personhog.types.v1.DeleteHashKeyOverridesByTeamsResponse\x12w\n\x15CheckCohortMembership\x120.personhog.types.v1.CheckCohortMembershipRequest\x1a,.personhog.types.v1.CohortMembershipResponse\x12s\n\x12CountCohortMembers\x12-.personhog.types.v1.CountCohortMembersRequest\x1a..personhog.types.v1.CountCohortMembersResponse\x12s\n\x12DeleteCohortMember\x12-.personhog.types.v1.DeleteCohortMemberRequest\x1a..personhog.types.v1.DeleteCohortMemberResponse\x12\x82\x01\n\x17DeleteCohortMembersBulk\x122.personhog.types.v1.DeleteCohortMembersBulkRequest\x1a3.personhog.types.v1.DeleteCohortMembersBulkResponse\x12v\n\x13InsertCohortMembers\x12..personhog.types.v1.InsertCohortMembersRequest\x1a/.personhog.types.v1.InsertCohortMembersResponse\x12v\n\x13ListCohortMemberIds\x12..personhog.types.v1.ListCohortMemberIdsRequest\x1a/.personhog.types.v1.ListCohortMemberIdsResponse\x12U\n\x08GetGroup\x12#.personhog.types.v1.GetGroupRequest\x1a$.personhog.types.v1.GetGroupResponse\x12U\n\tGetGroups\x12$.personhog.types.v1.GetGroupsRequest\x1a\".personhog.types.v1.GroupsResponse\x12g\n\x0eGetGroupsBatch\x12).personhog.types.v1.GetGroupsBatchRequest\x1a*.personhog.types.v1.GetGroupsBatchResponse\x12[\n\nListGroups\x12%.personhog.types.v1.ListGroupsRequest\x1a&.personhog.types.v1.ListGroupsResponse\x12\x86\x01\n\x1cGetGroupTypeMappingsByTeamId\x127.personhog.types.v1.GetGroupTypeMappingsByTeamIdRequest\x1a-.personhog.types.v1.GroupTypeMappingsResponse\x12\x8d\x01\n\x1dGetGroupTypeMappingsByTeamIds\x128.personhog.types.v1.GetGroupTypeMappingsByTeamIdsRequest\x1a2.personhog.types.v1.GroupTypeMappingsBatchResponse\x12\x8c\x01\n\x1fGetGroupTypeMappingsByProjectId\x12:.personhog.types.v1.GetGroupTypeMappingsByProjectIdRequest\x1a-.personhog.types.v1.GroupTypeMappingsResponse\x12\x93\x01\n GetGroupTypeMappingsByProjectIds\x12;.personhog.types.v1.GetGroupTypeMappingsByProjectIdsRequest\x1a2.personhog.types.v1.GroupTypeMappingsBatchResponse\x12\x9d\x01\n GetGroupTypeMappingByDashboardId\x12;.personhog.types.v1.GetGroupTypeMappingByDashboardIdRequest\x1a<.personhog.types.v1.GetGroupTypeMappingByDashboardIdResponse\x12\x7f\n\x16CountGroupTypeMappings\x121.personhog.types.v1.CountGroupTypeMappingsRequest\x1a2.personhog.types.v1.CountGroupTypeMappingsResponse\x12^\n\x0bCreateGroup\x12&.personhog.types.v1.CreateGroupRequest\x1a'.personhog.types.v1.CreateGroupResponse\x12^\n\x0bUpdateGroup\x12&.personhog.types.v1.UpdateGroupRequest\x1a'.personhog.types.v1.UpdateGroupResponse\x12\x85\x01\n\x18DeleteGroupsBatchForTeam\x123.personhog.types.v1.DeleteGroupsBatchForTeamRequest\x1a4.personhog.types.v1.DeleteGroupsBatchForTeamResponse\x12\x7f\n\x16UpdateGroupTypeMapping\x121.personhog.types.v1.UpdateGroupTypeMappingRequest\x1a2.personhog.types.v1.UpdateGroupTypeMappingResponse\x12\x7f\n\x16DeleteGroupTypeMapping\x121.personhog.types.v1.DeleteGroupTypeMappingRequest\x1a2.personhog.types.v1.DeleteGroupTypeMappingResponse\x12\xa6\x01\n#DeleteGroupTypeMappingsBatchForTeam\x12>.personhog.types.v1.DeleteGroupTypeMappingsBatchForTeamRequest\x1a?.personhog.types.v1.DeleteGroupTypeMappingsBatchForTeamResponse\x12\x7f\n\x16UpdatePersonProperties\x121.personhog.types.v1.UpdatePersonPropertiesRequest\x1a2.personhog.types.v1.UpdatePersonPropertiesResponse\x12^\n\x0bFencePerson\x12&.personhog.types.v1.FencePersonRequest\x1a'.personhog.types.v1.FencePersonResponse\x12a\n\x0cFencePersons\x12'.personhog.types.v1.FencePersonsRequest\x1a(.personhog.types.v1.FencePersonsResponse\x12a\n\x0cReleaseFence\x12'.personhog.types.v1.ReleaseFenceRequest\x1a(.personhog.types.v1.ReleaseFenceResponse\x12d\n\rReleaseFences\x12(.personhog.types.v1.ReleaseFencesRequest\x1a).personhog.types.v1.ReleaseFencesResponse\x12s\n\x12FoldPersonDocument\x12-.personhog.types.v1.FoldPersonDocumentRequest\x1a..personhog.types.v1.FoldPersonDocumentResponse\x12d\n\rDeletePersons\x12(.personhog.types.v1.DeletePersonsRequest\x1a).personhog.types.v1.DeletePersonsResponse\x12\x88\x01\n\x19DeletePersonsBatchForTeam\x124.personhog.types.v1.DeletePersonsBatchForTeamRequest\x1a5.personhog.types.v1.DeletePersonsBatchForTeamResponse\x12\x82\x01\n\x17DeleteTombstonedPersons\x122.personhog.types.v1.DeleteTombstonedPersonsRequest\x1a3.personhog.types.v1.DeleteTombstonedPersonsResponse\x12^\n\x0bSplitPerson\x12&.personhog.types.v1.SplitPersonRequest\x1a'.personhog.types.v1.SplitPersonResponse\x12\x9a\x01\n\x1fSetPersonDistinctIdVersionFloor\x12:.personhog.types.v1.SetPersonDistinctIdVersionFloorRequest\x1a;.personhog.types.v1.SetPersonDistinctIdVersionFloorResponse\x12|\n\x15SetPersonVersionFloor\x120.personhog.types.v1.SetPersonVersionFloorRequest\x1a1.personhog.types.v1.SetPersonVersionFloorResponseb\x06proto3"
-)
-_globals = globals()
-_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "personhog.service.v1.service_pb2", _globals)
-if not _descriptor._USE_C_DESCRIPTORS:
- DESCRIPTOR._loaded_options = None
- _globals["_PERSONHOGSERVICE"]._serialized_start = 198
- _globals["_PERSONHOGSERVICE"]._serialized_end = 5794
diff --git a/posthog/personhog_client/proto/generated/personhog/service/v1/service_pb2.pyi b/posthog/personhog_client/proto/generated/personhog/service/v1/service_pb2.pyi
deleted file mode 100644
index 4e0d8a74b0bb..000000000000
--- a/posthog/personhog_client/proto/generated/personhog/service/v1/service_pb2.pyi
+++ /dev/null
@@ -1,11 +0,0 @@
-from typing import ClassVar as _ClassVar
-
-from google.protobuf import descriptor as _descriptor
-from personhog.types.v1 import (
- cohort_pb2 as _cohort_pb2,
- feature_flag_pb2 as _feature_flag_pb2,
- group_pb2 as _group_pb2,
- person_pb2 as _person_pb2,
-)
-
-DESCRIPTOR: _descriptor.FileDescriptor
diff --git a/posthog/personhog_client/proto/generated/personhog/types/__init__.pyi b/posthog/personhog_client/proto/generated/personhog/types/__init__.pyi
deleted file mode 100644
index 326cdf49b6df..000000000000
--- a/posthog/personhog_client/proto/generated/personhog/types/__init__.pyi
+++ /dev/null
@@ -1 +0,0 @@
-from . import v1
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/__init__.pyi b/posthog/personhog_client/proto/generated/personhog/types/v1/__init__.pyi
deleted file mode 100644
index e6307f820f4a..000000000000
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/__init__.pyi
+++ /dev/null
@@ -1 +0,0 @@
-from . import cohort_pb2, common_pb2, feature_flag_pb2, group_pb2, person_pb2
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/group_pb2.py b/posthog/personhog_client/proto/generated/personhog/types/v1/group_pb2.py
deleted file mode 100644
index 20681cde3756..000000000000
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/group_pb2.py
+++ /dev/null
@@ -1,94 +0,0 @@
-"""Generated protocol buffer code."""
-
-from google.protobuf import (
- descriptor as _descriptor,
- descriptor_pool as _descriptor_pool,
- runtime_version as _runtime_version,
- symbol_database as _symbol_database,
-)
-from google.protobuf.internal import builder as _builder
-
-_runtime_version.ValidateProtobufRuntimeVersion(
- _runtime_version.Domain.PUBLIC, 5, 29, 0, "", "personhog/types/v1/group.proto"
-)
-_sym_db = _symbol_database.Default()
-from ....personhog.types.v1 import common_pb2 as personhog_dot_types_dot_v1_dot_common__pb2
-
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
- b'\n\x1epersonhog/types/v1/group.proto\x12\x12personhog.types.v1\x1a\x1fpersonhog/types/v1/common.proto"\xd7\x01\n\x05Group\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0f\n\x07team_id\x18\x02 \x01(\x03\x12\x18\n\x10group_type_index\x18\x03 \x01(\x05\x12\x11\n\tgroup_key\x18\x04 \x01(\t\x12\x18\n\x10group_properties\x18\x05 \x01(\x0c\x12\x12\n\ncreated_at\x18\x06 \x01(\x03\x12"\n\x1aproperties_last_updated_at\x18\x07 \x01(\x0c\x12!\n\x19properties_last_operation\x18\x08 \x01(\x0c\x12\x0f\n\x07version\x18\t \x01(\x03"\xdd\x02\n\x10GroupTypeMapping\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0f\n\x07team_id\x18\x02 \x01(\x03\x12\x12\n\nproject_id\x18\x03 \x01(\x03\x12\x12\n\ngroup_type\x18\x04 \x01(\t\x12\x18\n\x10group_type_index\x18\x05 \x01(\x05\x12\x1a\n\rname_singular\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bname_plural\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0fdefault_columns\x18\x08 \x01(\x0cH\x02\x88\x01\x01\x12 \n\x13detail_dashboard_id\x18\t \x01(\x03H\x03\x88\x01\x01\x12\x17\n\ncreated_at\x18\n \x01(\x03H\x04\x88\x01\x01B\x10\n\x0e_name_singularB\x0e\n\x0c_name_pluralB\x12\n\x10_default_columnsB\x16\n\x14_detail_dashboard_idB\r\n\x0b_created_at"r\n\x0cGroupWithKey\x12)\n\x03key\x18\x01 \x01(\x0b2\x1c.personhog.types.v1.GroupKey\x12-\n\x05group\x18\x02 \x01(\x0b2\x19.personhog.types.v1.GroupH\x00\x88\x01\x01B\x08\n\x06_group"]\n\x16GroupTypeMappingsByKey\x12\x0b\n\x03key\x18\x01 \x01(\x03\x126\n\x08mappings\x18\x02 \x03(\x0b2$.personhog.types.v1.GroupTypeMapping"\xe1\x01\n\x11ListGroupsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x1a\n\x12group_key_contains\x18\x03 \x01(\t\x12\x0e\n\x06search\x18\x04 \x01(\t\x12\x1c\n\x14cursor_created_at_ms\x18\x05 \x01(\x03\x12\x11\n\tcursor_id\x18\x06 \x01(\x03\x12\r\n\x05limit\x18\x07 \x01(\x05\x125\n\x0cread_options\x18\x08 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"Q\n\x12ListGroupsResponse\x12)\n\x06groups\x18\x01 \x03(\x0b2\x19.personhog.types.v1.Group\x12\x10\n\x08has_more\x18\x02 \x01(\x08"\x86\x01\n\x0fGetGroupRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x11\n\tgroup_key\x18\x03 \x01(\t\x125\n\x0cread_options\x18\x04 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"K\n\x10GetGroupResponse\x12-\n\x05group\x18\x01 \x01(\x0b2\x19.personhog.types.v1.GroupH\x00\x88\x01\x01B\x08\n\x06_group"\x9a\x01\n\x10GetGroupsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12>\n\x11group_identifiers\x18\x02 \x03(\x0b2#.personhog.types.v1.GroupIdentifier\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"x\n\x0eGroupsResponse\x12)\n\x06groups\x18\x01 \x03(\x0b2\x19.personhog.types.v1.Group\x12;\n\x0emissing_groups\x18\x02 \x03(\x0b2#.personhog.types.v1.GroupIdentifier"z\n\x15GetGroupsBatchRequest\x12*\n\x04keys\x18\x01 \x03(\x0b2\x1c.personhog.types.v1.GroupKey\x125\n\x0cread_options\x18\x02 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"K\n\x16GetGroupsBatchResponse\x121\n\x07results\x18\x01 \x03(\x0b2 .personhog.types.v1.GroupWithKey"m\n#GetGroupTypeMappingsByTeamIdRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x125\n\x0cread_options\x18\x02 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"o\n$GetGroupTypeMappingsByTeamIdsRequest\x12\x10\n\x08team_ids\x18\x01 \x03(\x03\x125\n\x0cread_options\x18\x02 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"s\n&GetGroupTypeMappingsByProjectIdRequest\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x125\n\x0cread_options\x18\x02 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"u\n\'GetGroupTypeMappingsByProjectIdsRequest\x12\x13\n\x0bproject_ids\x18\x01 \x03(\x03\x125\n\x0cread_options\x18\x02 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"S\n\x19GroupTypeMappingsResponse\x126\n\x08mappings\x18\x01 \x03(\x0b2$.personhog.types.v1.GroupTypeMapping"]\n\x1eGroupTypeMappingsBatchResponse\x12;\n\x07results\x18\x01 \x03(\x0b2*.personhog.types.v1.GroupTypeMappingsByKey"V\n\x1dCountGroupTypeMappingsRequest\x125\n\x0cread_options\x18\x01 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"7\n\x15GroupTypeMappingCount\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05count\x18\x02 \x01(\x03"[\n\x1eCountGroupTypeMappingsResponse\x129\n\x06counts\x18\x01 \x03(\x0b2).personhog.types.v1.GroupTypeMappingCount"\x94\x01\n\x12CreateGroupRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x11\n\tgroup_key\x18\x03 \x01(\t\x12\x18\n\x10group_properties\x18\x04 \x01(\x0c\x12\x17\n\ncreated_at\x18\x05 \x01(\x03H\x00\x88\x01\x01B\r\n\x0b_created_at"?\n\x13CreateGroupResponse\x12(\n\x05group\x18\x01 \x01(\x0b2\x19.personhog.types.v1.Group"\xd1\x02\n\x12UpdateGroupRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x11\n\tgroup_key\x18\x03 \x01(\t\x12\x13\n\x0bupdate_mask\x18\x04 \x03(\t\x12\x1d\n\x10group_properties\x18\x05 \x01(\x0cH\x00\x88\x01\x01\x12\'\n\x1aproperties_last_updated_at\x18\x06 \x01(\x0cH\x01\x88\x01\x01\x12&\n\x19properties_last_operation\x18\x07 \x01(\x0cH\x02\x88\x01\x01\x12\x17\n\ncreated_at\x18\x08 \x01(\x03H\x03\x88\x01\x01B\x13\n\x11_group_propertiesB\x1d\n\x1b_properties_last_updated_atB\x1c\n\x1a_properties_last_operationB\r\n\x0b_created_at"P\n\x13UpdateGroupResponse\x12(\n\x05group\x18\x01 \x01(\x0b2\x19.personhog.types.v1.Group\x12\x0f\n\x07updated\x18\x02 \x01(\x08"F\n\x1fDeleteGroupsBatchForTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x03"9\n DeleteGroupsBatchForTeamResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"\xce\x02\n\x1dUpdateGroupTypeMappingRequest\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05\x12\x13\n\x0bupdate_mask\x18\x03 \x03(\t\x12\x1a\n\rname_singular\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bname_plural\x18\x05 \x01(\tH\x01\x88\x01\x01\x12 \n\x13detail_dashboard_id\x18\x06 \x01(\x03H\x02\x88\x01\x01\x12\x1c\n\x0fdefault_columns\x18\x07 \x01(\x0cH\x03\x88\x01\x01\x12\x17\n\ncreated_at\x18\x08 \x01(\x03H\x04\x88\x01\x01B\x10\n\x0e_name_singularB\x0e\n\x0c_name_pluralB\x16\n\x14_detail_dashboard_idB\x12\n\x10_default_columnsB\r\n\x0b_created_at"W\n\x1eUpdateGroupTypeMappingResponse\x125\n\x07mapping\x18\x01 \x01(\x0b2$.personhog.types.v1.GroupTypeMapping"\x87\x01\n\'GetGroupTypeMappingByDashboardIdRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cdashboard_id\x18\x02 \x01(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"r\n(GetGroupTypeMappingByDashboardIdResponse\x12:\n\x07mapping\x18\x01 \x01(\x0b2$.personhog.types.v1.GroupTypeMappingH\x00\x88\x01\x01B\n\n\x08_mapping"M\n\x1dDeleteGroupTypeMappingRequest\x12\x12\n\nproject_id\x18\x01 \x01(\x03\x12\x18\n\x10group_type_index\x18\x02 \x01(\x05"1\n\x1eDeleteGroupTypeMappingResponse\x12\x0f\n\x07deleted\x18\x01 \x01(\x08"Q\n*DeleteGroupTypeMappingsBatchForTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x03"D\n+DeleteGroupTypeMappingsBatchForTeamResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03b\x06proto3'
-)
-_globals = globals()
-_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "personhog.types.v1.group_pb2", _globals)
-if not _descriptor._USE_C_DESCRIPTORS:
- DESCRIPTOR._loaded_options = None
- _globals["_GROUP"]._serialized_start = 88
- _globals["_GROUP"]._serialized_end = 303
- _globals["_GROUPTYPEMAPPING"]._serialized_start = 306
- _globals["_GROUPTYPEMAPPING"]._serialized_end = 655
- _globals["_GROUPWITHKEY"]._serialized_start = 657
- _globals["_GROUPWITHKEY"]._serialized_end = 771
- _globals["_GROUPTYPEMAPPINGSBYKEY"]._serialized_start = 773
- _globals["_GROUPTYPEMAPPINGSBYKEY"]._serialized_end = 866
- _globals["_LISTGROUPSREQUEST"]._serialized_start = 869
- _globals["_LISTGROUPSREQUEST"]._serialized_end = 1094
- _globals["_LISTGROUPSRESPONSE"]._serialized_start = 1096
- _globals["_LISTGROUPSRESPONSE"]._serialized_end = 1177
- _globals["_GETGROUPREQUEST"]._serialized_start = 1180
- _globals["_GETGROUPREQUEST"]._serialized_end = 1314
- _globals["_GETGROUPRESPONSE"]._serialized_start = 1316
- _globals["_GETGROUPRESPONSE"]._serialized_end = 1391
- _globals["_GETGROUPSREQUEST"]._serialized_start = 1394
- _globals["_GETGROUPSREQUEST"]._serialized_end = 1548
- _globals["_GROUPSRESPONSE"]._serialized_start = 1550
- _globals["_GROUPSRESPONSE"]._serialized_end = 1670
- _globals["_GETGROUPSBATCHREQUEST"]._serialized_start = 1672
- _globals["_GETGROUPSBATCHREQUEST"]._serialized_end = 1794
- _globals["_GETGROUPSBATCHRESPONSE"]._serialized_start = 1796
- _globals["_GETGROUPSBATCHRESPONSE"]._serialized_end = 1871
- _globals["_GETGROUPTYPEMAPPINGSBYTEAMIDREQUEST"]._serialized_start = 1873
- _globals["_GETGROUPTYPEMAPPINGSBYTEAMIDREQUEST"]._serialized_end = 1982
- _globals["_GETGROUPTYPEMAPPINGSBYTEAMIDSREQUEST"]._serialized_start = 1984
- _globals["_GETGROUPTYPEMAPPINGSBYTEAMIDSREQUEST"]._serialized_end = 2095
- _globals["_GETGROUPTYPEMAPPINGSBYPROJECTIDREQUEST"]._serialized_start = 2097
- _globals["_GETGROUPTYPEMAPPINGSBYPROJECTIDREQUEST"]._serialized_end = 2212
- _globals["_GETGROUPTYPEMAPPINGSBYPROJECTIDSREQUEST"]._serialized_start = 2214
- _globals["_GETGROUPTYPEMAPPINGSBYPROJECTIDSREQUEST"]._serialized_end = 2331
- _globals["_GROUPTYPEMAPPINGSRESPONSE"]._serialized_start = 2333
- _globals["_GROUPTYPEMAPPINGSRESPONSE"]._serialized_end = 2416
- _globals["_GROUPTYPEMAPPINGSBATCHRESPONSE"]._serialized_start = 2418
- _globals["_GROUPTYPEMAPPINGSBATCHRESPONSE"]._serialized_end = 2511
- _globals["_COUNTGROUPTYPEMAPPINGSREQUEST"]._serialized_start = 2513
- _globals["_COUNTGROUPTYPEMAPPINGSREQUEST"]._serialized_end = 2599
- _globals["_GROUPTYPEMAPPINGCOUNT"]._serialized_start = 2601
- _globals["_GROUPTYPEMAPPINGCOUNT"]._serialized_end = 2656
- _globals["_COUNTGROUPTYPEMAPPINGSRESPONSE"]._serialized_start = 2658
- _globals["_COUNTGROUPTYPEMAPPINGSRESPONSE"]._serialized_end = 2749
- _globals["_CREATEGROUPREQUEST"]._serialized_start = 2752
- _globals["_CREATEGROUPREQUEST"]._serialized_end = 2900
- _globals["_CREATEGROUPRESPONSE"]._serialized_start = 2902
- _globals["_CREATEGROUPRESPONSE"]._serialized_end = 2965
- _globals["_UPDATEGROUPREQUEST"]._serialized_start = 2968
- _globals["_UPDATEGROUPREQUEST"]._serialized_end = 3305
- _globals["_UPDATEGROUPRESPONSE"]._serialized_start = 3307
- _globals["_UPDATEGROUPRESPONSE"]._serialized_end = 3387
- _globals["_DELETEGROUPSBATCHFORTEAMREQUEST"]._serialized_start = 3389
- _globals["_DELETEGROUPSBATCHFORTEAMREQUEST"]._serialized_end = 3459
- _globals["_DELETEGROUPSBATCHFORTEAMRESPONSE"]._serialized_start = 3461
- _globals["_DELETEGROUPSBATCHFORTEAMRESPONSE"]._serialized_end = 3518
- _globals["_UPDATEGROUPTYPEMAPPINGREQUEST"]._serialized_start = 3521
- _globals["_UPDATEGROUPTYPEMAPPINGREQUEST"]._serialized_end = 3855
- _globals["_UPDATEGROUPTYPEMAPPINGRESPONSE"]._serialized_start = 3857
- _globals["_UPDATEGROUPTYPEMAPPINGRESPONSE"]._serialized_end = 3944
- _globals["_GETGROUPTYPEMAPPINGBYDASHBOARDIDREQUEST"]._serialized_start = 3947
- _globals["_GETGROUPTYPEMAPPINGBYDASHBOARDIDREQUEST"]._serialized_end = 4082
- _globals["_GETGROUPTYPEMAPPINGBYDASHBOARDIDRESPONSE"]._serialized_start = 4084
- _globals["_GETGROUPTYPEMAPPINGBYDASHBOARDIDRESPONSE"]._serialized_end = 4198
- _globals["_DELETEGROUPTYPEMAPPINGREQUEST"]._serialized_start = 4200
- _globals["_DELETEGROUPTYPEMAPPINGREQUEST"]._serialized_end = 4277
- _globals["_DELETEGROUPTYPEMAPPINGRESPONSE"]._serialized_start = 4279
- _globals["_DELETEGROUPTYPEMAPPINGRESPONSE"]._serialized_end = 4328
- _globals["_DELETEGROUPTYPEMAPPINGSBATCHFORTEAMREQUEST"]._serialized_start = 4330
- _globals["_DELETEGROUPTYPEMAPPINGSBATCHFORTEAMREQUEST"]._serialized_end = 4411
- _globals["_DELETEGROUPTYPEMAPPINGSBATCHFORTEAMRESPONSE"]._serialized_start = 4413
- _globals["_DELETEGROUPTYPEMAPPINGSBATCHFORTEAMRESPONSE"]._serialized_end = 4481
diff --git a/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.py b/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.py
deleted file mode 100644
index 3a8ccbcb1c92..000000000000
--- a/posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.py
+++ /dev/null
@@ -1,124 +0,0 @@
-"""Generated protocol buffer code."""
-
-from google.protobuf import (
- descriptor as _descriptor,
- descriptor_pool as _descriptor_pool,
- runtime_version as _runtime_version,
- symbol_database as _symbol_database,
-)
-from google.protobuf.internal import builder as _builder
-
-_runtime_version.ValidateProtobufRuntimeVersion(
- _runtime_version.Domain.PUBLIC, 5, 29, 0, "", "personhog/types/v1/person.proto"
-)
-_sym_db = _symbol_database.Default()
-from ....personhog.types.v1 import common_pb2 as personhog_dot_types_dot_v1_dot_common__pb2
-
-DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
- b'\n\x1fpersonhog/types/v1/person.proto\x12\x12personhog.types.v1\x1a\x1fpersonhog/types/v1/common.proto"\xb2\x02\n\x06Person\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x12\x0f\n\x07team_id\x18\x03 \x01(\x03\x12\x12\n\nproperties\x18\x04 \x01(\x0c\x12"\n\x1aproperties_last_updated_at\x18\x05 \x01(\x0c\x12!\n\x19properties_last_operation\x18\x06 \x01(\x0c\x12\x12\n\ncreated_at\x18\x07 \x01(\x03\x12\x0f\n\x07version\x18\x08 \x01(\x03\x12\x15\n\ris_identified\x18\t \x01(\x08\x12\x17\n\nis_user_id\x18\n \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0clast_seen_at\x18\x0b \x01(\x03H\x01\x88\x01\x01\x12\x12\n\nis_deleted\x18\x0c \x01(\x08B\r\n\x0b_is_user_idB\x0f\n\r_last_seen_at"f\n\x15DistinctIdWithVersion\x12\x13\n\x0bdistinct_id\x18\x01 \x01(\t\x12\x14\n\x07version\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x0f\n\x02id\x18\x03 \x01(\x03H\x01\x88\x01\x01B\n\n\x08_versionB\x05\n\x03_id"h\n\x15PersonWithDistinctIds\x12\x13\n\x0bdistinct_id\x18\x01 \x01(\t\x12/\n\x06person\x18\x02 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"g\n\x11PersonDistinctIds\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12?\n\x0cdistinct_ids\x18\x02 \x03(\x0b2).personhog.types.v1.DistinctIdWithVersion"\x87\x01\n\x18PersonWithTeamDistinctId\x12/\n\x03key\x18\x01 \x01(\x0b2".personhog.types.v1.TeamDistinctId\x12/\n\x06person\x18\x02 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"m\n\x10GetPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"O\n\x11GetPersonResponse\x12/\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"o\n\x11GetPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nperson_ids\x18\x02 \x03(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"S\n\x0fPersonsResponse\x12+\n\x07persons\x18\x01 \x03(\x0b2\x1a.personhog.types.v1.Person\x12\x13\n\x0bmissing_ids\x18\x02 \x03(\x03"n\n\x16GetPersonByUuidRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x0c\n\x04uuid\x18\x02 \x01(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"q\n\x18GetPersonsByUuidsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05uuids\x18\x02 \x03(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"{\n\x1cGetPersonByDistinctIdRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x13\n\x0bdistinct_id\x18\x02 \x01(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"\x84\x01\n$GetPersonsByDistinctIdsInTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cdistinct_ids\x18\x02 \x03(\t\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"`\n"PersonsByDistinctIdsInTeamResponse\x12:\n\x07results\x18\x01 \x03(\x0b2).personhog.types.v1.PersonWithDistinctIds"\x96\x01\n\x1eGetPersonsByDistinctIdsRequest\x12=\n\x11team_distinct_ids\x18\x01 \x03(\x0b2".personhog.types.v1.TeamDistinctId\x125\n\x0cread_options\x18\x02 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions"]\n\x1cPersonsByDistinctIdsResponse\x12=\n\x07results\x18\x01 \x03(\x0b2,.personhog.types.v1.PersonWithTeamDistinctId"\xbf\x01\n\x1eGetDistinctIdsForPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions\x12\x12\n\x05limit\x18\x04 \x01(\x03H\x00\x88\x01\x01\x12\x16\n\tcursor_id\x18\x05 \x01(\x03H\x01\x88\x01\x01B\x08\n\x06_limitB\x0c\n\n_cursor_id"\x92\x01\n\x1fGetDistinctIdsForPersonResponse\x12?\n\x0cdistinct_ids\x18\x01 \x03(\x0b2).personhog.types.v1.DistinctIdWithVersion\x12\x1b\n\x0enext_cursor_id\x18\x02 \x01(\x03H\x00\x88\x01\x01B\x11\n\x0f_next_cursor_id"\xb1\x01\n\x1fGetDistinctIdsForPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nperson_ids\x18\x02 \x03(\x03\x125\n\x0cread_options\x18\x03 \x01(\x0b2\x1f.personhog.types.v1.ReadOptions\x12\x1d\n\x10limit_per_person\x18\x04 \x01(\x03H\x00\x88\x01\x01B\x13\n\x11_limit_per_person"f\n GetDistinctIdsForPersonsResponse\x12B\n\x13person_distinct_ids\x18\x01 \x03(\x0b2%.personhog.types.v1.PersonDistinctIds"\x96\x02\n\x1dUpdatePersonPropertiesRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x12\n\nevent_name\x18\x03 \x01(\t\x12\x16\n\x0eset_properties\x18\x04 \x01(\x0c\x12\x1b\n\x13set_once_properties\x18\x05 \x01(\x0c\x12\x18\n\x10unset_properties\x18\x06 \x03(\t\x12\x1a\n\ris_identified\x18\x07 \x01(\x08H\x00\x88\x01\x01\x12\x19\n\x0clast_seen_at\x18\x08 \x01(\x03H\x01\x88\x01\x01\x12\x14\n\x0cforce_update\x18\t \x01(\x08B\x10\n\x0e_is_identifiedB\x0f\n\r_last_seen_at"m\n\x1eUpdatePersonPropertiesResponse\x12/\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01\x12\x0f\n\x07updated\x18\x02 \x01(\x08B\t\n\x07_person"=\n\x14DeletePersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cperson_uuids\x18\x02 \x03(\t".\n\x15DeletePersonsResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"G\n DeletePersonsBatchForTeamRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x12\n\nbatch_size\x18\x02 \x01(\x03":\n!DeletePersonsBatchForTeamResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03"Y\n\x1eDeleteTombstonedPersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x14\n\x0cperson_uuids\x18\x02 \x03(\t\x12\x10\n\x08max_rows\x18\x03 \x01(\x03"\xa6\x01\n\x1fDeleteTombstonedPersonsResponse\x12\x15\n\rdeleted_count\x18\x01 \x01(\x03\x12\x1a\n\x12skipped_live_count\x18\x02 \x01(\x03\x12\x1c\n\x14blocked_person_uuids\x18\x03 \x03(\t\x12\x1c\n\x14pending_person_uuids\x18\x04 \x03(\t\x12\x14\n\x0crows_deleted\x18\x05 \x01(\x03"W\n\x12SplitPersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x1d\n\x15distinct_ids_to_split\x18\x03 \x03(\t"\x8e\x01\n\x0bSplitResult\x12\x13\n\x0bdistinct_id\x18\x01 \x01(\t\x12\x17\n\x0fnew_person_uuid\x18\x02 \x01(\t\x12\x1a\n\x12new_person_version\x18\x03 \x01(\x03\x12\x13\n\x0bpdi_version\x18\x04 \x01(\x03\x12 \n\x18new_person_created_at_ms\x18\x05 \x01(\x03"F\n\x13SplitPersonResponse\x12/\n\x06splits\x18\x01 \x03(\x0b2\x1f.personhog.types.v1.SplitResult"c\n&SetPersonDistinctIdVersionFloorRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x13\n\x0bdistinct_id\x18\x02 \x01(\t\x12\x13\n\x0bmin_version\x18\x03 \x01(\x03"e\n\'SetPersonDistinctIdVersionFloorResponse\x12/\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.PersonH\x00\x88\x01\x01B\t\n\x07_person"W\n\x1cSetPersonVersionFloorRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x13\n\x0bmin_version\x18\x03 \x01(\x03"0\n\x1dSetPersonVersionFloorResponse\x12\x0f\n\x07updated\x18\x01 \x01(\x08"}\n\x12FencePersonRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\r\n\x05op_id\x18\x03 \x01(\t\x124\n\x07op_type\x18\x04 \x01(\x0e2#.personhog.types.v1.LifecycleOpType"A\n\x13FencePersonResponse\x12*\n\x06sealed\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.Person"\x7f\n\x13FencePersonsRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05op_id\x18\x02 \x01(\t\x124\n\x07op_type\x18\x03 \x01(\x0e2#.personhog.types.v1.LifecycleOpType\x12\x12\n\nperson_ids\x18\x04 \x03(\x03"_\n\x14FencePersonsResponse\x124\n\x06sealed\x18\x01 \x03(\x0b2$.personhog.types.v1.FencedPersonSeal\x12\x11\n\tnot_found\x18\x02 \x03(\x03"J\n\x10FencedPersonSeal\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x0f\n\x07version\x18\x02 \x01(\x03\x12\x12\n\ncreated_at\x18\x03 \x01(\x03"\xd6\x01\n\x13ReleaseFenceRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12\x13\n\x0bperson_uuid\x18\x03 \x01(\t\x12\r\n\x05op_id\x18\x04 \x01(\t\x123\n\x07outcome\x18\x05 \x01(\x0e2".personhog.types.v1.ReleaseOutcome\x12\x1b\n\x0esealed_version\x18\x06 \x01(\x03H\x00\x88\x01\x01\x12\x12\n\ncreated_at\x18\x07 \x01(\x03B\x11\n\x0f_sealed_version"\x16\n\x14ReleaseFenceResponse"\xa2\x01\n\x14ReleaseFencesRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\r\n\x05op_id\x18\x02 \x01(\t\x123\n\x07outcome\x18\x03 \x01(\x0e2".personhog.types.v1.ReleaseOutcome\x125\n\x07persons\x18\x04 \x03(\x0b2$.personhog.types.v1.ReleaseFenceItem"~\n\x10ReleaseFenceItem\x12\x11\n\tperson_id\x18\x01 \x01(\x03\x12\x13\n\x0bperson_uuid\x18\x02 \x01(\t\x12\x1b\n\x0esealed_version\x18\x03 \x01(\x03H\x00\x88\x01\x01\x12\x12\n\ncreated_at\x18\x04 \x01(\x03B\x11\n\x0f_sealed_version"\x17\n\x15ReleaseFencesResponse"S\n\x14SealedSourceSnapshot\x12*\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.Person\x12\x0f\n\x07ordinal\x18\x02 \x01(\x05"\xbd\x01\n\x19FoldPersonDocumentRequest\x12\x0f\n\x07team_id\x18\x01 \x01(\x03\x12\x11\n\tperson_id\x18\x02 \x01(\x03\x12B\n\x10sealed_snapshots\x18\x03 \x03(\x0b2(.personhog.types.v1.SealedSourceSnapshot\x12\x11\n\tevent_set\x18\x04 \x01(\x0c\x12\x16\n\x0eevent_set_once\x18\x05 \x01(\x0c\x12\r\n\x05op_id\x18\x06 \x01(\t"H\n\x1aFoldPersonDocumentResponse\x12*\n\x06person\x18\x01 \x01(\x0b2\x1a.personhog.types.v1.Person*o\n\x0fLifecycleOpType\x12!\n\x1dLIFECYCLE_OP_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18LIFECYCLE_OP_TYPE_DELETE\x10\x01\x12\x1b\n\x17LIFECYCLE_OP_TYPE_MERGE\x10\x02*m\n\x0eReleaseOutcome\x12\x1f\n\x1bRELEASE_OUTCOME_UNSPECIFIED\x10\x00\x12\x1d\n\x19RELEASE_OUTCOME_COMMITTED\x10\x01\x12\x1b\n\x17RELEASE_OUTCOME_ABORTED\x10\x02b\x06proto3'
-)
-_globals = globals()
-_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
-_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "personhog.types.v1.person_pb2", _globals)
-if not _descriptor._USE_C_DESCRIPTORS:
- DESCRIPTOR._loaded_options = None
- _globals["_LIFECYCLEOPTYPE"]._serialized_start = 5651
- _globals["_LIFECYCLEOPTYPE"]._serialized_end = 5762
- _globals["_RELEASEOUTCOME"]._serialized_start = 5764
- _globals["_RELEASEOUTCOME"]._serialized_end = 5873
- _globals["_PERSON"]._serialized_start = 89
- _globals["_PERSON"]._serialized_end = 395
- _globals["_DISTINCTIDWITHVERSION"]._serialized_start = 397
- _globals["_DISTINCTIDWITHVERSION"]._serialized_end = 499
- _globals["_PERSONWITHDISTINCTIDS"]._serialized_start = 501
- _globals["_PERSONWITHDISTINCTIDS"]._serialized_end = 605
- _globals["_PERSONDISTINCTIDS"]._serialized_start = 607
- _globals["_PERSONDISTINCTIDS"]._serialized_end = 710
- _globals["_PERSONWITHTEAMDISTINCTID"]._serialized_start = 713
- _globals["_PERSONWITHTEAMDISTINCTID"]._serialized_end = 848
- _globals["_GETPERSONREQUEST"]._serialized_start = 850
- _globals["_GETPERSONREQUEST"]._serialized_end = 959
- _globals["_GETPERSONRESPONSE"]._serialized_start = 961
- _globals["_GETPERSONRESPONSE"]._serialized_end = 1040
- _globals["_GETPERSONSREQUEST"]._serialized_start = 1042
- _globals["_GETPERSONSREQUEST"]._serialized_end = 1153
- _globals["_PERSONSRESPONSE"]._serialized_start = 1155
- _globals["_PERSONSRESPONSE"]._serialized_end = 1238
- _globals["_GETPERSONBYUUIDREQUEST"]._serialized_start = 1240
- _globals["_GETPERSONBYUUIDREQUEST"]._serialized_end = 1350
- _globals["_GETPERSONSBYUUIDSREQUEST"]._serialized_start = 1352
- _globals["_GETPERSONSBYUUIDSREQUEST"]._serialized_end = 1465
- _globals["_GETPERSONBYDISTINCTIDREQUEST"]._serialized_start = 1467
- _globals["_GETPERSONBYDISTINCTIDREQUEST"]._serialized_end = 1590
- _globals["_GETPERSONSBYDISTINCTIDSINTEAMREQUEST"]._serialized_start = 1593
- _globals["_GETPERSONSBYDISTINCTIDSINTEAMREQUEST"]._serialized_end = 1725
- _globals["_PERSONSBYDISTINCTIDSINTEAMRESPONSE"]._serialized_start = 1727
- _globals["_PERSONSBYDISTINCTIDSINTEAMRESPONSE"]._serialized_end = 1823
- _globals["_GETPERSONSBYDISTINCTIDSREQUEST"]._serialized_start = 1826
- _globals["_GETPERSONSBYDISTINCTIDSREQUEST"]._serialized_end = 1976
- _globals["_PERSONSBYDISTINCTIDSRESPONSE"]._serialized_start = 1978
- _globals["_PERSONSBYDISTINCTIDSRESPONSE"]._serialized_end = 2071
- _globals["_GETDISTINCTIDSFORPERSONREQUEST"]._serialized_start = 2074
- _globals["_GETDISTINCTIDSFORPERSONREQUEST"]._serialized_end = 2265
- _globals["_GETDISTINCTIDSFORPERSONRESPONSE"]._serialized_start = 2268
- _globals["_GETDISTINCTIDSFORPERSONRESPONSE"]._serialized_end = 2414
- _globals["_GETDISTINCTIDSFORPERSONSREQUEST"]._serialized_start = 2417
- _globals["_GETDISTINCTIDSFORPERSONSREQUEST"]._serialized_end = 2594
- _globals["_GETDISTINCTIDSFORPERSONSRESPONSE"]._serialized_start = 2596
- _globals["_GETDISTINCTIDSFORPERSONSRESPONSE"]._serialized_end = 2698
- _globals["_UPDATEPERSONPROPERTIESREQUEST"]._serialized_start = 2701
- _globals["_UPDATEPERSONPROPERTIESREQUEST"]._serialized_end = 2979
- _globals["_UPDATEPERSONPROPERTIESRESPONSE"]._serialized_start = 2981
- _globals["_UPDATEPERSONPROPERTIESRESPONSE"]._serialized_end = 3090
- _globals["_DELETEPERSONSREQUEST"]._serialized_start = 3092
- _globals["_DELETEPERSONSREQUEST"]._serialized_end = 3153
- _globals["_DELETEPERSONSRESPONSE"]._serialized_start = 3155
- _globals["_DELETEPERSONSRESPONSE"]._serialized_end = 3201
- _globals["_DELETEPERSONSBATCHFORTEAMREQUEST"]._serialized_start = 3203
- _globals["_DELETEPERSONSBATCHFORTEAMREQUEST"]._serialized_end = 3274
- _globals["_DELETEPERSONSBATCHFORTEAMRESPONSE"]._serialized_start = 3276
- _globals["_DELETEPERSONSBATCHFORTEAMRESPONSE"]._serialized_end = 3334
- _globals["_DELETETOMBSTONEDPERSONSREQUEST"]._serialized_start = 3336
- _globals["_DELETETOMBSTONEDPERSONSREQUEST"]._serialized_end = 3425
- _globals["_DELETETOMBSTONEDPERSONSRESPONSE"]._serialized_start = 3428
- _globals["_DELETETOMBSTONEDPERSONSRESPONSE"]._serialized_end = 3594
- _globals["_SPLITPERSONREQUEST"]._serialized_start = 3596
- _globals["_SPLITPERSONREQUEST"]._serialized_end = 3683
- _globals["_SPLITRESULT"]._serialized_start = 3686
- _globals["_SPLITRESULT"]._serialized_end = 3828
- _globals["_SPLITPERSONRESPONSE"]._serialized_start = 3830
- _globals["_SPLITPERSONRESPONSE"]._serialized_end = 3900
- _globals["_SETPERSONDISTINCTIDVERSIONFLOORREQUEST"]._serialized_start = 3902
- _globals["_SETPERSONDISTINCTIDVERSIONFLOORREQUEST"]._serialized_end = 4001
- _globals["_SETPERSONDISTINCTIDVERSIONFLOORRESPONSE"]._serialized_start = 4003
- _globals["_SETPERSONDISTINCTIDVERSIONFLOORRESPONSE"]._serialized_end = 4104
- _globals["_SETPERSONVERSIONFLOORREQUEST"]._serialized_start = 4106
- _globals["_SETPERSONVERSIONFLOORREQUEST"]._serialized_end = 4193
- _globals["_SETPERSONVERSIONFLOORRESPONSE"]._serialized_start = 4195
- _globals["_SETPERSONVERSIONFLOORRESPONSE"]._serialized_end = 4243
- _globals["_FENCEPERSONREQUEST"]._serialized_start = 4245
- _globals["_FENCEPERSONREQUEST"]._serialized_end = 4370
- _globals["_FENCEPERSONRESPONSE"]._serialized_start = 4372
- _globals["_FENCEPERSONRESPONSE"]._serialized_end = 4437
- _globals["_FENCEPERSONSREQUEST"]._serialized_start = 4439
- _globals["_FENCEPERSONSREQUEST"]._serialized_end = 4566
- _globals["_FENCEPERSONSRESPONSE"]._serialized_start = 4568
- _globals["_FENCEPERSONSRESPONSE"]._serialized_end = 4663
- _globals["_FENCEDPERSONSEAL"]._serialized_start = 4665
- _globals["_FENCEDPERSONSEAL"]._serialized_end = 4739
- _globals["_RELEASEFENCEREQUEST"]._serialized_start = 4742
- _globals["_RELEASEFENCEREQUEST"]._serialized_end = 4956
- _globals["_RELEASEFENCERESPONSE"]._serialized_start = 4958
- _globals["_RELEASEFENCERESPONSE"]._serialized_end = 4980
- _globals["_RELEASEFENCESREQUEST"]._serialized_start = 4983
- _globals["_RELEASEFENCESREQUEST"]._serialized_end = 5145
- _globals["_RELEASEFENCEITEM"]._serialized_start = 5147
- _globals["_RELEASEFENCEITEM"]._serialized_end = 5273
- _globals["_RELEASEFENCESRESPONSE"]._serialized_start = 5275
- _globals["_RELEASEFENCESRESPONSE"]._serialized_end = 5298
- _globals["_SEALEDSOURCESNAPSHOT"]._serialized_start = 5300
- _globals["_SEALEDSOURCESNAPSHOT"]._serialized_end = 5383
- _globals["_FOLDPERSONDOCUMENTREQUEST"]._serialized_start = 5386
- _globals["_FOLDPERSONDOCUMENTREQUEST"]._serialized_end = 5575
- _globals["_FOLDPERSONDOCUMENTRESPONSE"]._serialized_start = 5577
- _globals["_FOLDPERSONDOCUMENTRESPONSE"]._serialized_end = 5649
diff --git a/posthog/personhog_client/test_fake_client.py b/posthog/personhog_client/test_fake_client.py
index d8b6779984dc..96033d75c688 100644
--- a/posthog/personhog_client/test_fake_client.py
+++ b/posthog/personhog_client/test_fake_client.py
@@ -2,8 +2,9 @@ import json
import pytest
+from personhog.types.v1 import cohort_pb2, common_pb2, group_pb2, person_pb2
+
from posthog.personhog_client.fake_client import FakePersonHogClient, fake_personhog_client
-from posthog.personhog_client.proto.generated.personhog.types.v1 import cohort_pb2, common_pb2, group_pb2, person_pb2
class TestFakePersonHogClientPersons:
diff --git a/posthog/test/persons.py b/posthog/test/persons.py
index 86c74d9c66ed..7e868814e608 100644
--- a/posthog/test/persons.py
+++ b/posthog/test/persons.py
@@ -159,7 +159,7 @@ def _seed_distinct_id_into_fake(team_id: int, person_id: int, distinct_id: str,
if fake is None:
return
- from posthog.personhog_client.proto.generated.personhog.types.v1 import person_pb2 # noqa: PLC0415
+ from personhog.types.v1 import person_pb2 # noqa: PLC0415
person_proto = fake._persons_by_id.get((team_id, person_id))
if person_proto is None:
@@ -414,7 +414,7 @@ def delete_person(person: Person) -> None:
fake = _get_active_fake()
if fake is None:
return
- from posthog.personhog_client.proto.generated.personhog.types.v1 import person_pb2 # noqa: PLC0415
+ from personhog.types.v1 import person_pb2 # noqa: PLC0415
dids_with_version = list(fake._distinct_ids.get((person.team_id, person.pk), []))
_ch_create_person(
diff --git a/proto/README.md b/proto/README.md
index b4eaac163ccf..52894b4c5bdf 100644
--- a/proto/README.md
+++ b/proto/README.md
@@ -24,14 +24,14 @@ proto/
## Consumers
-| Proto | Rust | Python | Node.js |
-| ------------------ | ---------------------------------------------- | -------------------------------------------------------- | ----------------------------------------------------------- |
-| `cymbal/` | `rust/cymbal-proto` (auto via tonic) | — | — |
-| `ingestion/` | `rust/ingestion-worker-proto` (auto via tonic) | — | `nodejs/src/common/generated/ingestion-worker` (checked in) |
-| `personhog/` | `rust/personhog-proto` (auto via tonic) | `posthog/personhog_client/proto/generated/` (checked in) | `nodejs/src/common/generated/personhog` (checked in) |
-| `kafka_assigner/` | `rust/kafka-assigner-proto` (auto via tonic) | — | — |
-| `prometheus/` | `rust/prometheus-rw-proto` (auto via tonic) | — | — |
-| `usage_ingestion/` | `rust/usage-ingestion-proto` (auto via tonic) | — | `nodejs/src/common/generated/usage-ingestion` (checked in) |
+| Proto | Rust | Python | Node.js |
+| ------------------ | ---------------------------------------------- | ---------------------------------------- | ----------------------------------------------------------- |
+| `cymbal/` | `rust/cymbal-proto` (auto via tonic) | — | — |
+| `ingestion/` | `rust/ingestion-worker-proto` (auto via tonic) | — | `nodejs/src/common/generated/ingestion-worker` (checked in) |
+| `personhog/` | `rust/personhog-proto` (auto via tonic) | `packages/personhog-proto/` (checked in) | `nodejs/src/common/generated/personhog` (checked in) |
+| `kafka_assigner/` | `rust/kafka-assigner-proto` (auto via tonic) | — | — |
+| `prometheus/` | `rust/prometheus-rw-proto` (auto via tonic) | — | — |
+| `usage_ingestion/` | `rust/usage-ingestion-proto` (auto via tonic) | — | `nodejs/src/common/generated/usage-ingestion` (checked in) |
## Updating protos
@@ -45,7 +45,7 @@ proto/
bin/generate_personhog_proto.sh
```
-Only needed when `personhog/` protos change. Requires `grpcio-tools` and `protoletariat` (`uv sync`).
+Only needed when `personhog/` protos change. Requires `grpcio-tools` (`uv sync`).
If you added or removed **message types**, update the re-exports in `posthog/personhog_client/proto/__init__.py`.
If you added or removed **RPCs**, update the wrapper methods in `posthog/personhog_client/client.py`.
diff --git a/pyproject.toml b/pyproject.toml
index 1f11662c88e3..e9e114a9284f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -151,6 +151,7 @@ dependencies = [
# reads a repo's team -> Slack channel registry through it (products/stamphog/backend/logic/
# channel_resolution.py). Adds no third-party code — its own deps, pyyaml and click, are here.
"owners-yaml",
+ "personhog-proto",
"umap-learn~=0.5.0",
"tbb==2022.3.1; sys_platform == 'linux' and platform_machine == 'x86_64'",
"whitenoise~=6.10.0",
@@ -212,6 +213,7 @@ dependencies = [
[dependency-groups]
dev = [
+ { include-group = "proto-codegen" },
"aioresponses==0.7.6",
"autoevals==0.2.0",
"boto3-stubs[s3]~=1.38.30",
@@ -236,8 +238,6 @@ dev = [
"pyinstrument~=5.1",
"pytest-rerunfailures~=16.1",
"time-machine==3.5.0",
- "grpcio-tools~=1.71.0",
- "protoletariat~=3.3.10",
"ipython~=9.3.0",
"mypy~=2.1.0",
"mypy-extensions~=1.1.0",
@@ -265,7 +265,6 @@ dev = [
"python-dateutil~=2.9.0",
"requests-mock~=1.12.1",
"responses==0.23.1",
- "ruff~=0.15.20",
"stpyv8==13.1.201.22; sys_platform != 'linux' or (platform_machine != 'aarch64' and platform_machine != 'arm64')",
"syrupy~=4.9.1",
"tach~=0.34",
@@ -298,6 +297,10 @@ sentiment = [
hogql-parser-parity = [
"shrinkray==26.4.14.0",
]
+proto-codegen = [
+ "grpcio-tools~=1.71.0",
+ "ruff~=0.15.20",
+]
[tool.uv]
required-version = ">=0.10.2"
@@ -311,11 +314,12 @@ exclude-newer = "7 days"
exclude-newer-package = { granian = false, hogql-parser = false, hogql-parser-rs = false, deltalite = false, posthoganalytics = false, pixelhog = false, django = false, modal = false, posthog-hogland = false, google-ads = false }
[tool.uv.workspace]
-members = ["tools/hogli", "packages/owners-yaml"]
+members = ["tools/hogli", "packages/owners-yaml", "packages/personhog-proto"]
[tool.uv.sources]
hogli = { workspace = true }
owners-yaml = { workspace = true }
+personhog-proto = { workspace = true }
infi-clickhouse-orm = { git = "https://github.com/PostHog/infi.clickhouse_orm", rev = "4e3996becf66bf5c26580aff12a80425d9d56fe5" }
# pytest-split: pinned to PostHog's fork (immutable tag) for the order-preserving
# optimal_chunks split. Fork: PostHog/pytest-split (of jerry-git/pytest-split).
@@ -392,12 +396,9 @@ select = [
]
[tool.ruff.lint.per-file-ignores]
-# protoletariat generates .pyi stubs with re-exports (e.g. `from . import person_pb2`)
-# that type checkers need to resolve the package structure.
-# protobuf 5.x _pb2.py files have side-effect-only imports that load dependency
-# descriptors into the pool before AddSerializedFile() — ruff must not strip them.
-"posthog/personhog_client/proto/generated/**/*.pyi" = ["F401"]
-"posthog/personhog_client/proto/generated/**/*_pb2.py" = ["F401", "E402"]
+# protoc's _pb2.py files import dependencies for the side effect of loading their descriptors
+# into the pool before AddSerializedFile(). ruff must not strip or move those imports.
+"packages/personhog-proto/**/*_pb2.py" = ["F401", "E402"]
# deltalite's test suite bootstraps its harness/planner via sys.path (the package is a
# maturin-built extension living under rust/, not part of the Django app), so imports
# are necessarily lazy / post-path-insert (PLC0415, E402); the planner's small CLI
@@ -498,7 +499,7 @@ exclude_gitignore = true
# packages/owners-yaml: a standalone distribution that must build and run with no Django. This config
# loads the Django and DRF plugins and the app's settings, so it is the wrong checker for it. ty
# covers it repo-wide instead, and ci-python builds and exercises the wheel in an empty venv.
-exclude = ["^(bin/.*|tools/.*|packages/owners-yaml/.*|rust/deltalite/python/.*|products/desktop/.*|products/stamphog/packages/.*|products/[^/]+/skills/[^/]+/scripts/.*|gunicorn\\.config\\.py|manage\\.py|conftest\\.py)$"]
+exclude = ["^(bin/.*|tools/.*|packages/owners-yaml/.*|packages/personhog-proto/.*|rust/deltalite/python/.*|products/desktop/.*|products/stamphog/packages/.*|products/[^/]+/skills/[^/]+/scripts/.*|gunicorn\\.config\\.py|manage\\.py|conftest\\.py)$"]
[[tool.mypy.overrides]]
module = "bin.*"
@@ -535,7 +536,7 @@ exclude = [
"bin/**",
"manage.py",
"posthog/hogql/grammar/**",
- "posthog/personhog_client/proto/generated/**",
+ "packages/personhog-proto/**",
"posthog/schema.py",
"posthog/schema_enums.py",
"posthog/temporal/proxy_service/proto/**",
diff --git a/pytest.ini b/pytest.ini
index 4a0a0de20eaf..d8700749c64a 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,5 +1,5 @@
[pytest]
-pythonpath = . common tools/hogli-commands tools/query-performance-ai
+pythonpath = . common tools/hogli-commands tools/query-performance-ai packages/personhog-proto
env =
DEBUG=1
TEST=1
diff --git a/tools/hogbox-preview/hogbox_preview/stack.py b/tools/hogbox-preview/hogbox_preview/stack.py
index 0dfc6026f03e..e0eb8a6c9267 100644
--- a/tools/hogbox-preview/hogbox_preview/stack.py
+++ b/tools/hogbox-preview/hogbox_preview/stack.py
@@ -111,7 +111,15 @@ class PostHogPreviewStack:
BUILD_SERVICES = ["web", "temporal-django-worker"]
# PR backend source bind-mounted over the image's /code (backend hot-mount).
# The frontend stays baked in the image; mounting these swaps backend live.
- MOUNTS = [("posthog", "/code/posthog"), ("ee", "/code/ee"), ("products", "/code/products")]
+ # The personhog gRPC stubs are installed into the image's site-packages, not copied under
+ # /code. /code comes first on sys.path, so the PR's copy mounted there shadows the image's
+ # and a PR that changes a proto runs against its own stubs.
+ MOUNTS = [
+ ("posthog", "/code/posthog"),
+ ("ee", "/code/ee"),
+ ("products", "/code/products"),
+ ("packages/personhog-proto/personhog", "/code/personhog"),
+ ]
def __init__(
self,
diff --git a/tools/snob_backend_test_selection_shadow.py b/tools/snob_backend_test_selection_shadow.py
index eaff57330a8a..fa674ec4a05f 100755
--- a/tools/snob_backend_test_selection_shadow.py
+++ b/tools/snob_backend_test_selection_shadow.py
@@ -96,6 +96,9 @@ FULL_RUN_PATTERNS = (
"common/hogql_parser/",
"rust/hogql/parser/",
"common/hogvm/",
+ # The personhog gRPC stubs are an installed package, so the import graph has no edge from
+ # `personhog.*` to these files. Every personhog_client consumer depends on them.
+ "packages/personhog-proto/",
# Generates frontend/src/products.json, which is a full-run pattern in its own right.
"manifest.tsx",
)
diff --git a/tools/test_snob_backend_test_selection_shadow.py b/tools/test_snob_backend_test_selection_shadow.py
index 715a1c2cd7d0..12ef54c3f0b1 100644
--- a/tools/test_snob_backend_test_selection_shadow.py
+++ b/tools/test_snob_backend_test_selection_shadow.py
@@ -297,6 +297,7 @@ class TestSnobBackendTestSelectionShadow(unittest.TestCase):
("hogql_parser_sources", "common/hogql_parser/HogQLParser.cpp"),
("hogql_parser_rs_sources", "rust/hogql/parser/src/lib.rs"),
("hogvm", "common/hogvm/python/execute.py"),
+ ("personhog_stubs", "packages/personhog-proto/personhog/types/v1/person_pb2.py"),
("product_manifest", "products/surveys/manifest.tsx"),
]
)
diff --git a/uv.lock b/uv.lock
index 459331d735c8..c6cb3a58f60c 100644
--- a/uv.lock
+++ b/uv.lock
@@ -30,6 +30,7 @@ posthoganalytics = false
members = [
"hogli",
"owners-yaml",
+ "personhog-proto",
"posthog",
]
@@ -5406,6 +5407,21 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/6e/23/e98758924d1b3aac11a626268eabf7f3cf177e7837c28d47bf84c64532d0/pendulum-3.1.0-py3-none-any.whl", hash = "sha256:f9178c2a8e291758ade1e8dd6371b1d26d08371b4c7730a6e9a3ef8b16ebae0f", size = 111799, upload-time = "2025-04-19T14:02:34.739Z" },
]
+[[package]]
+name = "personhog-proto"
+version = "0.1.0"
+source = { editable = "packages/personhog-proto" }
+dependencies = [
+ { name = "grpcio" },
+ { name = "protobuf" },
+]
+
+[package.metadata]
+requires-dist = [
+ { name = "grpcio" },
+ { name = "protobuf" },
+]
+
[[package]]
name = "pex"
version = "2.42.2"
@@ -5708,6 +5724,7 @@ dependencies = [
{ name = "owners-yaml" },
{ name = "pandas" },
{ name = "paramiko" },
+ { name = "personhog-proto" },
{ name = "pillow" },
{ name = "pixelhog" },
{ name = "playwright" },
@@ -5805,7 +5822,6 @@ dev = [
{ name = "packaging" },
{ name = "parameterized" },
{ name = "prance" },
- { name = "protoletariat" },
{ name = "pyarrow" },
{ name = "pyarrow-stubs" },
{ name = "pyinstrument" },
@@ -5852,6 +5868,10 @@ dev = [
hogql-parser-parity = [
{ name = "shrinkray" },
]
+proto-codegen = [
+ { name = "grpcio-tools" },
+ { name = "ruff" },
+]
sentiment = [
{ name = "optimum", extra = ["onnxruntime"] },
{ name = "torch" },
@@ -5991,6 +6011,7 @@ requires-dist = [
{ name = "owners-yaml", editable = "packages/owners-yaml" },
{ name = "pandas", specifier = "~=2.3.3" },
{ name = "paramiko", specifier = "~=3.5.0" },
+ { name = "personhog-proto", editable = "packages/personhog-proto" },
{ name = "pillow", specifier = "==12.3.0" },
{ name = "pixelhog", specifier = "~=1.3.1" },
{ name = "playwright", specifier = "~=1.60.0" },
@@ -6088,7 +6109,6 @@ dev = [
{ name = "packaging", specifier = "==24.1" },
{ name = "parameterized", specifier = "==0.9.0" },
{ name = "prance", specifier = "==23.6.21.0" },
- { name = "protoletariat", specifier = "~=3.3.10" },
{ name = "pyarrow", specifier = "==23.0.1" },
{ name = "pyarrow-stubs", specifier = "==20.0.0.20260625" },
{ name = "pyinstrument", specifier = "~=5.1" },
@@ -6133,6 +6153,10 @@ dev = [
{ name = "watchdog", specifier = "==5.0.3" },
]
hogql-parser-parity = [{ name = "shrinkray", specifier = "==26.4.14.0" }]
+proto-codegen = [
+ { name = "grpcio-tools", specifier = "~=1.71.0" },
+ { name = "ruff", specifier = "~=0.15.20" },
+]
sentiment = [
{ name = "optimum", extras = ["onnxruntime"], specifier = "~=1.25.0" },
{ name = "torch", specifier = "~=2.9.0" },
@@ -6280,19 +6304,6 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/5a/cb/e3065b447186cb70aa65acc70c86baf482d82bf75625bf5a2c4f6919c6a3/protobuf-5.29.6-py3-none-any.whl", hash = "sha256:6b9edb641441b2da9fa8f428760fc136a49cf97a52076010cf22a2ff73438a86", size = 173126, upload-time = "2026-02-04T22:54:39.462Z" },
]
-[[package]]
-name = "protoletariat"
-version = "3.3.10"
-source = { registry = "https://pypi.org/simple" }
-dependencies = [
- { name = "click" },
- { name = "protobuf" },
-]
-sdist = { url = "https://files.pythonhosted.org/packages/36/60/31c8dac4e060bce3f102195409128838fc5830e4e589f7962eb7531b4a27/protoletariat-3.3.10.tar.gz", hash = "sha256:bfa0e663fe4c9e3584101779b8b9f5a77b8af623aa25f680e0559b7d2609039b", size = 20694, upload-time = "2025-03-19T22:39:15.043Z" }
-wheels = [
- { url = "https://files.pythonhosted.org/packages/30/6b/d8b8fb09a31f85685d41f63d0d4a807c14aca175c71e17bebcfbf5dc768a/protoletariat-3.3.10-py3-none-any.whl", hash = "sha256:4b0ab790a1791613d9ef1c4159e03424a7f056592ca66578ba585ae96686ee2d", size = 20736, upload-time = "2025-03-19T22:39:13.679Z" },
-]
-
[[package]]
name = "psutil"
version = "6.1.1"