@vharapuendava/psst-tasks-sdk 1.1.1 → 1.1.3

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.
@@ -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 = {
@@ -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,48 +15,61 @@ 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>;
19
- }, z.core.$strict>;
21
+ resurrectionDelay: z.ZodOptional<z.ZodInt>;
22
+ resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
23
+ lastSlain: z.ZodOptional<z.ZodISODateTime>;
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>;
27
- }, z.core.$strict>;
33
+ resurrectionDelay: z.ZodOptional<z.ZodInt>;
34
+ resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
35
+ lastSlain: z.ZodOptional<z.ZodISODateTime>;
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<{
36
46
  pending: "pending";
37
47
  completed: "completed";
38
48
  }>>;
39
- }, z.core.$strict>;
49
+ }, z.core.$strip>;
40
50
  export declare const zTask: z.ZodIntersection<z.ZodObject<{
41
51
  title: z.ZodString;
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>;
47
- }, z.core.$strict>, z.ZodObject<{
58
+ resurrectionDelay: z.ZodOptional<z.ZodInt>;
59
+ resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
60
+ lastSlain: z.ZodOptional<z.ZodISODateTime>;
61
+ }, z.core.$strip>, z.ZodObject<{
48
62
  taskId: z.ZodString;
49
63
  status: z.ZodEnum<{
50
64
  pending: "pending";
51
65
  completed: "completed";
52
66
  }>;
53
- }, z.core.$strict>>;
67
+ }, z.core.$strip>>;
54
68
  export declare const zListTasksData: z.ZodObject<{
55
69
  body: z.ZodOptional<z.ZodNever>;
56
70
  path: z.ZodOptional<z.ZodNever>;
57
71
  query: z.ZodOptional<z.ZodNever>;
58
- }, z.core.$strict>;
72
+ }, z.core.$strip>;
59
73
  /**
60
74
  * Successful response
61
75
  */
@@ -64,27 +78,35 @@ 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>;
69
- }, z.core.$strict>, z.ZodObject<{
84
+ resurrectionDelay: z.ZodOptional<z.ZodInt>;
85
+ resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
86
+ lastSlain: z.ZodOptional<z.ZodISODateTime>;
87
+ }, z.core.$strip>, z.ZodObject<{
70
88
  taskId: z.ZodString;
71
89
  status: z.ZodEnum<{
72
90
  pending: "pending";
73
91
  completed: "completed";
74
92
  }>;
75
- }, z.core.$strict>>>;
93
+ }, z.core.$strip>>>;
76
94
  export declare const zCreateTaskData: z.ZodObject<{
77
95
  body: z.ZodObject<{
78
96
  title: z.ZodString;
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>;
84
- }, z.core.$strict>;
103
+ resurrectionDelay: z.ZodOptional<z.ZodInt>;
104
+ resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
105
+ lastSlain: z.ZodOptional<z.ZodISODateTime>;
106
+ }, z.core.$strip>;
85
107
  path: z.ZodOptional<z.ZodNever>;
86
108
  query: z.ZodOptional<z.ZodNever>;
87
- }, z.core.$strict>;
109
+ }, z.core.$strip>;
88
110
  /**
89
111
  * Task created
90
112
  */
@@ -93,22 +115,26 @@ 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>;
98
- }, z.core.$strict>, z.ZodObject<{
121
+ resurrectionDelay: z.ZodOptional<z.ZodInt>;
122
+ resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
123
+ lastSlain: z.ZodOptional<z.ZodISODateTime>;
124
+ }, z.core.$strip>, z.ZodObject<{
99
125
  taskId: z.ZodString;
100
126
  status: z.ZodEnum<{
101
127
  pending: "pending";
102
128
  completed: "completed";
103
129
  }>;
104
- }, z.core.$strict>>;
130
+ }, z.core.$strip>>;
105
131
  export declare const zDeleteTaskByIdData: z.ZodObject<{
106
132
  body: z.ZodOptional<z.ZodNever>;
107
133
  path: z.ZodObject<{
108
134
  taskId: z.ZodString;
109
- }, z.core.$strict>;
135
+ }, z.core.$strip>;
110
136
  query: z.ZodOptional<z.ZodNever>;
111
- }, z.core.$strict>;
137
+ }, z.core.$strip>;
112
138
  /**
113
139
  * Task deleted successfully
114
140
  */
@@ -117,9 +143,9 @@ export declare const zGetTaskByIdData: z.ZodObject<{
117
143
  body: z.ZodOptional<z.ZodNever>;
118
144
  path: z.ZodObject<{
119
145
  taskId: z.ZodString;
120
- }, z.core.$strict>;
146
+ }, z.core.$strip>;
121
147
  query: z.ZodOptional<z.ZodNever>;
122
- }, z.core.$strict>;
148
+ }, z.core.$strip>;
123
149
  /**
124
150
  * Successful response
125
151
  */
@@ -128,33 +154,38 @@ 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>;
133
- }, z.core.$strict>, z.ZodObject<{
160
+ resurrectionDelay: z.ZodOptional<z.ZodInt>;
161
+ resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
162
+ lastSlain: z.ZodOptional<z.ZodISODateTime>;
163
+ }, z.core.$strip>, z.ZodObject<{
134
164
  taskId: z.ZodString;
135
165
  status: z.ZodEnum<{
136
166
  pending: "pending";
137
167
  completed: "completed";
138
168
  }>;
139
- }, z.core.$strict>>;
169
+ }, z.core.$strip>>;
140
170
  export declare const zUpdateTaskByIdData: z.ZodObject<{
141
171
  body: z.ZodObject<{
142
172
  title: z.ZodOptional<z.ZodString>;
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<{
149
180
  pending: "pending";
150
181
  completed: "completed";
151
182
  }>>;
152
- }, z.core.$strict>;
183
+ }, z.core.$strip>;
153
184
  path: z.ZodObject<{
154
185
  taskId: z.ZodString;
155
- }, z.core.$strict>;
186
+ }, z.core.$strip>;
156
187
  query: z.ZodOptional<z.ZodNever>;
157
- }, z.core.$strict>;
188
+ }, z.core.$strip>;
158
189
  /**
159
190
  * Task updated
160
191
  */
@@ -163,12 +194,16 @@ 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>;
168
- }, z.core.$strict>, z.ZodObject<{
200
+ resurrectionDelay: z.ZodOptional<z.ZodInt>;
201
+ resurrectionVisibilityAdvance: z.ZodOptional<z.ZodInt>;
202
+ lastSlain: z.ZodOptional<z.ZodISODateTime>;
203
+ }, z.core.$strip>, z.ZodObject<{
169
204
  taskId: z.ZodString;
170
205
  status: z.ZodEnum<{
171
206
  pending: "pending";
172
207
  completed: "completed";
173
208
  }>;
174
- }, z.core.$strict>>;
209
+ }, z.core.$strip>>;
@@ -1,30 +1,37 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
  import { z } from 'zod';
3
- export const zTaskType = z.enum(['one-time', 'recurring']);
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)
11
- }).strict();
14
+ dueDate: z.optional(zBasicDateTime),
15
+ resurrectionDelay: z.optional(z.int()),
16
+ resurrectionVisibilityAdvance: z.optional(z.int()),
17
+ lastSlain: z.optional(zBasicDateTime)
18
+ });
12
19
  export const zNewTask = zBaseTask;
13
20
  export const zUpdateTask = z.object({
14
21
  title: z.optional(zTaskTitle),
15
22
  taskType: z.optional(zTaskType),
16
23
  dueDate: z.optional(zBasicDateTime),
17
24
  status: z.optional(zTaskStatus)
18
- }).strict();
25
+ });
19
26
  export const zTask = zBaseTask.and(z.object({
20
27
  taskId: z.string(),
21
28
  status: zTaskStatus
22
- }).strict());
29
+ }));
23
30
  export const zListTasksData = z.object({
24
31
  body: z.optional(z.never()),
25
32
  path: z.optional(z.never()),
26
33
  query: z.optional(z.never())
27
- }).strict();
34
+ });
28
35
  /**
29
36
  * Successful response
30
37
  */
@@ -33,7 +40,7 @@ export const zCreateTaskData = z.object({
33
40
  body: zNewTask,
34
41
  path: z.optional(z.never()),
35
42
  query: z.optional(z.never())
36
- }).strict();
43
+ });
37
44
  /**
38
45
  * Task created
39
46
  */
@@ -42,9 +49,9 @@ export const zDeleteTaskByIdData = z.object({
42
49
  body: z.optional(z.never()),
43
50
  path: z.object({
44
51
  taskId: z.string()
45
- }).strict(),
52
+ }),
46
53
  query: z.optional(z.never())
47
- }).strict();
54
+ });
48
55
  /**
49
56
  * Task deleted successfully
50
57
  */
@@ -53,9 +60,9 @@ export const zGetTaskByIdData = z.object({
53
60
  body: z.optional(z.never()),
54
61
  path: z.object({
55
62
  taskId: z.string()
56
- }).strict(),
63
+ }),
57
64
  query: z.optional(z.never())
58
- }).strict();
65
+ });
59
66
  /**
60
67
  * Successful response
61
68
  */
@@ -64,9 +71,9 @@ export const zUpdateTaskByIdData = z.object({
64
71
  body: zUpdateTask,
65
72
  path: z.object({
66
73
  taskId: z.string()
67
- }).strict(),
74
+ }),
68
75
  query: z.optional(z.never())
69
- }).strict();
76
+ });
70
77
  /**
71
78
  * Task updated
72
79
  */
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "zod": "^4.3.6"
7
7
  },
8
8
  "name": "@vharapuendava/psst-tasks-sdk",
9
- "version": "1.1.1",
9
+ "version": "1.1.3",
10
10
  "files": [
11
11
  "dist/**"
12
12
  ],