@timothyw/pat-common 1.0.19 → 1.0.20

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.
@@ -0,0 +1,4 @@
1
+ import { UserData } from "../../models";
2
+ export interface GetUserResponse {
3
+ user: UserData;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
- export * from './get-user-config-types';
2
- export * from './update-user-config-types';
1
+ export * from './get-user-types';
2
+ export * from './update-user-types';
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./get-user-config-types"), exports);
18
- __exportStar(require("./update-user-config-types"), exports);
17
+ __exportStar(require("./get-user-types"), exports);
18
+ __exportStar(require("./update-user-types"), exports);
@@ -0,0 +1,108 @@
1
+ import { z } from "zod";
2
+ import { UserData } from "../../models";
3
+ export declare const updateUserRequestSchema: z.ZodObject<{
4
+ sandbox: z.ZodOptional<z.ZodOptional<z.ZodObject<{
5
+ discordId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ discordId?: string | undefined;
8
+ }, {
9
+ discordId?: string | undefined;
10
+ }>>>;
11
+ name: z.ZodOptional<z.ZodString>;
12
+ timezone: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
13
+ config: z.ZodOptional<z.ZodObject<{
14
+ panels: z.ZodOptional<z.ZodArray<z.ZodObject<{
15
+ type: z.ZodOptional<z.ZodNativeEnum<typeof import("../../..").PanelType>>;
16
+ visible: z.ZodOptional<z.ZodBoolean>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ type?: import("../../..").PanelType | undefined;
19
+ visible?: boolean | undefined;
20
+ }, {
21
+ type?: import("../../..").PanelType | undefined;
22
+ visible?: boolean | undefined;
23
+ }>, "many">>;
24
+ agenda: z.ZodOptional<z.ZodObject<{
25
+ itemCategories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
26
+ itemTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ itemCategories?: string[] | undefined;
29
+ itemTypes?: string[] | undefined;
30
+ }, {
31
+ itemCategories?: string[] | undefined;
32
+ itemTypes?: string[] | undefined;
33
+ }>>;
34
+ people: z.ZodOptional<z.ZodObject<{
35
+ propertyKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ propertyKeys?: string[] | undefined;
38
+ }, {
39
+ propertyKeys?: string[] | undefined;
40
+ }>>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ agenda?: {
43
+ itemCategories?: string[] | undefined;
44
+ itemTypes?: string[] | undefined;
45
+ } | undefined;
46
+ people?: {
47
+ propertyKeys?: string[] | undefined;
48
+ } | undefined;
49
+ panels?: {
50
+ type?: import("../../..").PanelType | undefined;
51
+ visible?: boolean | undefined;
52
+ }[] | undefined;
53
+ }, {
54
+ agenda?: {
55
+ itemCategories?: string[] | undefined;
56
+ itemTypes?: string[] | undefined;
57
+ } | undefined;
58
+ people?: {
59
+ propertyKeys?: string[] | undefined;
60
+ } | undefined;
61
+ panels?: {
62
+ type?: import("../../..").PanelType | undefined;
63
+ visible?: boolean | undefined;
64
+ }[] | undefined;
65
+ }>>;
66
+ }, "strict", z.ZodTypeAny, {
67
+ sandbox?: {
68
+ discordId?: string | undefined;
69
+ } | undefined;
70
+ name?: string | undefined;
71
+ timezone?: string | undefined;
72
+ config?: {
73
+ agenda?: {
74
+ itemCategories?: string[] | undefined;
75
+ itemTypes?: string[] | undefined;
76
+ } | undefined;
77
+ people?: {
78
+ propertyKeys?: string[] | undefined;
79
+ } | undefined;
80
+ panels?: {
81
+ type?: import("../../..").PanelType | undefined;
82
+ visible?: boolean | undefined;
83
+ }[] | undefined;
84
+ } | undefined;
85
+ }, {
86
+ sandbox?: {
87
+ discordId?: string | undefined;
88
+ } | undefined;
89
+ name?: string | undefined;
90
+ timezone?: string | undefined;
91
+ config?: {
92
+ agenda?: {
93
+ itemCategories?: string[] | undefined;
94
+ itemTypes?: string[] | undefined;
95
+ } | undefined;
96
+ people?: {
97
+ propertyKeys?: string[] | undefined;
98
+ } | undefined;
99
+ panels?: {
100
+ type?: import("../../..").PanelType | undefined;
101
+ visible?: boolean | undefined;
102
+ }[] | undefined;
103
+ } | undefined;
104
+ }>;
105
+ export type UpdateUserRequest = z.infer<typeof updateUserRequestSchema>;
106
+ export interface UpdateUserConfigResponse {
107
+ user: UserData;
108
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateUserRequestSchema = void 0;
4
+ const models_1 = require("../../models");
5
+ exports.updateUserRequestSchema = models_1.userDataSchema
6
+ .omit({ _id: true, createdAt: true, updatedAt: true })
7
+ .deepPartial()
8
+ .strict();
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@timothyw/pat-common",
3
3
  "description": "",
4
4
  "author": "Timothy Washburn",
5
- "version": "1.0.19",
5
+ "version": "1.0.20",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "scripts": {
@@ -1,5 +1,5 @@
1
1
  import { UserData } from "../../models";
2
2
 
3
- export interface GetUserConfigResponse {
3
+ export interface GetUserResponse {
4
4
  user: UserData;
5
5
  }
@@ -1,2 +1,2 @@
1
- export * from './get-user-config-types';
2
- export * from './update-user-config-types';
1
+ export * from './get-user-types';
2
+ export * from './update-user-types';
@@ -1,12 +1,12 @@
1
1
  import { z } from "zod";
2
2
  import { UserData, userDataSchema } from "../../models";
3
3
 
4
- export const updateUserConfigRequestSchema = userDataSchema
4
+ export const updateUserRequestSchema = userDataSchema
5
5
  .omit({ _id: true, createdAt: true, updatedAt: true })
6
6
  .deepPartial()
7
7
  .strict();
8
8
 
9
- export type UpdateUserConfigRequest = z.infer<typeof updateUserConfigRequestSchema>;
9
+ export type UpdateUserRequest = z.infer<typeof updateUserRequestSchema>;
10
10
 
11
11
  export interface UpdateUserConfigResponse {
12
12
  user: UserData