mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-04 23:45:07 +00:00
feat(admin-api): list events (#4989)
* docs: update cockroachdb version to 22.2 * feat(adminAPI): ListEventTypes returns the list of event types ZITADEL implements * feat(adminAPI): ListAggregateTypes returns the list of aggregate types ZITADEL implements * feat(adminAPI): ListEvents allows `IAM_OWNERS` to search for events
This commit is contained in:
parent
74c1c39207
commit
1bf1f335dc
@ -110,7 +110,7 @@ We add the label "good first issue" for problems we think are a good starting po
|
||||
### Backend / Login
|
||||
|
||||
By executing the commands from this section, you run everything you need to develop the ZITADEL backend locally.
|
||||
Using [Docker Compose](https://docs.docker.com/compose/), you run a [CockroachDB](https://www.cockroachlabs.com/docs/v22.1/start-a-local-cluster-in-docker-mac.html) on your local machine.
|
||||
Using [Docker Compose](https://docs.docker.com/compose/), you run a [CockroachDB](https://www.cockroachlabs.com/docs/stable/start-a-local-cluster-in-docker-mac.html) on your local machine.
|
||||
With [goreleaser](https://opencollective.com/goreleaser), you build a debuggable ZITADEL binary and run it using [delve](https://github.com/go-delve/delve).
|
||||
Then, you test your changes via the console your binary is serving at http://<span because="breaks the link"></span>localhost:8080 and by verifying the database.
|
||||
Once you are happy with your changes, you run end-to-end tests and tear everything down.
|
||||
@ -175,7 +175,7 @@ docker compose --file ./e2e/docker-compose.yaml down
|
||||
### Console
|
||||
|
||||
By executing the commands from this section, you run everything you need to develop the console locally.
|
||||
Using [Docker Compose](https://docs.docker.com/compose/), you run [CockroachDB](https://www.cockroachlabs.com/docs/v22.1/start-a-local-cluster-in-docker-mac.html) and the [latest release of ZITADEL](https://github.com/zitadel/zitadel/releases/latest) on your local machine.
|
||||
Using [Docker Compose](https://docs.docker.com/compose/), you run [CockroachDB](https://www.cockroachlabs.com/docs/stable/start-a-local-cluster-in-docker-mac.html) and the [latest release of ZITADEL](https://github.com/zitadel/zitadel/releases/latest) on your local machine.
|
||||
You use the ZITADEL container as backend for your console.
|
||||
The console is run in your [Node](https://nodejs.org/en/about/) environment using [a local development server for Angular](https://angular.io/cli/serve#ng-serve), so you have fast feedback about your changes.
|
||||
|
||||
|
@ -87,7 +87,7 @@ COPY --from=go-stub /go/src/github.com/zitadel/zitadel/internal/api/assets/route
|
||||
FROM go-base as go-test
|
||||
|
||||
ARG COCKROACH_BINARY=/usr/local/bin/cockroach
|
||||
ARG COCKROACH_VERSION=v22.1.11
|
||||
ARG COCKROACH_VERSION=v22.2.2
|
||||
RUN apt install openssl tzdata tar
|
||||
|
||||
# cockroach binary used to backup database
|
||||
|
@ -126,6 +126,10 @@ protoc \
|
||||
-I=/proto/include \
|
||||
--doc_out=${DOCS_PATH} --doc_opt=${PROTO_PATH}/docs/zitadel-md.tmpl,change.md \
|
||||
${PROTO_PATH}/change.proto
|
||||
protoc \
|
||||
-I=/proto/include \
|
||||
--doc_out=${DOCS_PATH} --doc_opt=${PROTO_PATH}/docs/zitadel-md.tmpl,event.md \
|
||||
${PROTO_PATH}/event.proto
|
||||
protoc \
|
||||
-I=/proto/include \
|
||||
--doc_out=${DOCS_PATH} --doc_opt=${PROTO_PATH}/docs/zitadel-md.tmpl,idp.md \
|
||||
|
@ -624,6 +624,7 @@ InternalAuthZ:
|
||||
- "project.grant.member.read"
|
||||
- "project.grant.member.write"
|
||||
- "project.grant.member.delete"
|
||||
- "events.read"
|
||||
- Role: "IAM_OWNER_VIEWER"
|
||||
Permissions:
|
||||
- "iam.read"
|
||||
@ -648,6 +649,7 @@ InternalAuthZ:
|
||||
- "project.app.read"
|
||||
- "project.grant.read"
|
||||
- "project.grant.member.read"
|
||||
- "events.read"
|
||||
- Role: "IAM_ORG_MANAGER"
|
||||
Permissions:
|
||||
- "org.read"
|
||||
|
@ -98,7 +98,7 @@ spec:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
containers:
|
||||
- name: cockroachdb
|
||||
image: cockroachdb/cockroach:v22.1.2
|
||||
image: cockroachdb/cockroach:v22.2.2
|
||||
imagePullPolicy: IfNotPresent
|
||||
# TODO: Change these to appropriate values for the hardware that you're running. You can see
|
||||
# the resources that can be allocated on each of your Kubernetes nodes by running:
|
||||
|
@ -1566,6 +1566,42 @@ Exports data from instance
|
||||
POST: /export
|
||||
|
||||
|
||||
### ListEventTypes
|
||||
|
||||
> **rpc** ListEventTypes([ListEventTypesRequest](#listeventtypesrequest))
|
||||
[ListEventTypesResponse](#listeventtypesresponse)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
POST: /events/types/_search
|
||||
|
||||
|
||||
### ListEvents
|
||||
|
||||
> **rpc** ListEvents([ListEventsRequest](#listeventsrequest))
|
||||
[ListEventsResponse](#listeventsresponse)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
POST: /events/_search
|
||||
|
||||
|
||||
### ListAggregateTypes
|
||||
|
||||
> **rpc** ListAggregateTypes([ListAggregateTypesRequest](#listaggregatetypesrequest))
|
||||
[ListAggregateTypesResponse](#listaggregatetypesresponse)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
POST: /aggregates/types/_search
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -3072,6 +3108,70 @@ at least one argument has to be provided
|
||||
|
||||
|
||||
|
||||
### ListAggregateTypesRequest
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### ListAggregateTypesResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description | Validation |
|
||||
| ----- | ---- | ----------- | ----------- |
|
||||
| aggregate_types | repeated string | - | |
|
||||
|
||||
|
||||
|
||||
|
||||
### ListEventTypesRequest
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### ListEventTypesResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description | Validation |
|
||||
| ----- | ---- | ----------- | ----------- |
|
||||
| event_types | repeated string | - | |
|
||||
|
||||
|
||||
|
||||
|
||||
### ListEventsRequest
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description | Validation |
|
||||
| ----- | ---- | ----------- | ----------- |
|
||||
| sequence | uint64 | sequence represents the order of events. It's always upcounting if asc is false sequence is used as less than filter if asc is true sequence is used as greater than filter if sequence is 0 the field is ignored | |
|
||||
| limit | uint32 | - | |
|
||||
| asc | bool | - | |
|
||||
| editor_user_id | string | - | |
|
||||
| event_types | repeated string | the types are or filtered and must match the type exatly | |
|
||||
| aggregate_id | string | - | |
|
||||
| aggregate_type | string | - | |
|
||||
| resource_owner | string | - | |
|
||||
| creation_date | google.protobuf.Timestamp | if asc is false creation_date is used as less than filter if asc is true creation_date is used as greater than filter if creation_date is not set the field is ignored | |
|
||||
|
||||
|
||||
|
||||
|
||||
### ListEventsResponse
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description | Validation |
|
||||
| ----- | ---- | ----------- | ----------- |
|
||||
| events | repeated zitadel.event.v1.Event | - | |
|
||||
|
||||
|
||||
|
||||
|
||||
### ListFailedEventsRequest
|
||||
This is an empty request
|
||||
|
||||
|
55
docs/docs/apis/proto/event.md
Normal file
55
docs/docs/apis/proto/event.md
Normal file
@ -0,0 +1,55 @@
|
||||
---
|
||||
title: zitadel/event.proto
|
||||
---
|
||||
> This document reflects the state from API 1.0 (available from 20.04.2021)
|
||||
|
||||
|
||||
|
||||
|
||||
## Messages
|
||||
|
||||
|
||||
### Aggregate
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description | Validation |
|
||||
| ----- | ---- | ----------- | ----------- |
|
||||
| id | string | - | |
|
||||
| type | string | - | |
|
||||
| resource_owner | string | - | |
|
||||
|
||||
|
||||
|
||||
|
||||
### Editor
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description | Validation |
|
||||
| ----- | ---- | ----------- | ----------- |
|
||||
| user_id | string | - | |
|
||||
| display_name | string | - | |
|
||||
| service | string | - | |
|
||||
|
||||
|
||||
|
||||
|
||||
### Event
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description | Validation |
|
||||
| ----- | ---- | ----------- | ----------- |
|
||||
| editor | Editor | - | |
|
||||
| aggregate | Aggregate | - | |
|
||||
| sequence | uint64 | - | |
|
||||
| creation_date | google.protobuf.Timestamp | The timestamp the event occurred | |
|
||||
| payload | google.protobuf.Struct | - | |
|
||||
| type | string | - | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ services:
|
||||
restart: 'always'
|
||||
networks:
|
||||
- 'zitadel'
|
||||
image: 'cockroachdb/cockroach:v22.1.3'
|
||||
image: 'cockroachdb/cockroach:v22.2.2'
|
||||
command: 'start-single-node --insecure'
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"]
|
||||
|
@ -20,7 +20,7 @@ services:
|
||||
restart: 'always'
|
||||
networks:
|
||||
- 'zitadel'
|
||||
image: 'cockroachdb/cockroach:v22.1.3'
|
||||
image: 'cockroachdb/cockroach:v22.2.2'
|
||||
command: 'start-single-node --insecure'
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"]
|
||||
|
@ -8,8 +8,8 @@ import Next from './_next.mdx'
|
||||
|
||||
## Install CockroachDB
|
||||
|
||||
Download a `cockroach` binary as described [in the CockroachDB docs](https://www.cockroachlabs.com/docs/v22.1/install-cockroachdb).
|
||||
ZITADEL is tested against CockroachDB v22.1.0 and Ubuntu 20.04.
|
||||
Download a `cockroach` binary as described [in the CockroachDB docs](https://www.cockroachlabs.com/docs/stable/install-cockroachdb).
|
||||
ZITADEL is tested against CockroachDB v22.2.2 and Ubuntu 20.04.
|
||||
|
||||
## Run CockroachDB
|
||||
|
||||
|
@ -28,7 +28,7 @@ services:
|
||||
- 'zitadel-certs:/crdb-certs:ro'
|
||||
|
||||
certs:
|
||||
image: 'cockroachdb/cockroach:v22.1.0'
|
||||
image: 'cockroachdb/cockroach:v22.2.2'
|
||||
entrypoint: [ '/bin/bash', '-c' ]
|
||||
command: [ 'cp /certs/* /zitadel-certs/ && cockroach cert create-client --overwrite --certs-dir /zitadel-certs/ --ca-key /zitadel-certs/ca.key zitadel_user && chown 1000:1000 /zitadel-certs/*' ]
|
||||
volumes:
|
||||
@ -42,7 +42,7 @@ services:
|
||||
restart: 'always'
|
||||
networks:
|
||||
- 'zitadel'
|
||||
image: 'cockroachdb/cockroach:v22.1.0'
|
||||
image: 'cockroachdb/cockroach:v22.2.2'
|
||||
command: 'start-single-node --advertise-addr my-cockroach-db'
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"]
|
||||
|
@ -8,8 +8,8 @@ import Next from './_next.mdx'
|
||||
|
||||
## Install CockroachDB
|
||||
|
||||
Download a `cockroach` binary as described [in the CockroachDB docs](https://www.cockroachlabs.com/docs/v22.1/install-cockroachdb).
|
||||
ZITADEL is tested against CockroachDB v22.1.0.
|
||||
Download a `cockroach` binary as described [in the CockroachDB docs](https://www.cockroachlabs.com/docs/stable/install-cockroachdb).
|
||||
ZITADEL is tested against CockroachDB v22.2.2.
|
||||
|
||||
## Run CockroachDB
|
||||
|
||||
|
@ -19,7 +19,7 @@ services:
|
||||
- "zitadel-certs:/crdb-certs:ro"
|
||||
|
||||
certs:
|
||||
image: "cockroachdb/cockroach:v22.1.0"
|
||||
image: "cockroachdb/cockroach:v22.2.2"
|
||||
entrypoint: ["/bin/bash", "-c"]
|
||||
command:
|
||||
[
|
||||
@ -36,7 +36,7 @@ services:
|
||||
restart: "always"
|
||||
networks:
|
||||
- "zitadel"
|
||||
image: "cockroachdb/cockroach:v22.1.0"
|
||||
image: "cockroachdb/cockroach:v22.2.2"
|
||||
command: "start-single-node --advertise-addr my-cockroach-db"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/health?ready=1"]
|
||||
|
@ -19,7 +19,7 @@ services:
|
||||
|
||||
db:
|
||||
restart: 'always'
|
||||
image: 'cockroachdb/cockroach:v22.1.0'
|
||||
image: 'cockroachdb/cockroach:v22.2.2'
|
||||
command: 'start-single-node --insecure --http-addr :9090'
|
||||
healthcheck:
|
||||
test: ['CMD', 'curl', '-f', 'http://localhost:9090/health?ready=1']
|
||||
|
107
internal/api/grpc/admin/event.go
Normal file
107
internal/api/grpc/admin/event.go
Normal file
@ -0,0 +1,107 @@
|
||||
package admin
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"google.golang.org/protobuf/types/known/structpb"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/api/authz"
|
||||
"github.com/zitadel/zitadel/internal/errors"
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
"github.com/zitadel/zitadel/internal/query"
|
||||
admin_pb "github.com/zitadel/zitadel/pkg/grpc/admin"
|
||||
event_pb "github.com/zitadel/zitadel/pkg/grpc/event"
|
||||
)
|
||||
|
||||
func (s *Server) ListEvents(ctx context.Context, in *admin_pb.ListEventsRequest) (*admin_pb.ListEventsResponse, error) {
|
||||
filter, err := eventRequestToFilter(ctx, in)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
events, err := s.query.SearchEvents(ctx, filter)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return convertEventsToResponse(events)
|
||||
}
|
||||
|
||||
func (s *Server) ListEventTypes(ctx context.Context, in *admin_pb.ListEventTypesRequest) (*admin_pb.ListEventTypesResponse, error) {
|
||||
return &admin_pb.ListEventTypesResponse{
|
||||
EventTypes: s.query.SearchEventTypes(ctx),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *Server) ListAggregateTypes(ctx context.Context, in *admin_pb.ListAggregateTypesRequest) (*admin_pb.ListAggregateTypesResponse, error) {
|
||||
return &admin_pb.ListAggregateTypesResponse{
|
||||
AggregateTypes: s.query.SearchAggregateTypes(ctx),
|
||||
}, nil
|
||||
}
|
||||
|
||||
func eventRequestToFilter(ctx context.Context, req *admin_pb.ListEventsRequest) (*eventstore.SearchQueryBuilder, error) {
|
||||
eventTypes := make([]eventstore.EventType, len(req.EventTypes))
|
||||
for i, eventType := range req.EventTypes {
|
||||
eventTypes[i] = eventstore.EventType(eventType)
|
||||
}
|
||||
|
||||
builder := eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent).
|
||||
OrderDesc().
|
||||
InstanceID(authz.GetInstance(ctx).InstanceID()).
|
||||
Limit(uint64(req.Limit)).
|
||||
ResourceOwner(req.ResourceOwner).
|
||||
EditorUser(req.EditorUserId).
|
||||
AddQuery().
|
||||
AggregateIDs(req.AggregateId).
|
||||
AggregateTypes(eventstore.AggregateType(req.AggregateType)).
|
||||
EventTypes(eventTypes...).
|
||||
CreationDateAfter(req.CreationDate.AsTime()).
|
||||
SequenceGreater(req.Sequence).
|
||||
Builder()
|
||||
|
||||
if req.Asc {
|
||||
builder.OrderAsc()
|
||||
}
|
||||
|
||||
return builder, nil
|
||||
}
|
||||
|
||||
func convertEventsToResponse(events []*query.Event) (response *admin_pb.ListEventsResponse, err error) {
|
||||
response = &admin_pb.ListEventsResponse{
|
||||
Events: make([]*event_pb.Event, len(events)),
|
||||
}
|
||||
|
||||
for i, event := range events {
|
||||
response.Events[i], err = convertEvent(event)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func convertEvent(event *query.Event) (*event_pb.Event, error) {
|
||||
var payload *structpb.Struct
|
||||
if len(event.Payload) > 0 {
|
||||
payload = new(structpb.Struct)
|
||||
if err := payload.UnmarshalJSON(event.Payload); err != nil {
|
||||
return nil, errors.ThrowInternal(err, "ADMIN-eaimD", "Errors.Internal")
|
||||
}
|
||||
}
|
||||
return &event_pb.Event{
|
||||
Editor: &event_pb.Editor{
|
||||
UserId: event.Editor.ID,
|
||||
DisplayName: event.Editor.DisplayName,
|
||||
Service: event.Editor.Service,
|
||||
},
|
||||
Aggregate: &event_pb.Aggregate{
|
||||
Id: event.Aggregate.ID,
|
||||
Type: string(event.Aggregate.Type),
|
||||
ResourceOwner: event.Aggregate.ResourceOwner,
|
||||
},
|
||||
Sequence: event.Sequence,
|
||||
CreationDate: timestamppb.New(event.CreationDate),
|
||||
Payload: payload,
|
||||
Type: event.Type,
|
||||
}, nil
|
||||
}
|
@ -5,6 +5,7 @@ import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@ -19,6 +20,8 @@ type Eventstore struct {
|
||||
repo repository.Repository
|
||||
interceptorMutex sync.Mutex
|
||||
eventInterceptors map[EventType]eventTypeInterceptors
|
||||
eventTypes []string
|
||||
aggregateTypes []string
|
||||
PushTimeout time.Duration
|
||||
}
|
||||
|
||||
@ -73,6 +76,14 @@ func (es *Eventstore) NewInstance(ctx context.Context, instanceID string) error
|
||||
return es.repo.CreateInstance(ctx, instanceID)
|
||||
}
|
||||
|
||||
func (es *Eventstore) EventTypes() []string {
|
||||
return es.eventTypes
|
||||
}
|
||||
|
||||
func (es *Eventstore) AggregateTypes() []string {
|
||||
return es.aggregateTypes
|
||||
}
|
||||
|
||||
func commandsToRepository(instanceID string, cmds []Command) (events []*repository.Event, constraints []*repository.UniqueConstraint, err error) {
|
||||
events = make([]*repository.Event, len(cmds))
|
||||
for i, cmd := range cmds {
|
||||
@ -224,13 +235,16 @@ func (es *Eventstore) FilterToQueryReducer(ctx context.Context, r QueryReducer)
|
||||
}
|
||||
|
||||
// RegisterFilterEventMapper registers a function for mapping an eventstore event to an event
|
||||
func (es *Eventstore) RegisterFilterEventMapper(eventType EventType, mapper func(*repository.Event) (Event, error)) *Eventstore {
|
||||
func (es *Eventstore) RegisterFilterEventMapper(aggregateType AggregateType, eventType EventType, mapper func(*repository.Event) (Event, error)) *Eventstore {
|
||||
if mapper == nil || eventType == "" {
|
||||
return es
|
||||
}
|
||||
es.interceptorMutex.Lock()
|
||||
defer es.interceptorMutex.Unlock()
|
||||
|
||||
es.appendEventType(eventType)
|
||||
es.appendAggregateType(aggregateType)
|
||||
|
||||
interceptor := es.eventInterceptors[eventType]
|
||||
interceptor.eventMapper = mapper
|
||||
es.eventInterceptors[eventType] = interceptor
|
||||
@ -238,6 +252,22 @@ func (es *Eventstore) RegisterFilterEventMapper(eventType EventType, mapper func
|
||||
return es
|
||||
}
|
||||
|
||||
func (es *Eventstore) appendEventType(typ EventType) {
|
||||
i := sort.SearchStrings(es.eventTypes, string(typ))
|
||||
if i > 0 && es.eventTypes[i-1] == string(typ) {
|
||||
return
|
||||
}
|
||||
es.eventTypes = append(es.eventTypes[:i], append([]string{string(typ)}, es.eventTypes[i:]...)...)
|
||||
}
|
||||
|
||||
func (es *Eventstore) appendAggregateType(typ AggregateType) {
|
||||
i := sort.SearchStrings(es.aggregateTypes, string(typ))
|
||||
if len(es.aggregateTypes) > i && es.aggregateTypes[i] == string(typ) {
|
||||
return
|
||||
}
|
||||
es.aggregateTypes = append(es.aggregateTypes[:i], append([]string{string(typ)}, es.aggregateTypes[i:]...)...)
|
||||
}
|
||||
|
||||
func EventData(event Command) ([]byte, error) {
|
||||
switch data := event.Data().(type) {
|
||||
case nil:
|
||||
|
@ -156,7 +156,7 @@ func Test_eventstore_RegisterFilterEventMapper(t *testing.T) {
|
||||
es := &Eventstore{
|
||||
eventInterceptors: tt.fields.eventMapper,
|
||||
}
|
||||
es = es.RegisterFilterEventMapper(tt.args.eventType, tt.args.mapper)
|
||||
es = es.RegisterFilterEventMapper("test", tt.args.eventType, tt.args.mapper)
|
||||
if len(es.eventInterceptors) != tt.res.mapperCount {
|
||||
t.Errorf("unexpected mapper count: want %d, got %d", tt.res.mapperCount, len(es.eventInterceptors))
|
||||
return
|
||||
@ -990,7 +990,7 @@ func TestEventstore_Push(t *testing.T) {
|
||||
eventInterceptors: map[EventType]eventTypeInterceptors{},
|
||||
}
|
||||
for eventType, mapper := range tt.fields.eventMapper {
|
||||
es = es.RegisterFilterEventMapper(eventType, mapper)
|
||||
es = es.RegisterFilterEventMapper("test", eventType, mapper)
|
||||
}
|
||||
if len(es.eventInterceptors) != len(tt.fields.eventMapper) {
|
||||
t.Errorf("register event mapper failed expected mapper amount: %d, got: %d", len(tt.fields.eventMapper), len(es.eventInterceptors))
|
||||
@ -1130,7 +1130,7 @@ func TestEventstore_FilterEvents(t *testing.T) {
|
||||
}
|
||||
|
||||
for eventType, mapper := range tt.fields.eventMapper {
|
||||
es = es.RegisterFilterEventMapper(eventType, mapper)
|
||||
es = es.RegisterFilterEventMapper("test", eventType, mapper)
|
||||
}
|
||||
if len(es.eventInterceptors) != len(tt.fields.eventMapper) {
|
||||
t.Errorf("register event mapper failed expected mapper amount: %d, got: %d", len(tt.fields.eventMapper), len(es.eventInterceptors))
|
||||
@ -1448,7 +1448,7 @@ func TestEventstore_FilterToReducer(t *testing.T) {
|
||||
eventInterceptors: map[EventType]eventTypeInterceptors{},
|
||||
}
|
||||
for eventType, mapper := range tt.fields.eventMapper {
|
||||
es = es.RegisterFilterEventMapper(eventType, mapper)
|
||||
es = es.RegisterFilterEventMapper("test", eventType, mapper)
|
||||
}
|
||||
if len(es.eventInterceptors) != len(tt.fields.eventMapper) {
|
||||
t.Errorf("register event mapper failed expected mapper amount: %d, got: %d", len(tt.fields.eventMapper), len(es.eventInterceptors))
|
||||
@ -1589,7 +1589,7 @@ func TestEventstore_mapEvents(t *testing.T) {
|
||||
eventInterceptors: map[EventType]eventTypeInterceptors{},
|
||||
}
|
||||
for eventType, mapper := range tt.fields.eventMapper {
|
||||
es = es.RegisterFilterEventMapper(eventType, mapper)
|
||||
es = es.RegisterFilterEventMapper("test", eventType, mapper)
|
||||
}
|
||||
if len(es.eventInterceptors) != len(tt.fields.eventMapper) {
|
||||
t.Errorf("register event mapper failed expected mapper amount: %d, got: %d", len(tt.fields.eventMapper), len(es.eventInterceptors))
|
||||
|
@ -43,8 +43,8 @@ func NewUserAddedEvent(id string, firstName string) *UserAddedEvent {
|
||||
}
|
||||
}
|
||||
|
||||
func UserAddedEventMapper() (eventstore.EventType, func(*repository.Event) (eventstore.Event, error)) {
|
||||
return "user.added", func(event *repository.Event) (eventstore.Event, error) {
|
||||
func UserAddedEventMapper() (eventstore.AggregateType, eventstore.EventType, func(*repository.Event) (eventstore.Event, error)) {
|
||||
return "user", "user.added", func(event *repository.Event) (eventstore.Event, error) {
|
||||
e := &UserAddedEvent{
|
||||
BaseEvent: *eventstore.BaseEventFromRepo(event),
|
||||
}
|
||||
@ -88,8 +88,8 @@ func NewUserFirstNameChangedEvent(id, firstName string) *UserFirstNameChangedEve
|
||||
}
|
||||
}
|
||||
|
||||
func UserFirstNameChangedMapper() (eventstore.EventType, func(*repository.Event) (eventstore.Event, error)) {
|
||||
return "user.firstName.changed", func(event *repository.Event) (eventstore.Event, error) {
|
||||
func UserFirstNameChangedMapper() (eventstore.AggregateType, eventstore.EventType, func(*repository.Event) (eventstore.Event, error)) {
|
||||
return "user", "user.firstName.changed", func(event *repository.Event) (eventstore.Event, error) {
|
||||
e := &UserFirstNameChangedEvent{
|
||||
BaseEvent: *eventstore.BaseEventFromRepo(event),
|
||||
}
|
||||
@ -130,8 +130,8 @@ func NewUserPasswordCheckedEvent(id string) *UserPasswordCheckedEvent {
|
||||
}
|
||||
}
|
||||
|
||||
func UserPasswordCheckedMapper() (eventstore.EventType, func(*repository.Event) (eventstore.Event, error)) {
|
||||
return "user.password.checked", func(event *repository.Event) (eventstore.Event, error) {
|
||||
func UserPasswordCheckedMapper() (eventstore.AggregateType, eventstore.EventType, func(*repository.Event) (eventstore.Event, error)) {
|
||||
return "user", "user.password.checked", func(event *repository.Event) (eventstore.Event, error) {
|
||||
return &UserPasswordCheckedEvent{
|
||||
BaseEvent: *eventstore.BaseEventFromRepo(event),
|
||||
}, nil
|
||||
@ -167,8 +167,8 @@ func NewUserDeletedEvent(id string) *UserDeletedEvent {
|
||||
}
|
||||
}
|
||||
|
||||
func UserDeletedMapper() (eventstore.EventType, func(*repository.Event) (eventstore.Event, error)) {
|
||||
return "user.deleted", func(event *repository.Event) (eventstore.Event, error) {
|
||||
func UserDeletedMapper() (eventstore.AggregateType, eventstore.EventType, func(*repository.Event) (eventstore.Event, error)) {
|
||||
return "user", "user.deleted", func(event *repository.Event) (eventstore.Event, error) {
|
||||
return &UserDeletedEvent{
|
||||
BaseEvent: *eventstore.BaseEventFromRepo(event),
|
||||
}, nil
|
||||
|
@ -17,6 +17,7 @@ type SearchQueryBuilder struct {
|
||||
desc bool
|
||||
resourceOwner string
|
||||
instanceID string
|
||||
editorUser string
|
||||
queries []*SearchQuery
|
||||
tx *sql.Tx
|
||||
}
|
||||
@ -124,6 +125,11 @@ func (builder *SearchQueryBuilder) SetTx(tx *sql.Tx) *SearchQueryBuilder {
|
||||
return builder
|
||||
}
|
||||
|
||||
func (builder *SearchQueryBuilder) EditorUser(id string) *SearchQueryBuilder {
|
||||
builder.editorUser = id
|
||||
return builder
|
||||
}
|
||||
|
||||
// AddQuery creates a new sub query.
|
||||
// All fields in the sub query are AND-connected in the storage request.
|
||||
// Multiple sub queries are OR-connected in the storage request.
|
||||
@ -245,6 +251,7 @@ func (builder *SearchQueryBuilder) build(instanceID string) (*repository.SearchQ
|
||||
query.creationDateAfterFilter,
|
||||
query.builder.resourceOwnerFilter,
|
||||
query.builder.instanceIDFilter,
|
||||
query.builder.editorUserFilter,
|
||||
} {
|
||||
if filter := f(); filter != nil {
|
||||
if err := filter.Validate(); err != nil {
|
||||
@ -353,6 +360,13 @@ func (builder *SearchQueryBuilder) instanceIDFilter() *repository.Filter {
|
||||
return repository.NewFilter(repository.FieldInstanceID, builder.instanceID, repository.OperationEquals)
|
||||
}
|
||||
|
||||
func (builder *SearchQueryBuilder) editorUserFilter() *repository.Filter {
|
||||
if builder.editorUser == "" {
|
||||
return nil
|
||||
}
|
||||
return repository.NewFilter(repository.FieldEditorUser, builder.editorUser, repository.OperationEquals)
|
||||
}
|
||||
|
||||
func (query *SearchQuery) creationDateAfterFilter() *repository.Filter {
|
||||
if query.creationDateAfter.IsZero() {
|
||||
return nil
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
"github.com/zitadel/zitadel/internal/eventstore/repository"
|
||||
)
|
||||
|
||||
//SetupStep is the command pushed on the eventstore
|
||||
// SetupStep is the command pushed on the eventstore
|
||||
type SetupStep struct {
|
||||
eventstore.BaseEvent `json:"-"`
|
||||
migration Migration
|
||||
@ -97,10 +97,10 @@ func (s *SetupStep) UniqueConstraints() []*eventstore.EventUniqueConstraint {
|
||||
}
|
||||
|
||||
func RegisterMappers(es *eventstore.Eventstore) {
|
||||
es.RegisterFilterEventMapper(startedType, SetupMapper)
|
||||
es.RegisterFilterEventMapper(doneType, SetupMapper)
|
||||
es.RegisterFilterEventMapper(failedType, SetupMapper)
|
||||
es.RegisterFilterEventMapper(repeatableDoneType, SetupMapper)
|
||||
es.RegisterFilterEventMapper(aggregateType, startedType, SetupMapper)
|
||||
es.RegisterFilterEventMapper(aggregateType, doneType, SetupMapper)
|
||||
es.RegisterFilterEventMapper(aggregateType, failedType, SetupMapper)
|
||||
es.RegisterFilterEventMapper(aggregateType, repeatableDoneType, SetupMapper)
|
||||
}
|
||||
|
||||
func SetupMapper(event *repository.Event) (eventstore.Event, error) {
|
||||
|
73
internal/query/event.go
Normal file
73
internal/query/event.go
Normal file
@ -0,0 +1,73 @@
|
||||
package query
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
)
|
||||
|
||||
type Event struct {
|
||||
Editor *EventEditor
|
||||
Aggregate eventstore.Aggregate
|
||||
Sequence uint64
|
||||
CreationDate time.Time
|
||||
Type string
|
||||
Payload []byte
|
||||
}
|
||||
|
||||
type EventEditor struct {
|
||||
ID string
|
||||
DisplayName string
|
||||
Service string
|
||||
}
|
||||
|
||||
func (q *Queries) SearchEvents(ctx context.Context, query *eventstore.SearchQueryBuilder) ([]*Event, error) {
|
||||
events, err := q.eventstore.Filter(ctx, query)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return q.convertEvents(ctx, events), nil
|
||||
}
|
||||
|
||||
func (q *Queries) SearchEventTypes(ctx context.Context) []string {
|
||||
return q.eventstore.EventTypes()
|
||||
}
|
||||
|
||||
func (q *Queries) SearchAggregateTypes(ctx context.Context) []string {
|
||||
return q.eventstore.AggregateTypes()
|
||||
}
|
||||
|
||||
func (q *Queries) convertEvents(ctx context.Context, events []eventstore.Event) []*Event {
|
||||
result := make([]*Event, len(events))
|
||||
for i, event := range events {
|
||||
result[i] = q.convertEvent(ctx, event)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func (q *Queries) convertEvent(ctx context.Context, event eventstore.Event) *Event {
|
||||
displayName := event.EditorUser()
|
||||
user, err := q.GetUserByID(ctx, false, event.EditorUser(), false)
|
||||
if err == nil {
|
||||
if user.Human != nil {
|
||||
displayName = user.Human.DisplayName
|
||||
} else if user.Machine != nil {
|
||||
displayName = user.Machine.Name
|
||||
}
|
||||
}
|
||||
|
||||
return &Event{
|
||||
Editor: &EventEditor{
|
||||
ID: event.EditorUser(),
|
||||
Service: event.EditorService(),
|
||||
DisplayName: displayName,
|
||||
},
|
||||
Aggregate: event.Aggregate(),
|
||||
Sequence: event.Sequence(),
|
||||
CreationDate: event.CreationDate(),
|
||||
Type: string(event.Type()),
|
||||
Payload: event.DataAsBytes(),
|
||||
}
|
||||
}
|
@ -3,9 +3,9 @@ package action
|
||||
import "github.com/zitadel/zitadel/internal/eventstore"
|
||||
|
||||
func RegisterEventMappers(es *eventstore.Eventstore) {
|
||||
es.RegisterFilterEventMapper(AddedEventType, AddedEventMapper).
|
||||
RegisterFilterEventMapper(ChangedEventType, ChangedEventMapper).
|
||||
RegisterFilterEventMapper(DeactivatedEventType, DeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(ReactivatedEventType, ReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(RemovedEventType, RemovedEventMapper)
|
||||
es.RegisterFilterEventMapper(AggregateType, AddedEventType, AddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ChangedEventType, ChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DeactivatedEventType, DeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ReactivatedEventType, ReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, RemovedEventType, RemovedEventMapper)
|
||||
}
|
||||
|
@ -5,89 +5,89 @@ import (
|
||||
)
|
||||
|
||||
func RegisterEventMappers(es *eventstore.Eventstore) {
|
||||
es.RegisterFilterEventMapper(DefaultOrgSetEventType, DefaultOrgSetMapper).
|
||||
RegisterFilterEventMapper(ProjectSetEventType, ProjectSetMapper).
|
||||
RegisterFilterEventMapper(ConsoleSetEventType, ConsoleSetMapper).
|
||||
RegisterFilterEventMapper(DefaultLanguageSetEventType, DefaultLanguageSetMapper).
|
||||
RegisterFilterEventMapper(SecretGeneratorAddedEventType, SecretGeneratorAddedEventMapper).
|
||||
RegisterFilterEventMapper(SecretGeneratorChangedEventType, SecretGeneratorChangedEventMapper).
|
||||
RegisterFilterEventMapper(SecretGeneratorRemovedEventType, SecretGeneratorRemovedEventMapper).
|
||||
RegisterFilterEventMapper(SMTPConfigAddedEventType, SMTPConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(SMTPConfigChangedEventType, SMTPConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(SMTPConfigPasswordChangedEventType, SMTPConfigPasswordChangedEventMapper).
|
||||
RegisterFilterEventMapper(SMTPConfigRemovedEventType, SMTPConfigRemovedEventMapper).
|
||||
RegisterFilterEventMapper(SMSConfigTwilioAddedEventType, SMSConfigTwilioAddedEventMapper).
|
||||
RegisterFilterEventMapper(SMSConfigTwilioChangedEventType, SMSConfigTwilioChangedEventMapper).
|
||||
RegisterFilterEventMapper(SMSConfigTwilioTokenChangedEventType, SMSConfigTwilioTokenChangedEventMapper).
|
||||
RegisterFilterEventMapper(SMSConfigActivatedEventType, SMSConfigActivatedEventMapper).
|
||||
RegisterFilterEventMapper(SMSConfigDeactivatedEventType, SMSConfigDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(SMSConfigRemovedEventType, SMSConfigRemovedEventMapper).
|
||||
RegisterFilterEventMapper(DebugNotificationProviderFileAddedEventType, DebugNotificationProviderFileAddedEventMapper).
|
||||
RegisterFilterEventMapper(DebugNotificationProviderFileChangedEventType, DebugNotificationProviderFileChangedEventMapper).
|
||||
RegisterFilterEventMapper(DebugNotificationProviderFileRemovedEventType, DebugNotificationProviderFileRemovedEventMapper).
|
||||
RegisterFilterEventMapper(DebugNotificationProviderLogAddedEventType, DebugNotificationProviderLogAddedEventMapper).
|
||||
RegisterFilterEventMapper(DebugNotificationProviderLogChangedEventType, DebugNotificationProviderLogChangedEventMapper).
|
||||
RegisterFilterEventMapper(DebugNotificationProviderLogRemovedEventType, DebugNotificationProviderLogRemovedEventMapper).
|
||||
RegisterFilterEventMapper(OIDCSettingsAddedEventType, OIDCSettingsAddedEventMapper).
|
||||
RegisterFilterEventMapper(OIDCSettingsChangedEventType, OIDCSettingsChangedEventMapper).
|
||||
RegisterFilterEventMapper(SecurityPolicySetEventType, SecurityPolicySetEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyAddedEventType, LabelPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyChangedEventType, LabelPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyActivatedEventType, LabelPolicyActivatedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyLogoAddedEventType, LabelPolicyLogoAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyLogoRemovedEventType, LabelPolicyLogoRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyIconAddedEventType, LabelPolicyIconAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyIconRemovedEventType, LabelPolicyIconRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyLogoDarkAddedEventType, LabelPolicyLogoDarkAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyLogoDarkRemovedEventType, LabelPolicyLogoDarkRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyIconDarkAddedEventType, LabelPolicyIconDarkAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyIconDarkRemovedEventType, LabelPolicyIconDarkRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyFontAddedEventType, LabelPolicyFontAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyFontRemovedEventType, LabelPolicyFontRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyAssetsRemovedEventType, LabelPolicyAssetsRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyAddedEventType, LoginPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyChangedEventType, LoginPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(DomainPolicyAddedEventType, DomainPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(DomainPolicyChangedEventType, DomainPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(PasswordAgePolicyAddedEventType, PasswordAgePolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(PasswordAgePolicyChangedEventType, PasswordAgePolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(PasswordComplexityPolicyAddedEventType, PasswordComplexityPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(PasswordComplexityPolicyChangedEventType, PasswordComplexityPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(LockoutPolicyAddedEventType, LockoutPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(LockoutPolicyChangedEventType, LockoutPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(PrivacyPolicyAddedEventType, PrivacyPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(PrivacyPolicyChangedEventType, PrivacyPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(MemberAddedEventType, MemberAddedEventMapper).
|
||||
RegisterFilterEventMapper(MemberChangedEventType, MemberChangedEventMapper).
|
||||
RegisterFilterEventMapper(MemberRemovedEventType, MemberRemovedEventMapper).
|
||||
RegisterFilterEventMapper(MemberCascadeRemovedEventType, MemberCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(IDPConfigAddedEventType, IDPConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(IDPConfigChangedEventType, IDPConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(IDPConfigRemovedEventType, IDPConfigRemovedEventMapper).
|
||||
RegisterFilterEventMapper(IDPConfigDeactivatedEventType, IDPConfigDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(IDPConfigReactivatedEventType, IDPConfigReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(IDPOIDCConfigAddedEventType, IDPOIDCConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(IDPOIDCConfigChangedEventType, IDPOIDCConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(IDPJWTConfigAddedEventType, IDPJWTConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(IDPJWTConfigChangedEventType, IDPJWTConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyIDPProviderAddedEventType, IdentityProviderAddedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyIDPProviderRemovedEventType, IdentityProviderRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyIDPProviderCascadeRemovedEventType, IdentityProviderCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicySecondFactorAddedEventType, SecondFactorAddedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicySecondFactorRemovedEventType, SecondFactorRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyMultiFactorAddedEventType, MultiFactorAddedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyMultiFactorRemovedEventType, MultiFactorRemovedEventMapper).
|
||||
RegisterFilterEventMapper(MailTemplateAddedEventType, MailTemplateAddedEventMapper).
|
||||
RegisterFilterEventMapper(MailTemplateChangedEventType, MailTemplateChangedEventMapper).
|
||||
RegisterFilterEventMapper(MailTextAddedEventType, MailTextAddedEventMapper).
|
||||
RegisterFilterEventMapper(MailTextChangedEventType, MailTextChangedEventMapper).
|
||||
RegisterFilterEventMapper(CustomTextSetEventType, CustomTextSetEventMapper).
|
||||
RegisterFilterEventMapper(CustomTextRemovedEventType, CustomTextRemovedEventMapper).
|
||||
RegisterFilterEventMapper(CustomTextTemplateRemovedEventType, CustomTextTemplateRemovedEventMapper).
|
||||
RegisterFilterEventMapper(InstanceDomainAddedEventType, DomainAddedEventMapper).
|
||||
RegisterFilterEventMapper(InstanceDomainPrimarySetEventType, DomainPrimarySetEventMapper).
|
||||
RegisterFilterEventMapper(InstanceDomainRemovedEventType, DomainRemovedEventMapper).
|
||||
RegisterFilterEventMapper(InstanceAddedEventType, InstanceAddedEventMapper).
|
||||
RegisterFilterEventMapper(InstanceChangedEventType, InstanceChangedEventMapper).
|
||||
RegisterFilterEventMapper(InstanceRemovedEventType, InstanceRemovedEventMapper)
|
||||
es.RegisterFilterEventMapper(AggregateType, DefaultOrgSetEventType, DefaultOrgSetMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ProjectSetEventType, ProjectSetMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ConsoleSetEventType, ConsoleSetMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DefaultLanguageSetEventType, DefaultLanguageSetMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SecretGeneratorAddedEventType, SecretGeneratorAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SecretGeneratorChangedEventType, SecretGeneratorChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SecretGeneratorRemovedEventType, SecretGeneratorRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SMTPConfigAddedEventType, SMTPConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SMTPConfigChangedEventType, SMTPConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SMTPConfigPasswordChangedEventType, SMTPConfigPasswordChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SMTPConfigRemovedEventType, SMTPConfigRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SMSConfigTwilioAddedEventType, SMSConfigTwilioAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SMSConfigTwilioChangedEventType, SMSConfigTwilioChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SMSConfigTwilioTokenChangedEventType, SMSConfigTwilioTokenChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SMSConfigActivatedEventType, SMSConfigActivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SMSConfigDeactivatedEventType, SMSConfigDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SMSConfigRemovedEventType, SMSConfigRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DebugNotificationProviderFileAddedEventType, DebugNotificationProviderFileAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DebugNotificationProviderFileChangedEventType, DebugNotificationProviderFileChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DebugNotificationProviderFileRemovedEventType, DebugNotificationProviderFileRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DebugNotificationProviderLogAddedEventType, DebugNotificationProviderLogAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DebugNotificationProviderLogChangedEventType, DebugNotificationProviderLogChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DebugNotificationProviderLogRemovedEventType, DebugNotificationProviderLogRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OIDCSettingsAddedEventType, OIDCSettingsAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OIDCSettingsChangedEventType, OIDCSettingsChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SecurityPolicySetEventType, SecurityPolicySetEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyAddedEventType, LabelPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyChangedEventType, LabelPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyActivatedEventType, LabelPolicyActivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyLogoAddedEventType, LabelPolicyLogoAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyLogoRemovedEventType, LabelPolicyLogoRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyIconAddedEventType, LabelPolicyIconAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyIconRemovedEventType, LabelPolicyIconRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyLogoDarkAddedEventType, LabelPolicyLogoDarkAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyLogoDarkRemovedEventType, LabelPolicyLogoDarkRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyIconDarkAddedEventType, LabelPolicyIconDarkAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyIconDarkRemovedEventType, LabelPolicyIconDarkRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyFontAddedEventType, LabelPolicyFontAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyFontRemovedEventType, LabelPolicyFontRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyAssetsRemovedEventType, LabelPolicyAssetsRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyAddedEventType, LoginPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyChangedEventType, LoginPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DomainPolicyAddedEventType, DomainPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DomainPolicyChangedEventType, DomainPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PasswordAgePolicyAddedEventType, PasswordAgePolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PasswordAgePolicyChangedEventType, PasswordAgePolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PasswordComplexityPolicyAddedEventType, PasswordComplexityPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PasswordComplexityPolicyChangedEventType, PasswordComplexityPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LockoutPolicyAddedEventType, LockoutPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LockoutPolicyChangedEventType, LockoutPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PrivacyPolicyAddedEventType, PrivacyPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PrivacyPolicyChangedEventType, PrivacyPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberAddedEventType, MemberAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberChangedEventType, MemberChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberRemovedEventType, MemberRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberCascadeRemovedEventType, MemberCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPConfigAddedEventType, IDPConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPConfigChangedEventType, IDPConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPConfigRemovedEventType, IDPConfigRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPConfigDeactivatedEventType, IDPConfigDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPConfigReactivatedEventType, IDPConfigReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPOIDCConfigAddedEventType, IDPOIDCConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPOIDCConfigChangedEventType, IDPOIDCConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPJWTConfigAddedEventType, IDPJWTConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPJWTConfigChangedEventType, IDPJWTConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyIDPProviderAddedEventType, IdentityProviderAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyIDPProviderRemovedEventType, IdentityProviderRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyIDPProviderCascadeRemovedEventType, IdentityProviderCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicySecondFactorAddedEventType, SecondFactorAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicySecondFactorRemovedEventType, SecondFactorRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyMultiFactorAddedEventType, MultiFactorAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyMultiFactorRemovedEventType, MultiFactorRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MailTemplateAddedEventType, MailTemplateAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MailTemplateChangedEventType, MailTemplateChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MailTextAddedEventType, MailTextAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MailTextChangedEventType, MailTextChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, CustomTextSetEventType, CustomTextSetEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, CustomTextRemovedEventType, CustomTextRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, CustomTextTemplateRemovedEventType, CustomTextTemplateRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, InstanceDomainAddedEventType, DomainAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, InstanceDomainPrimarySetEventType, DomainPrimarySetEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, InstanceDomainRemovedEventType, DomainRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, InstanceAddedEventType, InstanceAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, InstanceChangedEventType, InstanceChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, InstanceRemovedEventType, InstanceRemovedEventMapper)
|
||||
}
|
||||
|
@ -5,6 +5,6 @@ import (
|
||||
)
|
||||
|
||||
func RegisterEventMappers(es *eventstore.Eventstore) {
|
||||
es.RegisterFilterEventMapper(AddedEventType, AddedEventMapper)
|
||||
es.RegisterFilterEventMapper(AddedCertificateEventType, AddedCertificateEventMapper)
|
||||
es.RegisterFilterEventMapper(AggregateType, AddedEventType, AddedEventMapper)
|
||||
es.RegisterFilterEventMapper(AggregateType, AddedCertificateEventType, AddedCertificateEventMapper)
|
||||
}
|
||||
|
@ -5,83 +5,83 @@ import (
|
||||
)
|
||||
|
||||
func RegisterEventMappers(es *eventstore.Eventstore) {
|
||||
es.RegisterFilterEventMapper(OrgAddedEventType, OrgAddedEventMapper).
|
||||
RegisterFilterEventMapper(OrgChangedEventType, OrgChangedEventMapper).
|
||||
RegisterFilterEventMapper(OrgDeactivatedEventType, OrgDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(OrgReactivatedEventType, OrgReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(OrgRemovedEventType, OrgRemovedEventMapper).
|
||||
RegisterFilterEventMapper(OrgDomainAddedEventType, DomainAddedEventMapper).
|
||||
RegisterFilterEventMapper(OrgDomainVerificationAddedEventType, DomainVerificationAddedEventMapper).
|
||||
RegisterFilterEventMapper(OrgDomainVerificationFailedEventType, DomainVerificationFailedEventMapper).
|
||||
RegisterFilterEventMapper(OrgDomainVerifiedEventType, DomainVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(OrgDomainPrimarySetEventType, DomainPrimarySetEventMapper).
|
||||
RegisterFilterEventMapper(OrgDomainRemovedEventType, DomainRemovedEventMapper).
|
||||
RegisterFilterEventMapper(MemberAddedEventType, MemberAddedEventMapper).
|
||||
RegisterFilterEventMapper(MemberChangedEventType, MemberChangedEventMapper).
|
||||
RegisterFilterEventMapper(MemberRemovedEventType, MemberRemovedEventMapper).
|
||||
RegisterFilterEventMapper(MemberCascadeRemovedEventType, MemberCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyAddedEventType, LabelPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyChangedEventType, LabelPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyActivatedEventType, LabelPolicyActivatedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyRemovedEventType, LabelPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyLogoAddedEventType, LabelPolicyLogoAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyLogoRemovedEventType, LabelPolicyLogoRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyIconAddedEventType, LabelPolicyIconAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyIconRemovedEventType, LabelPolicyIconRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyLogoDarkAddedEventType, LabelPolicyLogoDarkAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyLogoDarkRemovedEventType, LabelPolicyLogoDarkRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyIconDarkAddedEventType, LabelPolicyIconDarkAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyIconDarkRemovedEventType, LabelPolicyIconDarkRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyFontAddedEventType, LabelPolicyFontAddedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyFontRemovedEventType, LabelPolicyFontRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LabelPolicyAssetsRemovedEventType, LabelPolicyAssetsRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyAddedEventType, LoginPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyChangedEventType, LoginPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyRemovedEventType, LoginPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicySecondFactorAddedEventType, SecondFactorAddedEventEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicySecondFactorRemovedEventType, SecondFactorRemovedEventEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyMultiFactorAddedEventType, MultiFactorAddedEventEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyMultiFactorRemovedEventType, MultiFactorRemovedEventEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyIDPProviderAddedEventType, IdentityProviderAddedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyIDPProviderRemovedEventType, IdentityProviderRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LoginPolicyIDPProviderCascadeRemovedEventType, IdentityProviderCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(DomainPolicyAddedEventType, DomainPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(DomainPolicyChangedEventType, DomainPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(DomainPolicyRemovedEventType, DomainPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(PasswordAgePolicyAddedEventType, PasswordAgePolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(PasswordAgePolicyChangedEventType, PasswordAgePolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(PasswordAgePolicyRemovedEventType, PasswordAgePolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(PasswordComplexityPolicyAddedEventType, PasswordComplexityPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(PasswordComplexityPolicyChangedEventType, PasswordComplexityPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(PasswordComplexityPolicyRemovedEventType, PasswordComplexityPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(LockoutPolicyAddedEventType, LockoutPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(LockoutPolicyChangedEventType, LockoutPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(LockoutPolicyRemovedEventType, LockoutPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(PrivacyPolicyAddedEventType, PrivacyPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(PrivacyPolicyChangedEventType, PrivacyPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(PrivacyPolicyRemovedEventType, PrivacyPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(MailTemplateAddedEventType, MailTemplateAddedEventMapper).
|
||||
RegisterFilterEventMapper(MailTemplateChangedEventType, MailTemplateChangedEventMapper).
|
||||
RegisterFilterEventMapper(MailTemplateRemovedEventType, MailTemplateRemovedEventMapper).
|
||||
RegisterFilterEventMapper(MailTextAddedEventType, MailTextAddedEventMapper).
|
||||
RegisterFilterEventMapper(MailTextChangedEventType, MailTextChangedEventMapper).
|
||||
RegisterFilterEventMapper(MailTextRemovedEventType, MailTextRemovedEventMapper).
|
||||
RegisterFilterEventMapper(CustomTextSetEventType, CustomTextSetEventMapper).
|
||||
RegisterFilterEventMapper(CustomTextRemovedEventType, CustomTextRemovedEventMapper).
|
||||
RegisterFilterEventMapper(CustomTextTemplateRemovedEventType, CustomTextTemplateRemovedEventMapper).
|
||||
RegisterFilterEventMapper(IDPConfigAddedEventType, IDPConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(IDPConfigChangedEventType, IDPConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(IDPConfigRemovedEventType, IDPConfigRemovedEventMapper).
|
||||
RegisterFilterEventMapper(IDPConfigDeactivatedEventType, IDPConfigDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(IDPConfigReactivatedEventType, IDPConfigReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(IDPOIDCConfigAddedEventType, IDPOIDCConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(IDPOIDCConfigChangedEventType, IDPOIDCConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(IDPJWTConfigAddedEventType, IDPJWTConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(IDPJWTConfigChangedEventType, IDPJWTConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(TriggerActionsSetEventType, TriggerActionsSetEventMapper).
|
||||
RegisterFilterEventMapper(TriggerActionsCascadeRemovedEventType, TriggerActionsCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(FlowClearedEventType, FlowClearedEventMapper).
|
||||
RegisterFilterEventMapper(MetadataSetType, MetadataSetEventMapper).
|
||||
RegisterFilterEventMapper(MetadataRemovedType, MetadataRemovedEventMapper).
|
||||
RegisterFilterEventMapper(MetadataRemovedAllType, MetadataRemovedAllEventMapper)
|
||||
es.RegisterFilterEventMapper(AggregateType, OrgAddedEventType, OrgAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OrgChangedEventType, OrgChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OrgDeactivatedEventType, OrgDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OrgReactivatedEventType, OrgReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OrgRemovedEventType, OrgRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OrgDomainAddedEventType, DomainAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OrgDomainVerificationAddedEventType, DomainVerificationAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OrgDomainVerificationFailedEventType, DomainVerificationFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OrgDomainVerifiedEventType, DomainVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OrgDomainPrimarySetEventType, DomainPrimarySetEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OrgDomainRemovedEventType, DomainRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberAddedEventType, MemberAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberChangedEventType, MemberChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberRemovedEventType, MemberRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberCascadeRemovedEventType, MemberCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyAddedEventType, LabelPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyChangedEventType, LabelPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyActivatedEventType, LabelPolicyActivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyRemovedEventType, LabelPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyLogoAddedEventType, LabelPolicyLogoAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyLogoRemovedEventType, LabelPolicyLogoRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyIconAddedEventType, LabelPolicyIconAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyIconRemovedEventType, LabelPolicyIconRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyLogoDarkAddedEventType, LabelPolicyLogoDarkAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyLogoDarkRemovedEventType, LabelPolicyLogoDarkRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyIconDarkAddedEventType, LabelPolicyIconDarkAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyIconDarkRemovedEventType, LabelPolicyIconDarkRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyFontAddedEventType, LabelPolicyFontAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyFontRemovedEventType, LabelPolicyFontRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LabelPolicyAssetsRemovedEventType, LabelPolicyAssetsRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyAddedEventType, LoginPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyChangedEventType, LoginPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyRemovedEventType, LoginPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicySecondFactorAddedEventType, SecondFactorAddedEventEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicySecondFactorRemovedEventType, SecondFactorRemovedEventEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyMultiFactorAddedEventType, MultiFactorAddedEventEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyMultiFactorRemovedEventType, MultiFactorRemovedEventEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyIDPProviderAddedEventType, IdentityProviderAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyIDPProviderRemovedEventType, IdentityProviderRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LoginPolicyIDPProviderCascadeRemovedEventType, IdentityProviderCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DomainPolicyAddedEventType, DomainPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DomainPolicyChangedEventType, DomainPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, DomainPolicyRemovedEventType, DomainPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PasswordAgePolicyAddedEventType, PasswordAgePolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PasswordAgePolicyChangedEventType, PasswordAgePolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PasswordAgePolicyRemovedEventType, PasswordAgePolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PasswordComplexityPolicyAddedEventType, PasswordComplexityPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PasswordComplexityPolicyChangedEventType, PasswordComplexityPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PasswordComplexityPolicyRemovedEventType, PasswordComplexityPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LockoutPolicyAddedEventType, LockoutPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LockoutPolicyChangedEventType, LockoutPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, LockoutPolicyRemovedEventType, LockoutPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PrivacyPolicyAddedEventType, PrivacyPolicyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PrivacyPolicyChangedEventType, PrivacyPolicyChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PrivacyPolicyRemovedEventType, PrivacyPolicyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MailTemplateAddedEventType, MailTemplateAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MailTemplateChangedEventType, MailTemplateChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MailTemplateRemovedEventType, MailTemplateRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MailTextAddedEventType, MailTextAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MailTextChangedEventType, MailTextChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MailTextRemovedEventType, MailTextRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, CustomTextSetEventType, CustomTextSetEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, CustomTextRemovedEventType, CustomTextRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, CustomTextTemplateRemovedEventType, CustomTextTemplateRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPConfigAddedEventType, IDPConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPConfigChangedEventType, IDPConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPConfigRemovedEventType, IDPConfigRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPConfigDeactivatedEventType, IDPConfigDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPConfigReactivatedEventType, IDPConfigReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPOIDCConfigAddedEventType, IDPOIDCConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPOIDCConfigChangedEventType, IDPOIDCConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPJWTConfigAddedEventType, IDPJWTConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, IDPJWTConfigChangedEventType, IDPJWTConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, TriggerActionsSetEventType, TriggerActionsSetEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, TriggerActionsCascadeRemovedEventType, TriggerActionsCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, FlowClearedEventType, FlowClearedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MetadataSetType, MetadataSetEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MetadataRemovedType, MetadataRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MetadataRemovedAllType, MetadataRemovedAllEventMapper)
|
||||
}
|
||||
|
@ -5,43 +5,43 @@ import (
|
||||
)
|
||||
|
||||
func RegisterEventMappers(es *eventstore.Eventstore) {
|
||||
es.RegisterFilterEventMapper(ProjectAddedType, ProjectAddedEventMapper).
|
||||
RegisterFilterEventMapper(ProjectChangedType, ProjectChangeEventMapper).
|
||||
RegisterFilterEventMapper(ProjectDeactivatedType, ProjectDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(ProjectReactivatedType, ProjectReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(ProjectRemovedType, ProjectRemovedEventMapper).
|
||||
RegisterFilterEventMapper(MemberAddedType, MemberAddedEventMapper).
|
||||
RegisterFilterEventMapper(MemberChangedType, MemberChangedEventMapper).
|
||||
RegisterFilterEventMapper(MemberRemovedType, MemberRemovedEventMapper).
|
||||
RegisterFilterEventMapper(MemberCascadeRemovedType, MemberCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(RoleAddedType, RoleAddedEventMapper).
|
||||
RegisterFilterEventMapper(RoleChangedType, RoleChangedEventMapper).
|
||||
RegisterFilterEventMapper(RoleRemovedType, RoleRemovedEventMapper).
|
||||
RegisterFilterEventMapper(GrantAddedType, GrantAddedEventMapper).
|
||||
RegisterFilterEventMapper(GrantChangedType, GrantChangedEventMapper).
|
||||
RegisterFilterEventMapper(GrantCascadeChangedType, GrantCascadeChangedEventMapper).
|
||||
RegisterFilterEventMapper(GrantDeactivatedType, GrantDeactivateEventMapper).
|
||||
RegisterFilterEventMapper(GrantReactivatedType, GrantReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(GrantRemovedType, GrantRemovedEventMapper).
|
||||
RegisterFilterEventMapper(GrantMemberAddedType, GrantMemberAddedEventMapper).
|
||||
RegisterFilterEventMapper(GrantMemberChangedType, GrantMemberChangedEventMapper).
|
||||
RegisterFilterEventMapper(GrantMemberRemovedType, GrantMemberRemovedEventMapper).
|
||||
RegisterFilterEventMapper(GrantMemberCascadeRemovedType, GrantMemberCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(ApplicationAddedType, ApplicationAddedEventMapper).
|
||||
RegisterFilterEventMapper(ApplicationChangedType, ApplicationChangedEventMapper).
|
||||
RegisterFilterEventMapper(ApplicationRemovedType, ApplicationRemovedEventMapper).
|
||||
RegisterFilterEventMapper(ApplicationDeactivatedType, ApplicationDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(ApplicationReactivatedType, ApplicationReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(OIDCConfigAddedType, OIDCConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(OIDCConfigChangedType, OIDCConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(OIDCConfigSecretChangedType, OIDCConfigSecretChangedEventMapper).
|
||||
RegisterFilterEventMapper(OIDCClientSecretCheckSucceededType, OIDCConfigSecretCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(OIDCClientSecretCheckFailedType, OIDCConfigSecretCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(APIConfigAddedType, APIConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(APIConfigChangedType, APIConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(APIConfigSecretChangedType, APIConfigSecretChangedEventMapper).
|
||||
RegisterFilterEventMapper(ApplicationKeyAddedEventType, ApplicationKeyAddedEventMapper).
|
||||
RegisterFilterEventMapper(ApplicationKeyRemovedEventType, ApplicationKeyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(SAMLConfigAddedType, SAMLConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(SAMLConfigChangedType, SAMLConfigChangedEventMapper)
|
||||
es.RegisterFilterEventMapper(AggregateType, ProjectAddedType, ProjectAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ProjectChangedType, ProjectChangeEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ProjectDeactivatedType, ProjectDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ProjectReactivatedType, ProjectReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ProjectRemovedType, ProjectRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberAddedType, MemberAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberChangedType, MemberChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberRemovedType, MemberRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MemberCascadeRemovedType, MemberCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, RoleAddedType, RoleAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, RoleChangedType, RoleChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, RoleRemovedType, RoleRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, GrantAddedType, GrantAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, GrantChangedType, GrantChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, GrantCascadeChangedType, GrantCascadeChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, GrantDeactivatedType, GrantDeactivateEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, GrantReactivatedType, GrantReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, GrantRemovedType, GrantRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, GrantMemberAddedType, GrantMemberAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, GrantMemberChangedType, GrantMemberChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, GrantMemberRemovedType, GrantMemberRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, GrantMemberCascadeRemovedType, GrantMemberCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ApplicationAddedType, ApplicationAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ApplicationChangedType, ApplicationChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ApplicationRemovedType, ApplicationRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ApplicationDeactivatedType, ApplicationDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ApplicationReactivatedType, ApplicationReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OIDCConfigAddedType, OIDCConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OIDCConfigChangedType, OIDCConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OIDCConfigSecretChangedType, OIDCConfigSecretChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OIDCClientSecretCheckSucceededType, OIDCConfigSecretCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, OIDCClientSecretCheckFailedType, OIDCConfigSecretCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, APIConfigAddedType, APIConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, APIConfigChangedType, APIConfigChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, APIConfigSecretChangedType, APIConfigSecretChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ApplicationKeyAddedEventType, ApplicationKeyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, ApplicationKeyRemovedEventType, ApplicationKeyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SAMLConfigAddedType, SAMLConfigAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, SAMLConfigChangedType, SAMLConfigChangedEventMapper)
|
||||
}
|
||||
|
@ -5,113 +5,113 @@ import (
|
||||
)
|
||||
|
||||
func RegisterEventMappers(es *eventstore.Eventstore) {
|
||||
es.RegisterFilterEventMapper(UserV1AddedType, HumanAddedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1RegisteredType, HumanRegisteredEventMapper).
|
||||
RegisterFilterEventMapper(UserV1InitialCodeAddedType, HumanInitialCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1InitialCodeSentType, HumanInitialCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(UserV1InitializedCheckSucceededType, HumanInitializedCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(UserV1InitializedCheckFailedType, HumanInitializedCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1SignedOutType, HumanSignedOutEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PasswordChangedType, HumanPasswordChangedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PasswordCodeAddedType, HumanPasswordCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PasswordCodeSentType, HumanPasswordCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PasswordCheckSucceededType, HumanPasswordCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PasswordCheckFailedType, HumanPasswordCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1EmailChangedType, HumanEmailChangedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1EmailVerifiedType, HumanEmailVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1EmailVerificationFailedType, HumanEmailVerificationFailedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1EmailCodeAddedType, HumanEmailCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1EmailCodeSentType, HumanEmailCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PhoneChangedType, HumanPhoneChangedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PhoneRemovedType, HumanPhoneRemovedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PhoneVerifiedType, HumanPhoneVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PhoneVerificationFailedType, HumanPhoneVerificationFailedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PhoneCodeAddedType, HumanPhoneCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1PhoneCodeSentType, HumanPhoneCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(UserV1ProfileChangedType, HumanProfileChangedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1AddressChangedType, HumanAddressChangedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1MFAInitSkippedType, HumanMFAInitSkippedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1MFAOTPAddedType, HumanOTPAddedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1MFAOTPVerifiedType, HumanOTPVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1MFAOTPRemovedType, HumanOTPRemovedEventMapper).
|
||||
RegisterFilterEventMapper(UserV1MFAOTPCheckSucceededType, HumanOTPCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(UserV1MFAOTPCheckFailedType, HumanOTPCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(UserLockedType, UserLockedEventMapper).
|
||||
RegisterFilterEventMapper(UserUnlockedType, UserUnlockedEventMapper).
|
||||
RegisterFilterEventMapper(UserDeactivatedType, UserDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(UserReactivatedType, UserReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(UserRemovedType, UserRemovedEventMapper).
|
||||
RegisterFilterEventMapper(UserTokenAddedType, UserTokenAddedEventMapper).
|
||||
RegisterFilterEventMapper(UserTokenRemovedType, UserTokenRemovedEventMapper).
|
||||
RegisterFilterEventMapper(UserDomainClaimedType, DomainClaimedEventMapper).
|
||||
RegisterFilterEventMapper(UserDomainClaimedSentType, DomainClaimedSentEventMapper).
|
||||
RegisterFilterEventMapper(UserUserNameChangedType, UsernameChangedEventMapper).
|
||||
RegisterFilterEventMapper(MetadataSetType, MetadataSetEventMapper).
|
||||
RegisterFilterEventMapper(MetadataRemovedType, MetadataRemovedEventMapper).
|
||||
RegisterFilterEventMapper(MetadataRemovedAllType, MetadataRemovedAllEventMapper).
|
||||
RegisterFilterEventMapper(HumanAddedType, HumanAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanRegisteredType, HumanRegisteredEventMapper).
|
||||
RegisterFilterEventMapper(HumanInitialCodeAddedType, HumanInitialCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanInitialCodeSentType, HumanInitialCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(HumanInitializedCheckSucceededType, HumanInitializedCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(HumanInitializedCheckFailedType, HumanInitializedCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(HumanSignedOutType, HumanSignedOutEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordChangedType, HumanPasswordChangedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordCodeAddedType, HumanPasswordCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordCodeSentType, HumanPasswordCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordCheckSucceededType, HumanPasswordCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordCheckFailedType, HumanPasswordCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(UserIDPLinkAddedType, UserIDPLinkAddedEventMapper).
|
||||
RegisterFilterEventMapper(UserIDPLinkRemovedType, UserIDPLinkRemovedEventMapper).
|
||||
RegisterFilterEventMapper(UserIDPLinkCascadeRemovedType, UserIDPLinkCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(UserIDPLoginCheckSucceededType, UserIDPCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(HumanEmailChangedType, HumanEmailChangedEventMapper).
|
||||
RegisterFilterEventMapper(HumanEmailVerifiedType, HumanEmailVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(HumanEmailVerificationFailedType, HumanEmailVerificationFailedEventMapper).
|
||||
RegisterFilterEventMapper(HumanEmailCodeAddedType, HumanEmailCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanEmailCodeSentType, HumanEmailCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(HumanPhoneChangedType, HumanPhoneChangedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPhoneRemovedType, HumanPhoneRemovedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPhoneVerifiedType, HumanPhoneVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPhoneVerificationFailedType, HumanPhoneVerificationFailedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPhoneCodeAddedType, HumanPhoneCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPhoneCodeSentType, HumanPhoneCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(HumanProfileChangedType, HumanProfileChangedEventMapper).
|
||||
RegisterFilterEventMapper(HumanAvatarAddedType, HumanAvatarAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanAvatarRemovedType, HumanAvatarRemovedEventMapper).
|
||||
RegisterFilterEventMapper(HumanAddressChangedType, HumanAddressChangedEventMapper).
|
||||
RegisterFilterEventMapper(HumanMFAInitSkippedType, HumanMFAInitSkippedEventMapper).
|
||||
RegisterFilterEventMapper(HumanMFAOTPAddedType, HumanOTPAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanMFAOTPVerifiedType, HumanOTPVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(HumanMFAOTPRemovedType, HumanOTPRemovedEventMapper).
|
||||
RegisterFilterEventMapper(HumanMFAOTPCheckSucceededType, HumanOTPCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(HumanMFAOTPCheckFailedType, HumanOTPCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(HumanU2FTokenAddedType, HumanU2FAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanU2FTokenVerifiedType, HumanU2FVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(HumanU2FTokenSignCountChangedType, HumanU2FSignCountChangedEventMapper).
|
||||
RegisterFilterEventMapper(HumanU2FTokenRemovedType, HumanU2FRemovedEventMapper).
|
||||
RegisterFilterEventMapper(HumanU2FTokenBeginLoginType, HumanU2FBeginLoginEventMapper).
|
||||
RegisterFilterEventMapper(HumanU2FTokenCheckSucceededType, HumanU2FCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(HumanU2FTokenCheckFailedType, HumanU2FCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessTokenAddedType, HumanPasswordlessAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessTokenVerifiedType, HumanPasswordlessVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessTokenSignCountChangedType, HumanPasswordlessSignCountChangedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessTokenRemovedType, HumanPasswordlessRemovedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessTokenBeginLoginType, HumanPasswordlessBeginLoginEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessTokenCheckSucceededType, HumanPasswordlessCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessTokenCheckFailedType, HumanPasswordlessCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessInitCodeAddedType, HumanPasswordlessInitCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessInitCodeRequestedType, HumanPasswordlessInitCodeRequestedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessInitCodeSentType, HumanPasswordlessInitCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessInitCodeCheckFailedType, HumanPasswordlessInitCodeCodeCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(HumanPasswordlessInitCodeCheckSucceededType, HumanPasswordlessInitCodeCodeCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(HumanRefreshTokenAddedType, HumanRefreshTokenAddedEventMapper).
|
||||
RegisterFilterEventMapper(HumanRefreshTokenRenewedType, HumanRefreshTokenRenewedEventEventMapper).
|
||||
RegisterFilterEventMapper(HumanRefreshTokenRemovedType, HumanRefreshTokenRemovedEventEventMapper).
|
||||
RegisterFilterEventMapper(MachineAddedEventType, MachineAddedEventMapper).
|
||||
RegisterFilterEventMapper(MachineChangedEventType, MachineChangedEventMapper).
|
||||
RegisterFilterEventMapper(MachineKeyAddedEventType, MachineKeyAddedEventMapper).
|
||||
RegisterFilterEventMapper(MachineKeyRemovedEventType, MachineKeyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(PersonalAccessTokenAddedType, PersonalAccessTokenAddedEventMapper).
|
||||
RegisterFilterEventMapper(PersonalAccessTokenRemovedType, PersonalAccessTokenRemovedEventMapper)
|
||||
es.RegisterFilterEventMapper(AggregateType, UserV1AddedType, HumanAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1RegisteredType, HumanRegisteredEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1InitialCodeAddedType, HumanInitialCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1InitialCodeSentType, HumanInitialCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1InitializedCheckSucceededType, HumanInitializedCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1InitializedCheckFailedType, HumanInitializedCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1SignedOutType, HumanSignedOutEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PasswordChangedType, HumanPasswordChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PasswordCodeAddedType, HumanPasswordCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PasswordCodeSentType, HumanPasswordCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PasswordCheckSucceededType, HumanPasswordCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PasswordCheckFailedType, HumanPasswordCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1EmailChangedType, HumanEmailChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1EmailVerifiedType, HumanEmailVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1EmailVerificationFailedType, HumanEmailVerificationFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1EmailCodeAddedType, HumanEmailCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1EmailCodeSentType, HumanEmailCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PhoneChangedType, HumanPhoneChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PhoneRemovedType, HumanPhoneRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PhoneVerifiedType, HumanPhoneVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PhoneVerificationFailedType, HumanPhoneVerificationFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PhoneCodeAddedType, HumanPhoneCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1PhoneCodeSentType, HumanPhoneCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1ProfileChangedType, HumanProfileChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1AddressChangedType, HumanAddressChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1MFAInitSkippedType, HumanMFAInitSkippedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1MFAOTPAddedType, HumanOTPAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1MFAOTPVerifiedType, HumanOTPVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1MFAOTPRemovedType, HumanOTPRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1MFAOTPCheckSucceededType, HumanOTPCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserV1MFAOTPCheckFailedType, HumanOTPCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserLockedType, UserLockedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserUnlockedType, UserUnlockedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserDeactivatedType, UserDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserReactivatedType, UserReactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserRemovedType, UserRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserTokenAddedType, UserTokenAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserTokenRemovedType, UserTokenRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserDomainClaimedType, DomainClaimedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserDomainClaimedSentType, DomainClaimedSentEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserUserNameChangedType, UsernameChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MetadataSetType, MetadataSetEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MetadataRemovedType, MetadataRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MetadataRemovedAllType, MetadataRemovedAllEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanAddedType, HumanAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanRegisteredType, HumanRegisteredEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanInitialCodeAddedType, HumanInitialCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanInitialCodeSentType, HumanInitialCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanInitializedCheckSucceededType, HumanInitializedCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanInitializedCheckFailedType, HumanInitializedCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanSignedOutType, HumanSignedOutEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordChangedType, HumanPasswordChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordCodeAddedType, HumanPasswordCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordCodeSentType, HumanPasswordCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordCheckSucceededType, HumanPasswordCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordCheckFailedType, HumanPasswordCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserIDPLinkAddedType, UserIDPLinkAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserIDPLinkRemovedType, UserIDPLinkRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserIDPLinkCascadeRemovedType, UserIDPLinkCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserIDPLoginCheckSucceededType, UserIDPCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanEmailChangedType, HumanEmailChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanEmailVerifiedType, HumanEmailVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanEmailVerificationFailedType, HumanEmailVerificationFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanEmailCodeAddedType, HumanEmailCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanEmailCodeSentType, HumanEmailCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPhoneChangedType, HumanPhoneChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPhoneRemovedType, HumanPhoneRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPhoneVerifiedType, HumanPhoneVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPhoneVerificationFailedType, HumanPhoneVerificationFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPhoneCodeAddedType, HumanPhoneCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPhoneCodeSentType, HumanPhoneCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanProfileChangedType, HumanProfileChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanAvatarAddedType, HumanAvatarAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanAvatarRemovedType, HumanAvatarRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanAddressChangedType, HumanAddressChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanMFAInitSkippedType, HumanMFAInitSkippedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanMFAOTPAddedType, HumanOTPAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanMFAOTPVerifiedType, HumanOTPVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanMFAOTPRemovedType, HumanOTPRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanMFAOTPCheckSucceededType, HumanOTPCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanMFAOTPCheckFailedType, HumanOTPCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanU2FTokenAddedType, HumanU2FAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanU2FTokenVerifiedType, HumanU2FVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanU2FTokenSignCountChangedType, HumanU2FSignCountChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanU2FTokenRemovedType, HumanU2FRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanU2FTokenBeginLoginType, HumanU2FBeginLoginEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanU2FTokenCheckSucceededType, HumanU2FCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanU2FTokenCheckFailedType, HumanU2FCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessTokenAddedType, HumanPasswordlessAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessTokenVerifiedType, HumanPasswordlessVerifiedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessTokenSignCountChangedType, HumanPasswordlessSignCountChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessTokenRemovedType, HumanPasswordlessRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessTokenBeginLoginType, HumanPasswordlessBeginLoginEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessTokenCheckSucceededType, HumanPasswordlessCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessTokenCheckFailedType, HumanPasswordlessCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessInitCodeAddedType, HumanPasswordlessInitCodeAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessInitCodeRequestedType, HumanPasswordlessInitCodeRequestedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessInitCodeSentType, HumanPasswordlessInitCodeSentEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessInitCodeCheckFailedType, HumanPasswordlessInitCodeCodeCheckFailedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanPasswordlessInitCodeCheckSucceededType, HumanPasswordlessInitCodeCodeCheckSucceededEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanRefreshTokenAddedType, HumanRefreshTokenAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanRefreshTokenRenewedType, HumanRefreshTokenRenewedEventEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, HumanRefreshTokenRemovedType, HumanRefreshTokenRemovedEventEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MachineAddedEventType, MachineAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MachineChangedEventType, MachineChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MachineKeyAddedEventType, MachineKeyAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, MachineKeyRemovedEventType, MachineKeyRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PersonalAccessTokenAddedType, PersonalAccessTokenAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, PersonalAccessTokenRemovedType, PersonalAccessTokenRemovedEventMapper)
|
||||
}
|
||||
|
@ -5,11 +5,11 @@ import (
|
||||
)
|
||||
|
||||
func RegisterEventMappers(es *eventstore.Eventstore) {
|
||||
es.RegisterFilterEventMapper(UserGrantAddedType, UserGrantAddedEventMapper).
|
||||
RegisterFilterEventMapper(UserGrantChangedType, UserGrantChangedEventMapper).
|
||||
RegisterFilterEventMapper(UserGrantCascadeChangedType, UserGrantCascadeChangedEventMapper).
|
||||
RegisterFilterEventMapper(UserGrantRemovedType, UserGrantRemovedEventMapper).
|
||||
RegisterFilterEventMapper(UserGrantCascadeRemovedType, UserGrantCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(UserGrantDeactivatedType, UserGrantDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(UserGrantReactivatedType, UserGrantReactivatedEventMapper)
|
||||
es.RegisterFilterEventMapper(AggregateType, UserGrantAddedType, UserGrantAddedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserGrantChangedType, UserGrantChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserGrantCascadeChangedType, UserGrantCascadeChangedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserGrantRemovedType, UserGrantRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserGrantCascadeRemovedType, UserGrantCascadeRemovedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserGrantDeactivatedType, UserGrantDeactivatedEventMapper).
|
||||
RegisterFilterEventMapper(AggregateType, UserGrantReactivatedType, UserGrantReactivatedEventMapper)
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import "zitadel/policy.proto";
|
||||
import "zitadel/settings.proto";
|
||||
import "zitadel/text.proto";
|
||||
import "zitadel/member.proto";
|
||||
import "zitadel/event.proto";
|
||||
import "zitadel/management.proto";
|
||||
import "zitadel/v1.proto";
|
||||
|
||||
@ -2544,6 +2545,39 @@ service AdminService {
|
||||
permission: "iam.read";
|
||||
};
|
||||
}
|
||||
|
||||
rpc ListEventTypes(ListEventTypesRequest) returns (ListEventTypesResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/events/types/_search";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "events.read";
|
||||
};
|
||||
}
|
||||
|
||||
rpc ListEvents(ListEventsRequest) returns (ListEventsResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/events/_search";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "events.read";
|
||||
};
|
||||
}
|
||||
|
||||
rpc ListAggregateTypes(ListAggregateTypesRequest) returns (ListAggregateTypesResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/aggregates/types/_search";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "events.read";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4797,3 +4831,76 @@ message ExportDataRequest {
|
||||
message ExportDataResponse {
|
||||
repeated DataOrg orgs = 1;
|
||||
}
|
||||
|
||||
message ListEventsRequest {
|
||||
// sequence represents the order of events. It's always upcounting
|
||||
// if asc is false sequence is used as less than filter
|
||||
// if asc is true sequence is used as greater than filter
|
||||
// if sequence is 0 the field is ignored
|
||||
uint64 sequence = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2\"";
|
||||
}
|
||||
];
|
||||
uint32 limit = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "20";
|
||||
description: "Maximum amount of events returned.";
|
||||
}
|
||||
];
|
||||
bool asc = 3 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "default is descending sorting order"
|
||||
}
|
||||
];
|
||||
string editor_user_id = 4 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\"";
|
||||
}
|
||||
];
|
||||
// the types are or filtered and must match the type exatly
|
||||
repeated string event_types = 5 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "[\"user.human.added\", \"user.machine\"]";
|
||||
}
|
||||
];
|
||||
string aggregate_id = 6 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\"";
|
||||
}
|
||||
];
|
||||
string aggregate_type = 7 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"user\"";
|
||||
}
|
||||
];
|
||||
string resource_owner = 8 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\"";
|
||||
}
|
||||
];
|
||||
// if asc is false creation_date is used as less than filter
|
||||
// if asc is true creation_date is used as greater than filter
|
||||
// if creation_date is not set the field is ignored
|
||||
google.protobuf.Timestamp creation_date = 9 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2019-04-01T08:45:00.000000Z\"";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ListEventsResponse {
|
||||
repeated zitadel.event.v1.Event events = 1;
|
||||
}
|
||||
|
||||
message ListEventTypesRequest {}
|
||||
|
||||
message ListEventTypesResponse {
|
||||
repeated string event_types = 1;
|
||||
}
|
||||
|
||||
message ListAggregateTypesRequest {}
|
||||
|
||||
message ListAggregateTypesResponse {
|
||||
repeated string aggregate_types = 1;
|
||||
}
|
||||
|
36
proto/zitadel/event.proto
Normal file
36
proto/zitadel/event.proto
Normal file
@ -0,0 +1,36 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/struct.proto";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
package zitadel.event.v1;
|
||||
|
||||
option go_package ="github.com/zitadel/zitadel/pkg/grpc/event";
|
||||
|
||||
message Event {
|
||||
Editor editor = 1;
|
||||
Aggregate aggregate = 2;
|
||||
uint64 sequence = 3;
|
||||
// The timestamp the event occurred
|
||||
google.protobuf.Timestamp creation_date = 4 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"2019-04-01T08:45:00.000000Z\"";
|
||||
}
|
||||
];
|
||||
google.protobuf.Struct payload = 5;
|
||||
string type = 6;
|
||||
}
|
||||
|
||||
message Editor {
|
||||
string user_id = 1;
|
||||
string display_name = 2;
|
||||
string service = 3;
|
||||
}
|
||||
|
||||
message Aggregate {
|
||||
string id = 1;
|
||||
string type = 2;
|
||||
string resource_owner = 3;
|
||||
}
|
Loading…
Reference in New Issue
Block a user