@purpleschool/multisite 0.0.16 → 0.0.18

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 (37) hide show
  1. package/build/commands/page/create-page.command.d.ts +0 -100
  2. package/build/commands/page/create-page.command.d.ts.map +1 -1
  3. package/build/commands/page/find-page-by-alias.command.d.ts +0 -200
  4. package/build/commands/page/find-page-by-alias.command.d.ts.map +1 -1
  5. package/build/commands/page/find-page-by-criteria.command.d.ts +0 -63
  6. package/build/commands/page/find-page-by-criteria.command.d.ts.map +1 -1
  7. package/build/commands/page/find-page-by-criteria.command.js +0 -2
  8. package/build/commands/page/find-page.command.d.ts +0 -141
  9. package/build/commands/page/find-page.command.d.ts.map +1 -1
  10. package/build/commands/page/update-page.command.d.ts +0 -100
  11. package/build/commands/page/update-page.command.d.ts.map +1 -1
  12. package/build/constants/page/index.d.ts +1 -1
  13. package/build/constants/page/index.d.ts.map +1 -1
  14. package/build/constants/page/index.js +0 -15
  15. package/build/constants/user-to-subscription/enums/index.d.ts +1 -0
  16. package/build/constants/user-to-subscription/enums/index.d.ts.map +1 -1
  17. package/build/constants/user-to-subscription/enums/index.js +1 -0
  18. package/build/constants/user-to-subscription/enums/user-to-subscription-type.enum.d.ts +5 -0
  19. package/build/constants/user-to-subscription/enums/user-to-subscription-type.enum.d.ts.map +1 -0
  20. package/build/constants/user-to-subscription/enums/user-to-subscription-type.enum.js +8 -0
  21. package/build/models/page.schema.d.ts +0 -129
  22. package/build/models/page.schema.d.ts.map +1 -1
  23. package/build/models/page.schema.js +1 -19
  24. package/build/models/subscription.schema.d.ts +2 -2
  25. package/build/queries/subscription/find-subscriptions.command.d.ts +4 -4
  26. package/build/queries/subscription/get-subscriptions-summary.command.d.ts +6 -6
  27. package/build/queries/user/get-my-subscriptions.command.d.ts +6 -6
  28. package/commands/page/find-page-by-criteria.command.ts +0 -2
  29. package/constants/page/index.ts +1 -1
  30. package/constants/user-to-subscription/enums/index.ts +1 -0
  31. package/constants/user-to-subscription/enums/user-to-subscription-type.enum.ts +4 -0
  32. package/models/page.schema.ts +0 -22
  33. package/package.json +1 -1
  34. package/build/constants/page/enums/page-type.enum.d.ts +0 -6
  35. package/build/constants/page/enums/page-type.enum.d.ts.map +0 -1
  36. package/build/constants/page/enums/page-type.enum.js +0 -9
  37. package/constants/page/enums/page-type.enum.ts +0 -5
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USER_TO_SUBSCRIPTION_TYPE = void 0;
4
+ var USER_TO_SUBSCRIPTION_TYPE;
5
+ (function (USER_TO_SUBSCRIPTION_TYPE) {
6
+ USER_TO_SUBSCRIPTION_TYPE["PAID"] = "paid";
7
+ USER_TO_SUBSCRIPTION_TYPE["INTERVAL"] = "interval";
8
+ })(USER_TO_SUBSCRIPTION_TYPE || (exports.USER_TO_SUBSCRIPTION_TYPE = USER_TO_SUBSCRIPTION_TYPE = {}));
@@ -1,51 +1,4 @@
1
1
  import { z } from 'zod';
2
- import { PageType } from '../constants';
3
- export declare const WriterToolPageMetadataSchema: z.ZodObject<{
4
- type: z.ZodLiteral<PageType.WRITER_TOOL>;
5
- }, "strip", z.ZodTypeAny, {
6
- type: PageType.WRITER_TOOL;
7
- }, {
8
- type: PageType.WRITER_TOOL;
9
- }>;
10
- export declare const EduTaskSolvingToolPageMetadataSchema: z.ZodObject<{
11
- type: z.ZodLiteral<PageType.EDU_TASK_SOLVING_TOOL>;
12
- }, "strip", z.ZodTypeAny, {
13
- type: PageType.EDU_TASK_SOLVING_TOOL;
14
- }, {
15
- type: PageType.EDU_TASK_SOLVING_TOOL;
16
- }>;
17
- export declare const WriterDocumentTypePageMetadataSchema: z.ZodObject<{
18
- type: z.ZodLiteral<PageType.WRITER_DOCUMENT_TYPE>;
19
- writerDocumentTypeId: z.ZodString;
20
- }, "strip", z.ZodTypeAny, {
21
- type: PageType.WRITER_DOCUMENT_TYPE;
22
- writerDocumentTypeId: string;
23
- }, {
24
- type: PageType.WRITER_DOCUMENT_TYPE;
25
- writerDocumentTypeId: string;
26
- }>;
27
- export declare const PageMetadataSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
28
- type: z.ZodLiteral<PageType.WRITER_TOOL>;
29
- }, "strip", z.ZodTypeAny, {
30
- type: PageType.WRITER_TOOL;
31
- }, {
32
- type: PageType.WRITER_TOOL;
33
- }>, z.ZodObject<{
34
- type: z.ZodLiteral<PageType.EDU_TASK_SOLVING_TOOL>;
35
- }, "strip", z.ZodTypeAny, {
36
- type: PageType.EDU_TASK_SOLVING_TOOL;
37
- }, {
38
- type: PageType.EDU_TASK_SOLVING_TOOL;
39
- }>, z.ZodObject<{
40
- type: z.ZodLiteral<PageType.WRITER_DOCUMENT_TYPE>;
41
- writerDocumentTypeId: z.ZodString;
42
- }, "strip", z.ZodTypeAny, {
43
- type: PageType.WRITER_DOCUMENT_TYPE;
44
- writerDocumentTypeId: string;
45
- }, {
46
- type: PageType.WRITER_DOCUMENT_TYPE;
47
- writerDocumentTypeId: string;
48
- }>]>;
49
2
  export declare const PageSchema: z.ZodObject<{
50
3
  uuid: z.ZodString;
51
4
  metaTitle: z.ZodString;
@@ -54,34 +7,10 @@ export declare const PageSchema: z.ZodObject<{
54
7
  subTitle: z.ZodString;
55
8
  seoTextMd: z.ZodString;
56
9
  alias: z.ZodString;
57
- type: z.ZodNativeEnum<typeof PageType>;
58
- metadata: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
59
- type: z.ZodLiteral<PageType.WRITER_TOOL>;
60
- }, "strip", z.ZodTypeAny, {
61
- type: PageType.WRITER_TOOL;
62
- }, {
63
- type: PageType.WRITER_TOOL;
64
- }>, z.ZodObject<{
65
- type: z.ZodLiteral<PageType.EDU_TASK_SOLVING_TOOL>;
66
- }, "strip", z.ZodTypeAny, {
67
- type: PageType.EDU_TASK_SOLVING_TOOL;
68
- }, {
69
- type: PageType.EDU_TASK_SOLVING_TOOL;
70
- }>, z.ZodObject<{
71
- type: z.ZodLiteral<PageType.WRITER_DOCUMENT_TYPE>;
72
- writerDocumentTypeId: z.ZodString;
73
- }, "strip", z.ZodTypeAny, {
74
- type: PageType.WRITER_DOCUMENT_TYPE;
75
- writerDocumentTypeId: string;
76
- }, {
77
- type: PageType.WRITER_DOCUMENT_TYPE;
78
- writerDocumentTypeId: string;
79
- }>]>;
80
10
  createdAt: z.ZodDate;
81
11
  updatedAt: z.ZodDate;
82
12
  }, "strip", z.ZodTypeAny, {
83
13
  uuid: string;
84
- type: PageType;
85
14
  title: string;
86
15
  createdAt: Date;
87
16
  updatedAt: Date;
@@ -90,17 +19,8 @@ export declare const PageSchema: z.ZodObject<{
90
19
  subTitle: string;
91
20
  seoTextMd: string;
92
21
  alias: string;
93
- metadata: {
94
- type: PageType.WRITER_TOOL;
95
- } | {
96
- type: PageType.EDU_TASK_SOLVING_TOOL;
97
- } | {
98
- type: PageType.WRITER_DOCUMENT_TYPE;
99
- writerDocumentTypeId: string;
100
- };
101
22
  }, {
102
23
  uuid: string;
103
- type: PageType;
104
24
  title: string;
105
25
  createdAt: Date;
106
26
  updatedAt: Date;
@@ -109,14 +29,6 @@ export declare const PageSchema: z.ZodObject<{
109
29
  subTitle: string;
110
30
  seoTextMd: string;
111
31
  alias: string;
112
- metadata: {
113
- type: PageType.WRITER_TOOL;
114
- } | {
115
- type: PageType.EDU_TASK_SOLVING_TOOL;
116
- } | {
117
- type: PageType.WRITER_DOCUMENT_TYPE;
118
- writerDocumentTypeId: string;
119
- };
120
32
  }>;
121
33
  export declare const PageWithQuestionsSchema: z.ZodObject<{
122
34
  uuid: z.ZodString;
@@ -126,29 +38,6 @@ export declare const PageWithQuestionsSchema: z.ZodObject<{
126
38
  subTitle: z.ZodString;
127
39
  seoTextMd: z.ZodString;
128
40
  alias: z.ZodString;
129
- type: z.ZodNativeEnum<typeof PageType>;
130
- metadata: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
131
- type: z.ZodLiteral<PageType.WRITER_TOOL>;
132
- }, "strip", z.ZodTypeAny, {
133
- type: PageType.WRITER_TOOL;
134
- }, {
135
- type: PageType.WRITER_TOOL;
136
- }>, z.ZodObject<{
137
- type: z.ZodLiteral<PageType.EDU_TASK_SOLVING_TOOL>;
138
- }, "strip", z.ZodTypeAny, {
139
- type: PageType.EDU_TASK_SOLVING_TOOL;
140
- }, {
141
- type: PageType.EDU_TASK_SOLVING_TOOL;
142
- }>, z.ZodObject<{
143
- type: z.ZodLiteral<PageType.WRITER_DOCUMENT_TYPE>;
144
- writerDocumentTypeId: z.ZodString;
145
- }, "strip", z.ZodTypeAny, {
146
- type: PageType.WRITER_DOCUMENT_TYPE;
147
- writerDocumentTypeId: string;
148
- }, {
149
- type: PageType.WRITER_DOCUMENT_TYPE;
150
- writerDocumentTypeId: string;
151
- }>]>;
152
41
  createdAt: z.ZodDate;
153
42
  updatedAt: z.ZodDate;
154
43
  } & {
@@ -176,7 +65,6 @@ export declare const PageWithQuestionsSchema: z.ZodObject<{
176
65
  }>, "many">;
177
66
  }, "strip", z.ZodTypeAny, {
178
67
  uuid: string;
179
- type: PageType;
180
68
  title: string;
181
69
  createdAt: Date;
182
70
  updatedAt: Date;
@@ -185,14 +73,6 @@ export declare const PageWithQuestionsSchema: z.ZodObject<{
185
73
  subTitle: string;
186
74
  seoTextMd: string;
187
75
  alias: string;
188
- metadata: {
189
- type: PageType.WRITER_TOOL;
190
- } | {
191
- type: PageType.EDU_TASK_SOLVING_TOOL;
192
- } | {
193
- type: PageType.WRITER_DOCUMENT_TYPE;
194
- writerDocumentTypeId: string;
195
- };
196
76
  questions: {
197
77
  uuid: string;
198
78
  createdAt: Date;
@@ -203,7 +83,6 @@ export declare const PageWithQuestionsSchema: z.ZodObject<{
203
83
  }[];
204
84
  }, {
205
85
  uuid: string;
206
- type: PageType;
207
86
  title: string;
208
87
  createdAt: Date;
209
88
  updatedAt: Date;
@@ -212,14 +91,6 @@ export declare const PageWithQuestionsSchema: z.ZodObject<{
212
91
  subTitle: string;
213
92
  seoTextMd: string;
214
93
  alias: string;
215
- metadata: {
216
- type: PageType.WRITER_TOOL;
217
- } | {
218
- type: PageType.EDU_TASK_SOLVING_TOOL;
219
- } | {
220
- type: PageType.WRITER_DOCUMENT_TYPE;
221
- writerDocumentTypeId: string;
222
- };
223
94
  questions: {
224
95
  uuid: string;
225
96
  createdAt: Date;
@@ -1 +1 @@
1
- {"version":3,"file":"page.schema.d.ts","sourceRoot":"","sources":["../../models/page.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,eAAO,MAAM,4BAA4B;;;;;;EAEvC,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;;;EAE/C,CAAC;AAEH,eAAO,MAAM,oCAAoC;;;;;;;;;EAG/C,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;IAI7B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYrB,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAElC,CAAC"}
1
+ {"version":3,"file":"page.schema.d.ts","sourceRoot":"","sources":["../../models/page.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUrB,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAElC,CAAC"}
@@ -1,24 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PageWithQuestionsSchema = exports.PageSchema = exports.PageMetadataSchema = exports.WriterDocumentTypePageMetadataSchema = exports.EduTaskSolvingToolPageMetadataSchema = exports.WriterToolPageMetadataSchema = void 0;
3
+ exports.PageWithQuestionsSchema = exports.PageSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../constants");
6
5
  const page_question_schema_1 = require("./page-question.schema");
7
- exports.WriterToolPageMetadataSchema = zod_1.z.object({
8
- type: zod_1.z.literal(constants_1.PageType.WRITER_TOOL),
9
- });
10
- exports.EduTaskSolvingToolPageMetadataSchema = zod_1.z.object({
11
- type: zod_1.z.literal(constants_1.PageType.EDU_TASK_SOLVING_TOOL),
12
- });
13
- exports.WriterDocumentTypePageMetadataSchema = zod_1.z.object({
14
- type: zod_1.z.literal(constants_1.PageType.WRITER_DOCUMENT_TYPE),
15
- writerDocumentTypeId: zod_1.z.string().uuid(),
16
- });
17
- exports.PageMetadataSchema = zod_1.z.discriminatedUnion('type', [
18
- exports.WriterToolPageMetadataSchema,
19
- exports.EduTaskSolvingToolPageMetadataSchema,
20
- exports.WriterDocumentTypePageMetadataSchema,
21
- ]);
22
6
  exports.PageSchema = zod_1.z.object({
23
7
  uuid: zod_1.z.string().uuid(),
24
8
  metaTitle: zod_1.z.string().min(3).max(16384),
@@ -27,8 +11,6 @@ exports.PageSchema = zod_1.z.object({
27
11
  subTitle: zod_1.z.string().min(3).max(16384),
28
12
  seoTextMd: zod_1.z.string().min(3).max(16384),
29
13
  alias: zod_1.z.string().min(3).max(16384),
30
- type: zod_1.z.nativeEnum(constants_1.PageType),
31
- metadata: exports.PageMetadataSchema,
32
14
  createdAt: zod_1.z.date(),
33
15
  updatedAt: zod_1.z.date(),
34
16
  });
@@ -22,6 +22,7 @@ export declare const SubscriptionSchema: z.ZodObject<{
22
22
  carryoverPercent: z.ZodNumber;
23
23
  }, "strip", z.ZodTypeAny, {
24
24
  price: number;
25
+ interval: string;
25
26
  uuid: string;
26
27
  siteId: string;
27
28
  name: string;
@@ -31,12 +32,12 @@ export declare const SubscriptionSchema: z.ZodObject<{
31
32
  type: string;
32
33
  name: string;
33
34
  }[];
34
- interval: string;
35
35
  period: number;
36
36
  discount: number;
37
37
  carryoverPercent: number;
38
38
  }, {
39
39
  price: number;
40
+ interval: string;
40
41
  uuid: string;
41
42
  siteId: string;
42
43
  name: string;
@@ -46,7 +47,6 @@ export declare const SubscriptionSchema: z.ZodObject<{
46
47
  type: string;
47
48
  name: string;
48
49
  }[];
49
- interval: string;
50
50
  period: number;
51
51
  discount: number;
52
52
  carryoverPercent: number;
@@ -24,6 +24,7 @@ export declare namespace FindSubscriptionsCommand {
24
24
  carryoverPercent: z.ZodNumber;
25
25
  }, "strip", z.ZodTypeAny, {
26
26
  price: number;
27
+ interval: string;
27
28
  uuid: string;
28
29
  siteId: string;
29
30
  name: string;
@@ -33,12 +34,12 @@ export declare namespace FindSubscriptionsCommand {
33
34
  type: string;
34
35
  name: string;
35
36
  }[];
36
- interval: string;
37
37
  period: number;
38
38
  discount: number;
39
39
  carryoverPercent: number;
40
40
  }, {
41
41
  price: number;
42
+ interval: string;
42
43
  uuid: string;
43
44
  siteId: string;
44
45
  name: string;
@@ -48,7 +49,6 @@ export declare namespace FindSubscriptionsCommand {
48
49
  type: string;
49
50
  name: string;
50
51
  }[];
51
- interval: string;
52
52
  period: number;
53
53
  discount: number;
54
54
  carryoverPercent: number;
@@ -56,6 +56,7 @@ export declare namespace FindSubscriptionsCommand {
56
56
  }, "strip", z.ZodTypeAny, {
57
57
  data: {
58
58
  price: number;
59
+ interval: string;
59
60
  uuid: string;
60
61
  siteId: string;
61
62
  name: string;
@@ -65,7 +66,6 @@ export declare namespace FindSubscriptionsCommand {
65
66
  type: string;
66
67
  name: string;
67
68
  }[];
68
- interval: string;
69
69
  period: number;
70
70
  discount: number;
71
71
  carryoverPercent: number;
@@ -73,6 +73,7 @@ export declare namespace FindSubscriptionsCommand {
73
73
  }, {
74
74
  data: {
75
75
  price: number;
76
+ interval: string;
76
77
  uuid: string;
77
78
  siteId: string;
78
79
  name: string;
@@ -82,7 +83,6 @@ export declare namespace FindSubscriptionsCommand {
82
83
  type: string;
83
84
  name: string;
84
85
  }[];
85
- interval: string;
86
86
  period: number;
87
87
  discount: number;
88
88
  carryoverPercent: number;
@@ -33,6 +33,7 @@ export declare namespace GetSubscriptionsSummaryCommand {
33
33
  carryoverPercent: z.ZodNumber;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  price: number;
36
+ interval: string;
36
37
  uuid: string;
37
38
  siteId: string;
38
39
  name: string;
@@ -42,12 +43,12 @@ export declare namespace GetSubscriptionsSummaryCommand {
42
43
  type: string;
43
44
  name: string;
44
45
  }[];
45
- interval: string;
46
46
  period: number;
47
47
  discount: number;
48
48
  carryoverPercent: number;
49
49
  }, {
50
50
  price: number;
51
+ interval: string;
51
52
  uuid: string;
52
53
  siteId: string;
53
54
  name: string;
@@ -57,7 +58,6 @@ export declare namespace GetSubscriptionsSummaryCommand {
57
58
  type: string;
58
59
  name: string;
59
60
  }[];
60
- interval: string;
61
61
  period: number;
62
62
  discount: number;
63
63
  carryoverPercent: number;
@@ -72,6 +72,7 @@ export declare namespace GetSubscriptionsSummaryCommand {
72
72
  carriedOverTokenBalance: number;
73
73
  subscription: {
74
74
  price: number;
75
+ interval: string;
75
76
  uuid: string;
76
77
  siteId: string;
77
78
  name: string;
@@ -81,7 +82,6 @@ export declare namespace GetSubscriptionsSummaryCommand {
81
82
  type: string;
82
83
  name: string;
83
84
  }[];
84
- interval: string;
85
85
  period: number;
86
86
  discount: number;
87
87
  carryoverPercent: number;
@@ -96,6 +96,7 @@ export declare namespace GetSubscriptionsSummaryCommand {
96
96
  carriedOverTokenBalance: number;
97
97
  subscription: {
98
98
  price: number;
99
+ interval: string;
99
100
  uuid: string;
100
101
  siteId: string;
101
102
  name: string;
@@ -105,7 +106,6 @@ export declare namespace GetSubscriptionsSummaryCommand {
105
106
  type: string;
106
107
  name: string;
107
108
  }[];
108
- interval: string;
109
109
  period: number;
110
110
  discount: number;
111
111
  carryoverPercent: number;
@@ -219,6 +219,7 @@ export declare namespace GetSubscriptionsSummaryCommand {
219
219
  carriedOverTokenBalance: number;
220
220
  subscription: {
221
221
  price: number;
222
+ interval: string;
222
223
  uuid: string;
223
224
  siteId: string;
224
225
  name: string;
@@ -228,7 +229,6 @@ export declare namespace GetSubscriptionsSummaryCommand {
228
229
  type: string;
229
230
  name: string;
230
231
  }[];
231
- interval: string;
232
232
  period: number;
233
233
  discount: number;
234
234
  carryoverPercent: number;
@@ -268,6 +268,7 @@ export declare namespace GetSubscriptionsSummaryCommand {
268
268
  carriedOverTokenBalance: number;
269
269
  subscription: {
270
270
  price: number;
271
+ interval: string;
271
272
  uuid: string;
272
273
  siteId: string;
273
274
  name: string;
@@ -277,7 +278,6 @@ export declare namespace GetSubscriptionsSummaryCommand {
277
278
  type: string;
278
279
  name: string;
279
280
  }[];
280
- interval: string;
281
281
  period: number;
282
282
  discount: number;
283
283
  carryoverPercent: number;
@@ -33,6 +33,7 @@ export declare namespace GetMySubscriptionsCommand {
33
33
  carryoverPercent: z.ZodNumber;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  price: number;
36
+ interval: string;
36
37
  uuid: string;
37
38
  siteId: string;
38
39
  name: string;
@@ -42,12 +43,12 @@ export declare namespace GetMySubscriptionsCommand {
42
43
  type: string;
43
44
  name: string;
44
45
  }[];
45
- interval: string;
46
46
  period: number;
47
47
  discount: number;
48
48
  carryoverPercent: number;
49
49
  }, {
50
50
  price: number;
51
+ interval: string;
51
52
  uuid: string;
52
53
  siteId: string;
53
54
  name: string;
@@ -57,7 +58,6 @@ export declare namespace GetMySubscriptionsCommand {
57
58
  type: string;
58
59
  name: string;
59
60
  }[];
60
- interval: string;
61
61
  period: number;
62
62
  discount: number;
63
63
  carryoverPercent: number;
@@ -72,6 +72,7 @@ export declare namespace GetMySubscriptionsCommand {
72
72
  carriedOverTokenBalance: number;
73
73
  subscription: {
74
74
  price: number;
75
+ interval: string;
75
76
  uuid: string;
76
77
  siteId: string;
77
78
  name: string;
@@ -81,7 +82,6 @@ export declare namespace GetMySubscriptionsCommand {
81
82
  type: string;
82
83
  name: string;
83
84
  }[];
84
- interval: string;
85
85
  period: number;
86
86
  discount: number;
87
87
  carryoverPercent: number;
@@ -96,6 +96,7 @@ export declare namespace GetMySubscriptionsCommand {
96
96
  carriedOverTokenBalance: number;
97
97
  subscription: {
98
98
  price: number;
99
+ interval: string;
99
100
  uuid: string;
100
101
  siteId: string;
101
102
  name: string;
@@ -105,7 +106,6 @@ export declare namespace GetMySubscriptionsCommand {
105
106
  type: string;
106
107
  name: string;
107
108
  }[];
108
- interval: string;
109
109
  period: number;
110
110
  discount: number;
111
111
  carryoverPercent: number;
@@ -122,6 +122,7 @@ export declare namespace GetMySubscriptionsCommand {
122
122
  carriedOverTokenBalance: number;
123
123
  subscription: {
124
124
  price: number;
125
+ interval: string;
125
126
  uuid: string;
126
127
  siteId: string;
127
128
  name: string;
@@ -131,7 +132,6 @@ export declare namespace GetMySubscriptionsCommand {
131
132
  type: string;
132
133
  name: string;
133
134
  }[];
134
- interval: string;
135
135
  period: number;
136
136
  discount: number;
137
137
  carryoverPercent: number;
@@ -148,6 +148,7 @@ export declare namespace GetMySubscriptionsCommand {
148
148
  carriedOverTokenBalance: number;
149
149
  subscription: {
150
150
  price: number;
151
+ interval: string;
151
152
  uuid: string;
152
153
  siteId: string;
153
154
  name: string;
@@ -157,7 +158,6 @@ export declare namespace GetMySubscriptionsCommand {
157
158
  type: string;
158
159
  name: string;
159
160
  }[];
160
- interval: string;
161
161
  period: number;
162
162
  discount: number;
163
163
  carryoverPercent: number;
@@ -1,12 +1,10 @@
1
1
  import { PageWithQuestionsSchema } from '../../models';
2
2
  import { z } from 'zod';
3
- import { PageType } from '../../constants/page';
4
3
 
5
4
  export namespace FindPageByCriteriaCommand {
6
5
  export const RequestQuerySchema = z.object({
7
6
  title: z.string().optional(),
8
7
  alias: z.string().optional(),
9
- type: z.nativeEnum(PageType).optional(),
10
8
  uuid: z.string().uuid().optional(),
11
9
  limit: z.coerce.number().min(1).optional(),
12
10
  offset: z.coerce.number().min(0).default(0).optional(),
@@ -1 +1 @@
1
- export * from './enums/page-type.enum';
1
+ export {};
@@ -1 +1,2 @@
1
1
  export * from './user-to-subscription-status.enum';
2
+ export * from './user-to-subscription-type.enum';
@@ -0,0 +1,4 @@
1
+ export enum USER_TO_SUBSCRIPTION_TYPE {
2
+ PAID = 'paid',
3
+ INTERVAL = 'interval',
4
+ }
@@ -1,26 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { PageType } from '../constants';
3
2
  import { PageQuestionSchema } from './page-question.schema';
4
3
 
5
- export const WriterToolPageMetadataSchema = z.object({
6
- type: z.literal(PageType.WRITER_TOOL),
7
- });
8
-
9
- export const EduTaskSolvingToolPageMetadataSchema = z.object({
10
- type: z.literal(PageType.EDU_TASK_SOLVING_TOOL),
11
- });
12
-
13
- export const WriterDocumentTypePageMetadataSchema = z.object({
14
- type: z.literal(PageType.WRITER_DOCUMENT_TYPE),
15
- writerDocumentTypeId: z.string().uuid(),
16
- });
17
-
18
- export const PageMetadataSchema = z.discriminatedUnion('type', [
19
- WriterToolPageMetadataSchema,
20
- EduTaskSolvingToolPageMetadataSchema,
21
- WriterDocumentTypePageMetadataSchema,
22
- ]);
23
-
24
4
  export const PageSchema = z.object({
25
5
  uuid: z.string().uuid(),
26
6
  metaTitle: z.string().min(3).max(16384),
@@ -29,8 +9,6 @@ export const PageSchema = z.object({
29
9
  subTitle: z.string().min(3).max(16384),
30
10
  seoTextMd: z.string().min(3).max(16384),
31
11
  alias: z.string().min(3).max(16384),
32
- type: z.nativeEnum(PageType),
33
- metadata: PageMetadataSchema,
34
12
  createdAt: z.date(),
35
13
  updatedAt: z.date(),
36
14
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/multisite",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "Multisite API contracts (DTO schemas, routes, constants)",
5
5
  "type": "commonjs",
6
6
  "main": "build/index.js",
@@ -1,6 +0,0 @@
1
- export declare enum PageType {
2
- WRITER_TOOL = "WRITER_TOOL",
3
- EDU_TASK_SOLVING_TOOL = "EDU_TASK_SOLVING_TOOL",
4
- WRITER_DOCUMENT_TYPE = "WRITER_DOCUMENT_TYPE"
5
- }
6
- //# sourceMappingURL=page-type.enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page-type.enum.d.ts","sourceRoot":"","sources":["../../../../constants/page/enums/page-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAChB,WAAW,gBAAgB;IAC3B,qBAAqB,0BAA0B;IAC/C,oBAAoB,yBAAyB;CAChD"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PageType = void 0;
4
- var PageType;
5
- (function (PageType) {
6
- PageType["WRITER_TOOL"] = "WRITER_TOOL";
7
- PageType["EDU_TASK_SOLVING_TOOL"] = "EDU_TASK_SOLVING_TOOL";
8
- PageType["WRITER_DOCUMENT_TYPE"] = "WRITER_DOCUMENT_TYPE";
9
- })(PageType || (exports.PageType = PageType = {}));
@@ -1,5 +0,0 @@
1
- export enum PageType {
2
- WRITER_TOOL = 'WRITER_TOOL',
3
- EDU_TASK_SOLVING_TOOL = 'EDU_TASK_SOLVING_TOOL',
4
- WRITER_DOCUMENT_TYPE = 'WRITER_DOCUMENT_TYPE',
5
- }