@candesk/contracts 6.74.0 → 6.75.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.
@@ -4,4 +4,5 @@ export interface TreatmentRequestPaidEvent {
4
4
  email: string;
5
5
  firstName?: string;
6
6
  number: string;
7
+ appointmentAt?: string;
7
8
  }
@@ -165,6 +165,7 @@ export interface TreatmentRequest {
165
165
  rejectionReason?: MedicalRejectionReason | undefined;
166
166
  rejectionText?: string | undefined;
167
167
  patientName?: string | undefined;
168
+ appointmentAt?: string | undefined;
168
169
  }
169
170
  export interface PatientSnapshot {
170
171
  firstName: string;
@@ -201,6 +202,7 @@ export interface UpdateTreatmentTypeResponse {
201
202
  export interface CreateTreatmentRequestRequest {
202
203
  userId: string;
203
204
  type: TreatmentType;
205
+ appointmentAt?: string | undefined;
204
206
  }
205
207
  export interface CreateTreatmentRequestResponse {
206
208
  request: TreatmentRequest | undefined;
@@ -323,6 +325,7 @@ export interface ListMedicalReviewsRequest {
323
325
  query?: string | undefined;
324
326
  from?: string | undefined;
325
327
  to?: string | undefined;
328
+ type?: TreatmentType | undefined;
326
329
  }
327
330
  export interface ListMedicalReviewsResponse {
328
331
  requests: TreatmentRequest[];
@@ -333,10 +336,14 @@ export interface CountMedicalReviewsRequest {
333
336
  doctorId: string;
334
337
  allDoctors?: boolean | undefined;
335
338
  }
336
- export interface CountMedicalReviewsResponse {
339
+ export interface MedicalReviewCount {
340
+ type: TreatmentType;
337
341
  queue: number;
338
342
  inReview: number;
339
343
  }
344
+ export interface CountMedicalReviewsResponse {
345
+ counts: MedicalReviewCount[];
346
+ }
340
347
  export interface GetMedicalReviewRequest {
341
348
  id: string;
342
349
  doctorId: string;
@@ -384,6 +391,24 @@ export interface RetryRefundRequest {
384
391
  export interface RetryRefundResponse {
385
392
  request: TreatmentRequest | undefined;
386
393
  }
394
+ export interface ListAppointmentSlotsRequest {
395
+ }
396
+ export interface ListAppointmentSlotsResponse {
397
+ slots: string[];
398
+ }
399
+ export interface ListAppointmentsRequest {
400
+ doctorId: string;
401
+ allDoctors?: boolean | undefined;
402
+ from?: string | undefined;
403
+ to?: string | undefined;
404
+ cursor?: string | undefined;
405
+ limit: number;
406
+ }
407
+ export interface ListAppointmentsResponse {
408
+ requests: TreatmentRequest[];
409
+ nextCursor?: string | undefined;
410
+ total: number;
411
+ }
387
412
  export interface TreatmentService {
388
413
  getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse>;
389
414
  saveQuestionnaire(request: SaveQuestionnaireRequest): Promise<SaveQuestionnaireResponse>;
@@ -411,4 +436,6 @@ export interface TreatmentService {
411
436
  rejectMedicalReview(request: RejectMedicalReviewRequest): Promise<RejectMedicalReviewResponse>;
412
437
  releaseMedicalReview(request: ReleaseMedicalReviewRequest): Promise<ReleaseMedicalReviewResponse>;
413
438
  retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse>;
439
+ listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse>;
440
+ listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse>;
414
441
  }
@@ -166,6 +166,7 @@ export interface TreatmentRequest {
166
166
  rejectionReason?: MedicalRejectionReason | undefined;
167
167
  rejectionText?: string | undefined;
168
168
  patientName?: string | undefined;
169
+ appointmentAt?: string | undefined;
169
170
  }
170
171
  export interface PatientSnapshot {
171
172
  firstName: string;
@@ -202,6 +203,7 @@ export interface UpdateTreatmentTypeResponse {
202
203
  export interface CreateTreatmentRequestRequest {
203
204
  userId: string;
204
205
  type: TreatmentType;
206
+ appointmentAt?: string | undefined;
205
207
  }
206
208
  export interface CreateTreatmentRequestResponse {
207
209
  request: TreatmentRequest | undefined;
@@ -324,6 +326,7 @@ export interface ListMedicalReviewsRequest {
324
326
  query?: string | undefined;
325
327
  from?: string | undefined;
326
328
  to?: string | undefined;
329
+ type?: TreatmentType | undefined;
327
330
  }
328
331
  export interface ListMedicalReviewsResponse {
329
332
  requests: TreatmentRequest[];
@@ -334,10 +337,14 @@ export interface CountMedicalReviewsRequest {
334
337
  doctorId: string;
335
338
  allDoctors?: boolean | undefined;
336
339
  }
337
- export interface CountMedicalReviewsResponse {
340
+ export interface MedicalReviewCount {
341
+ type: TreatmentType;
338
342
  queue: number;
339
343
  inReview: number;
340
344
  }
345
+ export interface CountMedicalReviewsResponse {
346
+ counts: MedicalReviewCount[];
347
+ }
341
348
  export interface GetMedicalReviewRequest {
342
349
  id: string;
343
350
  doctorId: string;
@@ -385,6 +392,24 @@ export interface RetryRefundRequest {
385
392
  export interface RetryRefundResponse {
386
393
  request: TreatmentRequest | undefined;
387
394
  }
395
+ export interface ListAppointmentSlotsRequest {
396
+ }
397
+ export interface ListAppointmentSlotsResponse {
398
+ slots: string[];
399
+ }
400
+ export interface ListAppointmentsRequest {
401
+ doctorId: string;
402
+ allDoctors?: boolean | undefined;
403
+ from?: string | undefined;
404
+ to?: string | undefined;
405
+ cursor?: string | undefined;
406
+ limit: number;
407
+ }
408
+ export interface ListAppointmentsResponse {
409
+ requests: TreatmentRequest[];
410
+ nextCursor?: string | undefined;
411
+ total: number;
412
+ }
388
413
  export declare const TREATMENT_V1_PACKAGE_NAME = "treatment.v1";
389
414
  export interface TreatmentServiceClient {
390
415
  getQuestionnaire(request: GetQuestionnaireRequest): Observable<GetQuestionnaireResponse>;
@@ -413,6 +438,8 @@ export interface TreatmentServiceClient {
413
438
  rejectMedicalReview(request: RejectMedicalReviewRequest): Observable<RejectMedicalReviewResponse>;
414
439
  releaseMedicalReview(request: ReleaseMedicalReviewRequest): Observable<ReleaseMedicalReviewResponse>;
415
440
  retryRefund(request: RetryRefundRequest): Observable<RetryRefundResponse>;
441
+ listAppointmentSlots(request: ListAppointmentSlotsRequest): Observable<ListAppointmentSlotsResponse>;
442
+ listAppointments(request: ListAppointmentsRequest): Observable<ListAppointmentsResponse>;
416
443
  }
417
444
  export interface TreatmentServiceController {
418
445
  getQuestionnaire(request: GetQuestionnaireRequest): Promise<GetQuestionnaireResponse> | Observable<GetQuestionnaireResponse> | GetQuestionnaireResponse;
@@ -441,6 +468,8 @@ export interface TreatmentServiceController {
441
468
  rejectMedicalReview(request: RejectMedicalReviewRequest): Promise<RejectMedicalReviewResponse> | Observable<RejectMedicalReviewResponse> | RejectMedicalReviewResponse;
442
469
  releaseMedicalReview(request: ReleaseMedicalReviewRequest): Promise<ReleaseMedicalReviewResponse> | Observable<ReleaseMedicalReviewResponse> | ReleaseMedicalReviewResponse;
443
470
  retryRefund(request: RetryRefundRequest): Promise<RetryRefundResponse> | Observable<RetryRefundResponse> | RetryRefundResponse;
471
+ listAppointmentSlots(request: ListAppointmentSlotsRequest): Promise<ListAppointmentSlotsResponse> | Observable<ListAppointmentSlotsResponse> | ListAppointmentSlotsResponse;
472
+ listAppointments(request: ListAppointmentsRequest): Promise<ListAppointmentsResponse> | Observable<ListAppointmentsResponse> | ListAppointmentsResponse;
444
473
  }
445
474
  export declare function TreatmentServiceControllerMethods(): (constructor: Function) => void;
446
475
  export declare const TREATMENT_SERVICE_NAME = "TreatmentService";
@@ -138,6 +138,8 @@ function TreatmentServiceControllerMethods() {
138
138
  "rejectMedicalReview",
139
139
  "releaseMedicalReview",
140
140
  "retryRefund",
141
+ "listAppointmentSlots",
142
+ "listAppointments",
141
143
  ];
142
144
  for (const method of grpcMethods) {
143
145
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.74.0",
3
+ "version": "6.75.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -29,6 +29,8 @@ service TreatmentService {
29
29
  rpc RejectMedicalReview (RejectMedicalReviewRequest) returns (RejectMedicalReviewResponse);
30
30
  rpc ReleaseMedicalReview (ReleaseMedicalReviewRequest) returns (ReleaseMedicalReviewResponse);
31
31
  rpc RetryRefund (RetryRefundRequest) returns (RetryRefundResponse);
32
+ rpc ListAppointmentSlots (ListAppointmentSlotsRequest) returns (ListAppointmentSlotsResponse);
33
+ rpc ListAppointments (ListAppointmentsRequest) returns (ListAppointmentsResponse);
32
34
  }
33
35
 
34
36
  enum QuestionnaireStatus {
@@ -201,6 +203,7 @@ message TreatmentRequest {
201
203
  optional MedicalRejectionReason rejection_reason = 21;
202
204
  optional string rejection_text = 22;
203
205
  optional string patient_name = 23;
206
+ optional string appointment_at = 24;
204
207
  }
205
208
 
206
209
  message PatientSnapshot {
@@ -246,6 +249,7 @@ message UpdateTreatmentTypeResponse {
246
249
  message CreateTreatmentRequestRequest {
247
250
  string user_id = 1;
248
251
  TreatmentType type = 2;
252
+ optional string appointment_at = 3;
249
253
  }
250
254
 
251
255
  message CreateTreatmentRequestResponse {
@@ -397,6 +401,7 @@ message ListMedicalReviewsRequest {
397
401
  optional string query = 6;
398
402
  optional string from = 7;
399
403
  optional string to = 8;
404
+ optional TreatmentType type = 9;
400
405
  }
401
406
 
402
407
  message ListMedicalReviewsResponse {
@@ -410,9 +415,15 @@ message CountMedicalReviewsRequest {
410
415
  optional bool all_doctors = 2;
411
416
  }
412
417
 
418
+ message MedicalReviewCount {
419
+ TreatmentType type = 1;
420
+ int32 queue = 2;
421
+ int32 in_review = 3;
422
+ }
423
+
413
424
  message CountMedicalReviewsResponse {
414
- int32 queue = 1;
415
- int32 in_review = 2;
425
+ reserved 1, 2;
426
+ repeated MedicalReviewCount counts = 3;
416
427
  }
417
428
 
418
429
  message GetMedicalReviewRequest {
@@ -473,3 +484,24 @@ message RetryRefundRequest {
473
484
  message RetryRefundResponse {
474
485
  TreatmentRequest request = 1;
475
486
  }
487
+
488
+ message ListAppointmentSlotsRequest {}
489
+
490
+ message ListAppointmentSlotsResponse {
491
+ repeated string slots = 1;
492
+ }
493
+
494
+ message ListAppointmentsRequest {
495
+ string doctor_id = 1;
496
+ optional bool all_doctors = 2;
497
+ optional string from = 3;
498
+ optional string to = 4;
499
+ optional string cursor = 5;
500
+ int32 limit = 6;
501
+ }
502
+
503
+ message ListAppointmentsResponse {
504
+ repeated TreatmentRequest requests = 1;
505
+ optional string next_cursor = 2;
506
+ int32 total = 3;
507
+ }