@candesk/contracts 6.51.0 → 6.53.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/catalog.d.ts +59 -0
- package/dist/nest/catalog.d.ts +60 -0
- package/dist/nest/catalog.js +1 -0
- package/package.json +1 -1
- package/proto/catalog.proto +70 -0
package/dist/gen/catalog.d.ts
CHANGED
|
@@ -121,6 +121,19 @@ export interface ProductInput {
|
|
|
121
121
|
price?: number | undefined;
|
|
122
122
|
availability: Availability;
|
|
123
123
|
}
|
|
124
|
+
export interface PotencyRange {
|
|
125
|
+
min?: number | undefined;
|
|
126
|
+
max?: number | undefined;
|
|
127
|
+
}
|
|
128
|
+
export interface ProductFilter {
|
|
129
|
+
genetics: Genetics[];
|
|
130
|
+
manufacturerSlugs: string[];
|
|
131
|
+
countries: string[];
|
|
132
|
+
thc?: PotencyRange | undefined;
|
|
133
|
+
cbd?: PotencyRange | undefined;
|
|
134
|
+
isIrradiated?: boolean | undefined;
|
|
135
|
+
strainSlugs: string[];
|
|
136
|
+
}
|
|
124
137
|
export interface ListProductsRequest {
|
|
125
138
|
query?: string | undefined;
|
|
126
139
|
type?: ProductType | undefined;
|
|
@@ -129,12 +142,57 @@ export interface ListProductsRequest {
|
|
|
129
142
|
limit: number;
|
|
130
143
|
ids: string[];
|
|
131
144
|
sort?: ProductSort | undefined;
|
|
145
|
+
filter?: ProductFilter | undefined;
|
|
132
146
|
}
|
|
133
147
|
export interface ListProductsResponse {
|
|
134
148
|
products: Product[];
|
|
135
149
|
nextCursor?: string | undefined;
|
|
136
150
|
total: number;
|
|
137
151
|
}
|
|
152
|
+
export interface GetProductFacetsRequest {
|
|
153
|
+
query?: string | undefined;
|
|
154
|
+
type?: ProductType | undefined;
|
|
155
|
+
status?: ProductStatus | undefined;
|
|
156
|
+
filter?: ProductFilter | undefined;
|
|
157
|
+
}
|
|
158
|
+
export interface ProductTypeFacet {
|
|
159
|
+
type: ProductType;
|
|
160
|
+
count: number;
|
|
161
|
+
}
|
|
162
|
+
export interface GeneticsFacet {
|
|
163
|
+
genetics: Genetics;
|
|
164
|
+
count: number;
|
|
165
|
+
}
|
|
166
|
+
export interface ManufacturerFacet {
|
|
167
|
+
manufacturer: Manufacturer | undefined;
|
|
168
|
+
count: number;
|
|
169
|
+
}
|
|
170
|
+
export interface StrainFacet {
|
|
171
|
+
strain: Strain | undefined;
|
|
172
|
+
count: number;
|
|
173
|
+
}
|
|
174
|
+
export interface CountryFacet {
|
|
175
|
+
country: string;
|
|
176
|
+
count: number;
|
|
177
|
+
}
|
|
178
|
+
export interface IrradiationFacet {
|
|
179
|
+
isIrradiated: boolean;
|
|
180
|
+
count: number;
|
|
181
|
+
}
|
|
182
|
+
export interface PotencyBounds {
|
|
183
|
+
min: number;
|
|
184
|
+
max: number;
|
|
185
|
+
}
|
|
186
|
+
export interface GetProductFacetsResponse {
|
|
187
|
+
types: ProductTypeFacet[];
|
|
188
|
+
genetics: GeneticsFacet[];
|
|
189
|
+
manufacturers: ManufacturerFacet[];
|
|
190
|
+
countries: CountryFacet[];
|
|
191
|
+
irradiation: IrradiationFacet[];
|
|
192
|
+
thc?: PotencyBounds | undefined;
|
|
193
|
+
cbd?: PotencyBounds | undefined;
|
|
194
|
+
strains: StrainFacet[];
|
|
195
|
+
}
|
|
138
196
|
export interface GetProductRequest {
|
|
139
197
|
id: string;
|
|
140
198
|
}
|
|
@@ -254,6 +312,7 @@ export interface DeleteTerpeneResponse {
|
|
|
254
312
|
}
|
|
255
313
|
export interface CatalogService {
|
|
256
314
|
listProducts(request: ListProductsRequest): Promise<ListProductsResponse>;
|
|
315
|
+
getProductFacets(request: GetProductFacetsRequest): Promise<GetProductFacetsResponse>;
|
|
257
316
|
getProduct(request: GetProductRequest): Promise<GetProductResponse>;
|
|
258
317
|
createProduct(request: CreateProductRequest): Promise<CreateProductResponse>;
|
|
259
318
|
updateProduct(request: UpdateProductRequest): Promise<UpdateProductResponse>;
|
package/dist/nest/catalog.d.ts
CHANGED
|
@@ -122,6 +122,19 @@ export interface ProductInput {
|
|
|
122
122
|
price?: number | undefined;
|
|
123
123
|
availability: Availability;
|
|
124
124
|
}
|
|
125
|
+
export interface PotencyRange {
|
|
126
|
+
min?: number | undefined;
|
|
127
|
+
max?: number | undefined;
|
|
128
|
+
}
|
|
129
|
+
export interface ProductFilter {
|
|
130
|
+
genetics: Genetics[];
|
|
131
|
+
manufacturerSlugs: string[];
|
|
132
|
+
countries: string[];
|
|
133
|
+
thc?: PotencyRange | undefined;
|
|
134
|
+
cbd?: PotencyRange | undefined;
|
|
135
|
+
isIrradiated?: boolean | undefined;
|
|
136
|
+
strainSlugs: string[];
|
|
137
|
+
}
|
|
125
138
|
export interface ListProductsRequest {
|
|
126
139
|
query?: string | undefined;
|
|
127
140
|
type?: ProductType | undefined;
|
|
@@ -130,12 +143,57 @@ export interface ListProductsRequest {
|
|
|
130
143
|
limit: number;
|
|
131
144
|
ids: string[];
|
|
132
145
|
sort?: ProductSort | undefined;
|
|
146
|
+
filter?: ProductFilter | undefined;
|
|
133
147
|
}
|
|
134
148
|
export interface ListProductsResponse {
|
|
135
149
|
products: Product[];
|
|
136
150
|
nextCursor?: string | undefined;
|
|
137
151
|
total: number;
|
|
138
152
|
}
|
|
153
|
+
export interface GetProductFacetsRequest {
|
|
154
|
+
query?: string | undefined;
|
|
155
|
+
type?: ProductType | undefined;
|
|
156
|
+
status?: ProductStatus | undefined;
|
|
157
|
+
filter?: ProductFilter | undefined;
|
|
158
|
+
}
|
|
159
|
+
export interface ProductTypeFacet {
|
|
160
|
+
type: ProductType;
|
|
161
|
+
count: number;
|
|
162
|
+
}
|
|
163
|
+
export interface GeneticsFacet {
|
|
164
|
+
genetics: Genetics;
|
|
165
|
+
count: number;
|
|
166
|
+
}
|
|
167
|
+
export interface ManufacturerFacet {
|
|
168
|
+
manufacturer: Manufacturer | undefined;
|
|
169
|
+
count: number;
|
|
170
|
+
}
|
|
171
|
+
export interface StrainFacet {
|
|
172
|
+
strain: Strain | undefined;
|
|
173
|
+
count: number;
|
|
174
|
+
}
|
|
175
|
+
export interface CountryFacet {
|
|
176
|
+
country: string;
|
|
177
|
+
count: number;
|
|
178
|
+
}
|
|
179
|
+
export interface IrradiationFacet {
|
|
180
|
+
isIrradiated: boolean;
|
|
181
|
+
count: number;
|
|
182
|
+
}
|
|
183
|
+
export interface PotencyBounds {
|
|
184
|
+
min: number;
|
|
185
|
+
max: number;
|
|
186
|
+
}
|
|
187
|
+
export interface GetProductFacetsResponse {
|
|
188
|
+
types: ProductTypeFacet[];
|
|
189
|
+
genetics: GeneticsFacet[];
|
|
190
|
+
manufacturers: ManufacturerFacet[];
|
|
191
|
+
countries: CountryFacet[];
|
|
192
|
+
irradiation: IrradiationFacet[];
|
|
193
|
+
thc?: PotencyBounds | undefined;
|
|
194
|
+
cbd?: PotencyBounds | undefined;
|
|
195
|
+
strains: StrainFacet[];
|
|
196
|
+
}
|
|
139
197
|
export interface GetProductRequest {
|
|
140
198
|
id: string;
|
|
141
199
|
}
|
|
@@ -256,6 +314,7 @@ export interface DeleteTerpeneResponse {
|
|
|
256
314
|
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
257
315
|
export interface CatalogServiceClient {
|
|
258
316
|
listProducts(request: ListProductsRequest): Observable<ListProductsResponse>;
|
|
317
|
+
getProductFacets(request: GetProductFacetsRequest): Observable<GetProductFacetsResponse>;
|
|
259
318
|
getProduct(request: GetProductRequest): Observable<GetProductResponse>;
|
|
260
319
|
createProduct(request: CreateProductRequest): Observable<CreateProductResponse>;
|
|
261
320
|
updateProduct(request: UpdateProductRequest): Observable<UpdateProductResponse>;
|
|
@@ -278,6 +337,7 @@ export interface CatalogServiceClient {
|
|
|
278
337
|
}
|
|
279
338
|
export interface CatalogServiceController {
|
|
280
339
|
listProducts(request: ListProductsRequest): Promise<ListProductsResponse> | Observable<ListProductsResponse> | ListProductsResponse;
|
|
340
|
+
getProductFacets(request: GetProductFacetsRequest): Promise<GetProductFacetsResponse> | Observable<GetProductFacetsResponse> | GetProductFacetsResponse;
|
|
281
341
|
getProduct(request: GetProductRequest): Promise<GetProductResponse> | Observable<GetProductResponse> | GetProductResponse;
|
|
282
342
|
createProduct(request: CreateProductRequest): Promise<CreateProductResponse> | Observable<CreateProductResponse> | CreateProductResponse;
|
|
283
343
|
updateProduct(request: UpdateProductRequest): Promise<UpdateProductResponse> | Observable<UpdateProductResponse> | UpdateProductResponse;
|
package/dist/nest/catalog.js
CHANGED
package/package.json
CHANGED
package/proto/catalog.proto
CHANGED
|
@@ -4,6 +4,7 @@ package catalog.v1;
|
|
|
4
4
|
|
|
5
5
|
service CatalogService {
|
|
6
6
|
rpc ListProducts (ListProductsRequest) returns (ListProductsResponse);
|
|
7
|
+
rpc GetProductFacets (GetProductFacetsRequest) returns (GetProductFacetsResponse);
|
|
7
8
|
rpc GetProduct (GetProductRequest) returns (GetProductResponse);
|
|
8
9
|
rpc CreateProduct (CreateProductRequest) returns (CreateProductResponse);
|
|
9
10
|
rpc UpdateProduct (UpdateProductRequest) returns (UpdateProductResponse);
|
|
@@ -154,6 +155,21 @@ message ProductInput {
|
|
|
154
155
|
Availability availability = 15;
|
|
155
156
|
}
|
|
156
157
|
|
|
158
|
+
message PotencyRange {
|
|
159
|
+
optional double min = 1;
|
|
160
|
+
optional double max = 2;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
message ProductFilter {
|
|
164
|
+
repeated Genetics genetics = 1;
|
|
165
|
+
repeated string manufacturer_slugs = 2;
|
|
166
|
+
repeated string countries = 3;
|
|
167
|
+
optional PotencyRange thc = 4;
|
|
168
|
+
optional PotencyRange cbd = 5;
|
|
169
|
+
optional bool is_irradiated = 6;
|
|
170
|
+
repeated string strain_slugs = 7;
|
|
171
|
+
}
|
|
172
|
+
|
|
157
173
|
message ListProductsRequest {
|
|
158
174
|
optional string query = 1;
|
|
159
175
|
optional ProductType type = 2;
|
|
@@ -162,6 +178,7 @@ message ListProductsRequest {
|
|
|
162
178
|
int32 limit = 5;
|
|
163
179
|
repeated string ids = 6;
|
|
164
180
|
optional ProductSort sort = 7;
|
|
181
|
+
optional ProductFilter filter = 8;
|
|
165
182
|
}
|
|
166
183
|
|
|
167
184
|
message ListProductsResponse {
|
|
@@ -170,6 +187,59 @@ message ListProductsResponse {
|
|
|
170
187
|
int32 total = 3;
|
|
171
188
|
}
|
|
172
189
|
|
|
190
|
+
message GetProductFacetsRequest {
|
|
191
|
+
optional string query = 1;
|
|
192
|
+
optional ProductType type = 2;
|
|
193
|
+
optional ProductStatus status = 3;
|
|
194
|
+
optional ProductFilter filter = 4;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
message ProductTypeFacet {
|
|
198
|
+
ProductType type = 1;
|
|
199
|
+
int32 count = 2;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
message GeneticsFacet {
|
|
203
|
+
Genetics genetics = 1;
|
|
204
|
+
int32 count = 2;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
message ManufacturerFacet {
|
|
208
|
+
Manufacturer manufacturer = 1;
|
|
209
|
+
int32 count = 2;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
message StrainFacet {
|
|
213
|
+
Strain strain = 1;
|
|
214
|
+
int32 count = 2;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
message CountryFacet {
|
|
218
|
+
string country = 1;
|
|
219
|
+
int32 count = 2;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
message IrradiationFacet {
|
|
223
|
+
bool is_irradiated = 1;
|
|
224
|
+
int32 count = 2;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
message PotencyBounds {
|
|
228
|
+
double min = 1;
|
|
229
|
+
double max = 2;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
message GetProductFacetsResponse {
|
|
233
|
+
repeated ProductTypeFacet types = 1;
|
|
234
|
+
repeated GeneticsFacet genetics = 2;
|
|
235
|
+
repeated ManufacturerFacet manufacturers = 3;
|
|
236
|
+
repeated CountryFacet countries = 4;
|
|
237
|
+
repeated IrradiationFacet irradiation = 5;
|
|
238
|
+
optional PotencyBounds thc = 6;
|
|
239
|
+
optional PotencyBounds cbd = 7;
|
|
240
|
+
repeated StrainFacet strains = 8;
|
|
241
|
+
}
|
|
242
|
+
|
|
173
243
|
message GetProductRequest {
|
|
174
244
|
string id = 1;
|
|
175
245
|
}
|