@taskora-uni/contracts 6.0.1 → 6.1.0
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.
|
@@ -2,6 +2,18 @@ import { Observable } from "rxjs";
|
|
|
2
2
|
import { Empty } from "./google/protobuf/empty";
|
|
3
3
|
import { Timestamp } from "./google/protobuf/timestamp";
|
|
4
4
|
export declare const protobufPackage = "invitation.v1";
|
|
5
|
+
export declare enum InvitationUsageStatus {
|
|
6
|
+
INVITATION_USAGE_STATUS_UNSPECIFIED = 0,
|
|
7
|
+
INVITATION_USAGE_STATUS_USED = 1,
|
|
8
|
+
INVITATION_USAGE_STATUS_UNUSED = 2,
|
|
9
|
+
UNRECOGNIZED = -1
|
|
10
|
+
}
|
|
11
|
+
export declare enum SortOrder {
|
|
12
|
+
SORT_ORDER_UNSPECIFIED = 0,
|
|
13
|
+
SORT_ORDER_ASC = 1,
|
|
14
|
+
SORT_ORDER_DESC = 2,
|
|
15
|
+
UNRECOGNIZED = -1
|
|
16
|
+
}
|
|
5
17
|
export interface CreateInvitationResponse {
|
|
6
18
|
token: string;
|
|
7
19
|
expiresAt: Timestamp | undefined;
|
|
@@ -17,6 +29,10 @@ export interface Invitation {
|
|
|
17
29
|
usedAt?: Timestamp | undefined;
|
|
18
30
|
createdAt: Timestamp | undefined;
|
|
19
31
|
}
|
|
32
|
+
export interface ListInvitationsRequest {
|
|
33
|
+
status?: InvitationUsageStatus | undefined;
|
|
34
|
+
createdAtOrder?: SortOrder | undefined;
|
|
35
|
+
}
|
|
20
36
|
export interface ListInvitationsResponse {
|
|
21
37
|
invitations: Invitation[];
|
|
22
38
|
}
|
|
@@ -32,13 +48,13 @@ export interface DeleteInvitationRequest {
|
|
|
32
48
|
export declare const INVITATION_V1_PACKAGE_NAME = "invitation.v1";
|
|
33
49
|
export interface InvitationServiceClient {
|
|
34
50
|
createInvitation(request: Empty): Observable<CreateInvitationResponse>;
|
|
35
|
-
listInvitations(request:
|
|
51
|
+
listInvitations(request: ListInvitationsRequest): Observable<ListInvitationsResponse>;
|
|
36
52
|
validateInvitationToken(request: ValidateInvitationTokenRequest): Observable<ValidateInvitationTokenResponse>;
|
|
37
53
|
deleteInvitation(request: DeleteInvitationRequest): Observable<Empty>;
|
|
38
54
|
}
|
|
39
55
|
export interface InvitationServiceController {
|
|
40
56
|
createInvitation(request: Empty): Promise<CreateInvitationResponse> | Observable<CreateInvitationResponse> | CreateInvitationResponse;
|
|
41
|
-
listInvitations(request:
|
|
57
|
+
listInvitations(request: ListInvitationsRequest): Promise<ListInvitationsResponse> | Observable<ListInvitationsResponse> | ListInvitationsResponse;
|
|
42
58
|
validateInvitationToken(request: ValidateInvitationTokenRequest): Promise<ValidateInvitationTokenResponse> | Observable<ValidateInvitationTokenResponse> | ValidateInvitationTokenResponse;
|
|
43
59
|
deleteInvitation(request: DeleteInvitationRequest): void | Promise<void>;
|
|
44
60
|
}
|
|
@@ -5,11 +5,25 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: invitation.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.INVITATION_SERVICE_NAME = exports.INVITATION_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
8
|
+
exports.INVITATION_SERVICE_NAME = exports.INVITATION_V1_PACKAGE_NAME = exports.SortOrder = exports.InvitationUsageStatus = exports.protobufPackage = void 0;
|
|
9
9
|
exports.InvitationServiceControllerMethods = InvitationServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
12
12
|
exports.protobufPackage = "invitation.v1";
|
|
13
|
+
var InvitationUsageStatus;
|
|
14
|
+
(function (InvitationUsageStatus) {
|
|
15
|
+
InvitationUsageStatus[InvitationUsageStatus["INVITATION_USAGE_STATUS_UNSPECIFIED"] = 0] = "INVITATION_USAGE_STATUS_UNSPECIFIED";
|
|
16
|
+
InvitationUsageStatus[InvitationUsageStatus["INVITATION_USAGE_STATUS_USED"] = 1] = "INVITATION_USAGE_STATUS_USED";
|
|
17
|
+
InvitationUsageStatus[InvitationUsageStatus["INVITATION_USAGE_STATUS_UNUSED"] = 2] = "INVITATION_USAGE_STATUS_UNUSED";
|
|
18
|
+
InvitationUsageStatus[InvitationUsageStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
19
|
+
})(InvitationUsageStatus || (exports.InvitationUsageStatus = InvitationUsageStatus = {}));
|
|
20
|
+
var SortOrder;
|
|
21
|
+
(function (SortOrder) {
|
|
22
|
+
SortOrder[SortOrder["SORT_ORDER_UNSPECIFIED"] = 0] = "SORT_ORDER_UNSPECIFIED";
|
|
23
|
+
SortOrder[SortOrder["SORT_ORDER_ASC"] = 1] = "SORT_ORDER_ASC";
|
|
24
|
+
SortOrder[SortOrder["SORT_ORDER_DESC"] = 2] = "SORT_ORDER_DESC";
|
|
25
|
+
SortOrder[SortOrder["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
26
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
13
27
|
exports.INVITATION_V1_PACKAGE_NAME = "invitation.v1";
|
|
14
28
|
function InvitationServiceControllerMethods() {
|
|
15
29
|
return function (constructor) {
|
package/package.json
CHANGED
package/proto/invitation.proto
CHANGED
|
@@ -7,7 +7,7 @@ import "google/protobuf/timestamp.proto";
|
|
|
7
7
|
|
|
8
8
|
service InvitationService {
|
|
9
9
|
rpc CreateInvitation(google.protobuf.Empty) returns (CreateInvitationResponse);
|
|
10
|
-
rpc ListInvitations(
|
|
10
|
+
rpc ListInvitations(ListInvitationsRequest) returns (ListInvitationsResponse);
|
|
11
11
|
rpc ValidateInvitationToken(ValidateInvitationTokenRequest) returns (ValidateInvitationTokenResponse);
|
|
12
12
|
rpc DeleteInvitation(DeleteInvitationRequest) returns (google.protobuf.Empty);
|
|
13
13
|
}
|
|
@@ -30,6 +30,23 @@ message Invitation {
|
|
|
30
30
|
google.protobuf.Timestamp created_at = 5;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
enum InvitationUsageStatus {
|
|
34
|
+
INVITATION_USAGE_STATUS_UNSPECIFIED = 0;
|
|
35
|
+
INVITATION_USAGE_STATUS_USED = 1;
|
|
36
|
+
INVITATION_USAGE_STATUS_UNUSED = 2;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
enum SortOrder {
|
|
40
|
+
SORT_ORDER_UNSPECIFIED = 0;
|
|
41
|
+
SORT_ORDER_ASC = 1;
|
|
42
|
+
SORT_ORDER_DESC = 2;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message ListInvitationsRequest {
|
|
46
|
+
optional InvitationUsageStatus status = 1;
|
|
47
|
+
optional SortOrder created_at_order = 2;
|
|
48
|
+
}
|
|
49
|
+
|
|
33
50
|
message ListInvitationsResponse {
|
|
34
51
|
repeated Invitation invitations = 1;
|
|
35
52
|
}
|