@candesk/contracts 6.43.0 → 6.45.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.
@@ -1,3 +1,4 @@
1
+ export * from './medication-wish-changed.interface';
1
2
  export * from './treatment.events';
2
3
  export * from './treatment-request-expired.interface';
3
4
  export * from './treatment-request-paid.interface';
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./medication-wish-changed.interface"), exports);
17
18
  __exportStar(require("./treatment.events"), exports);
18
19
  __exportStar(require("./treatment-request-expired.interface"), exports);
19
20
  __exportStar(require("./treatment-request-paid.interface"), exports);
@@ -0,0 +1,5 @@
1
+ export interface MedicationWishChangedEvent {
2
+ eventId: string;
3
+ accountId: string;
4
+ number: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  export declare const TREATMENT_EVENTS: {
2
2
  readonly REQUEST_PAID: 'treatment.request.paid';
3
3
  readonly REQUEST_EXPIRED: 'treatment.request.expired';
4
+ readonly MEDICATION_WISH_CHANGED: 'treatment.medication-wish.changed';
4
5
  };
@@ -3,5 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TREATMENT_EVENTS = void 0;
4
4
  exports.TREATMENT_EVENTS = {
5
5
  REQUEST_PAID: 'treatment.request.paid',
6
- REQUEST_EXPIRED: 'treatment.request.expired'
6
+ REQUEST_EXPIRED: 'treatment.request.expired',
7
+ MEDICATION_WISH_CHANGED: 'treatment.medication-wish.changed'
7
8
  };
@@ -13,6 +13,7 @@ export declare enum NotificationType {
13
13
  NOTIFICATION_TYPE_TOTP_ENABLED = 9,
14
14
  NOTIFICATION_TYPE_TOTP_DISABLED = 10,
15
15
  NOTIFICATION_TYPE_TREATMENT_REQUEST_EXPIRED = 11,
16
+ NOTIFICATION_TYPE_MEDICATION_WISH_CHANGED = 12,
16
17
  UNRECOGNIZED = -1
17
18
  }
18
19
  export interface Notification {
@@ -23,5 +23,6 @@ var NotificationType;
23
23
  NotificationType[NotificationType["NOTIFICATION_TYPE_TOTP_ENABLED"] = 9] = "NOTIFICATION_TYPE_TOTP_ENABLED";
24
24
  NotificationType[NotificationType["NOTIFICATION_TYPE_TOTP_DISABLED"] = 10] = "NOTIFICATION_TYPE_TOTP_DISABLED";
25
25
  NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_EXPIRED"] = 11] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_EXPIRED";
26
+ NotificationType[NotificationType["NOTIFICATION_TYPE_MEDICATION_WISH_CHANGED"] = 12] = "NOTIFICATION_TYPE_MEDICATION_WISH_CHANGED";
26
27
  NotificationType[NotificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
27
28
  })(NotificationType || (exports.NotificationType = NotificationType = {}));
@@ -113,6 +113,14 @@ export interface GetTreatmentTypesRequest {
113
113
  export interface GetTreatmentTypesResponse {
114
114
  types: TreatmentTypeOption[];
115
115
  }
116
+ export interface UpdateTreatmentTypeRequest {
117
+ type: TreatmentType;
118
+ amount?: number | undefined;
119
+ available?: boolean | undefined;
120
+ }
121
+ export interface UpdateTreatmentTypeResponse {
122
+ type: TreatmentTypeOption | undefined;
123
+ }
116
124
  export interface CreateTreatmentRequestRequest {
117
125
  userId: string;
118
126
  type: TreatmentType;
@@ -155,6 +163,13 @@ export interface UpdateTreatmentRequestRequest {
155
163
  export interface UpdateTreatmentRequestResponse {
156
164
  request: TreatmentRequest | undefined;
157
165
  }
166
+ export interface ChangeMedicationWishRequest {
167
+ id: string;
168
+ medicationWish: string;
169
+ }
170
+ export interface ChangeMedicationWishResponse {
171
+ request: TreatmentRequest | undefined;
172
+ }
158
173
  export interface DeleteTreatmentRequestRequest {
159
174
  userId: string;
160
175
  id: string;
@@ -173,11 +188,13 @@ export interface TreatmentService {
173
188
  getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse>;
174
189
  saveQuestionnaire(request: SaveQuestionnaireRequest): Promise<SaveQuestionnaireResponse>;
175
190
  getTreatmentTypes(request: GetTreatmentTypesRequest): Promise<GetTreatmentTypesResponse>;
191
+ updateTreatmentType(request: UpdateTreatmentTypeRequest): Promise<UpdateTreatmentTypeResponse>;
176
192
  createTreatmentRequest(request: CreateTreatmentRequestRequest): Promise<CreateTreatmentRequestResponse>;
177
193
  getTreatmentRequest(request: GetTreatmentRequestRequest): Promise<GetTreatmentRequestResponse>;
178
194
  listTreatmentRequests(request: ListTreatmentRequestsRequest): Promise<ListTreatmentRequestsResponse>;
179
195
  listAllTreatmentRequests(request: ListAllTreatmentRequestsRequest): Promise<ListAllTreatmentRequestsResponse>;
180
196
  updateTreatmentRequest(request: UpdateTreatmentRequestRequest): Promise<UpdateTreatmentRequestResponse>;
197
+ changeMedicationWish(request: ChangeMedicationWishRequest): Promise<ChangeMedicationWishResponse>;
181
198
  deleteTreatmentRequest(request: DeleteTreatmentRequestRequest): Promise<DeleteTreatmentRequestResponse>;
182
199
  startPayment(request: StartPaymentRequest): Promise<StartPaymentResponse>;
183
200
  }
@@ -14,6 +14,7 @@ export declare enum NotificationType {
14
14
  NOTIFICATION_TYPE_TOTP_ENABLED = 9,
15
15
  NOTIFICATION_TYPE_TOTP_DISABLED = 10,
16
16
  NOTIFICATION_TYPE_TREATMENT_REQUEST_EXPIRED = 11,
17
+ NOTIFICATION_TYPE_MEDICATION_WISH_CHANGED = 12,
17
18
  UNRECOGNIZED = -1
18
19
  }
19
20
  export interface Notification {
@@ -25,6 +25,7 @@ var NotificationType;
25
25
  NotificationType[NotificationType["NOTIFICATION_TYPE_TOTP_ENABLED"] = 9] = "NOTIFICATION_TYPE_TOTP_ENABLED";
26
26
  NotificationType[NotificationType["NOTIFICATION_TYPE_TOTP_DISABLED"] = 10] = "NOTIFICATION_TYPE_TOTP_DISABLED";
27
27
  NotificationType[NotificationType["NOTIFICATION_TYPE_TREATMENT_REQUEST_EXPIRED"] = 11] = "NOTIFICATION_TYPE_TREATMENT_REQUEST_EXPIRED";
28
+ NotificationType[NotificationType["NOTIFICATION_TYPE_MEDICATION_WISH_CHANGED"] = 12] = "NOTIFICATION_TYPE_MEDICATION_WISH_CHANGED";
28
29
  NotificationType[NotificationType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
29
30
  })(NotificationType || (exports.NotificationType = NotificationType = {}));
30
31
  exports.NOTIFICATION_V1_PACKAGE_NAME = "notification.v1";
@@ -114,6 +114,14 @@ export interface GetTreatmentTypesRequest {
114
114
  export interface GetTreatmentTypesResponse {
115
115
  types: TreatmentTypeOption[];
116
116
  }
117
+ export interface UpdateTreatmentTypeRequest {
118
+ type: TreatmentType;
119
+ amount?: number | undefined;
120
+ available?: boolean | undefined;
121
+ }
122
+ export interface UpdateTreatmentTypeResponse {
123
+ type: TreatmentTypeOption | undefined;
124
+ }
117
125
  export interface CreateTreatmentRequestRequest {
118
126
  userId: string;
119
127
  type: TreatmentType;
@@ -156,6 +164,13 @@ export interface UpdateTreatmentRequestRequest {
156
164
  export interface UpdateTreatmentRequestResponse {
157
165
  request: TreatmentRequest | undefined;
158
166
  }
167
+ export interface ChangeMedicationWishRequest {
168
+ id: string;
169
+ medicationWish: string;
170
+ }
171
+ export interface ChangeMedicationWishResponse {
172
+ request: TreatmentRequest | undefined;
173
+ }
159
174
  export interface DeleteTreatmentRequestRequest {
160
175
  userId: string;
161
176
  id: string;
@@ -175,11 +190,13 @@ export interface TreatmentServiceClient {
175
190
  getQuestionnaire(request: GetQuestionnaireRequest): Observable<GetQuestionnaireResponse>;
176
191
  saveQuestionnaire(request: SaveQuestionnaireRequest): Observable<SaveQuestionnaireResponse>;
177
192
  getTreatmentTypes(request: GetTreatmentTypesRequest): Observable<GetTreatmentTypesResponse>;
193
+ updateTreatmentType(request: UpdateTreatmentTypeRequest): Observable<UpdateTreatmentTypeResponse>;
178
194
  createTreatmentRequest(request: CreateTreatmentRequestRequest): Observable<CreateTreatmentRequestResponse>;
179
195
  getTreatmentRequest(request: GetTreatmentRequestRequest): Observable<GetTreatmentRequestResponse>;
180
196
  listTreatmentRequests(request: ListTreatmentRequestsRequest): Observable<ListTreatmentRequestsResponse>;
181
197
  listAllTreatmentRequests(request: ListAllTreatmentRequestsRequest): Observable<ListAllTreatmentRequestsResponse>;
182
198
  updateTreatmentRequest(request: UpdateTreatmentRequestRequest): Observable<UpdateTreatmentRequestResponse>;
199
+ changeMedicationWish(request: ChangeMedicationWishRequest): Observable<ChangeMedicationWishResponse>;
183
200
  deleteTreatmentRequest(request: DeleteTreatmentRequestRequest): Observable<DeleteTreatmentRequestResponse>;
184
201
  startPayment(request: StartPaymentRequest): Observable<StartPaymentResponse>;
185
202
  }
@@ -187,11 +204,13 @@ export interface TreatmentServiceController {
187
204
  getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse> | Observable<GetQuestionnaireResponse> | GetQuestionnaireResponse;
188
205
  saveQuestionnaire(request: SaveQuestionnaireRequest): Promise<SaveQuestionnaireResponse> | Observable<SaveQuestionnaireResponse> | SaveQuestionnaireResponse;
189
206
  getTreatmentTypes(request: GetTreatmentTypesRequest): Promise<GetTreatmentTypesResponse> | Observable<GetTreatmentTypesResponse> | GetTreatmentTypesResponse;
207
+ updateTreatmentType(request: UpdateTreatmentTypeRequest): Promise<UpdateTreatmentTypeResponse> | Observable<UpdateTreatmentTypeResponse> | UpdateTreatmentTypeResponse;
190
208
  createTreatmentRequest(request: CreateTreatmentRequestRequest): Promise<CreateTreatmentRequestResponse> | Observable<CreateTreatmentRequestResponse> | CreateTreatmentRequestResponse;
191
209
  getTreatmentRequest(request: GetTreatmentRequestRequest): Promise<GetTreatmentRequestResponse> | Observable<GetTreatmentRequestResponse> | GetTreatmentRequestResponse;
192
210
  listTreatmentRequests(request: ListTreatmentRequestsRequest): Promise<ListTreatmentRequestsResponse> | Observable<ListTreatmentRequestsResponse> | ListTreatmentRequestsResponse;
193
211
  listAllTreatmentRequests(request: ListAllTreatmentRequestsRequest): Promise<ListAllTreatmentRequestsResponse> | Observable<ListAllTreatmentRequestsResponse> | ListAllTreatmentRequestsResponse;
194
212
  updateTreatmentRequest(request: UpdateTreatmentRequestRequest): Promise<UpdateTreatmentRequestResponse> | Observable<UpdateTreatmentRequestResponse> | UpdateTreatmentRequestResponse;
213
+ changeMedicationWish(request: ChangeMedicationWishRequest): Promise<ChangeMedicationWishResponse> | Observable<ChangeMedicationWishResponse> | ChangeMedicationWishResponse;
195
214
  deleteTreatmentRequest(request: DeleteTreatmentRequestRequest): Promise<DeleteTreatmentRequestResponse> | Observable<DeleteTreatmentRequestResponse> | DeleteTreatmentRequestResponse;
196
215
  startPayment(request: StartPaymentRequest): Promise<StartPaymentResponse> | Observable<StartPaymentResponse> | StartPaymentResponse;
197
216
  }
@@ -70,11 +70,13 @@ function TreatmentServiceControllerMethods() {
70
70
  "getQuestionnaire",
71
71
  "saveQuestionnaire",
72
72
  "getTreatmentTypes",
73
+ "updateTreatmentType",
73
74
  "createTreatmentRequest",
74
75
  "getTreatmentRequest",
75
76
  "listTreatmentRequests",
76
77
  "listAllTreatmentRequests",
77
78
  "updateTreatmentRequest",
79
+ "changeMedicationWish",
78
80
  "deleteTreatmentRequest",
79
81
  "startPayment",
80
82
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.43.0",
3
+ "version": "6.45.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -21,6 +21,7 @@ enum NotificationType {
21
21
  NOTIFICATION_TYPE_TOTP_ENABLED = 9;
22
22
  NOTIFICATION_TYPE_TOTP_DISABLED = 10;
23
23
  NOTIFICATION_TYPE_TREATMENT_REQUEST_EXPIRED = 11;
24
+ NOTIFICATION_TYPE_MEDICATION_WISH_CHANGED = 12;
24
25
  }
25
26
 
26
27
  message Notification {
@@ -6,11 +6,13 @@ service TreatmentService {
6
6
  rpc GetQuestionnaire (GetQuestionnaireRequest) returns (GetQuestionnaireResponse);
7
7
  rpc SaveQuestionnaire (SaveQuestionnaireRequest) returns (SaveQuestionnaireResponse);
8
8
  rpc GetTreatmentTypes (GetTreatmentTypesRequest) returns (GetTreatmentTypesResponse);
9
+ rpc UpdateTreatmentType (UpdateTreatmentTypeRequest) returns (UpdateTreatmentTypeResponse);
9
10
  rpc CreateTreatmentRequest (CreateTreatmentRequestRequest) returns (CreateTreatmentRequestResponse);
10
11
  rpc GetTreatmentRequest (GetTreatmentRequestRequest) returns (GetTreatmentRequestResponse);
11
12
  rpc ListTreatmentRequests (ListTreatmentRequestsRequest) returns (ListTreatmentRequestsResponse);
12
13
  rpc ListAllTreatmentRequests (ListAllTreatmentRequestsRequest) returns (ListAllTreatmentRequestsResponse);
13
14
  rpc UpdateTreatmentRequest (UpdateTreatmentRequestRequest) returns (UpdateTreatmentRequestResponse);
15
+ rpc ChangeMedicationWish (ChangeMedicationWishRequest) returns (ChangeMedicationWishResponse);
14
16
  rpc DeleteTreatmentRequest (DeleteTreatmentRequestRequest) returns (DeleteTreatmentRequestResponse);
15
17
  rpc StartPayment (StartPaymentRequest) returns (StartPaymentResponse);
16
18
  }
@@ -137,6 +139,16 @@ message GetTreatmentTypesResponse {
137
139
  repeated TreatmentTypeOption types = 1;
138
140
  }
139
141
 
142
+ message UpdateTreatmentTypeRequest {
143
+ TreatmentType type = 1;
144
+ optional int32 amount = 2;
145
+ optional bool available = 3;
146
+ }
147
+
148
+ message UpdateTreatmentTypeResponse {
149
+ TreatmentTypeOption type = 1;
150
+ }
151
+
140
152
  message CreateTreatmentRequestRequest {
141
153
  string user_id = 1;
142
154
  TreatmentType type = 2;
@@ -191,6 +203,15 @@ message UpdateTreatmentRequestResponse {
191
203
  TreatmentRequest request = 1;
192
204
  }
193
205
 
206
+ message ChangeMedicationWishRequest {
207
+ string id = 1;
208
+ string medication_wish = 2;
209
+ }
210
+
211
+ message ChangeMedicationWishResponse {
212
+ TreatmentRequest request = 1;
213
+ }
214
+
194
215
  message DeleteTreatmentRequestRequest {
195
216
  string user_id = 1;
196
217
  string id = 2;