@volontariapp/contracts-nest 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/geo.d.ts +9 -0
- package/dist/common/geo.d.ts.map +1 -0
- package/dist/common/geo.js +2 -0
- package/dist/common/geo.js.map +1 -0
- package/dist/common/pagination.d.ts.map +1 -1
- package/dist/common/timestamp.d.ts.map +1 -1
- package/dist/common/timestamp.js.map +1 -1
- package/dist/event/event.command.d.ts +32 -10
- package/dist/event/event.command.d.ts.map +1 -1
- package/dist/event/event.command.js.map +1 -1
- package/dist/event/event.d.ts +38 -3
- package/dist/event/event.d.ts.map +1 -1
- package/dist/event/event.js +15 -0
- package/dist/event/event.js.map +1 -1
- package/dist/event/event.query.d.ts +14 -4
- package/dist/event/event.query.d.ts.map +1 -1
- package/dist/event/event.responses.d.ts +21 -9
- package/dist/event/event.responses.d.ts.map +1 -1
- package/dist/event/event.services.d.ts +33 -13
- package/dist/event/event.services.d.ts.map +1 -1
- package/dist/event/event.services.js +35 -5
- package/dist/event/event.services.js.map +1 -1
- package/dist/google/protobuf/timestamp.d.ts.map +1 -1
- package/package.json +1 -1
- package/proto/volontariapp/common/geo.proto +13 -0
- package/proto/volontariapp/event/event.command.proto +38 -10
- package/proto/volontariapp/event/event.proto +43 -6
- package/proto/volontariapp/event/event.query.proto +16 -4
- package/proto/volontariapp/event/event.responses.proto +24 -10
- package/proto/volontariapp/event/event.services.proto +14 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geo.d.ts","sourceRoot":"","sources":["../../src/common/geo.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,KAAK;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,KAAK,GAAG,SAAS,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geo.js","sourceRoot":"","sources":["../../src/common/geo.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/common/pagination.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/common/pagination.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../src/common/timestamp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../src/common/timestamp.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC;IACxB,GAAG,EAAE,IAAI,GAAG,SAAS,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../src/common/timestamp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../src/common/timestamp.ts"],"names":[],"mappings":"AAQA,OAAO,GAAG,MAAM,YAAY,CAAC;AAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC;AAOvD,QAAQ,CAAC,4BAA4B,CAAC,GAAG;IACvC,UAAU,CAAC,KAAW;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IACpF,CAAC;IACD,QAAQ,CAAC,OAA2C;QAClD,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;IAChE,CAAC;CACK,CAAC"}
|
|
@@ -1,20 +1,42 @@
|
|
|
1
|
+
import { Point } from "../common/geo.js";
|
|
2
|
+
import { Event, EventState, EventType } from "./event.js";
|
|
1
3
|
export interface CreateEventCommand {
|
|
2
4
|
title: string;
|
|
3
5
|
description: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
location:
|
|
7
|
-
|
|
6
|
+
startAt: Date | undefined;
|
|
7
|
+
endAt: Date | undefined;
|
|
8
|
+
location: Point | undefined;
|
|
9
|
+
localisationName: string;
|
|
10
|
+
type: EventType;
|
|
11
|
+
awardedImpactScore: number;
|
|
12
|
+
maxParticipants: number;
|
|
13
|
+
tagIds: string[];
|
|
8
14
|
}
|
|
9
15
|
export interface UpdateEventCommand {
|
|
10
16
|
id: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
startDate?: Date | undefined;
|
|
14
|
-
endDate?: Date | undefined;
|
|
15
|
-
location?: string | undefined;
|
|
17
|
+
event: Event | undefined;
|
|
18
|
+
updateMask: string[];
|
|
16
19
|
}
|
|
17
|
-
export interface
|
|
20
|
+
export interface ChangeEventStateCommand {
|
|
18
21
|
id: string;
|
|
22
|
+
newState: EventState;
|
|
23
|
+
}
|
|
24
|
+
export interface ManageRequirementCommand {
|
|
25
|
+
eventId: string;
|
|
26
|
+
add?: AddRequirement | undefined;
|
|
27
|
+
remove?: RemoveRequirement | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface AddRequirement {
|
|
30
|
+
name: string;
|
|
31
|
+
description: string;
|
|
32
|
+
neededQuantity: number;
|
|
33
|
+
}
|
|
34
|
+
export interface RemoveRequirement {
|
|
35
|
+
requirementId: string;
|
|
36
|
+
}
|
|
37
|
+
export interface CreateTagCommand {
|
|
38
|
+
slug: string;
|
|
39
|
+
name: string;
|
|
40
|
+
color: string;
|
|
19
41
|
}
|
|
20
42
|
//# sourceMappingURL=event.command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.command.d.ts","sourceRoot":"","sources":["../../src/event/event.command.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"event.command.d.ts","sourceRoot":"","sources":["../../src/event/event.command.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE1D,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,IAAI,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC;IACxB,QAAQ,EAAE,KAAK,GAAG,SAAS,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACjC,MAAM,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACxC;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.command.js","sourceRoot":"","sources":["../../src/event/event.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event.command.js","sourceRoot":"","sources":["../../src/event/event.command.ts"],"names":[],"mappings":"AAQA,OAAO,GAAG,MAAM,YAAY,CAAC;AAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC;AAkDvD,QAAQ,CAAC,4BAA4B,CAAC,GAAG;IACvC,UAAU,CAAC,KAAW;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IACpF,CAAC;IACD,QAAQ,CAAC,OAA2C;QAClD,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;IAChE,CAAC;CACK,CAAC"}
|
package/dist/event/event.d.ts
CHANGED
|
@@ -1,10 +1,45 @@
|
|
|
1
|
+
import { Point } from "../common/geo.js";
|
|
2
|
+
export declare enum EventType {
|
|
3
|
+
EVENT_TYPE_UNSPECIFIED = 0,
|
|
4
|
+
EVENT_TYPE_SOCIAL = 1,
|
|
5
|
+
EVENT_TYPE_ECOLOGY = 2,
|
|
6
|
+
UNRECOGNIZED = -1
|
|
7
|
+
}
|
|
8
|
+
export declare enum EventState {
|
|
9
|
+
EVENT_STATE_UNSPECIFIED = 0,
|
|
10
|
+
EVENT_STATE_DRAFT = 1,
|
|
11
|
+
EVENT_STATE_PUBLISHED = 2,
|
|
12
|
+
EVENT_STATE_CANCELLED = 3,
|
|
13
|
+
UNRECOGNIZED = -1
|
|
14
|
+
}
|
|
15
|
+
export interface Tag {
|
|
16
|
+
id: string;
|
|
17
|
+
slug: string;
|
|
18
|
+
name: string;
|
|
19
|
+
color: string;
|
|
20
|
+
}
|
|
21
|
+
export interface Requirement {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
neededQuantity: number;
|
|
26
|
+
currentQuantity: number;
|
|
27
|
+
}
|
|
1
28
|
export interface Event {
|
|
2
29
|
id: string;
|
|
3
|
-
locationName: string;
|
|
4
30
|
title: string;
|
|
5
31
|
description: string;
|
|
6
|
-
|
|
7
|
-
|
|
32
|
+
startAt: Date | undefined;
|
|
33
|
+
endAt: Date | undefined;
|
|
34
|
+
location: Point | undefined;
|
|
35
|
+
localisationName: string;
|
|
36
|
+
type: EventType;
|
|
37
|
+
state: EventState;
|
|
38
|
+
awardedImpactScore: number;
|
|
39
|
+
maxParticipants: number;
|
|
40
|
+
currentParticipants: number;
|
|
8
41
|
organizerId: string;
|
|
42
|
+
tags: Tag[];
|
|
43
|
+
requirements: Requirement[];
|
|
9
44
|
}
|
|
10
45
|
//# sourceMappingURL=event.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/event/event.ts"],"names":[],"mappings":"AASA,MAAM,
|
|
1
|
+
{"version":3,"file":"event.d.ts","sourceRoot":"","sources":["../../src/event/event.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,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3
|
+
export var EventType;
|
|
4
|
+
(function (EventType) {
|
|
5
|
+
EventType[EventType["EVENT_TYPE_UNSPECIFIED"] = 0] = "EVENT_TYPE_UNSPECIFIED";
|
|
6
|
+
EventType[EventType["EVENT_TYPE_SOCIAL"] = 1] = "EVENT_TYPE_SOCIAL";
|
|
7
|
+
EventType[EventType["EVENT_TYPE_ECOLOGY"] = 2] = "EVENT_TYPE_ECOLOGY";
|
|
8
|
+
EventType[EventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
9
|
+
})(EventType || (EventType = {}));
|
|
10
|
+
export var EventState;
|
|
11
|
+
(function (EventState) {
|
|
12
|
+
EventState[EventState["EVENT_STATE_UNSPECIFIED"] = 0] = "EVENT_STATE_UNSPECIFIED";
|
|
13
|
+
EventState[EventState["EVENT_STATE_DRAFT"] = 1] = "EVENT_STATE_DRAFT";
|
|
14
|
+
EventState[EventState["EVENT_STATE_PUBLISHED"] = 2] = "EVENT_STATE_PUBLISHED";
|
|
15
|
+
EventState[EventState["EVENT_STATE_CANCELLED"] = 3] = "EVENT_STATE_CANCELLED";
|
|
16
|
+
EventState[EventState["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
17
|
+
})(EventState || (EventState = {}));
|
|
3
18
|
wrappers[".google.protobuf.Timestamp"] = {
|
|
4
19
|
fromObject(value) {
|
|
5
20
|
return { seconds: value.getTime() / 1000, nanos: (value.getTime() % 1000) * 1e6 };
|
package/dist/event/event.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/event/event.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../src/event/event.ts"],"names":[],"mappings":"AAQA,OAAO,GAAG,MAAM,YAAY,CAAC;AAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC;AAGvD,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,6EAA0B,CAAA;IAC1B,mEAAqB,CAAA;IACrB,qEAAsB,CAAA;IACtB,0DAAiB,CAAA;AACnB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED,MAAM,CAAN,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,iFAA2B,CAAA;IAC3B,qEAAqB,CAAA;IACrB,6EAAyB,CAAA;IACzB,6EAAyB,CAAA;IACzB,4DAAiB,CAAA;AACnB,CAAC,EANW,UAAU,KAAV,UAAU,QAMrB;AAmCD,QAAQ,CAAC,4BAA4B,CAAC,GAAG;IACvC,UAAU,CAAC,KAAW;QACpB,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IACpF,CAAC;IACD,QAAQ,CAAC,OAA2C;QAClD,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;IAChE,CAAC;CACK,CAAC"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { GeoCircle } from "../common/geo.js";
|
|
2
|
+
import { EventType } from "./event.js";
|
|
3
|
+
export interface GetEventQuery {
|
|
3
4
|
id: string;
|
|
4
5
|
}
|
|
5
|
-
export interface
|
|
6
|
-
|
|
6
|
+
export interface SearchEventsQuery {
|
|
7
|
+
area: GeoCircle | undefined;
|
|
8
|
+
types: EventType[];
|
|
9
|
+
tagSlugs: string[];
|
|
10
|
+
onlyAvailable: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ListRequirementsQuery {
|
|
13
|
+
eventId: string;
|
|
14
|
+
}
|
|
15
|
+
export interface GetTagsQuery {
|
|
16
|
+
slugs: string[];
|
|
7
17
|
}
|
|
8
18
|
//# sourceMappingURL=event.query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.query.d.ts","sourceRoot":"","sources":["../../src/event/event.query.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event.query.d.ts","sourceRoot":"","sources":["../../src/event/event.query.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB"}
|
|
@@ -1,19 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Event } from "./event.js";
|
|
3
|
-
export interface GetEventResponse {
|
|
4
|
-
event: Event | undefined;
|
|
5
|
-
}
|
|
1
|
+
import { Event, Requirement, Tag } from "./event.js";
|
|
6
2
|
export interface CreateEventResponse {
|
|
7
3
|
event: Event | undefined;
|
|
8
4
|
}
|
|
9
5
|
export interface UpdateEventResponse {
|
|
10
6
|
event: Event | undefined;
|
|
11
7
|
}
|
|
12
|
-
export interface
|
|
13
|
-
|
|
14
|
-
pagination: PaginationResponse | undefined;
|
|
8
|
+
export interface ChangeEventStateResponse {
|
|
9
|
+
event: Event | undefined;
|
|
15
10
|
}
|
|
16
|
-
export interface
|
|
11
|
+
export interface ManageRequirementsResponse {
|
|
17
12
|
success: boolean;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
export interface GetEventResponse {
|
|
16
|
+
event: Event | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface SearchEventsResponse {
|
|
19
|
+
events: Event[];
|
|
20
|
+
totalCount: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ListRequirementsResponse {
|
|
23
|
+
requirements: Requirement[];
|
|
24
|
+
}
|
|
25
|
+
export interface GetTagsResponse {
|
|
26
|
+
tags: Tag[];
|
|
27
|
+
}
|
|
28
|
+
export interface CreateTagResponse {
|
|
29
|
+
tag: Tag | undefined;
|
|
18
30
|
}
|
|
19
31
|
//# sourceMappingURL=event.responses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.responses.d.ts","sourceRoot":"","sources":["../../src/event/event.responses.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event.responses.d.ts","sourceRoot":"","sources":["../../src/event/event.responses.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAGrD,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,GAAG,EAAE,CAAC;CACb;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,GAAG,GAAG,SAAS,CAAC;CACtB"}
|
|
@@ -1,21 +1,41 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import { CreateEventCommand,
|
|
3
|
-
import {
|
|
4
|
-
import { CreateEventResponse,
|
|
5
|
-
export interface
|
|
6
|
-
getEvent(request: EventQuery): Observable<GetEventResponse>;
|
|
7
|
-
listEvents(request: ListEventsQuery): Observable<ListEventsResponse>;
|
|
2
|
+
import { ChangeEventStateCommand, CreateEventCommand, CreateTagCommand, ManageRequirementCommand, UpdateEventCommand } from "./event.command.js";
|
|
3
|
+
import { GetEventQuery, GetTagsQuery, ListRequirementsQuery, SearchEventsQuery } from "./event.query.js";
|
|
4
|
+
import { ChangeEventStateResponse, CreateEventResponse, CreateTagResponse, GetEventResponse, GetTagsResponse, ListRequirementsResponse, ManageRequirementsResponse, SearchEventsResponse, UpdateEventResponse } from "./event.responses.js";
|
|
5
|
+
export interface EventCommandServiceClient {
|
|
8
6
|
createEvent(request: CreateEventCommand): Observable<CreateEventResponse>;
|
|
9
7
|
updateEvent(request: UpdateEventCommand): Observable<UpdateEventResponse>;
|
|
10
|
-
|
|
8
|
+
changeEventState(request: ChangeEventStateCommand): Observable<ChangeEventStateResponse>;
|
|
9
|
+
manageRequirements(request: ManageRequirementCommand): Observable<ManageRequirementsResponse>;
|
|
11
10
|
}
|
|
12
|
-
export interface
|
|
13
|
-
getEvent(request: EventQuery): Promise<GetEventResponse> | Observable<GetEventResponse> | GetEventResponse;
|
|
14
|
-
listEvents(request: ListEventsQuery): Promise<ListEventsResponse> | Observable<ListEventsResponse> | ListEventsResponse;
|
|
11
|
+
export interface EventCommandServiceController {
|
|
15
12
|
createEvent(request: CreateEventCommand): Promise<CreateEventResponse> | Observable<CreateEventResponse> | CreateEventResponse;
|
|
16
13
|
updateEvent(request: UpdateEventCommand): Promise<UpdateEventResponse> | Observable<UpdateEventResponse> | UpdateEventResponse;
|
|
17
|
-
|
|
14
|
+
changeEventState(request: ChangeEventStateCommand): Promise<ChangeEventStateResponse> | Observable<ChangeEventStateResponse> | ChangeEventStateResponse;
|
|
15
|
+
manageRequirements(request: ManageRequirementCommand): Promise<ManageRequirementsResponse> | Observable<ManageRequirementsResponse> | ManageRequirementsResponse;
|
|
18
16
|
}
|
|
19
|
-
export declare function
|
|
20
|
-
export declare const
|
|
17
|
+
export declare function EventCommandServiceControllerMethods(): (constructor: Function) => void;
|
|
18
|
+
export declare const EVENT_COMMAND_SERVICE_NAME = "EventCommandService";
|
|
19
|
+
export interface EventQueryServiceClient {
|
|
20
|
+
getEvent(request: GetEventQuery): Observable<GetEventResponse>;
|
|
21
|
+
searchEvents(request: SearchEventsQuery): Observable<SearchEventsResponse>;
|
|
22
|
+
listRequirements(request: ListRequirementsQuery): Observable<ListRequirementsResponse>;
|
|
23
|
+
}
|
|
24
|
+
export interface EventQueryServiceController {
|
|
25
|
+
getEvent(request: GetEventQuery): Promise<GetEventResponse> | Observable<GetEventResponse> | GetEventResponse;
|
|
26
|
+
searchEvents(request: SearchEventsQuery): Promise<SearchEventsResponse> | Observable<SearchEventsResponse> | SearchEventsResponse;
|
|
27
|
+
listRequirements(request: ListRequirementsQuery): Promise<ListRequirementsResponse> | Observable<ListRequirementsResponse> | ListRequirementsResponse;
|
|
28
|
+
}
|
|
29
|
+
export declare function EventQueryServiceControllerMethods(): (constructor: Function) => void;
|
|
30
|
+
export declare const EVENT_QUERY_SERVICE_NAME = "EventQueryService";
|
|
31
|
+
export interface TagServiceClient {
|
|
32
|
+
getTags(request: GetTagsQuery): Observable<GetTagsResponse>;
|
|
33
|
+
createTag(request: CreateTagCommand): Observable<CreateTagResponse>;
|
|
34
|
+
}
|
|
35
|
+
export interface TagServiceController {
|
|
36
|
+
getTags(request: GetTagsQuery): Promise<GetTagsResponse> | Observable<GetTagsResponse> | GetTagsResponse;
|
|
37
|
+
createTag(request: CreateTagCommand): Promise<CreateTagResponse> | Observable<CreateTagResponse> | CreateTagResponse;
|
|
38
|
+
}
|
|
39
|
+
export declare function TagServiceControllerMethods(): (constructor: Function) => void;
|
|
40
|
+
export declare const TAG_SERVICE_NAME = "TagService";
|
|
21
41
|
//# sourceMappingURL=event.services.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.services.d.ts","sourceRoot":"","sources":["../../src/event/event.services.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event.services.d.ts","sourceRoot":"","sources":["../../src/event/event.services.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACzG,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,yBAAyB;IACxC,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAE1E,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAE1E,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;IAEzF,kBAAkB,CAAC,OAAO,EAAE,wBAAwB,GAAG,UAAU,CAAC,0BAA0B,CAAC,CAAC;CAC/F;AAED,MAAM,WAAW,6BAA6B;IAC5C,WAAW,CACT,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,GAAG,UAAU,CAAC,mBAAmB,CAA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B,sBAAsB,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAE5D,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,eAAe,CAAC,GAAG,eAAe,CAAC;IAEzG,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,GAAG,UAAU,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC;CACtH;AAED,wBAAgB,2BAA2B,kBACX,QAAQ,UAYvC;AAED,eAAO,MAAM,gBAAgB,eAAe,CAAC"}
|
|
@@ -1,17 +1,47 @@
|
|
|
1
1
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
2
|
-
export function
|
|
2
|
+
export function EventCommandServiceControllerMethods() {
|
|
3
3
|
return function (constructor) {
|
|
4
|
-
const grpcMethods = ["
|
|
4
|
+
const grpcMethods = ["createEvent", "updateEvent", "changeEventState", "manageRequirements"];
|
|
5
5
|
for (const method of grpcMethods) {
|
|
6
6
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
7
|
-
GrpcMethod("
|
|
7
|
+
GrpcMethod("EventCommandService", method)(constructor.prototype[method], method, descriptor);
|
|
8
8
|
}
|
|
9
9
|
const grpcStreamMethods = [];
|
|
10
10
|
for (const method of grpcStreamMethods) {
|
|
11
11
|
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
12
|
-
GrpcStreamMethod("
|
|
12
|
+
GrpcStreamMethod("EventCommandService", method)(constructor.prototype[method], method, descriptor);
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
export const
|
|
16
|
+
export const EVENT_COMMAND_SERVICE_NAME = "EventCommandService";
|
|
17
|
+
export function EventQueryServiceControllerMethods() {
|
|
18
|
+
return function (constructor) {
|
|
19
|
+
const grpcMethods = ["getEvent", "searchEvents", "listRequirements"];
|
|
20
|
+
for (const method of grpcMethods) {
|
|
21
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
22
|
+
GrpcMethod("EventQueryService", method)(constructor.prototype[method], method, descriptor);
|
|
23
|
+
}
|
|
24
|
+
const grpcStreamMethods = [];
|
|
25
|
+
for (const method of grpcStreamMethods) {
|
|
26
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
27
|
+
GrpcStreamMethod("EventQueryService", method)(constructor.prototype[method], method, descriptor);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export const EVENT_QUERY_SERVICE_NAME = "EventQueryService";
|
|
32
|
+
export function TagServiceControllerMethods() {
|
|
33
|
+
return function (constructor) {
|
|
34
|
+
const grpcMethods = ["getTags", "createTag"];
|
|
35
|
+
for (const method of grpcMethods) {
|
|
36
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
37
|
+
GrpcMethod("TagService", method)(constructor.prototype[method], method, descriptor);
|
|
38
|
+
}
|
|
39
|
+
const grpcStreamMethods = [];
|
|
40
|
+
for (const method of grpcStreamMethods) {
|
|
41
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
42
|
+
GrpcStreamMethod("TagService", method)(constructor.prototype[method], method, descriptor);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export const TAG_SERVICE_NAME = "TagService";
|
|
17
47
|
//# sourceMappingURL=event.services.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.services.js","sourceRoot":"","sources":["../../src/event/event.services.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"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AC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../../src/google/protobuf/timestamp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"timestamp.d.ts","sourceRoot":"","sources":["../../../src/google/protobuf/timestamp.ts"],"names":[],"mappings":"AAoGA,MAAM,WAAW,SAAS;IAMxB,OAAO,EAAE,MAAM,CAAC;IAQhB,KAAK,EAAE,MAAM,CAAC;CACf"}
|
package/package.json
CHANGED
|
@@ -3,25 +3,53 @@ syntax = "proto3";
|
|
|
3
3
|
package volontariapp.event;
|
|
4
4
|
|
|
5
5
|
import "google/protobuf/timestamp.proto";
|
|
6
|
+
import "volontariapp/common/geo.proto";
|
|
7
|
+
import "volontariapp/event/event.proto";
|
|
6
8
|
|
|
7
9
|
message CreateEventCommand {
|
|
8
10
|
string title = 1;
|
|
9
11
|
string description = 2;
|
|
10
|
-
google.protobuf.Timestamp
|
|
11
|
-
google.protobuf.Timestamp
|
|
12
|
-
|
|
13
|
-
string
|
|
12
|
+
google.protobuf.Timestamp start_at = 3;
|
|
13
|
+
google.protobuf.Timestamp end_at = 4;
|
|
14
|
+
volontariapp.common.Point location = 5;
|
|
15
|
+
string localisation_name = 6;
|
|
16
|
+
EventType type = 7;
|
|
17
|
+
int32 awarded_impact_score = 8;
|
|
18
|
+
int32 max_participants = 9;
|
|
19
|
+
repeated string tag_ids = 10;
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
message UpdateEventCommand {
|
|
17
23
|
string id = 1;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
optional google.protobuf.Timestamp start_date = 4;
|
|
21
|
-
optional google.protobuf.Timestamp end_date = 5;
|
|
22
|
-
optional string location = 6;
|
|
24
|
+
Event event = 2;
|
|
25
|
+
repeated string update_mask = 3;
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
message
|
|
28
|
+
message ChangeEventStateCommand {
|
|
26
29
|
string id = 1;
|
|
30
|
+
EventState new_state = 2;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message ManageRequirementCommand {
|
|
34
|
+
string event_id = 1;
|
|
35
|
+
oneof action {
|
|
36
|
+
AddRequirement add = 2;
|
|
37
|
+
RemoveRequirement remove = 3;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message AddRequirement {
|
|
42
|
+
string name = 1;
|
|
43
|
+
string description = 2;
|
|
44
|
+
int32 needed_quantity = 3;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message RemoveRequirement {
|
|
48
|
+
string requirement_id = 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
message CreateTagCommand {
|
|
52
|
+
string slug = 1;
|
|
53
|
+
string name = 2;
|
|
54
|
+
string color = 3;
|
|
27
55
|
}
|
|
@@ -3,13 +3,50 @@ syntax = "proto3";
|
|
|
3
3
|
package volontariapp.event;
|
|
4
4
|
|
|
5
5
|
import "google/protobuf/timestamp.proto";
|
|
6
|
+
import "volontariapp/common/geo.proto";
|
|
7
|
+
|
|
8
|
+
enum EventType {
|
|
9
|
+
EVENT_TYPE_UNSPECIFIED = 0;
|
|
10
|
+
EVENT_TYPE_SOCIAL = 1;
|
|
11
|
+
EVENT_TYPE_ECOLOGY = 2;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
enum EventState {
|
|
15
|
+
EVENT_STATE_UNSPECIFIED = 0;
|
|
16
|
+
EVENT_STATE_DRAFT = 1;
|
|
17
|
+
EVENT_STATE_PUBLISHED = 2;
|
|
18
|
+
EVENT_STATE_CANCELLED = 3;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message Tag {
|
|
22
|
+
string id = 1;
|
|
23
|
+
string slug = 2;
|
|
24
|
+
string name = 3;
|
|
25
|
+
string color = 4;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message Requirement {
|
|
29
|
+
string id = 1;
|
|
30
|
+
string name = 2;
|
|
31
|
+
string description = 3;
|
|
32
|
+
int32 needed_quantity = 4;
|
|
33
|
+
int32 current_quantity = 5;
|
|
34
|
+
}
|
|
6
35
|
|
|
7
36
|
message Event {
|
|
8
37
|
string id = 1;
|
|
9
|
-
string
|
|
10
|
-
string
|
|
11
|
-
|
|
12
|
-
google.protobuf.Timestamp
|
|
13
|
-
|
|
14
|
-
string
|
|
38
|
+
string title = 2;
|
|
39
|
+
string description = 3;
|
|
40
|
+
google.protobuf.Timestamp start_at = 4;
|
|
41
|
+
google.protobuf.Timestamp end_at = 5;
|
|
42
|
+
volontariapp.common.Point location = 6;
|
|
43
|
+
string localisation_name = 7;
|
|
44
|
+
EventType type = 8;
|
|
45
|
+
EventState state = 9;
|
|
46
|
+
int32 awarded_impact_score = 10;
|
|
47
|
+
int32 max_participants = 11;
|
|
48
|
+
int32 current_participants = 12;
|
|
49
|
+
string organizer_id = 13;
|
|
50
|
+
repeated Tag tags = 14;
|
|
51
|
+
repeated Requirement requirements = 15;
|
|
15
52
|
}
|
|
@@ -2,12 +2,24 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package volontariapp.event;
|
|
4
4
|
|
|
5
|
-
import "volontariapp/common/
|
|
5
|
+
import "volontariapp/common/geo.proto";
|
|
6
|
+
import "volontariapp/event/event.proto";
|
|
6
7
|
|
|
7
|
-
message
|
|
8
|
+
message GetEventQuery {
|
|
8
9
|
string id = 1;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
message
|
|
12
|
-
volontariapp.common.
|
|
12
|
+
message SearchEventsQuery {
|
|
13
|
+
volontariapp.common.GeoCircle area = 1;
|
|
14
|
+
repeated EventType types = 2;
|
|
15
|
+
repeated string tag_slugs = 3;
|
|
16
|
+
bool only_available = 4;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message ListRequirementsQuery {
|
|
20
|
+
string event_id = 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message GetTagsQuery {
|
|
24
|
+
repeated string slugs = 1;
|
|
13
25
|
}
|
|
@@ -2,29 +2,43 @@ syntax = "proto3";
|
|
|
2
2
|
|
|
3
3
|
package volontariapp.event;
|
|
4
4
|
|
|
5
|
-
import "volontariapp/common/pagination.proto";
|
|
6
5
|
import "volontariapp/event/event.proto";
|
|
7
6
|
|
|
7
|
+
// Unique Responses for Command Service
|
|
8
|
+
message CreateEventResponse {
|
|
9
|
+
Event event = 1;
|
|
10
|
+
}
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
message GetEventResponse {
|
|
12
|
+
message UpdateEventResponse {
|
|
12
13
|
Event event = 1;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
message
|
|
16
|
+
message ChangeEventStateResponse {
|
|
16
17
|
Event event = 1;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
message
|
|
20
|
+
message ManageRequirementsResponse {
|
|
21
|
+
bool success = 1;
|
|
22
|
+
string message = 2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message GetEventResponse {
|
|
20
26
|
Event event = 1;
|
|
21
27
|
}
|
|
22
28
|
|
|
23
|
-
message
|
|
29
|
+
message SearchEventsResponse {
|
|
24
30
|
repeated Event events = 1;
|
|
25
|
-
|
|
31
|
+
int32 total_count = 2;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
|
-
message
|
|
29
|
-
|
|
34
|
+
message ListRequirementsResponse {
|
|
35
|
+
repeated Requirement requirements = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message GetTagsResponse {
|
|
39
|
+
repeated Tag tags = 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message CreateTagResponse {
|
|
43
|
+
Tag tag = 1;
|
|
30
44
|
}
|
|
@@ -6,11 +6,20 @@ import "volontariapp/event/event.query.proto";
|
|
|
6
6
|
import "volontariapp/event/event.command.proto";
|
|
7
7
|
import "volontariapp/event/event.responses.proto";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
service EventService {
|
|
11
|
-
rpc GetEvent (EventQuery) returns (GetEventResponse) {}
|
|
12
|
-
rpc ListEvents (ListEventsQuery) returns (ListEventsResponse) {}
|
|
9
|
+
service EventCommandService {
|
|
13
10
|
rpc CreateEvent (CreateEventCommand) returns (CreateEventResponse) {}
|
|
14
11
|
rpc UpdateEvent (UpdateEventCommand) returns (UpdateEventResponse) {}
|
|
15
|
-
rpc
|
|
12
|
+
rpc ChangeEventState (ChangeEventStateCommand) returns (ChangeEventStateResponse) {}
|
|
13
|
+
rpc ManageRequirements (ManageRequirementCommand) returns (ManageRequirementsResponse) {}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
service EventQueryService {
|
|
17
|
+
rpc GetEvent (GetEventQuery) returns (GetEventResponse) {}
|
|
18
|
+
rpc SearchEvents (SearchEventsQuery) returns (SearchEventsResponse) {}
|
|
19
|
+
rpc ListRequirements (ListRequirementsQuery) returns (ListRequirementsResponse) {}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
service TagService {
|
|
23
|
+
rpc GetTags (GetTagsQuery) returns (GetTagsResponse) {}
|
|
24
|
+
rpc CreateTag (CreateTagCommand) returns (CreateTagResponse) {}
|
|
16
25
|
}
|