@purpleschool/student-works 1.5.11 → 1.5.12

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.
Files changed (44) hide show
  1. package/build/commands/product/create-product.command.d.ts +32 -0
  2. package/build/commands/product/create-product.command.d.ts.map +1 -1
  3. package/build/commands/product/find-product.command.d.ts +32 -0
  4. package/build/commands/product/find-product.command.d.ts.map +1 -1
  5. package/build/commands/product/get-my-products.command.d.ts +16 -0
  6. package/build/commands/product/get-my-products.command.d.ts.map +1 -1
  7. package/build/commands/product/update-product.command.d.ts +32 -0
  8. package/build/commands/product/update-product.command.d.ts.map +1 -1
  9. package/build/commands/subscription/create-subscription.command.d.ts +29 -5
  10. package/build/commands/subscription/create-subscription.command.d.ts.map +1 -1
  11. package/build/commands/subscription/find-subscription.command.d.ts +39 -3
  12. package/build/commands/subscription/find-subscription.command.d.ts.map +1 -1
  13. package/build/commands/subscription/get-available-upgrades.command.d.ts +13 -1
  14. package/build/commands/subscription/get-available-upgrades.command.d.ts.map +1 -1
  15. package/build/commands/subscription/get-free-subscription.command.d.ts +13 -1
  16. package/build/commands/subscription/get-free-subscription.command.d.ts.map +1 -1
  17. package/build/commands/subscription/update-subscription.command.d.ts +29 -5
  18. package/build/commands/subscription/update-subscription.command.d.ts.map +1 -1
  19. package/build/commands/user/find-user-by-uuid.command.d.ts +2 -2
  20. package/build/commands/user/find-users-by-criteria.command.d.ts +2 -2
  21. package/build/commands/user/up-token-bonus-balance.command.d.ts +2 -2
  22. package/build/commands/user-to-subscription/get-user-to-subscriptions.command.d.ts +13 -1
  23. package/build/commands/user-to-subscription/get-user-to-subscriptions.command.d.ts.map +1 -1
  24. package/build/constants/subscription/enums/subscription-feature-type.enum.d.ts +5 -1
  25. package/build/constants/subscription/enums/subscription-feature-type.enum.d.ts.map +1 -1
  26. package/build/constants/subscription/enums/subscription-feature-type.enum.js +4 -0
  27. package/build/models/product.schema.d.ts +16 -0
  28. package/build/models/product.schema.d.ts.map +1 -1
  29. package/build/models/product.schema.js +2 -0
  30. package/build/models/subscription-feature.schema.d.ts +30 -2
  31. package/build/models/subscription-feature.schema.d.ts.map +1 -1
  32. package/build/models/subscription-feature.schema.js +21 -1
  33. package/build/models/subscription-upgrade-schema.d.ts +13 -1
  34. package/build/models/subscription-upgrade-schema.d.ts.map +1 -1
  35. package/build/models/subscription.schema.d.ts +65 -5
  36. package/build/models/subscription.schema.d.ts.map +1 -1
  37. package/build/models/user-to-product.schema.d.ts +16 -0
  38. package/build/models/user-to-product.schema.d.ts.map +1 -1
  39. package/build/models/user-to-subscription.schema.d.ts +13 -1
  40. package/build/models/user-to-subscription.schema.d.ts.map +1 -1
  41. package/constants/subscription/enums/subscription-feature-type.enum.ts +4 -0
  42. package/models/product.schema.ts +2 -0
  43. package/models/subscription-feature.schema.ts +24 -0
  44. package/package.json +1 -1
@@ -5,6 +5,22 @@ 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.CREDITS>;
13
+ name: z.ZodString;
14
+ }, z.core.$strip>, z.ZodObject<{
15
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
16
+ name: z.ZodString;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
19
+ name: z.ZodString;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
22
+ name: z.ZodString;
23
+ }, z.core.$strip>], "type">>;
8
24
  }, z.core.$strip>;
9
25
  type Request = z.infer<typeof RequestSchema>;
10
26
  const ResponseSchema: z.ZodObject<{
@@ -14,6 +30,22 @@ export declare namespace CreateProductCommand {
14
30
  description: z.ZodString;
15
31
  price: z.ZodNumber;
16
32
  tokens: z.ZodNumber;
33
+ features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
34
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
35
+ name: z.ZodString;
36
+ }, z.core.$strip>, z.ZodObject<{
37
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
38
+ name: z.ZodString;
39
+ }, z.core.$strip>, z.ZodObject<{
40
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
41
+ name: z.ZodString;
42
+ }, z.core.$strip>, z.ZodObject<{
43
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
44
+ name: z.ZodString;
45
+ }, z.core.$strip>, z.ZodObject<{
46
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
47
+ name: z.ZodString;
48
+ }, z.core.$strip>], "type">>;
17
49
  createdAt: z.ZodDate;
18
50
  updatedAt: z.ZodDate;
19
51
  }, 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;;;;;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"}
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,22 @@ 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.CREDITS>;
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>;
28
+ name: z.ZodString;
29
+ }, z.core.$strip>], "type">>;
14
30
  createdAt: z.ZodDate;
15
31
  updatedAt: z.ZodDate;
16
32
  }, z.core.$strip>>;
@@ -23,6 +39,22 @@ export declare namespace FindProductCommand {
23
39
  description: z.ZodString;
24
40
  price: z.ZodNumber;
25
41
  tokens: z.ZodNumber;
42
+ features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
43
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
44
+ name: z.ZodString;
45
+ }, z.core.$strip>, z.ZodObject<{
46
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
47
+ name: z.ZodString;
48
+ }, z.core.$strip>, z.ZodObject<{
49
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
50
+ name: z.ZodString;
51
+ }, z.core.$strip>, z.ZodObject<{
52
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
53
+ name: z.ZodString;
54
+ }, z.core.$strip>, z.ZodObject<{
55
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
56
+ name: z.ZodString;
57
+ }, z.core.$strip>], "type">>;
26
58
  createdAt: z.ZodDate;
27
59
  updatedAt: z.ZodDate;
28
60
  }, 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;;;;;;;;;;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"}
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,22 @@ 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.CREDITS>;
24
+ name: z.ZodString;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
27
+ name: z.ZodString;
28
+ }, z.core.$strip>, z.ZodObject<{
29
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
30
+ name: z.ZodString;
31
+ }, z.core.$strip>, z.ZodObject<{
32
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
33
+ name: z.ZodString;
34
+ }, z.core.$strip>], "type">>;
19
35
  createdAt: z.ZodDate;
20
36
  updatedAt: z.ZodDate;
21
37
  }, 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;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
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,22 @@ 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.CREDITS>;
13
+ name: z.ZodString;
14
+ }, z.core.$strip>, z.ZodObject<{
15
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
16
+ name: z.ZodString;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
19
+ name: z.ZodString;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
22
+ name: z.ZodString;
23
+ }, z.core.$strip>], "type">>>;
8
24
  }, z.core.$strip>;
9
25
  type Request = z.infer<typeof RequestSchema>;
10
26
  const RequestParamSchema: z.ZodObject<{
@@ -18,6 +34,22 @@ export declare namespace UpdateProductCommand {
18
34
  description: z.ZodString;
19
35
  price: z.ZodNumber;
20
36
  tokens: z.ZodNumber;
37
+ features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
38
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
39
+ name: z.ZodString;
40
+ }, z.core.$strip>, z.ZodObject<{
41
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
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>;
51
+ name: z.ZodString;
52
+ }, z.core.$strip>], "type">>;
21
53
  createdAt: z.ZodDate;
22
54
  updatedAt: z.ZodDate;
23
55
  }, 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;;;;;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"}
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,26 @@ 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.CREDITS>;
14
+ name: z.ZodString;
15
+ }, z.core.$strip>, z.ZodObject<{
16
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
17
+ name: z.ZodString;
18
+ }, z.core.$strip>, z.ZodObject<{
19
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
20
+ name: z.ZodString;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
23
+ name: z.ZodString;
24
+ }, z.core.$strip>], "type">>;
9
25
  mainSubscriptionId: z.ZodNullable<z.ZodString>;
10
26
  discount: z.ZodNumber;
11
27
  period: z.ZodNumber;
12
28
  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
29
  }, z.core.$strip>;
18
30
  type Request = z.infer<typeof RequestSchema>;
19
31
  const ResponseSchema: z.ZodObject<{
@@ -29,7 +41,19 @@ export declare namespace CreateSubscriptionCommand {
29
41
  tokens: z.ZodNumber;
30
42
  action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
31
43
  features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
32
- type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
44
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
45
+ name: z.ZodString;
46
+ }, z.core.$strip>, z.ZodObject<{
47
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
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>;
33
57
  name: z.ZodString;
34
58
  }, z.core.$strip>], "type">>;
35
59
  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;;;;;;;;;;;;;;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"}
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,19 @@ 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.CREDITS>;
24
+ name: z.ZodString;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
27
+ name: z.ZodString;
28
+ }, z.core.$strip>, z.ZodObject<{
29
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
30
+ name: z.ZodString;
31
+ }, z.core.$strip>, z.ZodObject<{
32
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
21
33
  name: z.ZodString;
22
34
  }, z.core.$strip>], "type">>;
23
35
  createdAt: z.ZodDate;
@@ -35,7 +47,19 @@ export declare namespace FindSubscriptionCommand {
35
47
  tokens: z.ZodNumber;
36
48
  action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
37
49
  features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
38
- type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
50
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
51
+ name: z.ZodString;
52
+ }, z.core.$strip>, z.ZodObject<{
53
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
54
+ name: z.ZodString;
55
+ }, z.core.$strip>, z.ZodObject<{
56
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
57
+ name: z.ZodString;
58
+ }, z.core.$strip>, z.ZodObject<{
59
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
60
+ name: z.ZodString;
61
+ }, z.core.$strip>, z.ZodObject<{
62
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
39
63
  name: z.ZodString;
40
64
  }, z.core.$strip>], "type">>;
41
65
  createdAt: z.ZodDate;
@@ -57,7 +81,19 @@ export declare namespace FindSubscriptionCommand {
57
81
  tokens: z.ZodNumber;
58
82
  action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
59
83
  features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
60
- type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
84
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
85
+ name: z.ZodString;
86
+ }, z.core.$strip>, z.ZodObject<{
87
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
88
+ name: z.ZodString;
89
+ }, z.core.$strip>, z.ZodObject<{
90
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
91
+ name: z.ZodString;
92
+ }, z.core.$strip>, z.ZodObject<{
93
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
94
+ name: z.ZodString;
95
+ }, z.core.$strip>, z.ZodObject<{
96
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
61
97
  name: z.ZodString;
62
98
  }, z.core.$strip>], "type">>;
63
99
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
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,19 @@ 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.CREDITS>;
22
+ name: z.ZodString;
23
+ }, z.core.$strip>, z.ZodObject<{
24
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
25
+ name: z.ZodString;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
28
+ name: z.ZodString;
29
+ }, z.core.$strip>, z.ZodObject<{
30
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
19
31
  name: z.ZodString;
20
32
  }, z.core.$strip>], "type">>;
21
33
  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;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
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,19 @@ 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.CREDITS>;
20
+ name: z.ZodString;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
23
+ name: z.ZodString;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
26
+ name: z.ZodString;
27
+ }, z.core.$strip>, z.ZodObject<{
28
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
17
29
  name: z.ZodString;
18
30
  }, z.core.$strip>], "type">>;
19
31
  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;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
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,26 @@ 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.CREDITS>;
14
+ name: z.ZodString;
15
+ }, z.core.$strip>, z.ZodObject<{
16
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
17
+ name: z.ZodString;
18
+ }, z.core.$strip>, z.ZodObject<{
19
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
20
+ name: z.ZodString;
21
+ }, z.core.$strip>, z.ZodObject<{
22
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
23
+ name: z.ZodString;
24
+ }, z.core.$strip>], "type">>>;
9
25
  mainSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
26
  discount: z.ZodOptional<z.ZodNumber>;
11
27
  period: z.ZodOptional<z.ZodNumber>;
12
28
  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
29
  }, z.core.$strip>;
18
30
  type Request = z.infer<typeof RequestSchema>;
19
31
  const RequestParamSchema: z.ZodObject<{
@@ -33,7 +45,19 @@ export declare namespace UpdateSubscriptionCommand {
33
45
  tokens: z.ZodNumber;
34
46
  action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof import("../..").SUBSCRIPTION_ACTION>>>;
35
47
  features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
36
- type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE>;
48
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
49
+ name: z.ZodString;
50
+ }, z.core.$strip>, z.ZodObject<{
51
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
52
+ name: z.ZodString;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
55
+ name: z.ZodString;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
58
+ name: z.ZodString;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
37
61
  name: z.ZodString;
38
62
  }, z.core.$strip>], "type">>;
39
63
  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;;;;;;;;;;;;;;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"}
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
- uuid: z.ZodString;
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
- uuid: z.ZodString;
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
- uuid: z.ZodOptional<z.ZodString>;
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,19 @@ 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.CREDITS>;
35
+ name: z.ZodString;
36
+ }, z.core.$strip>, z.ZodObject<{
37
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
38
+ name: z.ZodString;
39
+ }, z.core.$strip>, z.ZodObject<{
40
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
41
+ name: z.ZodString;
42
+ }, z.core.$strip>, z.ZodObject<{
43
+ type: z.ZodLiteral<import("../..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
32
44
  name: z.ZodString;
33
45
  }, z.core.$strip>], "type">>;
34
46
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
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,4 +1,8 @@
1
1
  export declare enum SUBSCRIPTION_FEATURE_TYPE {
2
- GENERIC = "generic"
2
+ GENERIC = "generic",
3
+ CREDITS = "credits",
4
+ WRITER_PAGES = "writer_pages",
5
+ PRESENTATION_SLIDES = "presentation_slides",
6
+ EDU_TASKS = "edu_tasks"
3
7
  }
4
8
  //# sourceMappingURL=subscription-feature-type.enum.d.ts.map
@@ -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;CACtB"}
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,OAAO,YAAY;IACnB,YAAY,iBAAiB;IAC7B,mBAAmB,wBAAwB;IAC3C,SAAS,cAAc;CAC1B"}
@@ -4,4 +4,8 @@ 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["CREDITS"] = "credits";
8
+ SUBSCRIPTION_FEATURE_TYPE["WRITER_PAGES"] = "writer_pages";
9
+ SUBSCRIPTION_FEATURE_TYPE["PRESENTATION_SLIDES"] = "presentation_slides";
10
+ SUBSCRIPTION_FEATURE_TYPE["EDU_TASKS"] = "edu_tasks";
7
11
  })(SUBSCRIPTION_FEATURE_TYPE || (exports.SUBSCRIPTION_FEATURE_TYPE = SUBSCRIPTION_FEATURE_TYPE = {}));
@@ -5,6 +5,22 @@ 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.CREDITS>;
13
+ name: z.ZodString;
14
+ }, z.core.$strip>, z.ZodObject<{
15
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
16
+ name: z.ZodString;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
19
+ name: z.ZodString;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
22
+ name: z.ZodString;
23
+ }, z.core.$strip>], "type">>;
8
24
  createdAt: z.ZodDate;
9
25
  updatedAt: z.ZodDate;
10
26
  }, 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;AAExB,eAAO,MAAM,aAAa;;;;;;;;iBAQxB,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,39 @@
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 CreditsSubscriptionFeatureSchema: z.ZodObject<{
8
+ type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
9
+ name: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export declare const WriterPagesSubscriptionFeatureSchema: z.ZodObject<{
12
+ type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
13
+ name: z.ZodString;
14
+ }, z.core.$strip>;
15
+ export declare const PresentationSlidesSubscriptionFeatureSchema: z.ZodObject<{
16
+ type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
17
+ name: z.ZodString;
18
+ }, z.core.$strip>;
19
+ export declare const EduTasksSubscriptionFeatureSchema: z.ZodObject<{
20
+ type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
5
21
  name: z.ZodString;
6
22
  }, z.core.$strip>;
7
23
  export declare const SubscriptionFeatureSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
8
- type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE>;
24
+ type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
25
+ name: z.ZodString;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
28
+ name: z.ZodString;
29
+ }, z.core.$strip>, z.ZodObject<{
30
+ type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
31
+ name: z.ZodString;
32
+ }, z.core.$strip>, z.ZodObject<{
33
+ type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
34
+ name: z.ZodString;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ type: z.ZodLiteral<SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
9
37
  name: z.ZodString;
10
38
  }, z.core.$strip>], "type">;
11
39
  //# 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,yBAAyB;;;2BAEpC,CAAC"}
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,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;;;;;;;;;;;;;;;2BAMpC,CAAC"}
@@ -1,12 +1,32 @@
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.CreditsSubscriptionFeatureSchema = 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.CreditsSubscriptionFeatureSchema = zod_1.z.object({
11
+ type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.CREDITS),
12
+ name: zod_1.z.string(),
13
+ });
14
+ exports.WriterPagesSubscriptionFeatureSchema = zod_1.z.object({
15
+ type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES),
16
+ name: zod_1.z.string(),
17
+ });
18
+ exports.PresentationSlidesSubscriptionFeatureSchema = zod_1.z.object({
19
+ type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES),
20
+ name: zod_1.z.string(),
21
+ });
22
+ exports.EduTasksSubscriptionFeatureSchema = zod_1.z.object({
23
+ type: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS),
24
+ name: zod_1.z.string(),
25
+ });
10
26
  exports.SubscriptionFeatureSchema = zod_1.z.discriminatedUnion('type', [
11
27
  exports.GenericSubscriptionFeatureSchema,
28
+ exports.CreditsSubscriptionFeatureSchema,
29
+ exports.WriterPagesSubscriptionFeatureSchema,
30
+ exports.PresentationSlidesSubscriptionFeatureSchema,
31
+ exports.EduTasksSubscriptionFeatureSchema,
12
32
  ]);
@@ -11,7 +11,19 @@ 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.CREDITS>;
18
+ name: z.ZodString;
19
+ }, z.core.$strip>, z.ZodObject<{
20
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
21
+ name: z.ZodString;
22
+ }, z.core.$strip>, z.ZodObject<{
23
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
24
+ name: z.ZodString;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
15
27
  name: z.ZodString;
16
28
  }, z.core.$strip>], "type">>;
17
29
  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;;;;;;;;;;;;;;;;;;;kBAKrC,CAAC"}
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,19 @@ 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.CREDITS>;
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>;
16
28
  name: z.ZodString;
17
29
  }, z.core.$strip>], "type">>;
18
30
  createdAt: z.ZodDate;
@@ -30,7 +42,19 @@ export declare const SubscriptionWithActionSchema: z.ZodIntersection<z.ZodObject
30
42
  tokens: z.ZodNumber;
31
43
  action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof SUBSCRIPTION_ACTION>>>;
32
44
  features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
33
- 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.CREDITS>;
49
+ name: z.ZodString;
50
+ }, z.core.$strip>, z.ZodObject<{
51
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
52
+ name: z.ZodString;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
55
+ name: z.ZodString;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
34
58
  name: z.ZodString;
35
59
  }, z.core.$strip>], "type">>;
36
60
  createdAt: z.ZodDate;
@@ -50,7 +74,19 @@ export declare const SubscriptionWithSubTypesSchema: z.ZodIntersection<z.ZodObje
50
74
  tokens: z.ZodNumber;
51
75
  action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof SUBSCRIPTION_ACTION>>>;
52
76
  features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
53
- type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE>;
77
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
78
+ name: z.ZodString;
79
+ }, z.core.$strip>, z.ZodObject<{
80
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
81
+ name: z.ZodString;
82
+ }, z.core.$strip>, z.ZodObject<{
83
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
84
+ name: z.ZodString;
85
+ }, z.core.$strip>, z.ZodObject<{
86
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
87
+ name: z.ZodString;
88
+ }, z.core.$strip>, z.ZodObject<{
89
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
54
90
  name: z.ZodString;
55
91
  }, z.core.$strip>], "type">>;
56
92
  createdAt: z.ZodDate;
@@ -68,7 +104,19 @@ export declare const SubscriptionWithSubTypesSchema: z.ZodIntersection<z.ZodObje
68
104
  tokens: z.ZodNumber;
69
105
  action: z.ZodNullable<z.ZodOptional<z.ZodEnum<typeof SUBSCRIPTION_ACTION>>>;
70
106
  features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
71
- type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE>;
107
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
108
+ name: z.ZodString;
109
+ }, z.core.$strip>, z.ZodObject<{
110
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
111
+ name: z.ZodString;
112
+ }, z.core.$strip>, z.ZodObject<{
113
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
114
+ name: z.ZodString;
115
+ }, z.core.$strip>, z.ZodObject<{
116
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
117
+ name: z.ZodString;
118
+ }, z.core.$strip>, z.ZodObject<{
119
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
72
120
  name: z.ZodString;
73
121
  }, z.core.$strip>], "type">>;
74
122
  createdAt: z.ZodDate;
@@ -89,7 +137,19 @@ export declare const SubscriptionWithFeaturesSchema: z.ZodObject<{
89
137
  createdAt: z.ZodDate;
90
138
  updatedAt: z.ZodDate;
91
139
  features: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
92
- type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE>;
140
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.GENERIC>;
141
+ name: z.ZodString;
142
+ }, z.core.$strip>, z.ZodObject<{
143
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.CREDITS>;
144
+ name: z.ZodString;
145
+ }, z.core.$strip>, z.ZodObject<{
146
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
147
+ name: z.ZodString;
148
+ }, z.core.$strip>, z.ZodObject<{
149
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
150
+ name: z.ZodString;
151
+ }, z.core.$strip>, z.ZodObject<{
152
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
93
153
  name: z.ZodString;
94
154
  }, z.core.$strip>], "type">>;
95
155
  }, 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;;;;;;;;;;;;;;;;;iBAc7B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;kBAKxC,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAK1C,CAAC;AAEF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;iBAEzC,CAAC"}
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,22 @@ 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.CREDITS>;
33
+ name: z.ZodString;
34
+ }, z.core.$strip>, z.ZodObject<{
35
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
36
+ name: z.ZodString;
37
+ }, z.core.$strip>, z.ZodObject<{
38
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
39
+ name: z.ZodString;
40
+ }, z.core.$strip>, z.ZodObject<{
41
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
42
+ name: z.ZodString;
43
+ }, z.core.$strip>], "type">>;
28
44
  createdAt: z.ZodDate;
29
45
  updatedAt: z.ZodDate;
30
46
  }, 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;;;;;;;;;;;;;;;;;;iBAEzC,CAAC"}
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,19 @@ 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.CREDITS>;
49
+ name: z.ZodString;
50
+ }, z.core.$strip>, z.ZodObject<{
51
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES>;
52
+ name: z.ZodString;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES>;
55
+ name: z.ZodString;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ type: z.ZodLiteral<import("..").SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS>;
46
58
  name: z.ZodString;
47
59
  }, z.core.$strip>], "type">>;
48
60
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKpD,CAAC"}
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"}
@@ -1,3 +1,7 @@
1
1
  export enum SUBSCRIPTION_FEATURE_TYPE {
2
2
  GENERIC = 'generic',
3
+ CREDITS = 'credits',
4
+ WRITER_PAGES = 'writer_pages',
5
+ PRESENTATION_SLIDES = 'presentation_slides',
6
+ EDU_TASKS = 'edu_tasks',
3
7
  }
@@ -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,30 @@ export const GenericSubscriptionFeatureSchema = z.object({
6
6
  name: z.string(),
7
7
  });
8
8
 
9
+ export const CreditsSubscriptionFeatureSchema = z.object({
10
+ type: z.literal(SUBSCRIPTION_FEATURE_TYPE.CREDITS),
11
+ name: z.string(),
12
+ });
13
+
14
+ export const WriterPagesSubscriptionFeatureSchema = z.object({
15
+ type: z.literal(SUBSCRIPTION_FEATURE_TYPE.WRITER_PAGES),
16
+ name: z.string(),
17
+ });
18
+
19
+ export const PresentationSlidesSubscriptionFeatureSchema = z.object({
20
+ type: z.literal(SUBSCRIPTION_FEATURE_TYPE.PRESENTATION_SLIDES),
21
+ name: z.string(),
22
+ });
23
+
24
+ export const EduTasksSubscriptionFeatureSchema = z.object({
25
+ type: z.literal(SUBSCRIPTION_FEATURE_TYPE.EDU_TASKS),
26
+ name: z.string(),
27
+ });
28
+
9
29
  export const SubscriptionFeatureSchema = z.discriminatedUnion('type', [
10
30
  GenericSubscriptionFeatureSchema,
31
+ CreditsSubscriptionFeatureSchema,
32
+ WriterPagesSubscriptionFeatureSchema,
33
+ PresentationSlidesSubscriptionFeatureSchema,
34
+ EduTasksSubscriptionFeatureSchema,
11
35
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/student-works",
3
- "version": "1.5.11",
3
+ "version": "1.5.12",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",