Skip to content

Commit

Permalink
Revert "Added other delegations events"
Browse files Browse the repository at this point in the history
This reverts commit 9b0534c.
  • Loading branch information
Carminepo2 committed Oct 14, 2024
1 parent f1ef54e commit ad270d5
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 242 deletions.
52 changes: 0 additions & 52 deletions proto/v2/delegation/delegation.proto

This file was deleted.

21 changes: 0 additions & 21 deletions proto/v2/delegation/events.proto

This file was deleted.

1 change: 0 additions & 1 deletion proto/v2/eservice/eservice.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ message EServiceV2 {
repeated EServiceDescriptorV2 descriptors = 6;
int64 createdAt = 7;
EServiceModeV2 mode = 8;
optional string delegationId = 9;
}

message EServiceAttributeValueV2 {
Expand Down
10 changes: 0 additions & 10 deletions proto/v2/eservice/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,3 @@ message EServiceDescriptorDocumentDeletedV2 {
message EServiceDescriptionUpdatedV2 {
EServiceV2 eservice = 1;
}

message EServiceDelegationAssignedV2 {
string delegationId = 1;
EServiceV2 eservice = 2;
}

message EServiceDelegationRevokedV2 {
string delegationId = 1;
EServiceV2 eservice = 2;
}
64 changes: 0 additions & 64 deletions src/delegation/eventsV2.ts

This file was deleted.

41 changes: 0 additions & 41 deletions src/delegation/index.ts

This file was deleted.

24 changes: 0 additions & 24 deletions src/eservice/eventsV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import {
EServiceDraftDescriptorUpdatedV2,
EServiceDescriptorQuotasUpdatedV2,
EServiceDescriptionUpdatedV2,
EServiceDelegationAssignedV2,
EServiceDelegationRevokedV2,
} from "../gen/v2/eservice/events.js";

export function eServiceEventToBinaryDataV2(
Expand Down Expand Up @@ -86,12 +84,6 @@ export function eServiceEventToBinaryDataV2(
.with({ type: "EServiceDescriptionUpdated" }, ({ data }) =>
EServiceDescriptionUpdatedV2.toBinary(data)
)
.with({ type: "EServiceDelegationAssigned" }, ({ data }) =>
EServiceDescriptionUpdatedV2.toBinary(data)
)
.with({ type: "EServiceDelegationRevoked" }, ({ data }) =>
EServiceDescriptionUpdatedV2.toBinary(data)
)
.exhaustive();
}

Expand Down Expand Up @@ -248,22 +240,6 @@ export const EServiceEventV2 = z.discriminatedUnion("type", [
version: z.number(),
timestamp: z.coerce.date(),
}),
z.object({
event_version: z.literal(2),
type: z.literal("EServiceDelegationAssigned"),
data: protobufDecoder(EServiceDelegationAssignedV2),
stream_id: z.string(),
version: z.number(),
timestamp: z.coerce.date(),
}),
z.object({
event_version: z.literal(2),
type: z.literal("EServiceDelegationRevoked"),
data: protobufDecoder(EServiceDelegationRevokedV2),
stream_id: z.string(),
version: z.number(),
timestamp: z.coerce.date(),
}),
]);

export type EServiceEventV2 = z.infer<typeof EServiceEventV2>;
3 changes: 0 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ export * from "./eservice/index.js";
export * from "./agreement/index.js";
export * from "./purpose/index.js";
export * from "./tenant/index.js";
export * from "./delegation/index.js";

export * from "./gen/v1/agreement/agreement.js";
export * from "./gen/v1/agreement/events.js";
Expand All @@ -21,5 +20,3 @@ export * from "./gen/v2/purpose/purpose.js";
export * from "./gen/v2/purpose/events.js";
export * from "./gen/v2/tenant/tenant.js";
export * from "./gen/v2/tenant/events.js";
export * from "./gen/v2/delegation/delegation.js";
export * from "./gen/v2/delegation/events.js";
26 changes: 0 additions & 26 deletions tests/delegation.test.ts

This file was deleted.

0 comments on commit ad270d5

Please sign in to comment.