@purpleschool/gptbot 0.5.16 → 0.5.17
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/user-to-subscription/get-user-to-subscriptions.command.js +1 -1
- package/build/models/user-to-subscription.schema.js +5 -1
- package/commands/user-to-subscription/get-user-to-subscriptions.command.ts +2 -2
- package/models/user-to-subscription.schema.ts +8 -0
- package/package.json +1 -1
|
@@ -6,6 +6,6 @@ const models_1 = require("../../models");
|
|
|
6
6
|
var GetUserToSubscriptionsCommand;
|
|
7
7
|
(function (GetUserToSubscriptionsCommand) {
|
|
8
8
|
GetUserToSubscriptionsCommand.ResponseSchema = zod_1.z.object({
|
|
9
|
-
data: zod_1.z.array(models_1.
|
|
9
|
+
data: zod_1.z.array(models_1.UserToSubscriptionWithSubscriptionSchema),
|
|
10
10
|
});
|
|
11
11
|
})(GetUserToSubscriptionsCommand || (exports.GetUserToSubscriptionsCommand = GetUserToSubscriptionsCommand = {}));
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserToSubscriptionSchema = void 0;
|
|
3
|
+
exports.UserToSubscriptionWithSubscriptionSchema = exports.UserToSubscriptionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const subscription_schema_1 = require("./subscription.schema");
|
|
5
6
|
exports.UserToSubscriptionSchema = zod_1.z.object({
|
|
6
7
|
uuid: zod_1.z.string().uuid(),
|
|
7
8
|
userId: zod_1.z.string().uuid(),
|
|
@@ -15,3 +16,6 @@ exports.UserToSubscriptionSchema = zod_1.z.object({
|
|
|
15
16
|
createdAt: zod_1.z.date(),
|
|
16
17
|
updatedAt: zod_1.z.date(),
|
|
17
18
|
});
|
|
19
|
+
exports.UserToSubscriptionWithSubscriptionSchema = zod_1.z.intersection(exports.UserToSubscriptionSchema, zod_1.z.object({
|
|
20
|
+
subscription: subscription_schema_1.SubscriptionSchema,
|
|
21
|
+
}));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { UserToSubscriptionWithSubscriptionSchema } from '../../models';
|
|
3
3
|
|
|
4
4
|
export namespace GetUserToSubscriptionsCommand {
|
|
5
5
|
export const ResponseSchema = z.object({
|
|
6
|
-
data: z.array(
|
|
6
|
+
data: z.array(UserToSubscriptionWithSubscriptionSchema),
|
|
7
7
|
});
|
|
8
8
|
|
|
9
9
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { SubscriptionSchema } from './subscription.schema';
|
|
2
3
|
|
|
3
4
|
export const UserToSubscriptionSchema = z.object({
|
|
4
5
|
uuid: z.string().uuid(),
|
|
@@ -13,3 +14,10 @@ export const UserToSubscriptionSchema = z.object({
|
|
|
13
14
|
createdAt: z.date(),
|
|
14
15
|
updatedAt: z.date(),
|
|
15
16
|
});
|
|
17
|
+
|
|
18
|
+
export const UserToSubscriptionWithSubscriptionSchema = z.intersection(
|
|
19
|
+
UserToSubscriptionSchema,
|
|
20
|
+
z.object({
|
|
21
|
+
subscription: SubscriptionSchema,
|
|
22
|
+
}),
|
|
23
|
+
);
|