@candesk/contracts 6.53.0 → 6.55.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.
@@ -43,6 +43,14 @@ export declare enum ProductSort {
43
43
  PRODUCT_SORT_CBD_DESC = 5,
44
44
  UNRECOGNIZED = -1
45
45
  }
46
+ export declare enum PotencyLevel {
47
+ POTENCY_LEVEL_UNSPECIFIED = 0,
48
+ POTENCY_LEVEL_LOW = 1,
49
+ POTENCY_LEVEL_MEDIUM = 2,
50
+ POTENCY_LEVEL_HIGH = 3,
51
+ POTENCY_LEVEL_VERY_HIGH = 4,
52
+ UNRECOGNIZED = -1
53
+ }
46
54
  export declare enum Flavor {
47
55
  FLAVOR_UNSPECIFIED = 0,
48
56
  FLAVOR_EARTHY = 1,
@@ -103,6 +111,8 @@ export interface Product {
103
111
  createdAt: string;
104
112
  updatedAt: string;
105
113
  coverKey?: string | undefined;
114
+ ratingAverage?: number | undefined;
115
+ ratingCount: number;
106
116
  }
107
117
  export interface ProductInput {
108
118
  name: string;
@@ -121,7 +131,7 @@ export interface ProductInput {
121
131
  price?: number | undefined;
122
132
  availability: Availability;
123
133
  }
124
- export interface PotencyRange {
134
+ export interface PriceRange {
125
135
  min?: number | undefined;
126
136
  max?: number | undefined;
127
137
  }
@@ -129,10 +139,12 @@ export interface ProductFilter {
129
139
  genetics: Genetics[];
130
140
  manufacturerSlugs: string[];
131
141
  countries: string[];
132
- thc?: PotencyRange | undefined;
133
- cbd?: PotencyRange | undefined;
134
142
  isIrradiated?: boolean | undefined;
135
143
  strainSlugs: string[];
144
+ thcLevels: PotencyLevel[];
145
+ cbdLevels: PotencyLevel[];
146
+ price?: PriceRange | undefined;
147
+ minRating?: number | undefined;
136
148
  }
137
149
  export interface ListProductsRequest {
138
150
  query?: string | undefined;
@@ -179,7 +191,15 @@ export interface IrradiationFacet {
179
191
  isIrradiated: boolean;
180
192
  count: number;
181
193
  }
182
- export interface PotencyBounds {
194
+ export interface PotencyLevelFacet {
195
+ level: PotencyLevel;
196
+ count: number;
197
+ }
198
+ export interface RatingFacet {
199
+ stars: number;
200
+ count: number;
201
+ }
202
+ export interface PriceBounds {
183
203
  min: number;
184
204
  max: number;
185
205
  }
@@ -189,9 +209,11 @@ export interface GetProductFacetsResponse {
189
209
  manufacturers: ManufacturerFacet[];
190
210
  countries: CountryFacet[];
191
211
  irradiation: IrradiationFacet[];
192
- thc?: PotencyBounds | undefined;
193
- cbd?: PotencyBounds | undefined;
194
212
  strains: StrainFacet[];
213
+ thcLevels: PotencyLevelFacet[];
214
+ cbdLevels: PotencyLevelFacet[];
215
+ price?: PriceBounds | undefined;
216
+ ratings: RatingFacet[];
195
217
  }
196
218
  export interface GetProductRequest {
197
219
  id: string;
@@ -5,7 +5,7 @@
5
5
  // protoc v3.21.12
6
6
  // source: catalog.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.Flavor = exports.ProductSort = exports.Availability = exports.PotencyUnit = exports.Genetics = exports.ProductStatus = exports.ProductType = exports.protobufFileName = exports.protobufPackage = void 0;
8
+ exports.Flavor = exports.PotencyLevel = exports.ProductSort = exports.Availability = exports.PotencyUnit = exports.Genetics = exports.ProductStatus = exports.ProductType = exports.protobufFileName = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  exports.protobufPackage = "catalog.v1";
11
11
  exports.protobufFileName = "catalog.proto";
@@ -58,6 +58,15 @@ var ProductSort;
58
58
  ProductSort[ProductSort["PRODUCT_SORT_CBD_DESC"] = 5] = "PRODUCT_SORT_CBD_DESC";
59
59
  ProductSort[ProductSort["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
60
60
  })(ProductSort || (exports.ProductSort = ProductSort = {}));
61
+ var PotencyLevel;
62
+ (function (PotencyLevel) {
63
+ PotencyLevel[PotencyLevel["POTENCY_LEVEL_UNSPECIFIED"] = 0] = "POTENCY_LEVEL_UNSPECIFIED";
64
+ PotencyLevel[PotencyLevel["POTENCY_LEVEL_LOW"] = 1] = "POTENCY_LEVEL_LOW";
65
+ PotencyLevel[PotencyLevel["POTENCY_LEVEL_MEDIUM"] = 2] = "POTENCY_LEVEL_MEDIUM";
66
+ PotencyLevel[PotencyLevel["POTENCY_LEVEL_HIGH"] = 3] = "POTENCY_LEVEL_HIGH";
67
+ PotencyLevel[PotencyLevel["POTENCY_LEVEL_VERY_HIGH"] = 4] = "POTENCY_LEVEL_VERY_HIGH";
68
+ PotencyLevel[PotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
69
+ })(PotencyLevel || (exports.PotencyLevel = PotencyLevel = {}));
61
70
  var Flavor;
62
71
  (function (Flavor) {
63
72
  Flavor[Flavor["FLAVOR_UNSPECIFIED"] = 0] = "FLAVOR_UNSPECIFIED";
@@ -44,6 +44,14 @@ export declare enum ProductSort {
44
44
  PRODUCT_SORT_CBD_DESC = 5,
45
45
  UNRECOGNIZED = -1
46
46
  }
47
+ export declare enum PotencyLevel {
48
+ POTENCY_LEVEL_UNSPECIFIED = 0,
49
+ POTENCY_LEVEL_LOW = 1,
50
+ POTENCY_LEVEL_MEDIUM = 2,
51
+ POTENCY_LEVEL_HIGH = 3,
52
+ POTENCY_LEVEL_VERY_HIGH = 4,
53
+ UNRECOGNIZED = -1
54
+ }
47
55
  export declare enum Flavor {
48
56
  FLAVOR_UNSPECIFIED = 0,
49
57
  FLAVOR_EARTHY = 1,
@@ -104,6 +112,8 @@ export interface Product {
104
112
  createdAt: string;
105
113
  updatedAt: string;
106
114
  coverKey?: string | undefined;
115
+ ratingAverage?: number | undefined;
116
+ ratingCount: number;
107
117
  }
108
118
  export interface ProductInput {
109
119
  name: string;
@@ -122,7 +132,7 @@ export interface ProductInput {
122
132
  price?: number | undefined;
123
133
  availability: Availability;
124
134
  }
125
- export interface PotencyRange {
135
+ export interface PriceRange {
126
136
  min?: number | undefined;
127
137
  max?: number | undefined;
128
138
  }
@@ -130,10 +140,12 @@ export interface ProductFilter {
130
140
  genetics: Genetics[];
131
141
  manufacturerSlugs: string[];
132
142
  countries: string[];
133
- thc?: PotencyRange | undefined;
134
- cbd?: PotencyRange | undefined;
135
143
  isIrradiated?: boolean | undefined;
136
144
  strainSlugs: string[];
145
+ thcLevels: PotencyLevel[];
146
+ cbdLevels: PotencyLevel[];
147
+ price?: PriceRange | undefined;
148
+ minRating?: number | undefined;
137
149
  }
138
150
  export interface ListProductsRequest {
139
151
  query?: string | undefined;
@@ -180,7 +192,15 @@ export interface IrradiationFacet {
180
192
  isIrradiated: boolean;
181
193
  count: number;
182
194
  }
183
- export interface PotencyBounds {
195
+ export interface PotencyLevelFacet {
196
+ level: PotencyLevel;
197
+ count: number;
198
+ }
199
+ export interface RatingFacet {
200
+ stars: number;
201
+ count: number;
202
+ }
203
+ export interface PriceBounds {
184
204
  min: number;
185
205
  max: number;
186
206
  }
@@ -190,9 +210,11 @@ export interface GetProductFacetsResponse {
190
210
  manufacturers: ManufacturerFacet[];
191
211
  countries: CountryFacet[];
192
212
  irradiation: IrradiationFacet[];
193
- thc?: PotencyBounds | undefined;
194
- cbd?: PotencyBounds | undefined;
195
213
  strains: StrainFacet[];
214
+ thcLevels: PotencyLevelFacet[];
215
+ cbdLevels: PotencyLevelFacet[];
216
+ price?: PriceBounds | undefined;
217
+ ratings: RatingFacet[];
196
218
  }
197
219
  export interface GetProductRequest {
198
220
  id: string;
@@ -5,7 +5,7 @@
5
5
  // protoc v3.21.12
6
6
  // source: catalog.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.CATALOG_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.Flavor = exports.ProductSort = exports.Availability = exports.PotencyUnit = exports.Genetics = exports.ProductStatus = exports.ProductType = exports.protobufFileName = exports.protobufPackage = void 0;
8
+ exports.CATALOG_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.Flavor = exports.PotencyLevel = exports.ProductSort = exports.Availability = exports.PotencyUnit = exports.Genetics = exports.ProductStatus = exports.ProductType = exports.protobufFileName = exports.protobufPackage = void 0;
9
9
  exports.CatalogServiceControllerMethods = CatalogServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const microservices_1 = require("@nestjs/microservices");
@@ -60,6 +60,15 @@ var ProductSort;
60
60
  ProductSort[ProductSort["PRODUCT_SORT_CBD_DESC"] = 5] = "PRODUCT_SORT_CBD_DESC";
61
61
  ProductSort[ProductSort["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
62
62
  })(ProductSort || (exports.ProductSort = ProductSort = {}));
63
+ var PotencyLevel;
64
+ (function (PotencyLevel) {
65
+ PotencyLevel[PotencyLevel["POTENCY_LEVEL_UNSPECIFIED"] = 0] = "POTENCY_LEVEL_UNSPECIFIED";
66
+ PotencyLevel[PotencyLevel["POTENCY_LEVEL_LOW"] = 1] = "POTENCY_LEVEL_LOW";
67
+ PotencyLevel[PotencyLevel["POTENCY_LEVEL_MEDIUM"] = 2] = "POTENCY_LEVEL_MEDIUM";
68
+ PotencyLevel[PotencyLevel["POTENCY_LEVEL_HIGH"] = 3] = "POTENCY_LEVEL_HIGH";
69
+ PotencyLevel[PotencyLevel["POTENCY_LEVEL_VERY_HIGH"] = 4] = "POTENCY_LEVEL_VERY_HIGH";
70
+ PotencyLevel[PotencyLevel["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
71
+ })(PotencyLevel || (exports.PotencyLevel = PotencyLevel = {}));
63
72
  var Flavor;
64
73
  (function (Flavor) {
65
74
  Flavor[Flavor["FLAVOR_UNSPECIFIED"] = 0] = "FLAVOR_UNSPECIFIED";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@candesk/contracts",
3
- "version": "6.53.0",
3
+ "version": "6.55.0",
4
4
  "description": "Protobuf contracts for CanDesk microservices",
5
5
  "author": {
6
6
  "name": "Alexander Schulz",
@@ -72,6 +72,14 @@ enum ProductSort {
72
72
  PRODUCT_SORT_CBD_DESC = 5;
73
73
  }
74
74
 
75
+ enum PotencyLevel {
76
+ POTENCY_LEVEL_UNSPECIFIED = 0;
77
+ POTENCY_LEVEL_LOW = 1;
78
+ POTENCY_LEVEL_MEDIUM = 2;
79
+ POTENCY_LEVEL_HIGH = 3;
80
+ POTENCY_LEVEL_VERY_HIGH = 4;
81
+ }
82
+
75
83
  enum Flavor {
76
84
  FLAVOR_UNSPECIFIED = 0;
77
85
  FLAVOR_EARTHY = 1;
@@ -135,6 +143,8 @@ message Product {
135
143
  string created_at = 20;
136
144
  string updated_at = 21;
137
145
  optional string cover_key = 22;
146
+ optional double rating_average = 23;
147
+ int32 rating_count = 24;
138
148
  }
139
149
 
140
150
  message ProductInput {
@@ -155,19 +165,22 @@ message ProductInput {
155
165
  Availability availability = 15;
156
166
  }
157
167
 
158
- message PotencyRange {
159
- optional double min = 1;
160
- optional double max = 2;
168
+ message PriceRange {
169
+ optional int32 min = 1;
170
+ optional int32 max = 2;
161
171
  }
162
172
 
163
173
  message ProductFilter {
164
174
  repeated Genetics genetics = 1;
165
175
  repeated string manufacturer_slugs = 2;
166
176
  repeated string countries = 3;
167
- optional PotencyRange thc = 4;
168
- optional PotencyRange cbd = 5;
177
+ reserved 4, 5;
169
178
  optional bool is_irradiated = 6;
170
179
  repeated string strain_slugs = 7;
180
+ repeated PotencyLevel thc_levels = 8;
181
+ repeated PotencyLevel cbd_levels = 9;
182
+ optional PriceRange price = 10;
183
+ optional int32 min_rating = 11;
171
184
  }
172
185
 
173
186
  message ListProductsRequest {
@@ -224,9 +237,19 @@ message IrradiationFacet {
224
237
  int32 count = 2;
225
238
  }
226
239
 
227
- message PotencyBounds {
228
- double min = 1;
229
- double max = 2;
240
+ message PotencyLevelFacet {
241
+ PotencyLevel level = 1;
242
+ int32 count = 2;
243
+ }
244
+
245
+ message RatingFacet {
246
+ int32 stars = 1;
247
+ int32 count = 2;
248
+ }
249
+
250
+ message PriceBounds {
251
+ int32 min = 1;
252
+ int32 max = 2;
230
253
  }
231
254
 
232
255
  message GetProductFacetsResponse {
@@ -235,9 +258,12 @@ message GetProductFacetsResponse {
235
258
  repeated ManufacturerFacet manufacturers = 3;
236
259
  repeated CountryFacet countries = 4;
237
260
  repeated IrradiationFacet irradiation = 5;
238
- optional PotencyBounds thc = 6;
239
- optional PotencyBounds cbd = 7;
261
+ reserved 6, 7;
240
262
  repeated StrainFacet strains = 8;
263
+ repeated PotencyLevelFacet thc_levels = 9;
264
+ repeated PotencyLevelFacet cbd_levels = 10;
265
+ optional PriceBounds price = 11;
266
+ repeated RatingFacet ratings = 12;
241
267
  }
242
268
 
243
269
  message GetProductRequest {