@purpleschool/student-works 1.5.11 → 1.5.13
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/commands/product/create-product.command.d.ts +26 -0
- package/build/commands/product/create-product.command.d.ts.map +1 -1
- package/build/commands/product/find-product.command.d.ts +26 -0
- package/build/commands/product/find-product.command.d.ts.map +1 -1
- package/build/commands/product/get-my-products.command.d.ts +13 -0
- package/build/commands/product/get-my-products.command.d.ts.map +1 -1
- package/build/commands/product/update-product.command.d.ts +26 -0
- package/build/commands/product/update-product.command.d.ts.map +1 -1
- package/build/commands/subscription/create-subscription.command.d.ts +23 -5
- package/build/commands/subscription/create-subscription.command.d.ts.map +1 -1
- package/build/commands/subscription/find-subscription.command.d.ts +30 -3
- package/build/commands/subscription/find-subscription.command.d.ts.map +1 -1
- package/build/commands/subscription/get-available-upgrades.command.d.ts +10 -1
- package/build/commands/subscription/get-available-upgrades.command.d.ts.map +1 -1
- package/build/commands/subscription/get-free-subscription.command.d.ts +10 -1
- package/build/commands/subscription/get-free-subscription.command.d.ts.map +1 -1
- package/build/commands/subscription/update-subscription.command.d.ts +23 -5
- package/build/commands/subscription/update-subscription.command.d.ts.map +1 -1
- package/build/commands/user/find-user-by-uuid.command.d.ts +2 -2
- package/build/commands/user/find-users-by-criteria.command.d.ts +2 -2
- package/build/commands/user/up-token-bonus-balance.command.d.ts +2 -2
- package/build/commands/user-to-subscription/get-user-to-subscriptions.command.d.ts +10 -1
- package/build/commands/user-to-subscription/get-user-to-subscriptions.command.d.ts.map +1 -1
- package/build/constants/subscription/enums/subscription-feature-type.enum.d.ts +4 -1
- package/build/constants/subscription/enums/subscription-feature-type.enum.d.ts.map +1 -1
- package/build/constants/subscription/enums/subscription-feature-type.enum.js +3 -0
- package/build/models/product.schema.d.ts +13 -0
- package/build/models/product.schema.d.ts.map +1 -1
- package/build/models/product.schema.js +2 -0
- package/build/models/subscription-feature.schema.d.ts +23 -2
- package/build/models/subscription-feature.schema.d.ts.map +1 -1
- package/build/models/subscription-feature.schema.js +16 -1
- package/build/models/subscription-upgrade-schema.d.ts +10 -1
- package/build/models/subscription-upgrade-schema.d.ts.map +1 -1
- package/build/models/subscription.schema.d.ts +50 -5
- package/build/models/subscription.schema.d.ts.map +1 -1
- package/build/models/user-to-product.schema.d.ts +13 -0
- package/build/models/user-to-product.schema.d.ts.map +1 -1
- package/build/models/user-to-subscription.schema.d.ts +10 -1
- package/build/models/user-to-subscription.schema.d.ts.map +1 -1
- package/constants/subscription/enums/subscription-feature-type.enum.ts +3 -0
- package/models/product.schema.ts +2 -0
- package/models/subscription-feature.schema.ts +18 -0
- package/package.json +1 -1
|
@@ -5,6 +5,19 @@ export declare namespace CreateProductCommand {
|
|
|
5
5
|
description: z.ZodString;
|
|
6
6
|
price: z.ZodNumber;
|
|
7
7
|
tokens: z.ZodNumber;
|
|
8
|
+
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
}, z.core.$strip>], "type">>;
|
|
8
21
|
}, z.core.$strip>;
|
|
9
22
|
type Request = z.infer<typeof RequestSchema>;
|
|
10
23
|
const ResponseSchema: z.ZodObject<{
|
|
@@ -14,6 +27,19 @@ export declare namespace CreateProductCommand {
|
|
|
14
27
|
description: z.ZodString;
|
|
15
28
|
price: z.ZodNumber;
|
|
16
29
|
tokens: z.ZodNumber;
|
|
30
|
+
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
31
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
32
|
+
name: z.ZodString;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
}, z.core.$strip>], "type">>;
|
|
17
43
|
createdAt: z.ZodDate;
|
|
18
44
|
updatedAt: z.ZodDate;
|
|
19
45
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-product.command.d.ts","sourceRoot":"","sources":["../../../commands/product/create-product.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"create-product.command.d.ts","sourceRoot":"","sources":["../../../commands/product/create-product.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,aAAa;;;;;;;;;;;;;;;;;;qBAIxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -11,6 +11,19 @@ export declare namespace FindProductCommand {
|
|
|
11
11
|
description: z.ZodString;
|
|
12
12
|
price: z.ZodNumber;
|
|
13
13
|
tokens: z.ZodNumber;
|
|
14
|
+
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
15
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
}, z.core.$strip>], "type">>;
|
|
14
27
|
createdAt: z.ZodDate;
|
|
15
28
|
updatedAt: z.ZodDate;
|
|
16
29
|
}, z.core.$strip>>;
|
|
@@ -23,6 +36,19 @@ export declare namespace FindProductCommand {
|
|
|
23
36
|
description: z.ZodString;
|
|
24
37
|
price: z.ZodNumber;
|
|
25
38
|
tokens: z.ZodNumber;
|
|
39
|
+
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
44
|
+
name: z.ZodString;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
}, z.core.$strip>], "type">>;
|
|
26
52
|
createdAt: z.ZodDate;
|
|
27
53
|
updatedAt: z.ZodDate;
|
|
28
54
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-product.command.d.ts","sourceRoot":"","sources":["../../../commands/product/find-product.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,aAAa;;qBAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"find-product.command.d.ts","sourceRoot":"","sources":["../../../commands/product/find-product.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,aAAa;;qBAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;IAE/C,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;qBAE/B,CAAC;IAEH,KAAY,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;CACrE"}
|
|
@@ -16,6 +16,19 @@ export declare namespace GetMyProductsCommand {
|
|
|
16
16
|
description: z.ZodString;
|
|
17
17
|
price: z.ZodNumber;
|
|
18
18
|
tokens: z.ZodNumber;
|
|
19
|
+
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
20
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
}, z.core.$strip>], "type">>;
|
|
19
32
|
createdAt: z.ZodDate;
|
|
20
33
|
updatedAt: z.ZodDate;
|
|
21
34
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-my-products.command.d.ts","sourceRoot":"","sources":["../../../commands/product/get-my-products.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"get-my-products.command.d.ts","sourceRoot":"","sources":["../../../commands/product/get-my-products.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -5,6 +5,19 @@ export declare namespace UpdateProductCommand {
|
|
|
5
5
|
description: z.ZodOptional<z.ZodString>;
|
|
6
6
|
price: z.ZodOptional<z.ZodNumber>;
|
|
7
7
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
features: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
}, z.core.$strip>], "type">>>;
|
|
8
21
|
}, z.core.$strip>;
|
|
9
22
|
type Request = z.infer<typeof RequestSchema>;
|
|
10
23
|
const RequestParamSchema: z.ZodObject<{
|
|
@@ -18,6 +31,19 @@ export declare namespace UpdateProductCommand {
|
|
|
18
31
|
description: z.ZodString;
|
|
19
32
|
price: z.ZodNumber;
|
|
20
33
|
tokens: z.ZodNumber;
|
|
34
|
+
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
}, z.core.$strip>], "type">>;
|
|
21
47
|
createdAt: z.ZodDate;
|
|
22
48
|
updatedAt: z.ZodDate;
|
|
23
49
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-product.command.d.ts","sourceRoot":"","sources":["../../../commands/product/update-product.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"update-product.command.d.ts","sourceRoot":"","sources":["../../../commands/product/update-product.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,aAAa;;;;;;;;;;;;;;;;;;qBAId,CAAC;IAEb,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,kBAAkB;;qBAE7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -6,14 +6,23 @@ export declare namespace CreateSubscriptionCommand {
|
|
|
6
6
|
description: z.ZodString;
|
|
7
7
|
price: z.ZodNumber;
|
|
8
8
|
tokens: z.ZodNumber;
|
|
9
|
+
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
10
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
13
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
16
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
}, z.core.$strip>], "type">>;
|
|
9
22
|
mainSubscriptionId: z.ZodNullable<z.ZodString>;
|
|
10
23
|
discount: z.ZodNumber;
|
|
11
24
|
period: z.ZodNumber;
|
|
12
25
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
|
|
13
|
-
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
14
|
-
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
15
|
-
name: z.ZodString;
|
|
16
|
-
}, z.core.$strip>], "type">>;
|
|
17
26
|
}, z.core.$strip>;
|
|
18
27
|
type Request = z.infer<typeof RequestSchema>;
|
|
19
28
|
const ResponseSchema: z.ZodObject<{
|
|
@@ -29,7 +38,16 @@ export declare namespace CreateSubscriptionCommand {
|
|
|
29
38
|
tokens: z.ZodNumber;
|
|
30
39
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
|
|
31
40
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
|
-
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
41
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
47
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
33
51
|
name: z.ZodString;
|
|
34
52
|
}, z.core.$strip>], "type">>;
|
|
35
53
|
createdAt: z.ZodDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-subscription.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/create-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"create-subscription.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/create-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;qBAIxB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -17,7 +17,16 @@ export declare namespace FindSubscriptionCommand {
|
|
|
17
17
|
tokens: z.ZodNumber;
|
|
18
18
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
|
|
19
19
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
20
|
-
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
20
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
21
30
|
name: z.ZodString;
|
|
22
31
|
}, z.core.$strip>], "type">>;
|
|
23
32
|
createdAt: z.ZodDate;
|
|
@@ -35,7 +44,16 @@ export declare namespace FindSubscriptionCommand {
|
|
|
35
44
|
tokens: z.ZodNumber;
|
|
36
45
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
|
|
37
46
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
|
-
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
47
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
54
|
+
name: z.ZodString;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
39
57
|
name: z.ZodString;
|
|
40
58
|
}, z.core.$strip>], "type">>;
|
|
41
59
|
createdAt: z.ZodDate;
|
|
@@ -57,7 +75,16 @@ export declare namespace FindSubscriptionCommand {
|
|
|
57
75
|
tokens: z.ZodNumber;
|
|
58
76
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
|
|
59
77
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
60
|
-
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
78
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
79
|
+
name: z.ZodString;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
87
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
61
88
|
name: z.ZodString;
|
|
62
89
|
}, z.core.$strip>], "type">>;
|
|
63
90
|
createdAt: z.ZodDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-subscription.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/find-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,aAAa;;qBAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"find-subscription.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/find-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,uBAAuB,CAAC;IAC9B,MAAM,aAAa;;qBAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;IAE/C,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAE/B,CAAC;IAEH,KAAY,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;CACrE"}
|
|
@@ -15,7 +15,16 @@ export declare namespace GetAvailableUpgradesCommand {
|
|
|
15
15
|
tokens: z.ZodNumber;
|
|
16
16
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
|
|
17
17
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
18
|
-
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
18
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
19
28
|
name: z.ZodString;
|
|
20
29
|
}, z.core.$strip>], "type">>;
|
|
21
30
|
createdAt: z.ZodDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-available-upgrades.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/get-available-upgrades.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,aAAa,gCAA8B,CAAC;IAEzD,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"get-available-upgrades.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/get-available-upgrades.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,aAAa,gCAA8B,CAAC;IAEzD,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -13,7 +13,16 @@ export declare namespace GetFreeSubscriptionCommand {
|
|
|
13
13
|
tokens: z.ZodNumber;
|
|
14
14
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
|
|
15
15
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
16
|
-
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
16
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
17
26
|
name: z.ZodString;
|
|
18
27
|
}, z.core.$strip>], "type">>;
|
|
19
28
|
createdAt: z.ZodDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-free-subscription.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/get-free-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,0BAA0B,CAAC;IACjC,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"get-free-subscription.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/get-free-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,0BAA0B,CAAC;IACjC,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -6,14 +6,23 @@ export declare namespace UpdateSubscriptionCommand {
|
|
|
6
6
|
description: z.ZodOptional<z.ZodString>;
|
|
7
7
|
price: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
tokens: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
features: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
10
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
13
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
16
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
}, z.core.$strip>], "type">>>;
|
|
9
22
|
mainSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
23
|
discount: z.ZodOptional<z.ZodNumber>;
|
|
11
24
|
period: z.ZodOptional<z.ZodNumber>;
|
|
12
25
|
action: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>>;
|
|
13
|
-
features: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
14
|
-
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
15
|
-
name: z.ZodString;
|
|
16
|
-
}, z.core.$strip>], "type">>>;
|
|
17
26
|
}, z.core.$strip>;
|
|
18
27
|
type Request = z.infer<typeof RequestSchema>;
|
|
19
28
|
const RequestParamSchema: z.ZodObject<{
|
|
@@ -33,7 +42,16 @@ export declare namespace UpdateSubscriptionCommand {
|
|
|
33
42
|
tokens: z.ZodNumber;
|
|
34
43
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
|
|
35
44
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
36
|
-
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
45
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
52
|
+
name: z.ZodString;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
37
55
|
name: z.ZodString;
|
|
38
56
|
}, z.core.$strip>], "type">>;
|
|
39
57
|
createdAt: z.ZodDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-subscription.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/update-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"update-subscription.command.d.ts","sourceRoot":"","sources":["../../../commands/subscription/update-subscription.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,yBAAyB,CAAC;IAChC,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;qBAId,CAAC;IAEb,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,kBAAkB;;qBAE7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -6,11 +6,11 @@ export declare namespace FindUserByUuidCommand {
|
|
|
6
6
|
type Request = z.infer<typeof RequestSchema>;
|
|
7
7
|
const ResponseSchema: z.ZodObject<{
|
|
8
8
|
data: z.ZodObject<{
|
|
9
|
-
|
|
9
|
+
email: z.ZodString;
|
|
10
10
|
createdAt: z.ZodDate;
|
|
11
11
|
updatedAt: z.ZodDate;
|
|
12
|
-
email: z.ZodString;
|
|
13
12
|
status: z.ZodString;
|
|
13
|
+
uuid: z.ZodString;
|
|
14
14
|
ip: z.ZodString;
|
|
15
15
|
tokenBonusBalance: z.ZodNumber;
|
|
16
16
|
role: z.ZodString;
|
|
@@ -42,11 +42,11 @@ export declare namespace FindUsersByCriteriaCommand {
|
|
|
42
42
|
type Request = z.infer<typeof RequestSchema>;
|
|
43
43
|
const ResponseSchema: z.ZodObject<{
|
|
44
44
|
data: z.ZodArray<z.ZodObject<{
|
|
45
|
-
|
|
45
|
+
email: z.ZodString;
|
|
46
46
|
createdAt: z.ZodDate;
|
|
47
47
|
updatedAt: z.ZodDate;
|
|
48
|
-
email: z.ZodString;
|
|
49
48
|
status: z.ZodString;
|
|
49
|
+
uuid: z.ZodString;
|
|
50
50
|
ip: z.ZodString;
|
|
51
51
|
tokenBonusBalance: z.ZodNumber;
|
|
52
52
|
role: z.ZodString;
|
|
@@ -9,11 +9,11 @@ export declare namespace UpTokenBonusBalanceCommand {
|
|
|
9
9
|
}, z.core.$strip>;
|
|
10
10
|
type Request = z.infer<typeof RequestSchema>;
|
|
11
11
|
const ResponseSchema: z.ZodObject<{
|
|
12
|
-
|
|
12
|
+
email: z.ZodOptional<z.ZodString>;
|
|
13
13
|
createdAt: z.ZodOptional<z.ZodDate>;
|
|
14
14
|
updatedAt: z.ZodOptional<z.ZodDate>;
|
|
15
|
-
email: z.ZodOptional<z.ZodString>;
|
|
16
15
|
status: z.ZodOptional<z.ZodString>;
|
|
16
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
17
17
|
ip: z.ZodOptional<z.ZodString>;
|
|
18
18
|
verifyTokenHash: z.ZodOptional<z.ZodString>;
|
|
19
19
|
restoreTokenHash: z.ZodOptional<z.ZodString>;
|
|
@@ -28,7 +28,16 @@ export declare namespace GetUserToSubscriptionsCommand {
|
|
|
28
28
|
tokens: z.ZodNumber;
|
|
29
29
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
|
|
30
30
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
31
|
-
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
31
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
32
|
+
name: z.ZodString;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
32
41
|
name: z.ZodString;
|
|
33
42
|
}, z.core.$strip>], "type">>;
|
|
34
43
|
createdAt: z.ZodDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-user-to-subscriptions.command.d.ts","sourceRoot":"","sources":["../../../commands/user-to-subscription/get-user-to-subscriptions.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,6BAA6B,CAAC;IACpC,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"get-user-to-subscriptions.command.d.ts","sourceRoot":"","sources":["../../../commands/user-to-subscription/get-user-to-subscriptions.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,6BAA6B,CAAC;IACpC,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-feature-type.enum.d.ts","sourceRoot":"","sources":["../../../../constants/subscription/enums/subscription-feature-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IACjC,OAAO,YAAY;
|
|
1
|
+
{"version":3,"file":"subscription-feature-type.enum.d.ts","sourceRoot":"","sources":["../../../../constants/subscription/enums/subscription-feature-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IACjC,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,mBAAmB,wBAAwB;IAC3C,SAAS,cAAc;CAC1B"}
|
|
@@ -4,4 +4,7 @@ exports.SUBSCRIPTION_FEATURE_TYPE = void 0;
|
|
|
4
4
|
var SUBSCRIPTION_FEATURE_TYPE;
|
|
5
5
|
(function (SUBSCRIPTION_FEATURE_TYPE) {
|
|
6
6
|
SUBSCRIPTION_FEATURE_TYPE["GENERIC"] = "generic";
|
|
7
|
+
SUBSCRIPTION_FEATURE_TYPE["WRITER_PAGES"] = "writer_pages";
|
|
8
|
+
SUBSCRIPTION_FEATURE_TYPE["PRESENTATION_SLIDES"] = "presentation_slides";
|
|
9
|
+
SUBSCRIPTION_FEATURE_TYPE["EDU_TASKS"] = "edu_tasks";
|
|
7
10
|
})(SUBSCRIPTION_FEATURE_TYPE || (exports.SUBSCRIPTION_FEATURE_TYPE = SUBSCRIPTION_FEATURE_TYPE = {}));
|
|
@@ -5,6 +5,19 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
5
5
|
description: z.ZodString;
|
|
6
6
|
price: z.ZodNumber;
|
|
7
7
|
tokens: z.ZodNumber;
|
|
8
|
+
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
}, z.core.$strip>], "type">>;
|
|
8
21
|
createdAt: z.ZodDate;
|
|
9
22
|
updatedAt: z.ZodDate;
|
|
10
23
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.schema.d.ts","sourceRoot":"","sources":["../../models/product.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"product.schema.d.ts","sourceRoot":"","sources":["../../models/product.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;iBASxB,CAAC"}
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProductSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const subscription_feature_schema_1 = require("./subscription-feature.schema");
|
|
5
6
|
exports.ProductSchema = 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
|
description: zod_1.z.string().min(3).max(16384),
|
|
9
10
|
price: zod_1.z.number(),
|
|
10
11
|
tokens: zod_1.z.number(),
|
|
12
|
+
features: zod_1.z.array(subscription_feature_schema_1.SubscriptionFeatureSchema),
|
|
11
13
|
createdAt: zod_1.z.date(),
|
|
12
14
|
updatedAt: zod_1.z.date(),
|
|
13
15
|
});
|
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import { SUBSCRIPTION_FEATURE_TYPE } from '../constants';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
export declare const GenericSubscriptionFeatureSchema: z.ZodObject<{
|
|
4
|
-
type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE>;
|
|
4
|
+
type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const WriterPagesSubscriptionFeatureSchema: z.ZodObject<{
|
|
8
|
+
type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const PresentationSlidesSubscriptionFeatureSchema: z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const EduTasksSubscriptionFeatureSchema: z.ZodObject<{
|
|
16
|
+
type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
5
17
|
name: z.ZodString;
|
|
6
18
|
}, z.core.$strip>;
|
|
7
19
|
export declare const SubscriptionFeatureSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
8
|
-
type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE>;
|
|
20
|
+
type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
9
30
|
name: z.ZodString;
|
|
10
31
|
}, z.core.$strip>], "type">;
|
|
11
32
|
//# sourceMappingURL=subscription-feature.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-feature.schema.d.ts","sourceRoot":"","sources":["../../models/subscription-feature.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAC;AAEH,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"subscription-feature.schema.d.ts","sourceRoot":"","sources":["../../models/subscription-feature.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gCAAgC;;;iBAG3C,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;iBAG/C,CAAC;AAEH,eAAO,MAAM,2CAA2C;;;iBAGtD,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;iBAG5C,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;2BAKpC,CAAC"}
|
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscriptionFeatureSchema = exports.GenericSubscriptionFeatureSchema = void 0;
|
|
3
|
+
exports.SubscriptionFeatureSchema = exports.EduTasksSubscriptionFeatureSchema = exports.PresentationSlidesSubscriptionFeatureSchema = exports.WriterPagesSubscriptionFeatureSchema = exports.GenericSubscriptionFeatureSchema = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.GenericSubscriptionFeatureSchema = zod_1.z.object({
|
|
7
7
|
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.GENERIC),
|
|
8
8
|
name: zod_1.z.string(),
|
|
9
9
|
});
|
|
10
|
+
exports.WriterPagesSubscriptionFeatureSchema = zod_1.z.object({
|
|
11
|
+
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES),
|
|
12
|
+
name: zod_1.z.string(),
|
|
13
|
+
});
|
|
14
|
+
exports.PresentationSlidesSubscriptionFeatureSchema = zod_1.z.object({
|
|
15
|
+
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES),
|
|
16
|
+
name: zod_1.z.string(),
|
|
17
|
+
});
|
|
18
|
+
exports.EduTasksSubscriptionFeatureSchema = zod_1.z.object({
|
|
19
|
+
type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS),
|
|
20
|
+
name: zod_1.z.string(),
|
|
21
|
+
});
|
|
10
22
|
exports.SubscriptionFeatureSchema = zod_1.z.discriminatedUnion('type', [
|
|
11
23
|
exports.GenericSubscriptionFeatureSchema,
|
|
24
|
+
exports.WriterPagesSubscriptionFeatureSchema,
|
|
25
|
+
exports.PresentationSlidesSubscriptionFeatureSchema,
|
|
26
|
+
exports.EduTasksSubscriptionFeatureSchema,
|
|
12
27
|
]);
|
|
@@ -11,7 +11,16 @@ export declare const SubscriptionUpgradeSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
11
11
|
tokens: z.ZodNumber;
|
|
12
12
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("..").SUBSCRIPTION_ACTION>>>;
|
|
13
13
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
14
|
-
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
14
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
23
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
15
24
|
name: z.ZodString;
|
|
16
25
|
}, z.core.$strip>], "type">>;
|
|
17
26
|
createdAt: z.ZodDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-upgrade-schema.d.ts","sourceRoot":"","sources":["../../models/subscription-upgrade-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"subscription-upgrade-schema.d.ts","sourceRoot":"","sources":["../../models/subscription-upgrade-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKrC,CAAC"}
|
|
@@ -12,7 +12,16 @@ export declare const SubscriptionSchema: z.ZodObject<{
|
|
|
12
12
|
tokens: z.ZodNumber;
|
|
13
13
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof SUBSCRIPTION_ACTION>>>;
|
|
14
14
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
15
|
-
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
15
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
21
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
16
25
|
name: z.ZodString;
|
|
17
26
|
}, z.core.$strip>], "type">>;
|
|
18
27
|
createdAt: z.ZodDate;
|
|
@@ -30,7 +39,16 @@ export declare const SubscriptionWithActionSchema: z.ZodIntersection<z.ZodObject
|
|
|
30
39
|
tokens: z.ZodNumber;
|
|
31
40
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof SUBSCRIPTION_ACTION>>>;
|
|
32
41
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
33
|
-
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
42
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
43
|
+
name: z.ZodString;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
34
52
|
name: z.ZodString;
|
|
35
53
|
}, z.core.$strip>], "type">>;
|
|
36
54
|
createdAt: z.ZodDate;
|
|
@@ -50,7 +68,16 @@ export declare const SubscriptionWithSubTypesSchema: z.ZodIntersection<z.ZodObje
|
|
|
50
68
|
tokens: z.ZodNumber;
|
|
51
69
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof SUBSCRIPTION_ACTION>>>;
|
|
52
70
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
53
|
-
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
71
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
74
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
75
|
+
name: z.ZodString;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
78
|
+
name: z.ZodString;
|
|
79
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
54
81
|
name: z.ZodString;
|
|
55
82
|
}, z.core.$strip>], "type">>;
|
|
56
83
|
createdAt: z.ZodDate;
|
|
@@ -68,7 +95,16 @@ export declare const SubscriptionWithSubTypesSchema: z.ZodIntersection<z.ZodObje
|
|
|
68
95
|
tokens: z.ZodNumber;
|
|
69
96
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof SUBSCRIPTION_ACTION>>>;
|
|
70
97
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
71
|
-
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
98
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
99
|
+
name: z.ZodString;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
105
|
+
name: z.ZodString;
|
|
106
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
72
108
|
name: z.ZodString;
|
|
73
109
|
}, z.core.$strip>], "type">>;
|
|
74
110
|
createdAt: z.ZodDate;
|
|
@@ -89,7 +125,16 @@ export declare const SubscriptionWithFeaturesSchema: z.ZodObject<{
|
|
|
89
125
|
createdAt: z.ZodDate;
|
|
90
126
|
updatedAt: z.ZodDate;
|
|
91
127
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
92
|
-
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
128
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
129
|
+
name: z.ZodString;
|
|
130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
131
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
132
|
+
name: z.ZodString;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
135
|
+
name: z.ZodString;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
93
138
|
name: z.ZodString;
|
|
94
139
|
}, z.core.$strip>], "type">>;
|
|
95
140
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.schema.d.ts","sourceRoot":"","sources":["../../models/subscription.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtE,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"subscription.schema.d.ts","sourceRoot":"","sources":["../../models/subscription.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAc7B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKxC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAK1C,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEzC,CAAC"}
|
|
@@ -25,6 +25,19 @@ export declare const UserToProductWithProductSchema: z.ZodObject<{
|
|
|
25
25
|
description: z.ZodString;
|
|
26
26
|
price: z.ZodNumber;
|
|
27
27
|
tokens: z.ZodNumber;
|
|
28
|
+
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
30
|
+
name: z.ZodString;
|
|
31
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
32
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
}, z.core.$strip>], "type">>;
|
|
28
41
|
createdAt: z.ZodDate;
|
|
29
42
|
updatedAt: z.ZodDate;
|
|
30
43
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-to-product.schema.d.ts","sourceRoot":"","sources":["../../models/user-to-product.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,mBAAmB;;;;;;;;;iBAS9B,CAAC;AAEH,eAAO,MAAM,8BAA8B
|
|
1
|
+
{"version":3,"file":"user-to-product.schema.d.ts","sourceRoot":"","sources":["../../models/user-to-product.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,eAAO,MAAM,mBAAmB;;;;;;;;;iBAS9B,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEzC,CAAC"}
|
|
@@ -42,7 +42,16 @@ export declare const UserToSubscriptionWithSubscriptionSchema: z.ZodIntersection
|
|
|
42
42
|
tokens: z.ZodNumber;
|
|
43
43
|
action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("..").SUBSCRIPTION_ACTION>>>;
|
|
44
44
|
features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
45
|
-
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE>;
|
|
45
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
|
|
52
|
+
name: z.ZodString;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
|
|
46
55
|
name: z.ZodString;
|
|
47
56
|
}, z.core.$strip>], "type">>;
|
|
48
57
|
createdAt: z.ZodDate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-to-subscription.schema.d.ts","sourceRoot":"","sources":["../../models/user-to-subscription.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE/E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;iBAcnC,CAAC;AAEH,eAAO,MAAM,wCAAwC
|
|
1
|
+
{"version":3,"file":"user-to-subscription.schema.d.ts","sourceRoot":"","sources":["../../models/user-to-subscription.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAE/E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;iBAcnC,CAAC;AAEH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKpD,CAAC"}
|
package/models/product.schema.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { SubscriptionFeatureSchema } from './subscription-feature.schema';
|
|
2
3
|
|
|
3
4
|
export const ProductSchema = z.object({
|
|
4
5
|
uuid: z.string().uuid(),
|
|
@@ -6,6 +7,7 @@ export const ProductSchema = z.object({
|
|
|
6
7
|
description: z.string().min(3).max(16384),
|
|
7
8
|
price: z.number(),
|
|
8
9
|
tokens: z.number(),
|
|
10
|
+
features: z.array(SubscriptionFeatureSchema),
|
|
9
11
|
createdAt: z.date(),
|
|
10
12
|
updatedAt: z.date(),
|
|
11
13
|
});
|
|
@@ -6,6 +6,24 @@ export const GenericSubscriptionFeatureSchema = z.object({
|
|
|
6
6
|
name: z.string(),
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
+
export const WriterPagesSubscriptionFeatureSchema = z.object({
|
|
10
|
+
type: z.literal(SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES),
|
|
11
|
+
name: z.string(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const PresentationSlidesSubscriptionFeatureSchema = z.object({
|
|
15
|
+
type: z.literal(SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES),
|
|
16
|
+
name: z.string(),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const EduTasksSubscriptionFeatureSchema = z.object({
|
|
20
|
+
type: z.literal(SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS),
|
|
21
|
+
name: z.string(),
|
|
22
|
+
});
|
|
23
|
+
|
|
9
24
|
export const SubscriptionFeatureSchema = z.discriminatedUnion('type', [
|
|
10
25
|
GenericSubscriptionFeatureSchema,
|
|
26
|
+
WriterPagesSubscriptionFeatureSchema,
|
|
27
|
+
PresentationSlidesSubscriptionFeatureSchema,
|
|
28
|
+
EduTasksSubscriptionFeatureSchema,
|
|
11
29
|
]);
|