@taskora-uni/contracts 1.2.1 → 1.2.2

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.
@@ -17,9 +17,14 @@ export interface CreateResponse {
17
17
  expiresAt: Timestamp | undefined;
18
18
  }
19
19
 
20
+ export interface InvitationUsedBy {
21
+ id: string;
22
+ email: string;
23
+ }
24
+
20
25
  export interface Invitation {
21
26
  id: string;
22
- usedById?: string | undefined;
27
+ usedBy?: InvitationUsedBy | undefined;
23
28
  expiresAt: Timestamp | undefined;
24
29
  usedAt?: Timestamp | undefined;
25
30
  createdAt: Timestamp | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taskora-uni/contracts",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Shared protobuf contracts and generated TypeScript bindings for Taskora Uni backend services.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -1,4 +1,4 @@
1
- syntax="proto3";
1
+ syntax = "proto3";
2
2
 
3
3
  package invitation.v1;
4
4
 
@@ -6,32 +6,37 @@ import "google/protobuf/empty.proto";
6
6
  import "google/protobuf/timestamp.proto";
7
7
 
8
8
  service InvitationService {
9
- rpc Create(google.protobuf.Empty) returns (CreateResponse);
10
- rpc GetAll(google.protobuf.Empty) returns (GetAllResponse);
11
- rpc ValidateToken(ValidateTokenRequest) returns (ValidateTokenResponse);
9
+ rpc Create(google.protobuf.Empty) returns (CreateResponse);
10
+ rpc GetAll(google.protobuf.Empty) returns (GetAllResponse);
11
+ rpc ValidateToken(ValidateTokenRequest) returns (ValidateTokenResponse);
12
12
  }
13
13
 
14
14
  message CreateResponse {
15
- string token = 1;
16
- google.protobuf.Timestamp expires_at = 2;
15
+ string token = 1;
16
+ google.protobuf.Timestamp expires_at = 2;
17
+ }
18
+
19
+ message InvitationUsedBy {
20
+ string id = 1;
21
+ string email = 2;
17
22
  }
18
23
 
19
24
  message Invitation {
20
- string id = 1;
21
- optional string used_by_id = 2;
22
- google.protobuf.Timestamp expires_at = 3;
23
- optional google.protobuf.Timestamp used_at = 4;
24
- google.protobuf.Timestamp created_at = 5;
25
+ string id = 1;
26
+ optional InvitationUsedBy used_by = 2;
27
+ google.protobuf.Timestamp expires_at = 3;
28
+ optional google.protobuf.Timestamp used_at = 4;
29
+ google.protobuf.Timestamp created_at = 5;
25
30
  }
26
31
 
27
32
  message GetAllResponse {
28
- repeated Invitation invitations = 1;
33
+ repeated Invitation invitations = 1;
29
34
  }
30
35
 
31
36
  message ValidateTokenRequest {
32
- string token = 1;
37
+ string token = 1;
33
38
  }
34
39
 
35
40
  message ValidateTokenResponse {
36
- bool is_valid = 1;
41
+ bool is_valid = 1;
37
42
  }