@candesk/contracts 6.51.0 → 6.52.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 +53 -0
- package/dist/nest/catalog.d.ts +54 -0
- package/dist/nest/catalog.js +1 -0
- package/package.json +1 -1
- package/proto/catalog.proto +63 -0
package/dist/gen/catalog.d.ts
CHANGED
|
@@ -121,6 +121,18 @@ 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
|
+
}
|
|
124
136
|
export interface ListProductsRequest {
|
|
125
137
|
query?: string | undefined;
|
|
126
138
|
type?: ProductType | undefined;
|
|
@@ -129,12 +141,52 @@ export interface ListProductsRequest {
|
|
|
129
141
|
limit: number;
|
|
130
142
|
ids: string[];
|
|
131
143
|
sort?: ProductSort | undefined;
|
|
144
|
+
filter?: ProductFilter | undefined;
|
|
132
145
|
}
|
|
133
146
|
export interface ListProductsResponse {
|
|
134
147
|
products: Product[];
|
|
135
148
|
nextCursor?: string | undefined;
|
|
136
149
|
total: number;
|
|
137
150
|
}
|
|
151
|
+
export interface GetProductFacetsRequest {
|
|
152
|
+
query?: string | undefined;
|
|
153
|
+
type?: ProductType | undefined;
|
|
154
|
+
status?: ProductStatus | undefined;
|
|
155
|
+
filter?: ProductFilter | undefined;
|
|
156
|
+
}
|
|
157
|
+
export interface ProductTypeFacet {
|
|
158
|
+
type: ProductType;
|
|
159
|
+
count: number;
|
|
160
|
+
}
|
|
161
|
+
export interface GeneticsFacet {
|
|
162
|
+
genetics: Genetics;
|
|
163
|
+
count: number;
|
|
164
|
+
}
|
|
165
|
+
export interface ManufacturerFacet {
|
|
166
|
+
manufacturer: Manufacturer | undefined;
|
|
167
|
+
count: number;
|
|
168
|
+
}
|
|
169
|
+
export interface CountryFacet {
|
|
170
|
+
country: string;
|
|
171
|
+
count: number;
|
|
172
|
+
}
|
|
173
|
+
export interface IrradiationFacet {
|
|
174
|
+
isIrradiated: boolean;
|
|
175
|
+
count: number;
|
|
176
|
+
}
|
|
177
|
+
export interface PotencyBounds {
|
|
178
|
+
min: number;
|
|
179
|
+
max: number;
|
|
180
|
+
}
|
|
181
|
+
export interface GetProductFacetsResponse {
|
|
182
|
+
types: ProductTypeFacet[];
|
|
183
|
+
genetics: GeneticsFacet[];
|
|
184
|
+
manufacturers: ManufacturerFacet[];
|
|
185
|
+
countries: CountryFacet[];
|
|
186
|
+
irradiation: IrradiationFacet[];
|
|
187
|
+
thc?: PotencyBounds | undefined;
|
|
188
|
+
cbd?: PotencyBounds | undefined;
|
|
189
|
+
}
|
|
138
190
|
export interface GetProductRequest {
|
|
139
191
|
id: string;
|
|
140
192
|
}
|
|
@@ -254,6 +306,7 @@ export interface DeleteTerpeneResponse {
|
|
|
254
306
|
}
|
|
255
307
|
export interface CatalogService {
|
|
256
308
|
listProducts(request: ListProductsRequest): Promise<ListProductsResponse>;
|
|
309
|
+
getProductFacets(request: GetProductFacetsRequest): Promise<GetProductFacetsResponse>;
|
|
257
310
|
getProduct(request: GetProductRequest): Promise<GetProductResponse>;
|
|
258
311
|
createProduct(request: CreateProductRequest): Promise<CreateProductResponse>;
|
|
259
312
|
updateProduct(request: UpdateProductRequest): Promise<UpdateProductResponse>;
|
package/dist/nest/catalog.d.ts
CHANGED
|
@@ -122,6 +122,18 @@ 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
|
+
}
|
|
125
137
|
export interface ListProductsRequest {
|
|
126
138
|
query?: string | undefined;
|
|
127
139
|
type?: ProductType | undefined;
|
|
@@ -130,12 +142,52 @@ export interface ListProductsRequest {
|
|
|
130
142
|
limit: number;
|
|
131
143
|
ids: string[];
|
|
132
144
|
sort?: ProductSort | undefined;
|
|
145
|
+
filter?: ProductFilter | undefined;
|
|
133
146
|
}
|
|
134
147
|
export interface ListProductsResponse {
|
|
135
148
|
products: Product[];
|
|
136
149
|
nextCursor?: string | undefined;
|
|
137
150
|
total: number;
|
|
138
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 CountryFacet {
|
|
171
|
+
country: string;
|
|
172
|
+
count: number;
|
|
173
|
+
}
|
|
174
|
+
export interface IrradiationFacet {
|
|
175
|
+
isIrradiated: boolean;
|
|
176
|
+
count: number;
|
|
177
|
+
}
|
|
178
|
+
export interface PotencyBounds {
|
|
179
|
+
min: number;
|
|
180
|
+
max: number;
|
|
181
|
+
}
|
|
182
|
+
export interface GetProductFacetsResponse {
|
|
183
|
+
types: ProductTypeFacet[];
|
|
184
|
+
genetics: GeneticsFacet[];
|
|
185
|
+
manufacturers: ManufacturerFacet[];
|
|
186
|
+
countries: CountryFacet[];
|
|
187
|
+
irradiation: IrradiationFacet[];
|
|
188
|
+
thc?: PotencyBounds | undefined;
|
|
189
|
+
cbd?: PotencyBounds | undefined;
|
|
190
|
+
}
|
|
139
191
|
export interface GetProductRequest {
|
|
140
192
|
id: string;
|
|
141
193
|
}
|
|
@@ -256,6 +308,7 @@ export interface DeleteTerpeneResponse {
|
|
|
256
308
|
export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
257
309
|
export interface CatalogServiceClient {
|
|
258
310
|
listProducts(request: ListProductsRequest): Observable<ListProductsResponse>;
|
|
311
|
+
getProductFacets(request: GetProductFacetsRequest): Observable<GetProductFacetsResponse>;
|
|
259
312
|
getProduct(request: GetProductRequest): Observable<GetProductResponse>;
|
|
260
313
|
createProduct(request: CreateProductRequest): Observable<CreateProductResponse>;
|
|
261
314
|
updateProduct(request: UpdateProductRequest): Observable<UpdateProductResponse>;
|
|
@@ -278,6 +331,7 @@ export interface CatalogServiceClient {
|
|
|
278
331
|
}
|
|
279
332
|
export interface CatalogServiceController {
|
|
280
333
|
listProducts(request: ListProductsRequest): Promise<ListProductsResponse> | Observable<ListProductsResponse> | ListProductsResponse;
|
|
334
|
+
getProductFacets(request: GetProductFacetsRequest): Promise<GetProductFacetsResponse> | Observable<GetProductFacetsResponse> | GetProductFacetsResponse;
|
|
281
335
|
getProduct(request: GetProductRequest): Promise<GetProductResponse> | Observable<GetProductResponse> | GetProductResponse;
|
|
282
336
|
createProduct(request: CreateProductRequest): Promise<CreateProductResponse> | Observable<CreateProductResponse> | CreateProductResponse;
|
|
283
337
|
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,20 @@ 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
|
+
}
|
|
171
|
+
|
|
157
172
|
message ListProductsRequest {
|
|
158
173
|
optional string query = 1;
|
|
159
174
|
optional ProductType type = 2;
|
|
@@ -162,6 +177,7 @@ message ListProductsRequest {
|
|
|
162
177
|
int32 limit = 5;
|
|
163
178
|
repeated string ids = 6;
|
|
164
179
|
optional ProductSort sort = 7;
|
|
180
|
+
optional ProductFilter filter = 8;
|
|
165
181
|
}
|
|
166
182
|
|
|
167
183
|
message ListProductsResponse {
|
|
@@ -170,6 +186,53 @@ message ListProductsResponse {
|
|
|
170
186
|
int32 total = 3;
|
|
171
187
|
}
|
|
172
188
|
|
|
189
|
+
message GetProductFacetsRequest {
|
|
190
|
+
optional string query = 1;
|
|
191
|
+
optional ProductType type = 2;
|
|
192
|
+
optional ProductStatus status = 3;
|
|
193
|
+
optional ProductFilter filter = 4;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
message ProductTypeFacet {
|
|
197
|
+
ProductType type = 1;
|
|
198
|
+
int32 count = 2;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
message GeneticsFacet {
|
|
202
|
+
Genetics genetics = 1;
|
|
203
|
+
int32 count = 2;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
message ManufacturerFacet {
|
|
207
|
+
Manufacturer manufacturer = 1;
|
|
208
|
+
int32 count = 2;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
message CountryFacet {
|
|
212
|
+
string country = 1;
|
|
213
|
+
int32 count = 2;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
message IrradiationFacet {
|
|
217
|
+
bool is_irradiated = 1;
|
|
218
|
+
int32 count = 2;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
message PotencyBounds {
|
|
222
|
+
double min = 1;
|
|
223
|
+
double max = 2;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
message GetProductFacetsResponse {
|
|
227
|
+
repeated ProductTypeFacet types = 1;
|
|
228
|
+
repeated GeneticsFacet genetics = 2;
|
|
229
|
+
repeated ManufacturerFacet manufacturers = 3;
|
|
230
|
+
repeated CountryFacet countries = 4;
|
|
231
|
+
repeated IrradiationFacet irradiation = 5;
|
|
232
|
+
optional PotencyBounds thc = 6;
|
|
233
|
+
optional PotencyBounds cbd = 7;
|
|
234
|
+
}
|
|
235
|
+
|
|
173
236
|
message GetProductRequest {
|
|
174
237
|
string id = 1;
|
|
175
238
|
}
|