@candesk/contracts 6.48.0 → 6.50.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.
- package/dist/gen/account.d.ts +1 -0
- package/dist/gen/audit.d.ts +1 -0
- package/dist/gen/catalog.d.ts +12 -0
- package/dist/gen/media.d.ts +1 -0
- package/dist/gen/media.js +1 -0
- package/dist/gen/treatment.d.ts +23 -3
- package/dist/gen/treatment.js +8 -1
- package/dist/nest/account.d.ts +1 -0
- package/dist/nest/audit.d.ts +1 -0
- package/dist/nest/catalog.d.ts +13 -0
- package/dist/nest/catalog.js +1 -0
- package/dist/nest/media.d.ts +1 -0
- package/dist/nest/media.js +1 -0
- package/dist/nest/treatment.d.ts +23 -3
- package/dist/nest/treatment.js +8 -1
- package/package.json +1 -1
- package/proto/account.proto +1 -0
- package/proto/audit.proto +1 -0
- package/proto/catalog.proto +14 -0
- package/proto/media.proto +1 -0
- package/proto/treatment.proto +24 -3
package/dist/gen/account.d.ts
CHANGED
|
@@ -192,6 +192,7 @@ export interface ListPatientAccountsRequest {
|
|
|
192
192
|
export interface ListPatientAccountsResponse {
|
|
193
193
|
accounts: PatientAccount[];
|
|
194
194
|
nextCursor?: string | undefined;
|
|
195
|
+
total: number;
|
|
195
196
|
}
|
|
196
197
|
export interface GetPatientAccountRequest {
|
|
197
198
|
id: string;
|
package/dist/gen/audit.d.ts
CHANGED
package/dist/gen/catalog.d.ts
CHANGED
|
@@ -93,6 +93,7 @@ export interface Product {
|
|
|
93
93
|
publishedAt?: string | undefined;
|
|
94
94
|
createdAt: string;
|
|
95
95
|
updatedAt: string;
|
|
96
|
+
coverKey?: string | undefined;
|
|
96
97
|
}
|
|
97
98
|
export interface ProductInput {
|
|
98
99
|
name: string;
|
|
@@ -117,10 +118,12 @@ export interface ListProductsRequest {
|
|
|
117
118
|
status?: ProductStatus | undefined;
|
|
118
119
|
cursor?: string | undefined;
|
|
119
120
|
limit: number;
|
|
121
|
+
ids: string[];
|
|
120
122
|
}
|
|
121
123
|
export interface ListProductsResponse {
|
|
122
124
|
products: Product[];
|
|
123
125
|
nextCursor?: string | undefined;
|
|
126
|
+
total: number;
|
|
124
127
|
}
|
|
125
128
|
export interface GetProductRequest {
|
|
126
129
|
id: string;
|
|
@@ -159,6 +162,14 @@ export interface DeleteProductRequest {
|
|
|
159
162
|
export interface DeleteProductResponse {
|
|
160
163
|
product: Product | undefined;
|
|
161
164
|
}
|
|
165
|
+
export interface SetProductCoverRequest {
|
|
166
|
+
id: string;
|
|
167
|
+
coverKey?: string | undefined;
|
|
168
|
+
}
|
|
169
|
+
export interface SetProductCoverResponse {
|
|
170
|
+
product: Product | undefined;
|
|
171
|
+
previousCoverKey?: string | undefined;
|
|
172
|
+
}
|
|
162
173
|
export interface ListManufacturersRequest {
|
|
163
174
|
}
|
|
164
175
|
export interface ListManufacturersResponse {
|
|
@@ -239,6 +250,7 @@ export interface CatalogService {
|
|
|
239
250
|
publishProduct(request: PublishProductRequest): Promise<PublishProductResponse>;
|
|
240
251
|
unpublishProduct(request: UnpublishProductRequest): Promise<UnpublishProductResponse>;
|
|
241
252
|
deleteProduct(request: DeleteProductRequest): Promise<DeleteProductResponse>;
|
|
253
|
+
setProductCover(request: SetProductCoverRequest): Promise<SetProductCoverResponse>;
|
|
242
254
|
listManufacturers(request: ListManufacturersRequest): Promise<ListManufacturersResponse>;
|
|
243
255
|
createManufacturer(request: CreateManufacturerRequest): Promise<CreateManufacturerResponse>;
|
|
244
256
|
updateManufacturer(request: UpdateManufacturerRequest): Promise<UpdateManufacturerResponse>;
|
package/dist/gen/media.d.ts
CHANGED
package/dist/gen/media.js
CHANGED
|
@@ -12,5 +12,6 @@ var MediaKind;
|
|
|
12
12
|
(function (MediaKind) {
|
|
13
13
|
MediaKind[MediaKind["MEDIA_KIND_UNSPECIFIED"] = 0] = "MEDIA_KIND_UNSPECIFIED";
|
|
14
14
|
MediaKind[MediaKind["MEDIA_KIND_AVATAR"] = 1] = "MEDIA_KIND_AVATAR";
|
|
15
|
+
MediaKind[MediaKind["MEDIA_KIND_PRODUCT_COVER"] = 2] = "MEDIA_KIND_PRODUCT_COVER";
|
|
15
16
|
MediaKind[MediaKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
16
17
|
})(MediaKind || (exports.MediaKind = MediaKind = {}));
|
package/dist/gen/treatment.d.ts
CHANGED
|
@@ -33,6 +33,12 @@ export declare enum IntakeMethod {
|
|
|
33
33
|
INTAKE_METHOD_INHALATION = 2,
|
|
34
34
|
UNRECOGNIZED = -1
|
|
35
35
|
}
|
|
36
|
+
export declare enum ProductType {
|
|
37
|
+
PRODUCT_TYPE_UNSPECIFIED = 0,
|
|
38
|
+
PRODUCT_TYPE_FLOWER = 1,
|
|
39
|
+
PRODUCT_TYPE_EXTRACT = 2,
|
|
40
|
+
UNRECOGNIZED = -1
|
|
41
|
+
}
|
|
36
42
|
export declare enum TreatmentType {
|
|
37
43
|
TREATMENT_TYPE_UNSPECIFIED = 0,
|
|
38
44
|
TREATMENT_TYPE_ONLINE = 1,
|
|
@@ -46,6 +52,13 @@ export declare enum TreatmentRequestStatus {
|
|
|
46
52
|
TREATMENT_REQUEST_STATUS_PAID = 3,
|
|
47
53
|
UNRECOGNIZED = -1
|
|
48
54
|
}
|
|
55
|
+
export interface MedicationProduct {
|
|
56
|
+
productId: string;
|
|
57
|
+
amount: number;
|
|
58
|
+
number: number;
|
|
59
|
+
name: string;
|
|
60
|
+
type: ProductType;
|
|
61
|
+
}
|
|
49
62
|
export interface QuestionnaireAnswers {
|
|
50
63
|
symptoms: Symptom[];
|
|
51
64
|
otherSymptoms?: string | undefined;
|
|
@@ -67,6 +80,7 @@ export interface QuestionnaireAnswers {
|
|
|
67
80
|
confirmsTruthfulness?: boolean | undefined;
|
|
68
81
|
intakeMethods: IntakeMethod[];
|
|
69
82
|
medicationWish?: string | undefined;
|
|
83
|
+
medicationProducts: MedicationProduct[];
|
|
70
84
|
}
|
|
71
85
|
export interface Questionnaire {
|
|
72
86
|
status: QuestionnaireStatus;
|
|
@@ -89,10 +103,12 @@ export interface TreatmentRequest {
|
|
|
89
103
|
currency: string;
|
|
90
104
|
expiresAt?: string | undefined;
|
|
91
105
|
createdAt: string;
|
|
92
|
-
medicationWish
|
|
106
|
+
medicationWish?: string | undefined;
|
|
93
107
|
paidAt?: string | undefined;
|
|
94
108
|
userId: string;
|
|
95
109
|
withdrawalWaiverAt?: string | undefined;
|
|
110
|
+
medicationProducts: MedicationProduct[];
|
|
111
|
+
intakeMethods: IntakeMethod[];
|
|
96
112
|
}
|
|
97
113
|
export interface GetQuestionnaireRequest {
|
|
98
114
|
userId: string;
|
|
@@ -143,6 +159,7 @@ export interface ListTreatmentRequestsRequest {
|
|
|
143
159
|
export interface ListTreatmentRequestsResponse {
|
|
144
160
|
requests: TreatmentRequest[];
|
|
145
161
|
nextCursor?: string | undefined;
|
|
162
|
+
total: number;
|
|
146
163
|
}
|
|
147
164
|
export interface ListAllTreatmentRequestsRequest {
|
|
148
165
|
number?: string | undefined;
|
|
@@ -154,18 +171,21 @@ export interface ListAllTreatmentRequestsRequest {
|
|
|
154
171
|
export interface ListAllTreatmentRequestsResponse {
|
|
155
172
|
requests: TreatmentRequest[];
|
|
156
173
|
nextCursor?: string | undefined;
|
|
174
|
+
total: number;
|
|
157
175
|
}
|
|
158
176
|
export interface UpdateTreatmentRequestRequest {
|
|
159
177
|
userId: string;
|
|
160
178
|
id: string;
|
|
161
|
-
medicationWish
|
|
179
|
+
medicationWish?: string | undefined;
|
|
180
|
+
medicationProducts: MedicationProduct[];
|
|
162
181
|
}
|
|
163
182
|
export interface UpdateTreatmentRequestResponse {
|
|
164
183
|
request: TreatmentRequest | undefined;
|
|
165
184
|
}
|
|
166
185
|
export interface ChangeMedicationWishRequest {
|
|
167
186
|
id: string;
|
|
168
|
-
medicationWish
|
|
187
|
+
medicationWish?: string | undefined;
|
|
188
|
+
medicationProducts: MedicationProduct[];
|
|
169
189
|
}
|
|
170
190
|
export interface ChangeMedicationWishResponse {
|
|
171
191
|
request: TreatmentRequest | undefined;
|
package/dist/gen/treatment.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: treatment.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.TreatmentRequestStatus = exports.TreatmentType = exports.IntakeMethod = exports.SymptomDuration = exports.Symptom = exports.QuestionnaireStatus = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
8
|
+
exports.TreatmentRequestStatus = exports.TreatmentType = exports.ProductType = exports.IntakeMethod = exports.SymptomDuration = exports.Symptom = exports.QuestionnaireStatus = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
exports.protobufPackage = "treatment.v1";
|
|
11
11
|
exports.protobufFileName = "treatment.proto";
|
|
@@ -46,6 +46,13 @@ var IntakeMethod;
|
|
|
46
46
|
IntakeMethod[IntakeMethod["INTAKE_METHOD_INHALATION"] = 2] = "INTAKE_METHOD_INHALATION";
|
|
47
47
|
IntakeMethod[IntakeMethod["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
48
48
|
})(IntakeMethod || (exports.IntakeMethod = IntakeMethod = {}));
|
|
49
|
+
var ProductType;
|
|
50
|
+
(function (ProductType) {
|
|
51
|
+
ProductType[ProductType["PRODUCT_TYPE_UNSPECIFIED"] = 0] = "PRODUCT_TYPE_UNSPECIFIED";
|
|
52
|
+
ProductType[ProductType["PRODUCT_TYPE_FLOWER"] = 1] = "PRODUCT_TYPE_FLOWER";
|
|
53
|
+
ProductType[ProductType["PRODUCT_TYPE_EXTRACT"] = 2] = "PRODUCT_TYPE_EXTRACT";
|
|
54
|
+
ProductType[ProductType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
55
|
+
})(ProductType || (exports.ProductType = ProductType = {}));
|
|
49
56
|
var TreatmentType;
|
|
50
57
|
(function (TreatmentType) {
|
|
51
58
|
TreatmentType[TreatmentType["TREATMENT_TYPE_UNSPECIFIED"] = 0] = "TREATMENT_TYPE_UNSPECIFIED";
|
package/dist/nest/account.d.ts
CHANGED
|
@@ -193,6 +193,7 @@ export interface ListPatientAccountsRequest {
|
|
|
193
193
|
export interface ListPatientAccountsResponse {
|
|
194
194
|
accounts: PatientAccount[];
|
|
195
195
|
nextCursor?: string | undefined;
|
|
196
|
+
total: number;
|
|
196
197
|
}
|
|
197
198
|
export interface GetPatientAccountRequest {
|
|
198
199
|
id: string;
|
package/dist/nest/audit.d.ts
CHANGED
package/dist/nest/catalog.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ export interface Product {
|
|
|
94
94
|
publishedAt?: string | undefined;
|
|
95
95
|
createdAt: string;
|
|
96
96
|
updatedAt: string;
|
|
97
|
+
coverKey?: string | undefined;
|
|
97
98
|
}
|
|
98
99
|
export interface ProductInput {
|
|
99
100
|
name: string;
|
|
@@ -118,10 +119,12 @@ export interface ListProductsRequest {
|
|
|
118
119
|
status?: ProductStatus | undefined;
|
|
119
120
|
cursor?: string | undefined;
|
|
120
121
|
limit: number;
|
|
122
|
+
ids: string[];
|
|
121
123
|
}
|
|
122
124
|
export interface ListProductsResponse {
|
|
123
125
|
products: Product[];
|
|
124
126
|
nextCursor?: string | undefined;
|
|
127
|
+
total: number;
|
|
125
128
|
}
|
|
126
129
|
export interface GetProductRequest {
|
|
127
130
|
id: string;
|
|
@@ -160,6 +163,14 @@ export interface DeleteProductRequest {
|
|
|
160
163
|
export interface DeleteProductResponse {
|
|
161
164
|
product: Product | undefined;
|
|
162
165
|
}
|
|
166
|
+
export interface SetProductCoverRequest {
|
|
167
|
+
id: string;
|
|
168
|
+
coverKey?: string | undefined;
|
|
169
|
+
}
|
|
170
|
+
export interface SetProductCoverResponse {
|
|
171
|
+
product: Product | undefined;
|
|
172
|
+
previousCoverKey?: string | undefined;
|
|
173
|
+
}
|
|
163
174
|
export interface ListManufacturersRequest {
|
|
164
175
|
}
|
|
165
176
|
export interface ListManufacturersResponse {
|
|
@@ -241,6 +252,7 @@ export interface CatalogServiceClient {
|
|
|
241
252
|
publishProduct(request: PublishProductRequest): Observable<PublishProductResponse>;
|
|
242
253
|
unpublishProduct(request: UnpublishProductRequest): Observable<UnpublishProductResponse>;
|
|
243
254
|
deleteProduct(request: DeleteProductRequest): Observable<DeleteProductResponse>;
|
|
255
|
+
setProductCover(request: SetProductCoverRequest): Observable<SetProductCoverResponse>;
|
|
244
256
|
listManufacturers(request: ListManufacturersRequest): Observable<ListManufacturersResponse>;
|
|
245
257
|
createManufacturer(request: CreateManufacturerRequest): Observable<CreateManufacturerResponse>;
|
|
246
258
|
updateManufacturer(request: UpdateManufacturerRequest): Observable<UpdateManufacturerResponse>;
|
|
@@ -262,6 +274,7 @@ export interface CatalogServiceController {
|
|
|
262
274
|
publishProduct(request: PublishProductRequest): Promise<PublishProductResponse> | Observable<PublishProductResponse> | PublishProductResponse;
|
|
263
275
|
unpublishProduct(request: UnpublishProductRequest): Promise<UnpublishProductResponse> | Observable<UnpublishProductResponse> | UnpublishProductResponse;
|
|
264
276
|
deleteProduct(request: DeleteProductRequest): Promise<DeleteProductResponse> | Observable<DeleteProductResponse> | DeleteProductResponse;
|
|
277
|
+
setProductCover(request: SetProductCoverRequest): Promise<SetProductCoverResponse> | Observable<SetProductCoverResponse> | SetProductCoverResponse;
|
|
265
278
|
listManufacturers(request: ListManufacturersRequest): Promise<ListManufacturersResponse> | Observable<ListManufacturersResponse> | ListManufacturersResponse;
|
|
266
279
|
createManufacturer(request: CreateManufacturerRequest): Promise<CreateManufacturerResponse> | Observable<CreateManufacturerResponse> | CreateManufacturerResponse;
|
|
267
280
|
updateManufacturer(request: UpdateManufacturerRequest): Promise<UpdateManufacturerResponse> | Observable<UpdateManufacturerResponse> | UpdateManufacturerResponse;
|
package/dist/nest/catalog.js
CHANGED
package/dist/nest/media.d.ts
CHANGED
package/dist/nest/media.js
CHANGED
|
@@ -15,6 +15,7 @@ var MediaKind;
|
|
|
15
15
|
(function (MediaKind) {
|
|
16
16
|
MediaKind[MediaKind["MEDIA_KIND_UNSPECIFIED"] = 0] = "MEDIA_KIND_UNSPECIFIED";
|
|
17
17
|
MediaKind[MediaKind["MEDIA_KIND_AVATAR"] = 1] = "MEDIA_KIND_AVATAR";
|
|
18
|
+
MediaKind[MediaKind["MEDIA_KIND_PRODUCT_COVER"] = 2] = "MEDIA_KIND_PRODUCT_COVER";
|
|
18
19
|
MediaKind[MediaKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
19
20
|
})(MediaKind || (exports.MediaKind = MediaKind = {}));
|
|
20
21
|
exports.MEDIA_V1_PACKAGE_NAME = "media.v1";
|
package/dist/nest/treatment.d.ts
CHANGED
|
@@ -34,6 +34,12 @@ export declare enum IntakeMethod {
|
|
|
34
34
|
INTAKE_METHOD_INHALATION = 2,
|
|
35
35
|
UNRECOGNIZED = -1
|
|
36
36
|
}
|
|
37
|
+
export declare enum ProductType {
|
|
38
|
+
PRODUCT_TYPE_UNSPECIFIED = 0,
|
|
39
|
+
PRODUCT_TYPE_FLOWER = 1,
|
|
40
|
+
PRODUCT_TYPE_EXTRACT = 2,
|
|
41
|
+
UNRECOGNIZED = -1
|
|
42
|
+
}
|
|
37
43
|
export declare enum TreatmentType {
|
|
38
44
|
TREATMENT_TYPE_UNSPECIFIED = 0,
|
|
39
45
|
TREATMENT_TYPE_ONLINE = 1,
|
|
@@ -47,6 +53,13 @@ export declare enum TreatmentRequestStatus {
|
|
|
47
53
|
TREATMENT_REQUEST_STATUS_PAID = 3,
|
|
48
54
|
UNRECOGNIZED = -1
|
|
49
55
|
}
|
|
56
|
+
export interface MedicationProduct {
|
|
57
|
+
productId: string;
|
|
58
|
+
amount: number;
|
|
59
|
+
number: number;
|
|
60
|
+
name: string;
|
|
61
|
+
type: ProductType;
|
|
62
|
+
}
|
|
50
63
|
export interface QuestionnaireAnswers {
|
|
51
64
|
symptoms: Symptom[];
|
|
52
65
|
otherSymptoms?: string | undefined;
|
|
@@ -68,6 +81,7 @@ export interface QuestionnaireAnswers {
|
|
|
68
81
|
confirmsTruthfulness?: boolean | undefined;
|
|
69
82
|
intakeMethods: IntakeMethod[];
|
|
70
83
|
medicationWish?: string | undefined;
|
|
84
|
+
medicationProducts: MedicationProduct[];
|
|
71
85
|
}
|
|
72
86
|
export interface Questionnaire {
|
|
73
87
|
status: QuestionnaireStatus;
|
|
@@ -90,10 +104,12 @@ export interface TreatmentRequest {
|
|
|
90
104
|
currency: string;
|
|
91
105
|
expiresAt?: string | undefined;
|
|
92
106
|
createdAt: string;
|
|
93
|
-
medicationWish
|
|
107
|
+
medicationWish?: string | undefined;
|
|
94
108
|
paidAt?: string | undefined;
|
|
95
109
|
userId: string;
|
|
96
110
|
withdrawalWaiverAt?: string | undefined;
|
|
111
|
+
medicationProducts: MedicationProduct[];
|
|
112
|
+
intakeMethods: IntakeMethod[];
|
|
97
113
|
}
|
|
98
114
|
export interface GetQuestionnaireRequest {
|
|
99
115
|
userId: string;
|
|
@@ -144,6 +160,7 @@ export interface ListTreatmentRequestsRequest {
|
|
|
144
160
|
export interface ListTreatmentRequestsResponse {
|
|
145
161
|
requests: TreatmentRequest[];
|
|
146
162
|
nextCursor?: string | undefined;
|
|
163
|
+
total: number;
|
|
147
164
|
}
|
|
148
165
|
export interface ListAllTreatmentRequestsRequest {
|
|
149
166
|
number?: string | undefined;
|
|
@@ -155,18 +172,21 @@ export interface ListAllTreatmentRequestsRequest {
|
|
|
155
172
|
export interface ListAllTreatmentRequestsResponse {
|
|
156
173
|
requests: TreatmentRequest[];
|
|
157
174
|
nextCursor?: string | undefined;
|
|
175
|
+
total: number;
|
|
158
176
|
}
|
|
159
177
|
export interface UpdateTreatmentRequestRequest {
|
|
160
178
|
userId: string;
|
|
161
179
|
id: string;
|
|
162
|
-
medicationWish
|
|
180
|
+
medicationWish?: string | undefined;
|
|
181
|
+
medicationProducts: MedicationProduct[];
|
|
163
182
|
}
|
|
164
183
|
export interface UpdateTreatmentRequestResponse {
|
|
165
184
|
request: TreatmentRequest | undefined;
|
|
166
185
|
}
|
|
167
186
|
export interface ChangeMedicationWishRequest {
|
|
168
187
|
id: string;
|
|
169
|
-
medicationWish
|
|
188
|
+
medicationWish?: string | undefined;
|
|
189
|
+
medicationProducts: MedicationProduct[];
|
|
170
190
|
}
|
|
171
191
|
export interface ChangeMedicationWishResponse {
|
|
172
192
|
request: TreatmentRequest | undefined;
|
package/dist/nest/treatment.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// protoc v3.21.12
|
|
6
6
|
// source: treatment.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.TREATMENT_SERVICE_NAME = exports.TREATMENT_V1_PACKAGE_NAME = exports.TreatmentRequestStatus = exports.TreatmentType = exports.IntakeMethod = exports.SymptomDuration = exports.Symptom = exports.QuestionnaireStatus = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
8
|
+
exports.TREATMENT_SERVICE_NAME = exports.TREATMENT_V1_PACKAGE_NAME = exports.TreatmentRequestStatus = exports.TreatmentType = exports.ProductType = exports.IntakeMethod = exports.SymptomDuration = exports.Symptom = exports.QuestionnaireStatus = exports.protobufFileName = exports.protobufPackage = void 0;
|
|
9
9
|
exports.TreatmentServiceControllerMethods = TreatmentServiceControllerMethods;
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
const microservices_1 = require("@nestjs/microservices");
|
|
@@ -48,6 +48,13 @@ var IntakeMethod;
|
|
|
48
48
|
IntakeMethod[IntakeMethod["INTAKE_METHOD_INHALATION"] = 2] = "INTAKE_METHOD_INHALATION";
|
|
49
49
|
IntakeMethod[IntakeMethod["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
50
50
|
})(IntakeMethod || (exports.IntakeMethod = IntakeMethod = {}));
|
|
51
|
+
var ProductType;
|
|
52
|
+
(function (ProductType) {
|
|
53
|
+
ProductType[ProductType["PRODUCT_TYPE_UNSPECIFIED"] = 0] = "PRODUCT_TYPE_UNSPECIFIED";
|
|
54
|
+
ProductType[ProductType["PRODUCT_TYPE_FLOWER"] = 1] = "PRODUCT_TYPE_FLOWER";
|
|
55
|
+
ProductType[ProductType["PRODUCT_TYPE_EXTRACT"] = 2] = "PRODUCT_TYPE_EXTRACT";
|
|
56
|
+
ProductType[ProductType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
57
|
+
})(ProductType || (exports.ProductType = ProductType = {}));
|
|
51
58
|
var TreatmentType;
|
|
52
59
|
(function (TreatmentType) {
|
|
53
60
|
TreatmentType[TreatmentType["TREATMENT_TYPE_UNSPECIFIED"] = 0] = "TREATMENT_TYPE_UNSPECIFIED";
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
package/proto/audit.proto
CHANGED
package/proto/catalog.proto
CHANGED
|
@@ -10,6 +10,7 @@ service CatalogService {
|
|
|
10
10
|
rpc PublishProduct (PublishProductRequest) returns (PublishProductResponse);
|
|
11
11
|
rpc UnpublishProduct (UnpublishProductRequest) returns (UnpublishProductResponse);
|
|
12
12
|
rpc DeleteProduct (DeleteProductRequest) returns (DeleteProductResponse);
|
|
13
|
+
rpc SetProductCover (SetProductCoverRequest) returns (SetProductCoverResponse);
|
|
13
14
|
|
|
14
15
|
rpc ListManufacturers (ListManufacturersRequest) returns (ListManufacturersResponse);
|
|
15
16
|
rpc CreateManufacturer (CreateManufacturerRequest) returns (CreateManufacturerResponse);
|
|
@@ -123,6 +124,7 @@ message Product {
|
|
|
123
124
|
optional string published_at = 19;
|
|
124
125
|
string created_at = 20;
|
|
125
126
|
string updated_at = 21;
|
|
127
|
+
optional string cover_key = 22;
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
message ProductInput {
|
|
@@ -149,11 +151,13 @@ message ListProductsRequest {
|
|
|
149
151
|
optional ProductStatus status = 3;
|
|
150
152
|
optional string cursor = 4;
|
|
151
153
|
int32 limit = 5;
|
|
154
|
+
repeated string ids = 6;
|
|
152
155
|
}
|
|
153
156
|
|
|
154
157
|
message ListProductsResponse {
|
|
155
158
|
repeated Product products = 1;
|
|
156
159
|
optional string next_cursor = 2;
|
|
160
|
+
int32 total = 3;
|
|
157
161
|
}
|
|
158
162
|
|
|
159
163
|
message GetProductRequest {
|
|
@@ -205,6 +209,16 @@ message DeleteProductResponse {
|
|
|
205
209
|
Product product = 1;
|
|
206
210
|
}
|
|
207
211
|
|
|
212
|
+
message SetProductCoverRequest {
|
|
213
|
+
string id = 1;
|
|
214
|
+
optional string cover_key = 2;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
message SetProductCoverResponse {
|
|
218
|
+
Product product = 1;
|
|
219
|
+
optional string previous_cover_key = 2;
|
|
220
|
+
}
|
|
221
|
+
|
|
208
222
|
message ListManufacturersRequest {}
|
|
209
223
|
|
|
210
224
|
message ListManufacturersResponse {
|
package/proto/media.proto
CHANGED
package/proto/treatment.proto
CHANGED
|
@@ -50,6 +50,12 @@ enum IntakeMethod {
|
|
|
50
50
|
INTAKE_METHOD_INHALATION = 2;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
enum ProductType {
|
|
54
|
+
PRODUCT_TYPE_UNSPECIFIED = 0;
|
|
55
|
+
PRODUCT_TYPE_FLOWER = 1;
|
|
56
|
+
PRODUCT_TYPE_EXTRACT = 2;
|
|
57
|
+
}
|
|
58
|
+
|
|
53
59
|
enum TreatmentType {
|
|
54
60
|
TREATMENT_TYPE_UNSPECIFIED = 0;
|
|
55
61
|
TREATMENT_TYPE_ONLINE = 1;
|
|
@@ -63,6 +69,14 @@ enum TreatmentRequestStatus {
|
|
|
63
69
|
TREATMENT_REQUEST_STATUS_PAID = 3;
|
|
64
70
|
}
|
|
65
71
|
|
|
72
|
+
message MedicationProduct {
|
|
73
|
+
string product_id = 1;
|
|
74
|
+
int32 amount = 2;
|
|
75
|
+
int32 number = 3;
|
|
76
|
+
string name = 4;
|
|
77
|
+
ProductType type = 5;
|
|
78
|
+
}
|
|
79
|
+
|
|
66
80
|
message QuestionnaireAnswers {
|
|
67
81
|
repeated Symptom symptoms = 1;
|
|
68
82
|
optional string other_symptoms = 2;
|
|
@@ -84,6 +98,7 @@ message QuestionnaireAnswers {
|
|
|
84
98
|
optional bool confirms_truthfulness = 18;
|
|
85
99
|
repeated IntakeMethod intake_methods = 19;
|
|
86
100
|
optional string medication_wish = 20;
|
|
101
|
+
repeated MedicationProduct medication_products = 21;
|
|
87
102
|
}
|
|
88
103
|
|
|
89
104
|
message Questionnaire {
|
|
@@ -109,10 +124,12 @@ message TreatmentRequest {
|
|
|
109
124
|
string currency = 6;
|
|
110
125
|
optional string expires_at = 7;
|
|
111
126
|
string created_at = 8;
|
|
112
|
-
string medication_wish = 9;
|
|
127
|
+
optional string medication_wish = 9;
|
|
113
128
|
optional string paid_at = 10;
|
|
114
129
|
string user_id = 11;
|
|
115
130
|
optional string withdrawal_waiver_at = 12;
|
|
131
|
+
repeated MedicationProduct medication_products = 13;
|
|
132
|
+
repeated IntakeMethod intake_methods = 14;
|
|
116
133
|
}
|
|
117
134
|
|
|
118
135
|
message GetQuestionnaireRequest {
|
|
@@ -178,6 +195,7 @@ message ListTreatmentRequestsResponse {
|
|
|
178
195
|
repeated TreatmentRequest requests = 1;
|
|
179
196
|
reserved 2, 3, 4;
|
|
180
197
|
optional string next_cursor = 5;
|
|
198
|
+
int32 total = 6;
|
|
181
199
|
}
|
|
182
200
|
|
|
183
201
|
message ListAllTreatmentRequestsRequest {
|
|
@@ -191,12 +209,14 @@ message ListAllTreatmentRequestsRequest {
|
|
|
191
209
|
message ListAllTreatmentRequestsResponse {
|
|
192
210
|
repeated TreatmentRequest requests = 1;
|
|
193
211
|
optional string next_cursor = 2;
|
|
212
|
+
int32 total = 3;
|
|
194
213
|
}
|
|
195
214
|
|
|
196
215
|
message UpdateTreatmentRequestRequest {
|
|
197
216
|
string user_id = 1;
|
|
198
217
|
string id = 2;
|
|
199
|
-
string medication_wish = 3;
|
|
218
|
+
optional string medication_wish = 3;
|
|
219
|
+
repeated MedicationProduct medication_products = 4;
|
|
200
220
|
}
|
|
201
221
|
|
|
202
222
|
message UpdateTreatmentRequestResponse {
|
|
@@ -205,7 +225,8 @@ message UpdateTreatmentRequestResponse {
|
|
|
205
225
|
|
|
206
226
|
message ChangeMedicationWishRequest {
|
|
207
227
|
string id = 1;
|
|
208
|
-
string medication_wish = 2;
|
|
228
|
+
optional string medication_wish = 2;
|
|
229
|
+
repeated MedicationProduct medication_products = 3;
|
|
209
230
|
}
|
|
210
231
|
|
|
211
232
|
message ChangeMedicationWishResponse {
|