@purpleschool/gptbot 0.10.6 → 0.10.7

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.
@@ -3,11 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FindProductCommand = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const models_1 = require("../../models");
6
+ const constants_1 = require("../../constants");
6
7
  var FindProductCommand;
7
8
  (function (FindProductCommand) {
8
9
  FindProductCommand.RequestSchema = models_1.ProductSchema.pick({
9
10
  uuid: true,
10
11
  });
12
+ FindProductCommand.RequestQuerySchema = zod_1.z.object({
13
+ billingScope: zod_1.z.nativeEnum(constants_1.BILLING_SCOPE).default(constants_1.BILLING_SCOPE.USER),
14
+ });
11
15
  FindProductCommand.ResponseSchema = zod_1.z.object({
12
16
  data: zod_1.z.array(models_1.ProductSchema),
13
17
  });
@@ -3,11 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FindSubscriptionCommand = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const models_1 = require("../../models");
6
+ const constants_1 = require("../../constants");
6
7
  var FindSubscriptionCommand;
7
8
  (function (FindSubscriptionCommand) {
8
9
  FindSubscriptionCommand.RequestSchema = models_1.SubscriptionSchema.pick({
9
10
  uuid: true,
10
11
  });
12
+ FindSubscriptionCommand.RequestQuerySchema = zod_1.z.object({
13
+ billingScope: zod_1.z.nativeEnum(constants_1.BILLING_SCOPE).default(constants_1.BILLING_SCOPE.USER),
14
+ });
11
15
  FindSubscriptionCommand.ResponseSchema = zod_1.z.object({
12
16
  data: zod_1.z.array(models_1.SubscriptionWithSubTypesSchema),
13
17
  });
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ProductSchema } from '../../models';
3
+ import { BILLING_SCOPE } from '../../constants';
3
4
 
4
5
  export namespace FindProductCommand {
5
6
  export const RequestSchema = ProductSchema.pick({
@@ -8,6 +9,12 @@ export namespace FindProductCommand {
8
9
 
9
10
  export type Request = z.infer<typeof RequestSchema>;
10
11
 
12
+ export const RequestQuerySchema = z.object({
13
+ billingScope: z.nativeEnum(BILLING_SCOPE).default(BILLING_SCOPE.USER),
14
+ });
15
+
16
+ export type RequestQuery = z.infer<typeof RequestQuerySchema>;
17
+
11
18
  export const ResponseSchema = z.object({
12
19
  data: z.array(ProductSchema),
13
20
  });
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { SubscriptionSchema, SubscriptionWithSubTypesSchema } from '../../models';
3
+ import { BILLING_SCOPE } from '../../constants';
3
4
 
4
5
  export namespace FindSubscriptionCommand {
5
6
  export const RequestSchema = SubscriptionSchema.pick({
@@ -8,6 +9,12 @@ export namespace FindSubscriptionCommand {
8
9
 
9
10
  export type Request = z.infer<typeof RequestSchema>;
10
11
 
12
+ export const RequestQuerySchema = z.object({
13
+ billingScope: z.nativeEnum(BILLING_SCOPE).default(BILLING_SCOPE.USER),
14
+ });
15
+
16
+ export type RequestQuery = z.infer<typeof RequestQuerySchema>;
17
+
11
18
  export const ResponseSchema = z.object({
12
19
  data: z.array(SubscriptionWithSubTypesSchema),
13
20
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.10.6",
3
+ "version": "0.10.7",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",