@vharapuendava/psst-tasks-sdk 1.1.2 → 1.2.0
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.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/paths.gen.d.ts +2 -1
- package/dist/paths.gen.js +1 -0
- package/dist/sdk.gen.d.ts +5 -1
- package/dist/sdk.gen.js +4 -0
- package/dist/types.gen.d.ts +30 -1
- package/dist/zodSchemas/zod.schemas.d.ts +63 -0
- package/dist/zodSchemas/zod.schemas.js +20 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createTask, deleteTaskById, getTaskById, listTasks, type Options, updateTaskById } from './sdk.gen.js';
|
|
2
|
-
export type { BaseTask, BasicDateTime, ClientOptions, CreateTaskData, CreateTaskResponse, CreateTaskResponses, DeleteTaskByIdData, DeleteTaskByIdResponse, DeleteTaskByIdResponses, GetTaskByIdData, GetTaskByIdResponse, GetTaskByIdResponses, ListTasksData, ListTasksResponse, ListTasksResponses, NewTask, Task, TaskStatus, TaskTitle, TaskType, UpdateTask, UpdateTaskByIdData, UpdateTaskByIdResponse, UpdateTaskByIdResponses } from './types.gen.js';
|
|
1
|
+
export { createTask, deleteTaskById, getTaskById, listTasks, type Options, slayTaskById, updateTaskById } from './sdk.gen.js';
|
|
2
|
+
export type { BaseTask, BasicDateTime, ClientOptions, CreateTaskData, CreateTaskResponse, CreateTaskResponses, DeleteTaskByIdData, DeleteTaskByIdResponse, DeleteTaskByIdResponses, GetTaskByIdData, GetTaskByIdResponse, GetTaskByIdResponses, ListTasksData, ListTasksResponse, ListTasksResponses, NewTask, SlayTaskByIdData, SlayTaskByIdResponse, SlayTaskByIdResponses, Task, TaskStatus, TaskTitle, TaskType, UpdateTask, UpdateTaskByIdData, UpdateTaskByIdResponse, UpdateTaskByIdResponses } from './types.gen.js';
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export { createTask, deleteTaskById, getTaskById, listTasks, updateTaskById } from './sdk.gen.js';
|
|
2
|
+
export { createTask, deleteTaskById, getTaskById, listTasks, slayTaskById, updateTaskById } from './sdk.gen.js';
|
package/dist/paths.gen.d.ts
CHANGED
package/dist/paths.gen.js
CHANGED
package/dist/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client/index.js';
|
|
2
|
-
import type { CreateTaskData, CreateTaskResponses, DeleteTaskByIdData, DeleteTaskByIdResponses, GetTaskByIdData, GetTaskByIdResponses, ListTasksData, ListTasksResponses, UpdateTaskByIdData, UpdateTaskByIdResponses } from './types.gen.js';
|
|
2
|
+
import type { CreateTaskData, CreateTaskResponses, DeleteTaskByIdData, DeleteTaskByIdResponses, GetTaskByIdData, GetTaskByIdResponses, ListTasksData, ListTasksResponses, SlayTaskByIdData, SlayTaskByIdResponses, UpdateTaskByIdData, UpdateTaskByIdResponses } from './types.gen.js';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -33,3 +33,7 @@ export declare const getTaskById: <ThrowOnError extends boolean = false>(options
|
|
|
33
33
|
* Update a task by id
|
|
34
34
|
*/
|
|
35
35
|
export declare const updateTaskById: <ThrowOnError extends boolean = false>(options: Options<UpdateTaskByIdData, ThrowOnError>) => import("./client/types.gen.js").RequestResult<UpdateTaskByIdResponses, unknown, ThrowOnError, "fields">;
|
|
36
|
+
/**
|
|
37
|
+
* Slay a task by id
|
|
38
|
+
*/
|
|
39
|
+
export declare const slayTaskById: <ThrowOnError extends boolean = false>(options: Options<SlayTaskByIdData, ThrowOnError>) => import("./client/types.gen.js").RequestResult<SlayTaskByIdResponses, unknown, ThrowOnError, "fields">;
|
package/dist/sdk.gen.js
CHANGED
|
@@ -34,3 +34,7 @@ export const updateTaskById = (options) => (options.client ?? client).patch({
|
|
|
34
34
|
...options.headers
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
+
/**
|
|
38
|
+
* Slay a task by id
|
|
39
|
+
*/
|
|
40
|
+
export const slayTaskById = (options) => (options.client ?? client).post({ url: '/v1/task/{taskId}/slay', ...options });
|
package/dist/types.gen.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type ClientOptions = {
|
|
2
2
|
baseUrl: 'https://api.example.com/v1' | 'https://m51crfeyal.execute-api.eu-central-1.amazonaws.com/dev' | (string & {});
|
|
3
3
|
};
|
|
4
|
-
export type TaskType = 'one-time' | 'recurring';
|
|
4
|
+
export type TaskType = 'one-time' | 'recurring' | 'resurrecting';
|
|
5
5
|
export type TaskStatus = 'pending' | 'completed';
|
|
6
6
|
export type TaskTitle = string;
|
|
7
7
|
export type BasicDateTime = string;
|
|
@@ -9,6 +9,17 @@ export type BaseTask = {
|
|
|
9
9
|
title: TaskTitle;
|
|
10
10
|
taskType: TaskType;
|
|
11
11
|
dueDate?: BasicDateTime;
|
|
12
|
+
/**
|
|
13
|
+
* The number of seconds after which a 'resurrecting' task should reappear once it has been marked as completed.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
resurrectionDelay?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The number of seconds before the resurrection time when the task should become visible again in the task list.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
resurrectionVisibilityAdvance?: number;
|
|
22
|
+
lastSlain?: BasicDateTime;
|
|
12
23
|
};
|
|
13
24
|
export type NewTask = BaseTask;
|
|
14
25
|
export type UpdateTask = {
|
|
@@ -98,3 +109,21 @@ export type UpdateTaskByIdResponses = {
|
|
|
98
109
|
200: Task;
|
|
99
110
|
};
|
|
100
111
|
export type UpdateTaskByIdResponse = UpdateTaskByIdResponses[keyof UpdateTaskByIdResponses];
|
|
112
|
+
export type SlayTaskByIdData = {
|
|
113
|
+
body?: never;
|
|
114
|
+
path: {
|
|
115
|
+
/**
|
|
116
|
+
* The ID (uuid) of the task to slay
|
|
117
|
+
*/
|
|
118
|
+
taskId: string;
|
|
119
|
+
};
|
|
120
|
+
query?: never;
|
|
121
|
+
url: '/v1/task/{taskId}/slay';
|
|
122
|
+
};
|
|
123
|
+
export type SlayTaskByIdResponses = {
|
|
124
|
+
/**
|
|
125
|
+
* Task slain
|
|
126
|
+
*/
|
|
127
|
+
200: Task;
|
|
128
|
+
};
|
|
129
|
+
export type SlayTaskByIdResponse = SlayTaskByIdResponses[keyof SlayTaskByIdResponses];
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const zTaskType: z.ZodEnum<{
|
|
3
3
|
"one-time": "one-time";
|
|
4
4
|
recurring: "recurring";
|
|
5
|
+
resurrecting: "resurrecting";
|
|
5
6
|
}>;
|
|
6
7
|
export declare const zTaskStatus: z.ZodEnum<{
|
|
7
8
|
pending: "pending";
|
|
@@ -14,22 +15,31 @@ export declare const zBaseTask: z.ZodObject<{
|
|
|
14
15
|
taskType: z.ZodEnum<{
|
|
15
16
|
"one-time": "one-time";
|
|
16
17
|
recurring: "recurring";
|
|
18
|
+
resurrecting: "resurrecting";
|
|
17
19
|
}>;
|
|
18
20
|
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
21
|
+
resurrectionDelay: z.ZodOptional<z.ZodInt>;
|
|
22
|
+
resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
|
|
23
|
+
lastSlain: z.ZodOptional<z.ZodISODateTime>;
|
|
19
24
|
}, z.core.$strip>;
|
|
20
25
|
export declare const zNewTask: z.ZodObject<{
|
|
21
26
|
title: z.ZodString;
|
|
22
27
|
taskType: z.ZodEnum<{
|
|
23
28
|
"one-time": "one-time";
|
|
24
29
|
recurring: "recurring";
|
|
30
|
+
resurrecting: "resurrecting";
|
|
25
31
|
}>;
|
|
26
32
|
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
33
|
+
resurrectionDelay: z.ZodOptional<z.ZodInt>;
|
|
34
|
+
resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
|
|
35
|
+
lastSlain: z.ZodOptional<z.ZodISODateTime>;
|
|
27
36
|
}, z.core.$strip>;
|
|
28
37
|
export declare const zUpdateTask: z.ZodObject<{
|
|
29
38
|
title: z.ZodOptional<z.ZodString>;
|
|
30
39
|
taskType: z.ZodOptional<z.ZodEnum<{
|
|
31
40
|
"one-time": "one-time";
|
|
32
41
|
recurring: "recurring";
|
|
42
|
+
resurrecting: "resurrecting";
|
|
33
43
|
}>>;
|
|
34
44
|
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
35
45
|
status: z.ZodOptional<z.ZodEnum<{
|
|
@@ -42,8 +52,12 @@ export declare const zTask: z.ZodIntersection<z.ZodObject<{
|
|
|
42
52
|
taskType: z.ZodEnum<{
|
|
43
53
|
"one-time": "one-time";
|
|
44
54
|
recurring: "recurring";
|
|
55
|
+
resurrecting: "resurrecting";
|
|
45
56
|
}>;
|
|
46
57
|
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
58
|
+
resurrectionDelay: z.ZodOptional<z.ZodInt>;
|
|
59
|
+
resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
|
|
60
|
+
lastSlain: z.ZodOptional<z.ZodISODateTime>;
|
|
47
61
|
}, z.core.$strip>, z.ZodObject<{
|
|
48
62
|
taskId: z.ZodString;
|
|
49
63
|
status: z.ZodEnum<{
|
|
@@ -64,8 +78,12 @@ export declare const zListTasksResponse: z.ZodArray<z.ZodIntersection<z.ZodObjec
|
|
|
64
78
|
taskType: z.ZodEnum<{
|
|
65
79
|
"one-time": "one-time";
|
|
66
80
|
recurring: "recurring";
|
|
81
|
+
resurrecting: "resurrecting";
|
|
67
82
|
}>;
|
|
68
83
|
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
84
|
+
resurrectionDelay: z.ZodOptional<z.ZodInt>;
|
|
85
|
+
resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
|
|
86
|
+
lastSlain: z.ZodOptional<z.ZodISODateTime>;
|
|
69
87
|
}, z.core.$strip>, z.ZodObject<{
|
|
70
88
|
taskId: z.ZodString;
|
|
71
89
|
status: z.ZodEnum<{
|
|
@@ -79,8 +97,12 @@ export declare const zCreateTaskData: z.ZodObject<{
|
|
|
79
97
|
taskType: z.ZodEnum<{
|
|
80
98
|
"one-time": "one-time";
|
|
81
99
|
recurring: "recurring";
|
|
100
|
+
resurrecting: "resurrecting";
|
|
82
101
|
}>;
|
|
83
102
|
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
103
|
+
resurrectionDelay: z.ZodOptional<z.ZodInt>;
|
|
104
|
+
resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
|
|
105
|
+
lastSlain: z.ZodOptional<z.ZodISODateTime>;
|
|
84
106
|
}, z.core.$strip>;
|
|
85
107
|
path: z.ZodOptional<z.ZodNever>;
|
|
86
108
|
query: z.ZodOptional<z.ZodNever>;
|
|
@@ -93,8 +115,12 @@ export declare const zCreateTaskResponse: z.ZodIntersection<z.ZodObject<{
|
|
|
93
115
|
taskType: z.ZodEnum<{
|
|
94
116
|
"one-time": "one-time";
|
|
95
117
|
recurring: "recurring";
|
|
118
|
+
resurrecting: "resurrecting";
|
|
96
119
|
}>;
|
|
97
120
|
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
121
|
+
resurrectionDelay: z.ZodOptional<z.ZodInt>;
|
|
122
|
+
resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
|
|
123
|
+
lastSlain: z.ZodOptional<z.ZodISODateTime>;
|
|
98
124
|
}, z.core.$strip>, z.ZodObject<{
|
|
99
125
|
taskId: z.ZodString;
|
|
100
126
|
status: z.ZodEnum<{
|
|
@@ -128,8 +154,12 @@ export declare const zGetTaskByIdResponse: z.ZodIntersection<z.ZodObject<{
|
|
|
128
154
|
taskType: z.ZodEnum<{
|
|
129
155
|
"one-time": "one-time";
|
|
130
156
|
recurring: "recurring";
|
|
157
|
+
resurrecting: "resurrecting";
|
|
131
158
|
}>;
|
|
132
159
|
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
160
|
+
resurrectionDelay: z.ZodOptional<z.ZodInt>;
|
|
161
|
+
resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
|
|
162
|
+
lastSlain: z.ZodOptional<z.ZodISODateTime>;
|
|
133
163
|
}, z.core.$strip>, z.ZodObject<{
|
|
134
164
|
taskId: z.ZodString;
|
|
135
165
|
status: z.ZodEnum<{
|
|
@@ -143,6 +173,7 @@ export declare const zUpdateTaskByIdData: z.ZodObject<{
|
|
|
143
173
|
taskType: z.ZodOptional<z.ZodEnum<{
|
|
144
174
|
"one-time": "one-time";
|
|
145
175
|
recurring: "recurring";
|
|
176
|
+
resurrecting: "resurrecting";
|
|
146
177
|
}>>;
|
|
147
178
|
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
148
179
|
status: z.ZodOptional<z.ZodEnum<{
|
|
@@ -163,8 +194,40 @@ export declare const zUpdateTaskByIdResponse: z.ZodIntersection<z.ZodObject<{
|
|
|
163
194
|
taskType: z.ZodEnum<{
|
|
164
195
|
"one-time": "one-time";
|
|
165
196
|
recurring: "recurring";
|
|
197
|
+
resurrecting: "resurrecting";
|
|
166
198
|
}>;
|
|
167
199
|
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
200
|
+
resurrectionDelay: z.ZodOptional<z.ZodInt>;
|
|
201
|
+
resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
|
|
202
|
+
lastSlain: z.ZodOptional<z.ZodISODateTime>;
|
|
203
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
204
|
+
taskId: z.ZodString;
|
|
205
|
+
status: z.ZodEnum<{
|
|
206
|
+
pending: "pending";
|
|
207
|
+
completed: "completed";
|
|
208
|
+
}>;
|
|
209
|
+
}, z.core.$strip>>;
|
|
210
|
+
export declare const zSlayTaskByIdData: z.ZodObject<{
|
|
211
|
+
body: z.ZodOptional<z.ZodNever>;
|
|
212
|
+
path: z.ZodObject<{
|
|
213
|
+
taskId: z.ZodString;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
query: z.ZodOptional<z.ZodNever>;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
/**
|
|
218
|
+
* Task slain
|
|
219
|
+
*/
|
|
220
|
+
export declare const zSlayTaskByIdResponse: z.ZodIntersection<z.ZodObject<{
|
|
221
|
+
title: z.ZodString;
|
|
222
|
+
taskType: z.ZodEnum<{
|
|
223
|
+
"one-time": "one-time";
|
|
224
|
+
recurring: "recurring";
|
|
225
|
+
resurrecting: "resurrecting";
|
|
226
|
+
}>;
|
|
227
|
+
dueDate: z.ZodOptional<z.ZodISODateTime>;
|
|
228
|
+
resurrectionDelay: z.ZodOptional<z.ZodInt>;
|
|
229
|
+
resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
|
|
230
|
+
lastSlain: z.ZodOptional<z.ZodISODateTime>;
|
|
168
231
|
}, z.core.$strip>, z.ZodObject<{
|
|
169
232
|
taskId: z.ZodString;
|
|
170
233
|
status: z.ZodEnum<{
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
export const zTaskType = z.enum([
|
|
3
|
+
export const zTaskType = z.enum([
|
|
4
|
+
'one-time',
|
|
5
|
+
'recurring',
|
|
6
|
+
'resurrecting'
|
|
7
|
+
]);
|
|
4
8
|
export const zTaskStatus = z.enum(['pending', 'completed']);
|
|
5
9
|
export const zTaskTitle = z.string().min(3).max(64);
|
|
6
10
|
export const zBasicDateTime = z.iso.datetime();
|
|
7
11
|
export const zBaseTask = z.object({
|
|
8
12
|
title: zTaskTitle,
|
|
9
13
|
taskType: zTaskType,
|
|
10
|
-
dueDate: z.optional(zBasicDateTime)
|
|
14
|
+
dueDate: z.optional(zBasicDateTime),
|
|
15
|
+
resurrectionDelay: z.optional(z.int()),
|
|
16
|
+
resurrectionVisibilityAdvance: z.optional(z.int()),
|
|
17
|
+
lastSlain: z.optional(zBasicDateTime)
|
|
11
18
|
});
|
|
12
19
|
export const zNewTask = zBaseTask;
|
|
13
20
|
export const zUpdateTask = z.object({
|
|
@@ -71,3 +78,14 @@ export const zUpdateTaskByIdData = z.object({
|
|
|
71
78
|
* Task updated
|
|
72
79
|
*/
|
|
73
80
|
export const zUpdateTaskByIdResponse = zTask;
|
|
81
|
+
export const zSlayTaskByIdData = z.object({
|
|
82
|
+
body: z.optional(z.never()),
|
|
83
|
+
path: z.object({
|
|
84
|
+
taskId: z.string()
|
|
85
|
+
}),
|
|
86
|
+
query: z.optional(z.never())
|
|
87
|
+
});
|
|
88
|
+
/**
|
|
89
|
+
* Task slain
|
|
90
|
+
*/
|
|
91
|
+
export const zSlayTaskByIdResponse = zTask;
|