@purpleschool/gptbot 0.1.0 → 0.1.2
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/build/constants/errors/errors.js +5 -0
- package/build/models/category.schema.js +1 -0
- package/build/models/product.schema.js +6 -2
- package/build/models/subscription.schema.js +2 -1
- package/constants/errors/errors.ts +5 -0
- package/models/category.schema.ts +1 -0
- package/models/product.schema.ts +6 -2
- package/models/subscription.schema.ts +2 -2
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ exports.CategorySchema = zod_1.z.object({
|
|
|
7
7
|
mainCategoryId: zod_1.z.nullable(zod_1.z.string().uuid()),
|
|
8
8
|
name: zod_1.z.string().min(3).max(16384),
|
|
9
9
|
prompt: zod_1.z.string().min(3).max(16384),
|
|
10
|
+
placeholder: zod_1.z.nullable(zod_1.z.string()),
|
|
10
11
|
createdAt: zod_1.z.date(),
|
|
11
12
|
updatedAt: zod_1.z.date(),
|
|
12
13
|
});
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductSchema = void 0;
|
|
3
|
+
exports.ProductSchema = exports.FeaturesSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
exports.FeaturesSchema = zod_1.z.object({
|
|
6
|
+
icon: zod_1.z.string(),
|
|
7
|
+
title: zod_1.z.string(),
|
|
8
|
+
});
|
|
5
9
|
exports.ProductSchema = zod_1.z.object({
|
|
6
10
|
uuid: zod_1.z.string().uuid(),
|
|
7
11
|
name: zod_1.z.string().min(3).max(16384),
|
|
8
12
|
requests: zod_1.z.number(),
|
|
9
13
|
price: zod_1.z.number(),
|
|
10
|
-
features: zod_1.z.array(
|
|
14
|
+
features: zod_1.z.array(exports.FeaturesSchema),
|
|
11
15
|
createdAt: zod_1.z.date(),
|
|
12
16
|
updatedAt: zod_1.z.date(),
|
|
13
17
|
});
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SubscriptionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const product_schema_1 = require("./product.schema");
|
|
5
6
|
exports.SubscriptionSchema = zod_1.z.object({
|
|
6
7
|
uuid: zod_1.z.string().uuid(),
|
|
7
8
|
name: zod_1.z.string().min(3).max(16384),
|
|
8
9
|
requests: zod_1.z.number(),
|
|
9
10
|
price: zod_1.z.number(),
|
|
10
|
-
features: zod_1.z.array(
|
|
11
|
+
features: zod_1.z.array(product_schema_1.FeaturesSchema),
|
|
11
12
|
createdAt: zod_1.z.date(),
|
|
12
13
|
updatedAt: zod_1.z.date(),
|
|
13
14
|
});
|
package/models/product.schema.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
export const FeaturesSchema = z.object({
|
|
4
|
+
icon: z.string(),
|
|
5
|
+
title: z.string(),
|
|
6
|
+
});
|
|
7
|
+
|
|
3
8
|
export const ProductSchema = z.object({
|
|
4
9
|
uuid: z.string().uuid(),
|
|
5
10
|
name: z.string().min(3).max(16384),
|
|
6
11
|
requests: z.number(),
|
|
7
12
|
price: z.number(),
|
|
8
|
-
features: z.array(
|
|
9
|
-
|
|
13
|
+
features: z.array(FeaturesSchema),
|
|
10
14
|
createdAt: z.date(),
|
|
11
15
|
updatedAt: z.date(),
|
|
12
16
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { FeaturesSchema } from './product.schema';
|
|
2
3
|
|
|
3
4
|
export const SubscriptionSchema = z.object({
|
|
4
5
|
uuid: z.string().uuid(),
|
|
5
6
|
name: z.string().min(3).max(16384),
|
|
6
7
|
requests: z.number(),
|
|
7
8
|
price: z.number(),
|
|
8
|
-
features: z.array(
|
|
9
|
-
|
|
9
|
+
features: z.array(FeaturesSchema),
|
|
10
10
|
createdAt: z.date(),
|
|
11
11
|
updatedAt: z.date(),
|
|
12
12
|
});
|