@sagebox-be/proto-contracts 1.0.13 → 1.0.14
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/index.js +2 -2
- package/package.json +1 -1
- package/dist/interfaces/product.d.ts +0 -91
- package/dist/interfaces/product.js +0 -663
- package/dist/types/product.d.ts +0 -143
- package/dist/types/product.js +0 -1057
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
2
|
+
// Export all gRPC interfaces and types
|
|
3
3
|
// export * from './interfaces/sagebox';
|
|
4
4
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
5
|
if (k2 === undefined) k2 = k;
|
|
@@ -17,7 +17,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.getProtoPath = void 0;
|
|
20
|
-
// Export all gRPC types for TypeScript
|
|
20
|
+
// // Export all gRPC types for TypeScript
|
|
21
21
|
__exportStar(require("./types/sagebox"), exports);
|
|
22
22
|
// Export proto file path helper
|
|
23
23
|
var utils_1 = require("./utils");
|
package/package.json
CHANGED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { BinaryReader, BinaryWriter } from '@bufbuild/protobuf/wire';
|
|
2
|
-
import type { Metadata } from '@grpc/grpc-js';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
export declare const protobufPackage = "product";
|
|
5
|
-
/** Request messages */
|
|
6
|
-
export interface GetProductsByCategoryIdRequest {
|
|
7
|
-
categoryId: string;
|
|
8
|
-
}
|
|
9
|
-
export interface GetProductByIdRequest {
|
|
10
|
-
id: string;
|
|
11
|
-
}
|
|
12
|
-
export interface CreateProductRequest {
|
|
13
|
-
name: string;
|
|
14
|
-
title: string;
|
|
15
|
-
description: string;
|
|
16
|
-
categoryId: string;
|
|
17
|
-
storeId: string;
|
|
18
|
-
status: string;
|
|
19
|
-
mediaKeys: string[];
|
|
20
|
-
skus: ProductSkuInput[];
|
|
21
|
-
}
|
|
22
|
-
/** Response messages */
|
|
23
|
-
export interface GetProductsResponse {
|
|
24
|
-
products: Product[];
|
|
25
|
-
}
|
|
26
|
-
export interface ProductResponse {
|
|
27
|
-
product: Product | undefined;
|
|
28
|
-
error: string;
|
|
29
|
-
}
|
|
30
|
-
/** Data structures */
|
|
31
|
-
export interface Product {
|
|
32
|
-
id: string;
|
|
33
|
-
name: string;
|
|
34
|
-
title: string;
|
|
35
|
-
description: string;
|
|
36
|
-
keywords: string;
|
|
37
|
-
categoryId: string;
|
|
38
|
-
storeId: string;
|
|
39
|
-
viewedCount: number;
|
|
40
|
-
status: string;
|
|
41
|
-
url: string;
|
|
42
|
-
media: Media[];
|
|
43
|
-
createdAt: string;
|
|
44
|
-
updatedAt: string;
|
|
45
|
-
}
|
|
46
|
-
export interface Media {
|
|
47
|
-
id: string;
|
|
48
|
-
key: string;
|
|
49
|
-
url: string;
|
|
50
|
-
type: string;
|
|
51
|
-
createdAt: string;
|
|
52
|
-
updatedAt: string;
|
|
53
|
-
}
|
|
54
|
-
export interface ProductSkuInput {
|
|
55
|
-
price: number;
|
|
56
|
-
quantity: number;
|
|
57
|
-
brand?: string | undefined;
|
|
58
|
-
mediaKeys: string[];
|
|
59
|
-
attributeValues: AttributeValueInput[];
|
|
60
|
-
}
|
|
61
|
-
export interface AttributeValueInput {
|
|
62
|
-
attrId: string;
|
|
63
|
-
value: string;
|
|
64
|
-
name: string;
|
|
65
|
-
}
|
|
66
|
-
export declare const PRODUCT_PACKAGE_NAME = "product";
|
|
67
|
-
export declare const GetProductsByCategoryIdRequest: MessageFns<GetProductsByCategoryIdRequest>;
|
|
68
|
-
export declare const GetProductByIdRequest: MessageFns<GetProductByIdRequest>;
|
|
69
|
-
export declare const CreateProductRequest: MessageFns<CreateProductRequest>;
|
|
70
|
-
export declare const GetProductsResponse: MessageFns<GetProductsResponse>;
|
|
71
|
-
export declare const ProductResponse: MessageFns<ProductResponse>;
|
|
72
|
-
export declare const Product: MessageFns<Product>;
|
|
73
|
-
export declare const Media: MessageFns<Media>;
|
|
74
|
-
export declare const ProductSkuInput: MessageFns<ProductSkuInput>;
|
|
75
|
-
export declare const AttributeValueInput: MessageFns<AttributeValueInput>;
|
|
76
|
-
export interface ProductServiceClient {
|
|
77
|
-
getProductsByCategoryId(request: GetProductsByCategoryIdRequest, metadata?: Metadata): Observable<GetProductsResponse>;
|
|
78
|
-
getProductById(request: GetProductByIdRequest, metadata?: Metadata): Observable<ProductResponse>;
|
|
79
|
-
createProduct(request: CreateProductRequest, metadata?: Metadata): Observable<ProductResponse>;
|
|
80
|
-
}
|
|
81
|
-
export interface ProductServiceController {
|
|
82
|
-
getProductsByCategoryId(request: GetProductsByCategoryIdRequest, metadata?: Metadata): Promise<GetProductsResponse> | Observable<GetProductsResponse> | GetProductsResponse;
|
|
83
|
-
getProductById(request: GetProductByIdRequest, metadata?: Metadata): Promise<ProductResponse> | Observable<ProductResponse> | ProductResponse;
|
|
84
|
-
createProduct(request: CreateProductRequest, metadata?: Metadata): Promise<ProductResponse> | Observable<ProductResponse> | ProductResponse;
|
|
85
|
-
}
|
|
86
|
-
export declare function ProductServiceControllerMethods(): (constructor: Function) => void;
|
|
87
|
-
export declare const PRODUCT_SERVICE_NAME = "ProductService";
|
|
88
|
-
export interface MessageFns<T> {
|
|
89
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
90
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
91
|
-
}
|