@chopkola/common 1.0.176 → 1.0.178

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.
@@ -132,6 +132,61 @@ export type UpdateProductVariantInput = Partial<CreateProductVariantInput>;
132
132
  export type CreateInventoryItemInput = Omit<BaseInventoryItem, "id" | "created_at" | "updated_at" | "stock_status"> & InventoryLink;
133
133
  export type UpdateInventoryItemInput = Partial<CreateInventoryItemInput>;
134
134
  export type CreateStockMovementInput = Omit<StockMovement, "id" | "created_at" | "updated_at">;
135
+ export interface CategoryLite {
136
+ id: UUID;
137
+ name: string;
138
+ slug: string;
139
+ }
140
+ export interface ProductAggregateLite {
141
+ id: UUID;
142
+ vendor_id: UUID;
143
+ name: string;
144
+ slug: string;
145
+ sku: string | null;
146
+ description: string | null;
147
+ brand: string | null;
148
+ images: string[] | null;
149
+ tags: string[] | null;
150
+ attributes: Record<string, unknown> | null;
151
+ is_approved: boolean;
152
+ created_at: Date;
153
+ category: CategoryLite | null;
154
+ }
155
+ export interface ProductVariantAggregateLite {
156
+ id: UUID;
157
+ product_id: UUID;
158
+ name_suffix: string | null;
159
+ sku: string | null;
160
+ options: Record<string, unknown> | null;
161
+ images: string[] | null;
162
+ is_default: boolean;
163
+ }
164
+ export interface VendorLite {
165
+ id: UUID;
166
+ business_name: string;
167
+ slug: string;
168
+ logo_url: string | null;
169
+ }
170
+ export interface InventoryItemAggregate {
171
+ id: UUID;
172
+ vendor_id: UUID;
173
+ product_id: UUID | null;
174
+ product_variant_id: UUID | null;
175
+ sku: string | null;
176
+ price: number;
177
+ discount_price: number | null;
178
+ currency: string;
179
+ quantity_available: number;
180
+ low_stock_threshold: number | null;
181
+ stock_status: string;
182
+ is_visible: boolean;
183
+ is_featured: boolean;
184
+ created_at: Date;
185
+ updated_at: Date;
186
+ product: ProductAggregateLite | null;
187
+ product_variant: ProductVariantAggregateLite | null;
188
+ vendor: VendorLite;
189
+ }
135
190
  export interface VendorProductsManagementData {
136
191
  products: ProductAggregate[];
137
192
  stats: VendorProductsStats;
@@ -144,5 +199,5 @@ export interface ProductDetailsData {
144
199
  product: ProductAggregate;
145
200
  }
146
201
  export type WebApplicationProductsResourceData = {
147
- products: ProductAggregate[];
202
+ products: InventoryItemAggregate[];
148
203
  };
@@ -92,67 +92,12 @@ export interface GroceryVendorAggregate extends Vendor {
92
92
  }
93
93
  export type VendorAggregate = RestaurantVendorAggregate | GroceryVendorAggregate;
94
94
  export type VendorAggregateForWeb = VendorAggregate & {
95
- distance?: number;
96
- time?: string;
95
+ distance?: string;
96
+ duration?: string;
97
97
  deliveryFee?: number;
98
98
  reviews?: number;
99
99
  rating?: number;
100
100
  };
101
- export interface CategoryLite {
102
- id: UUID;
103
- name: string;
104
- slug: string;
105
- }
106
- export interface ProductAggregateLite {
107
- id: UUID;
108
- vendor_id: UUID;
109
- name: string;
110
- slug: string;
111
- sku: string | null;
112
- description: string | null;
113
- brand: string | null;
114
- images: string[] | null;
115
- tags: string[] | null;
116
- attributes: Record<string, unknown> | null;
117
- is_approved: boolean;
118
- created_at: Date;
119
- category: CategoryLite | null;
120
- }
121
- export interface ProductVariantAggregateLite {
122
- id: UUID;
123
- product_id: UUID;
124
- name_suffix: string | null;
125
- sku: string | null;
126
- options: Record<string, unknown> | null;
127
- images: string[] | null;
128
- is_default: boolean;
129
- }
130
- export interface VendorLite {
131
- id: UUID;
132
- business_name: string;
133
- slug: string;
134
- logo_url: string | null;
135
- }
136
- export interface InventoryItemAggregate {
137
- id: UUID;
138
- vendor_id: UUID;
139
- product_id: UUID | null;
140
- product_variant_id: UUID | null;
141
- sku: string | null;
142
- price: number;
143
- discount_price: number | null;
144
- currency: string;
145
- quantity_available: number;
146
- low_stock_threshold: number | null;
147
- stock_status: string;
148
- is_visible: boolean;
149
- is_featured: boolean;
150
- created_at: Date;
151
- updated_at: Date;
152
- product: ProductAggregateLite | null;
153
- product_variant: ProductVariantAggregateLite | null;
154
- vendor: VendorLite;
155
- }
156
101
  export type CreateVendorInput = Omit<Vendor, "id" | "rating" | "review_count" | "business_status" | "approved_by" | "approved_on" | "created_at" | "updated_at"> & {
157
102
  address_payload: AddressPayloadType;
158
103
  registration_cert: File;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chopkola/common",
3
- "version": "1.0.176",
3
+ "version": "1.0.178",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "akrosoft technology ltd",