@sagebox-be/proto-contracts 1.0.14 → 1.0.16

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.
@@ -15,14 +15,23 @@ export interface GetProductByIdRequest {
15
15
  }
16
16
  export interface CreateProductRequest {
17
17
  name: string;
18
- title: string;
18
+ brandId?: string | undefined;
19
19
  description: string;
20
20
  categoryId: string;
21
- storeId: string;
22
21
  status: string;
23
22
  mediaKeys: string[];
24
23
  skus: ProductSkuInput[];
25
24
  }
25
+ export interface UpdateSkuRequest {
26
+ id: string;
27
+ price?: number | undefined;
28
+ width?: number | undefined;
29
+ height?: number | undefined;
30
+ length?: number | undefined;
31
+ weight?: number | undefined;
32
+ mediaKeys: string[];
33
+ attributeValues: AttributeValueInput[];
34
+ }
26
35
  /**
27
36
  * ============================================
28
37
  * Product Response Messages
@@ -35,6 +44,10 @@ export interface ProductResponse {
35
44
  product: Product | undefined;
36
45
  error: string;
37
46
  }
47
+ export interface SkuResponse {
48
+ sku: Sku | undefined;
49
+ error: string;
50
+ }
38
51
  /**
39
52
  * ============================================
40
53
  * Address Request Messages
@@ -71,11 +84,10 @@ export interface GetWardsResponse {
71
84
  export interface Product {
72
85
  id: string;
73
86
  name: string;
74
- title: string;
87
+ brandId?: string | undefined;
75
88
  description: string;
76
89
  keywords: string;
77
90
  categoryId: string;
78
- storeId: string;
79
91
  viewedCount: number;
80
92
  status: string;
81
93
  url: string;
@@ -83,6 +95,20 @@ export interface Product {
83
95
  createdAt: string;
84
96
  updatedAt: string;
85
97
  }
98
+ export interface Sku {
99
+ id: string;
100
+ skuNo: string;
101
+ productId: string;
102
+ price: number;
103
+ width: number;
104
+ height: number;
105
+ length: number;
106
+ weight: number;
107
+ media: Media[];
108
+ inactive: boolean;
109
+ createdAt: string;
110
+ updatedAt: string;
111
+ }
86
112
  export interface Media {
87
113
  id: string;
88
114
  key: string;
@@ -94,7 +120,11 @@ export interface Media {
94
120
  export interface ProductSkuInput {
95
121
  price: number;
96
122
  quantity: number;
97
- brand?: string | undefined;
123
+ width: number;
124
+ height: number;
125
+ length: number;
126
+ warehouseId: string;
127
+ weight: number;
98
128
  mediaKeys: string[];
99
129
  attributeValues: AttributeValueInput[];
100
130
  }
@@ -112,12 +142,42 @@ export interface AddressUnit {
112
142
  code: string;
113
143
  name: string;
114
144
  }
145
+ /**
146
+ * ============================================
147
+ * Outbox Request Messages
148
+ * ============================================
149
+ */
150
+ export interface PublishOutboxRequest {
151
+ }
152
+ export interface RetryOutboxRequest {
153
+ }
154
+ export interface RetryEsRequest {
155
+ }
156
+ /**
157
+ * ============================================
158
+ * Outbox Response Messages
159
+ * ============================================
160
+ */
161
+ export interface PublishOutboxResponse {
162
+ success: boolean;
163
+ error: string;
164
+ }
165
+ export interface RetryOutboxResponse {
166
+ success: boolean;
167
+ error: string;
168
+ }
169
+ export interface RetryEsResponse {
170
+ success: boolean;
171
+ error: string;
172
+ }
115
173
  export declare const SAGEBOX_PACKAGE_NAME = "sagebox";
116
174
  export declare const GetProductsByCategoryIdRequest: MessageFns<GetProductsByCategoryIdRequest>;
117
175
  export declare const GetProductByIdRequest: MessageFns<GetProductByIdRequest>;
118
176
  export declare const CreateProductRequest: MessageFns<CreateProductRequest>;
177
+ export declare const UpdateSkuRequest: MessageFns<UpdateSkuRequest>;
119
178
  export declare const GetProductsResponse: MessageFns<GetProductsResponse>;
120
179
  export declare const ProductResponse: MessageFns<ProductResponse>;
180
+ export declare const SkuResponse: MessageFns<SkuResponse>;
121
181
  export declare const GetProvincesRequest: MessageFns<GetProvincesRequest>;
122
182
  export declare const GetDistrictsRequest: MessageFns<GetDistrictsRequest>;
123
183
  export declare const GetWardsRequest: MessageFns<GetWardsRequest>;
@@ -125,10 +185,17 @@ export declare const GetProvincesResponse: MessageFns<GetProvincesResponse>;
125
185
  export declare const GetDistrictsResponse: MessageFns<GetDistrictsResponse>;
126
186
  export declare const GetWardsResponse: MessageFns<GetWardsResponse>;
127
187
  export declare const Product: MessageFns<Product>;
188
+ export declare const Sku: MessageFns<Sku>;
128
189
  export declare const Media: MessageFns<Media>;
129
190
  export declare const ProductSkuInput: MessageFns<ProductSkuInput>;
130
191
  export declare const AttributeValueInput: MessageFns<AttributeValueInput>;
131
192
  export declare const AddressUnit: MessageFns<AddressUnit>;
193
+ export declare const PublishOutboxRequest: MessageFns<PublishOutboxRequest>;
194
+ export declare const RetryOutboxRequest: MessageFns<RetryOutboxRequest>;
195
+ export declare const RetryEsRequest: MessageFns<RetryEsRequest>;
196
+ export declare const PublishOutboxResponse: MessageFns<PublishOutboxResponse>;
197
+ export declare const RetryOutboxResponse: MessageFns<RetryOutboxResponse>;
198
+ export declare const RetryEsResponse: MessageFns<RetryEsResponse>;
132
199
  /**
133
200
  * ============================================
134
201
  * Product Service
@@ -138,6 +205,7 @@ export interface ProductServiceClient {
138
205
  getProductsByCategoryId(request: GetProductsByCategoryIdRequest, metadata?: Metadata): Observable<GetProductsResponse>;
139
206
  getProductById(request: GetProductByIdRequest, metadata?: Metadata): Observable<ProductResponse>;
140
207
  createProduct(request: CreateProductRequest, metadata?: Metadata): Observable<ProductResponse>;
208
+ updateSku(request: UpdateSkuRequest, metadata?: Metadata): Observable<SkuResponse>;
141
209
  }
142
210
  /**
143
211
  * ============================================
@@ -148,6 +216,7 @@ export interface ProductServiceController {
148
216
  getProductsByCategoryId(request: GetProductsByCategoryIdRequest, metadata?: Metadata): Promise<GetProductsResponse> | Observable<GetProductsResponse> | GetProductsResponse;
149
217
  getProductById(request: GetProductByIdRequest, metadata?: Metadata): Promise<ProductResponse> | Observable<ProductResponse> | ProductResponse;
150
218
  createProduct(request: CreateProductRequest, metadata?: Metadata): Promise<ProductResponse> | Observable<ProductResponse> | ProductResponse;
219
+ updateSku(request: UpdateSkuRequest, metadata?: Metadata): Promise<SkuResponse> | Observable<SkuResponse> | SkuResponse;
151
220
  }
152
221
  export declare function ProductServiceControllerMethods(): (constructor: Function) => void;
153
222
  export declare const PRODUCT_SERVICE_NAME = "ProductService";
@@ -173,6 +242,32 @@ export interface AddressServiceController {
173
242
  }
174
243
  export declare function AddressServiceControllerMethods(): (constructor: Function) => void;
175
244
  export declare const ADDRESS_SERVICE_NAME = "AddressService";
245
+ /**
246
+ * ============================================
247
+ * Outbox Service
248
+ * ============================================
249
+ */
250
+ export interface ProductOutboxServiceClient {
251
+ publishProductOutbox(request: PublishOutboxRequest, metadata?: Metadata): Observable<PublishOutboxResponse>;
252
+ retryProductOutbox(request: RetryOutboxRequest, metadata?: Metadata): Observable<RetryOutboxResponse>;
253
+ publishInventoryOutbox(request: PublishOutboxRequest, metadata?: Metadata): Observable<PublishOutboxResponse>;
254
+ retryInventoryOutbox(request: RetryOutboxRequest, metadata?: Metadata): Observable<RetryOutboxResponse>;
255
+ retryElasticsearchSync(request: RetryEsRequest, metadata?: Metadata): Observable<RetryEsResponse>;
256
+ }
257
+ /**
258
+ * ============================================
259
+ * Outbox Service
260
+ * ============================================
261
+ */
262
+ export interface ProductOutboxServiceController {
263
+ publishProductOutbox(request: PublishOutboxRequest, metadata?: Metadata): Promise<PublishOutboxResponse> | Observable<PublishOutboxResponse> | PublishOutboxResponse;
264
+ retryProductOutbox(request: RetryOutboxRequest, metadata?: Metadata): Promise<RetryOutboxResponse> | Observable<RetryOutboxResponse> | RetryOutboxResponse;
265
+ publishInventoryOutbox(request: PublishOutboxRequest, metadata?: Metadata): Promise<PublishOutboxResponse> | Observable<PublishOutboxResponse> | PublishOutboxResponse;
266
+ retryInventoryOutbox(request: RetryOutboxRequest, metadata?: Metadata): Promise<RetryOutboxResponse> | Observable<RetryOutboxResponse> | RetryOutboxResponse;
267
+ retryElasticsearchSync(request: RetryEsRequest, metadata?: Metadata): Promise<RetryEsResponse> | Observable<RetryEsResponse> | RetryEsResponse;
268
+ }
269
+ export declare function ProductOutboxServiceControllerMethods(): (constructor: Function) => void;
270
+ export declare const PRODUCT_OUTBOX_SERVICE_NAME = "ProductOutboxService";
176
271
  export interface MessageFns<T> {
177
272
  encode(message: T, writer?: BinaryWriter): BinaryWriter;
178
273
  decode(input: BinaryReader | Uint8Array, length?: number): T;