@zyacreatives/shared 2.5.33 → 2.5.34

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.
@@ -502,6 +502,43 @@ export declare const ProductDiscountCheckOutputSchema: z.ZodObject<{
502
502
  active: z.ZodDefault<z.ZodBoolean>;
503
503
  }, z.core.$strip>>;
504
504
  }, z.core.$strip>;
505
+ export declare const ProductStatsOutputSchema: z.ZodObject<{
506
+ salesToday: z.ZodNumber;
507
+ revenueToday: z.ZodNumber;
508
+ totalProductRevenue: z.ZodNumber;
509
+ }, z.core.$strip>;
510
+ export declare const ProductTransactionItemSchema: z.ZodObject<{
511
+ id: z.ZodString;
512
+ customerEmail: z.ZodNullable<z.ZodString>;
513
+ orderId: z.ZodNullable<z.ZodString>;
514
+ price: z.ZodNumber;
515
+ status: z.ZodString;
516
+ date: z.ZodCoercedDate<unknown>;
517
+ }, z.core.$strip>;
518
+ export declare const ProductTransactionsOutputSchema: z.ZodObject<{
519
+ transactions: z.ZodArray<z.ZodObject<{
520
+ id: z.ZodString;
521
+ customerEmail: z.ZodNullable<z.ZodString>;
522
+ orderId: z.ZodNullable<z.ZodString>;
523
+ price: z.ZodNumber;
524
+ status: z.ZodString;
525
+ date: z.ZodCoercedDate<unknown>;
526
+ }, z.core.$strip>>;
527
+ }, z.core.$strip>;
528
+ export declare const RevenueChartPointSchema: z.ZodObject<{
529
+ date: z.ZodString;
530
+ revenue: z.ZodNumber;
531
+ }, z.core.$strip>;
532
+ export declare const ProductRevenueChartOutputSchema: z.ZodObject<{
533
+ chartData: z.ZodArray<z.ZodObject<{
534
+ date: z.ZodString;
535
+ revenue: z.ZodNumber;
536
+ }, z.core.$strip>>;
537
+ }, z.core.$strip>;
538
+ export declare const RevenueChartInputSchema: z.ZodObject<{
539
+ startDate: z.ZodOptional<z.ZodString>;
540
+ endDate: z.ZodOptional<z.ZodString>;
541
+ }, z.core.$strip>;
505
542
  export type ProductLink = z.infer<typeof ProductLinkSchema>;
506
543
  export type SearchProductInput = z.infer<typeof SearchProductInputSchema>;
507
544
  export type SearchProductOutput = z.infer<typeof SearchProductOutputSchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductDiscountCheckOutputSchema = exports.ProductDiscountCheckInputSchema = exports.MarketplaceProductEntitySchema = exports.GetMarketplaceInfoOutputSchema = exports.MarketplaceCategorySchema = exports.SearchProductOutputSchema = exports.SearchProductInputSchema = exports.ProductSearchDocumentSchema = exports.ProductEntitySchema = exports.UpdateProductInputSchema = exports.ProductServiceAndComplianceInputSchema = exports.CreateProductInputSchema = exports.ProductLinkSchema = exports.ProductDiscountEntitySchema = void 0;
3
+ exports.RevenueChartInputSchema = exports.ProductRevenueChartOutputSchema = exports.RevenueChartPointSchema = exports.ProductTransactionsOutputSchema = exports.ProductTransactionItemSchema = exports.ProductStatsOutputSchema = exports.ProductDiscountCheckOutputSchema = exports.ProductDiscountCheckInputSchema = exports.MarketplaceProductEntitySchema = exports.GetMarketplaceInfoOutputSchema = exports.MarketplaceCategorySchema = exports.SearchProductOutputSchema = exports.SearchProductInputSchema = exports.ProductSearchDocumentSchema = exports.ProductEntitySchema = exports.UpdateProductInputSchema = exports.ProductServiceAndComplianceInputSchema = exports.CreateProductInputSchema = exports.ProductLinkSchema = exports.ProductDiscountEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const file_1 = require("./file");
@@ -212,3 +212,30 @@ exports.ProductDiscountCheckOutputSchema = zod_openapi_1.z.object({
212
212
  exists: zod_openapi_1.z.boolean(),
213
213
  discount: exports.ProductDiscountEntitySchema.nullable(),
214
214
  });
215
+ exports.ProductStatsOutputSchema = zod_openapi_1.z.object({
216
+ salesToday: zod_openapi_1.z.number().int(),
217
+ revenueToday: zod_openapi_1.z.number().int(),
218
+ totalProductRevenue: zod_openapi_1.z.number().int(),
219
+ });
220
+ exports.ProductTransactionItemSchema = zod_openapi_1.z.object({
221
+ id: zod_openapi_1.z.string(),
222
+ customerEmail: zod_openapi_1.z.string().nullable(),
223
+ orderId: zod_openapi_1.z.string().nullable(),
224
+ price: zod_openapi_1.z.number().int(),
225
+ status: zod_openapi_1.z.string(),
226
+ date: zod_openapi_1.z.coerce.date(),
227
+ });
228
+ exports.ProductTransactionsOutputSchema = zod_openapi_1.z.object({
229
+ transactions: zod_openapi_1.z.array(exports.ProductTransactionItemSchema),
230
+ });
231
+ exports.RevenueChartPointSchema = zod_openapi_1.z.object({
232
+ date: zod_openapi_1.z.string().openapi({ example: "2023-11-25" }),
233
+ revenue: zod_openapi_1.z.number().int(),
234
+ });
235
+ exports.ProductRevenueChartOutputSchema = zod_openapi_1.z.object({
236
+ chartData: zod_openapi_1.z.array(exports.RevenueChartPointSchema),
237
+ });
238
+ exports.RevenueChartInputSchema = zod_openapi_1.z.object({
239
+ startDate: zod_openapi_1.z.string().optional().openapi({ description: "YYYY-MM-DD" }),
240
+ endDate: zod_openapi_1.z.string().optional().openapi({ description: "YYYY-MM-DD" }),
241
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.33",
3
+ "version": "2.5.34",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -266,6 +266,39 @@ export const ProductDiscountCheckOutputSchema = z.object({
266
266
  discount: ProductDiscountEntitySchema.nullable(),
267
267
  });
268
268
 
269
+ export const ProductStatsOutputSchema = z.object({
270
+ salesToday: z.number().int(),
271
+ revenueToday: z.number().int(),
272
+ totalProductRevenue: z.number().int(),
273
+ });
274
+
275
+ export const ProductTransactionItemSchema = z.object({
276
+ id: z.string(),
277
+ customerEmail: z.string().nullable(),
278
+ orderId: z.string().nullable(),
279
+ price: z.number().int(),
280
+ status: z.string(),
281
+ date: z.coerce.date(),
282
+ });
283
+
284
+ export const ProductTransactionsOutputSchema = z.object({
285
+ transactions: z.array(ProductTransactionItemSchema),
286
+ });
287
+
288
+ export const RevenueChartPointSchema = z.object({
289
+ date: z.string().openapi({ example: "2023-11-25" }),
290
+ revenue: z.number().int(),
291
+ });
292
+
293
+ export const ProductRevenueChartOutputSchema = z.object({
294
+ chartData: z.array(RevenueChartPointSchema),
295
+ });
296
+
297
+ export const RevenueChartInputSchema = z.object({
298
+ startDate: z.string().optional().openapi({ description: "YYYY-MM-DD" }),
299
+ endDate: z.string().optional().openapi({ description: "YYYY-MM-DD" }),
300
+ });
301
+
269
302
  export type ProductLink = z.infer<typeof ProductLinkSchema>;
270
303
  export type SearchProductInput = z.infer<typeof SearchProductInputSchema>;
271
304
  export type SearchProductOutput = z.infer<typeof SearchProductOutputSchema>;