@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.
@@ -1,143 +0,0 @@
1
- import { BinaryReader, BinaryWriter } from '@bufbuild/protobuf/wire';
2
- import { type CallOptions, type ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, type Metadata, type ServiceError, type UntypedServiceImplementation } from '@grpc/grpc-js';
3
- export declare const protobufPackage = "product";
4
- /** Request messages */
5
- export interface GetProductsByCategoryIdRequest {
6
- categoryId: string;
7
- }
8
- export interface GetProductByIdRequest {
9
- id: string;
10
- }
11
- export interface CreateProductRequest {
12
- name: string;
13
- title: string;
14
- description: string;
15
- categoryId: string;
16
- storeId: string;
17
- status: string;
18
- mediaKeys: string[];
19
- skus: ProductSkuInput[];
20
- }
21
- /** Response messages */
22
- export interface GetProductsResponse {
23
- products: Product[];
24
- }
25
- export interface ProductResponse {
26
- product: Product | undefined;
27
- error: string;
28
- }
29
- /** Data structures */
30
- export interface Product {
31
- id: string;
32
- name: string;
33
- title: string;
34
- description: string;
35
- keywords: string;
36
- categoryId: string;
37
- storeId: string;
38
- viewedCount: number;
39
- status: string;
40
- url: string;
41
- media: Media[];
42
- createdAt: string;
43
- updatedAt: string;
44
- }
45
- export interface Media {
46
- id: string;
47
- key: string;
48
- url: string;
49
- type: string;
50
- createdAt: string;
51
- updatedAt: string;
52
- }
53
- export interface ProductSkuInput {
54
- price: number;
55
- quantity: number;
56
- brand?: string | undefined;
57
- mediaKeys: string[];
58
- attributeValues: AttributeValueInput[];
59
- }
60
- export interface AttributeValueInput {
61
- attrId: string;
62
- value: string;
63
- name: string;
64
- }
65
- export declare const GetProductsByCategoryIdRequest: MessageFns<GetProductsByCategoryIdRequest>;
66
- export declare const GetProductByIdRequest: MessageFns<GetProductByIdRequest>;
67
- export declare const CreateProductRequest: MessageFns<CreateProductRequest>;
68
- export declare const GetProductsResponse: MessageFns<GetProductsResponse>;
69
- export declare const ProductResponse: MessageFns<ProductResponse>;
70
- export declare const Product: MessageFns<Product>;
71
- export declare const Media: MessageFns<Media>;
72
- export declare const ProductSkuInput: MessageFns<ProductSkuInput>;
73
- export declare const AttributeValueInput: MessageFns<AttributeValueInput>;
74
- export type ProductServiceService = typeof ProductServiceService;
75
- export declare const ProductServiceService: {
76
- readonly getProductsByCategoryId: {
77
- readonly path: "/product.ProductService/GetProductsByCategoryId";
78
- readonly requestStream: false;
79
- readonly responseStream: false;
80
- readonly requestSerialize: (value: GetProductsByCategoryIdRequest) => Buffer;
81
- readonly requestDeserialize: (value: Buffer) => GetProductsByCategoryIdRequest;
82
- readonly responseSerialize: (value: GetProductsResponse) => Buffer;
83
- readonly responseDeserialize: (value: Buffer) => GetProductsResponse;
84
- };
85
- readonly getProductById: {
86
- readonly path: "/product.ProductService/GetProductById";
87
- readonly requestStream: false;
88
- readonly responseStream: false;
89
- readonly requestSerialize: (value: GetProductByIdRequest) => Buffer;
90
- readonly requestDeserialize: (value: Buffer) => GetProductByIdRequest;
91
- readonly responseSerialize: (value: ProductResponse) => Buffer;
92
- readonly responseDeserialize: (value: Buffer) => ProductResponse;
93
- };
94
- readonly createProduct: {
95
- readonly path: "/product.ProductService/CreateProduct";
96
- readonly requestStream: false;
97
- readonly responseStream: false;
98
- readonly requestSerialize: (value: CreateProductRequest) => Buffer;
99
- readonly requestDeserialize: (value: Buffer) => CreateProductRequest;
100
- readonly responseSerialize: (value: ProductResponse) => Buffer;
101
- readonly responseDeserialize: (value: Buffer) => ProductResponse;
102
- };
103
- };
104
- export interface ProductServiceServer extends UntypedServiceImplementation {
105
- getProductsByCategoryId: handleUnaryCall<GetProductsByCategoryIdRequest, GetProductsResponse>;
106
- getProductById: handleUnaryCall<GetProductByIdRequest, ProductResponse>;
107
- createProduct: handleUnaryCall<CreateProductRequest, ProductResponse>;
108
- }
109
- export interface ProductServiceClient extends Client {
110
- getProductsByCategoryId(request: GetProductsByCategoryIdRequest, callback: (error: ServiceError | null, response: GetProductsResponse) => void): ClientUnaryCall;
111
- getProductsByCategoryId(request: GetProductsByCategoryIdRequest, metadata: Metadata, callback: (error: ServiceError | null, response: GetProductsResponse) => void): ClientUnaryCall;
112
- getProductsByCategoryId(request: GetProductsByCategoryIdRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GetProductsResponse) => void): ClientUnaryCall;
113
- getProductById(request: GetProductByIdRequest, callback: (error: ServiceError | null, response: ProductResponse) => void): ClientUnaryCall;
114
- getProductById(request: GetProductByIdRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ProductResponse) => void): ClientUnaryCall;
115
- getProductById(request: GetProductByIdRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ProductResponse) => void): ClientUnaryCall;
116
- createProduct(request: CreateProductRequest, callback: (error: ServiceError | null, response: ProductResponse) => void): ClientUnaryCall;
117
- createProduct(request: CreateProductRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ProductResponse) => void): ClientUnaryCall;
118
- createProduct(request: CreateProductRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ProductResponse) => void): ClientUnaryCall;
119
- }
120
- export declare const ProductServiceClient: {
121
- new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): ProductServiceClient;
122
- service: typeof ProductServiceService;
123
- serviceName: string;
124
- };
125
- type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
126
- export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
127
- [K in keyof T]?: DeepPartial<T[K]>;
128
- } : Partial<T>;
129
- type KeysOfUnion<T> = T extends T ? keyof T : never;
130
- export type Exact<P, I extends P> = P extends Builtin ? P : P & {
131
- [K in keyof P]: Exact<P[K], I[K]>;
132
- } & {
133
- [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
134
- };
135
- export interface MessageFns<T> {
136
- encode(message: T, writer?: BinaryWriter): BinaryWriter;
137
- decode(input: BinaryReader | Uint8Array, length?: number): T;
138
- fromJSON(object: any): T;
139
- toJSON(message: T): unknown;
140
- create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
141
- fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
142
- }
143
- export {};