squarecommonblhelper 2.0.0 → 2.0.1

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/README.md CHANGED
@@ -15,6 +15,11 @@ helper for common bl for my projects.
15
15
 
16
16
  ## changelog
17
17
 
18
+ ### v2.0.1
19
+
20
+ - use strictObject in zod.
21
+ - export types in index file.
22
+
18
23
  ### v2.0.0
19
24
 
20
25
  - remove UtilsCommonBL
package/dist/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
1
  export * from "./greeting.js";
2
2
  export * from "./authentication.js";
3
+ export * from "./types/GreetingResponses.js";
4
+ export * from "./types/AuthenticationResponses.js";
package/dist/index.js CHANGED
@@ -1,2 +1,4 @@
1
1
  export * from "./greeting.js";
2
2
  export * from "./authentication.js";
3
+ export * from "./types/GreetingResponses.js";
4
+ export * from "./types/AuthenticationResponses.js";
@@ -7,12 +7,12 @@ declare const GenerateAccessTokenV0ResponseZ: z.ZodObject<z.objectUtil.extendSha
7
7
  data: z.ZodObject<{
8
8
  main: z.ZodObject<{
9
9
  access_token: z.ZodString;
10
- }, "strip", z.ZodTypeAny, {
10
+ }, "strict", z.ZodTypeAny, {
11
11
  access_token: string;
12
12
  }, {
13
13
  access_token: string;
14
14
  }>;
15
- }, "strip", z.ZodTypeAny, {
15
+ }, "strict", z.ZodTypeAny, {
16
16
  main: {
17
17
  access_token: string;
18
18
  };
@@ -48,14 +48,14 @@ declare const UpdateUsernameV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
48
48
  main: z.ZodObject<{
49
49
  user_id: z.ZodString;
50
50
  username: z.ZodString;
51
- }, "strip", z.ZodTypeAny, {
51
+ }, "strict", z.ZodTypeAny, {
52
52
  user_id: string;
53
53
  username: string;
54
54
  }, {
55
55
  user_id: string;
56
56
  username: string;
57
57
  }>;
58
- }, "strip", z.ZodTypeAny, {
58
+ }, "strict", z.ZodTypeAny, {
59
59
  main: {
60
60
  user_id: string;
61
61
  username: string;
@@ -112,7 +112,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
112
112
  user_id: z.ZodString;
113
113
  credentials: z.ZodObject<{
114
114
  username: z.ZodString;
115
- }, "strip", z.ZodTypeAny, {
115
+ }, "strict", z.ZodTypeAny, {
116
116
  username: string;
117
117
  }, {
118
118
  username: string;
@@ -121,14 +121,14 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
121
121
  sessions: z.ZodArray<z.ZodObject<{
122
122
  app_id: z.ZodNumber;
123
123
  active_sessions: z.ZodNumber;
124
- }, "strip", z.ZodTypeAny, {
124
+ }, "strict", z.ZodTypeAny, {
125
125
  app_id: number;
126
126
  active_sessions: number;
127
127
  }, {
128
128
  app_id: number;
129
129
  active_sessions: number;
130
130
  }>, "many">;
131
- }, "strip", z.ZodTypeAny, {
131
+ }, "strict", z.ZodTypeAny, {
132
132
  user_id: string;
133
133
  credentials: {
134
134
  username: string;
@@ -149,7 +149,7 @@ declare const GetUserDetailsV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
149
149
  active_sessions: number;
150
150
  }[];
151
151
  }>;
152
- }, "strip", z.ZodTypeAny, {
152
+ }, "strict", z.ZodTypeAny, {
153
153
  main: {
154
154
  user_id: string;
155
155
  credentials: {
@@ -1,15 +1,15 @@
1
1
  import { APIOutputZ } from "squarecommons";
2
2
  import { z } from "zod";
3
3
  const GenerateAccessTokenV0ResponseZ = APIOutputZ.extend({
4
- data: z.object({
5
- main: z.object({
4
+ data: z.strictObject({
5
+ main: z.strictObject({
6
6
  access_token: z.string(),
7
7
  }),
8
8
  }),
9
9
  });
10
10
  const UpdateUsernameV0ResponseZ = APIOutputZ.extend({
11
- data: z.object({
12
- main: z.object({
11
+ data: z.strictObject({
12
+ main: z.strictObject({
13
13
  user_id: z.string(),
14
14
  username: z.string(),
15
15
  }),
@@ -19,14 +19,14 @@ const UpdatePasswordV0ResponseZ = APIOutputZ.extend({
19
19
  data: z.null(),
20
20
  });
21
21
  const GetUserDetailsV0ResponseZ = APIOutputZ.extend({
22
- data: z.object({
23
- main: z.object({
22
+ data: z.strictObject({
23
+ main: z.strictObject({
24
24
  user_id: z.string(),
25
- credentials: z.object({
25
+ credentials: z.strictObject({
26
26
  username: z.string(),
27
27
  }),
28
28
  apps: z.array(z.number()),
29
- sessions: z.array(z.object({
29
+ sessions: z.array(z.strictObject({
30
30
  app_id: z.number(),
31
31
  active_sessions: z.number(),
32
32
  })),
@@ -12,7 +12,7 @@ declare const CreateGreetingV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
12
12
  greeting_datetime: z.ZodString;
13
13
  greeting_is_anonymous: z.ZodBoolean;
14
14
  greeting_text: z.ZodNullable<z.ZodString>;
15
- }, "strip", z.ZodTypeAny, {
15
+ }, "strict", z.ZodTypeAny, {
16
16
  user_id: string | null;
17
17
  greeting_anonymous_sender_name: string | null;
18
18
  greeting_id: number;
@@ -27,7 +27,7 @@ declare const CreateGreetingV0ResponseZ: z.ZodObject<z.objectUtil.extendShape<{
27
27
  greeting_is_anonymous: boolean;
28
28
  greeting_text: string | null;
29
29
  }>, "many">;
30
- }, "strip", z.ZodTypeAny, {
30
+ }, "strict", z.ZodTypeAny, {
31
31
  main: {
32
32
  user_id: string | null;
33
33
  greeting_anonymous_sender_name: string | null;
@@ -1,8 +1,8 @@
1
1
  import { APIOutputZ } from "squarecommons";
2
2
  import { z } from "zod";
3
3
  const CreateGreetingV0ResponseZ = APIOutputZ.extend({
4
- data: z.object({
5
- main: z.array(z.object({
4
+ data: z.strictObject({
5
+ main: z.array(z.strictObject({
6
6
  greeting_anonymous_sender_name: z.string().nullable(),
7
7
  user_id: z.string().nullable(),
8
8
  greeting_id: z.number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarecommonblhelper",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "helper for common bl for my projects.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",