@vulog/aima-ticket 1.2.37 → 1.2.39
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/dist/index.cjs +2 -2
- package/dist/index.d.cts +14 -2
- package/dist/index.d.mts +14 -2
- package/dist/index.mjs +2 -2
- package/package.json +4 -4
- package/src/getTickets.ts +2 -2
- package/tsconfig.json +1 -8
- package/vitest.config.ts +1 -8
package/dist/index.cjs
CHANGED
|
@@ -21,9 +21,9 @@ zod.z.enum([
|
|
|
21
21
|
const schema = (0, _vulog_aima_core.createPaginableOptionsSchema)(zod.z.object({
|
|
22
22
|
status: zod.z.array(StatusList).default([]),
|
|
23
23
|
categoryId: zod.z.array(zod.z.number()).default([])
|
|
24
|
-
}).default({}))
|
|
24
|
+
}).default({}));
|
|
25
25
|
const getTickets = async (client, options) => {
|
|
26
|
-
const result = schema.safeParse(options);
|
|
26
|
+
const result = schema.safeParse(options ?? {});
|
|
27
27
|
if (!result.success) throw new TypeError("Invalid options", { cause: result.error.issues });
|
|
28
28
|
const finalOptions = result.data;
|
|
29
29
|
const searchParams = new URLSearchParams();
|
package/dist/index.d.cts
CHANGED
|
@@ -3,8 +3,20 @@ import { PaginableOptions, PaginableResponse } from "@vulog/aima-core";
|
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/types.d.ts
|
|
6
|
-
declare const StatusList: z.ZodEnum<
|
|
7
|
-
|
|
6
|
+
declare const StatusList: z.ZodEnum<{
|
|
7
|
+
PENDING: "PENDING";
|
|
8
|
+
CLOSED: "CLOSED";
|
|
9
|
+
RESOLVED: "RESOLVED";
|
|
10
|
+
ONGOING: "ONGOING";
|
|
11
|
+
REJECTED: "REJECTED";
|
|
12
|
+
NEW: "NEW";
|
|
13
|
+
}>;
|
|
14
|
+
declare const PriorityList: z.ZodEnum<{
|
|
15
|
+
CRITICAL: "CRITICAL";
|
|
16
|
+
HIGH: "HIGH";
|
|
17
|
+
MEDIUM: "MEDIUM";
|
|
18
|
+
LOW: "LOW";
|
|
19
|
+
}>;
|
|
8
20
|
type UserGroup = {
|
|
9
21
|
id: number;
|
|
10
22
|
name: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -3,8 +3,20 @@ import { z } from "zod";
|
|
|
3
3
|
import { Client } from "@vulog/aima-client";
|
|
4
4
|
|
|
5
5
|
//#region src/types.d.ts
|
|
6
|
-
declare const StatusList: z.ZodEnum<
|
|
7
|
-
|
|
6
|
+
declare const StatusList: z.ZodEnum<{
|
|
7
|
+
PENDING: "PENDING";
|
|
8
|
+
CLOSED: "CLOSED";
|
|
9
|
+
RESOLVED: "RESOLVED";
|
|
10
|
+
ONGOING: "ONGOING";
|
|
11
|
+
REJECTED: "REJECTED";
|
|
12
|
+
NEW: "NEW";
|
|
13
|
+
}>;
|
|
14
|
+
declare const PriorityList: z.ZodEnum<{
|
|
15
|
+
CRITICAL: "CRITICAL";
|
|
16
|
+
HIGH: "HIGH";
|
|
17
|
+
MEDIUM: "MEDIUM";
|
|
18
|
+
LOW: "LOW";
|
|
19
|
+
}>;
|
|
8
20
|
type UserGroup = {
|
|
9
21
|
id: number;
|
|
10
22
|
name: string;
|
package/dist/index.mjs
CHANGED
|
@@ -20,9 +20,9 @@ z.enum([
|
|
|
20
20
|
const schema = createPaginableOptionsSchema(z.object({
|
|
21
21
|
status: z.array(StatusList).default([]),
|
|
22
22
|
categoryId: z.array(z.number()).default([])
|
|
23
|
-
}).default({}))
|
|
23
|
+
}).default({}));
|
|
24
24
|
const getTickets = async (client, options) => {
|
|
25
|
-
const result = schema.safeParse(options);
|
|
25
|
+
const result = schema.safeParse(options ?? {});
|
|
26
26
|
if (!result.success) throw new TypeError("Invalid options", { cause: result.error.issues });
|
|
27
27
|
const finalOptions = result.data;
|
|
28
28
|
const searchParams = new URLSearchParams();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vulog/aima-ticket",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.39",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.cts",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"author": "Vulog",
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vulog/aima-client": "1.2.
|
|
36
|
-
"@vulog/aima-core": "1.2.
|
|
35
|
+
"@vulog/aima-client": "1.2.39",
|
|
36
|
+
"@vulog/aima-core": "1.2.39"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"zod": "^3.
|
|
39
|
+
"zod": "^4.3.6"
|
|
40
40
|
},
|
|
41
41
|
"description": ""
|
|
42
42
|
}
|
package/src/getTickets.ts
CHANGED
|
@@ -11,7 +11,7 @@ const schema = createPaginableOptionsSchema(
|
|
|
11
11
|
categoryId: z.array(z.number()).default([]),
|
|
12
12
|
})
|
|
13
13
|
.default({})
|
|
14
|
-
)
|
|
14
|
+
);
|
|
15
15
|
|
|
16
16
|
export type TicketFilters = {
|
|
17
17
|
status?: Status[];
|
|
@@ -22,7 +22,7 @@ export const getTickets = async (
|
|
|
22
22
|
client: Client,
|
|
23
23
|
options?: PaginableOptions<TicketFilters>
|
|
24
24
|
): Promise<PaginableResponse<Ticket>> => {
|
|
25
|
-
const result = schema.safeParse(options);
|
|
25
|
+
const result = schema.safeParse(options ?? {});
|
|
26
26
|
if (!result.success) {
|
|
27
27
|
throw new TypeError('Invalid options', {
|
|
28
28
|
cause: result.error.issues,
|
package/tsconfig.json
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../../tsconfig.base.json",
|
|
2
3
|
"include": ["src"],
|
|
3
4
|
"exclude": ["**/*.test.ts"],
|
|
4
5
|
"compilerOptions": {
|
|
5
|
-
"module": "esnext",
|
|
6
|
-
"target": "esnext",
|
|
7
|
-
"lib": ["esnext"],
|
|
8
|
-
"declaration": true,
|
|
9
|
-
"strict": true,
|
|
10
|
-
"moduleResolution": "node",
|
|
11
|
-
"skipLibCheck": true,
|
|
12
|
-
"esModuleInterop": true,
|
|
13
6
|
"outDir": "dist",
|
|
14
7
|
"rootDir": "src"
|
|
15
8
|
}
|