@lucaapp/service-utils 5.44.0 → 6.0.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.
@@ -1,4 +1,4 @@
1
- import { ZodEffects, ZodObject, z } from 'zod';
1
+ import { ZodObject, ZodPipe, z } from 'zod';
2
2
  export type ArrayToUnion<T> = T[keyof T];
3
3
  export type ExtractZodOutput<T> = T extends {
4
4
  status: infer Z;
@@ -7,7 +7,7 @@ export type ExtractZodOutput<T> = T extends {
7
7
  status: Z;
8
8
  body: V;
9
9
  } : never;
10
- export type ZodObjectSchemaOrUndefined = ZodObject<any, any, any> | ZodEffects<ZodObject<any, any, any>> | undefined;
10
+ export type ZodObjectSchemaOrUndefined = ZodObject<any, any> | ZodPipe<ZodObject<any, any>, any> | undefined;
11
11
  export type ZodSchemaOuput<T> = T extends z.ZodSchema<any> ? z.infer<T> : undefined;
12
12
  export type ExtractZodOutputFromMiddleware<T> = T extends {
13
13
  options: {
@@ -5,28 +5,18 @@ import { z } from 'zod';
5
5
  export declare const parametersSchema: z.ZodObject<{
6
6
  job: z.ZodString;
7
7
  method: z.ZodString;
8
- }, "strip", z.ZodTypeAny, {
9
- job: string;
10
- method: string;
11
- }, {
12
- job: string;
13
- method: string;
14
- }>;
8
+ }, z.core.$strip>;
15
9
  /**
16
10
  * Schema for job ID parameters
17
11
  */
18
12
  export declare const jobIdParametersSchema: z.ZodObject<{
19
13
  jobId: z.ZodString;
20
- }, "strip", z.ZodTypeAny, {
21
- jobId: string;
22
- }, {
23
- jobId: string;
24
- }>;
14
+ }, z.core.$strip>;
25
15
  /**
26
16
  * Schema for JSON request/response bodies
27
17
  * Allows any object structure to pass through
28
18
  */
29
- export declare const jsonSchema: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
19
+ export declare const jsonSchema: z.ZodObject<{}, z.core.$loose>;
30
20
  export type JsonSchema = z.infer<typeof jsonSchema>;
31
21
  /**
32
22
  * Schema for running job information
@@ -35,223 +25,77 @@ export declare const runningJobSchema: z.ZodObject<{
35
25
  jobId: z.ZodString;
36
26
  jobName: z.ZodString;
37
27
  method: z.ZodString;
38
- status: z.ZodEnum<["running", "completed", "failed"]>;
28
+ status: z.ZodEnum<{
29
+ completed: "completed";
30
+ failed: "failed";
31
+ running: "running";
32
+ }>;
39
33
  startedAt: z.ZodString;
40
34
  completedAt: z.ZodOptional<z.ZodString>;
41
35
  duration: z.ZodOptional<z.ZodNumber>;
42
36
  error: z.ZodOptional<z.ZodString>;
43
- }, "strip", z.ZodTypeAny, {
44
- jobId: string;
45
- jobName: string;
46
- method: string;
47
- status: "completed" | "failed" | "running";
48
- startedAt: string;
49
- completedAt?: string | undefined;
50
- duration?: number | undefined;
51
- error?: string | undefined;
52
- }, {
53
- jobId: string;
54
- jobName: string;
55
- method: string;
56
- status: "completed" | "failed" | "running";
57
- startedAt: string;
58
- completedAt?: string | undefined;
59
- duration?: number | undefined;
60
- error?: string | undefined;
61
- }>;
37
+ }, z.core.$strip>;
62
38
  /**
63
39
  * Schema for job completion information
64
40
  */
65
41
  export declare const jobCompletionSchema: z.ZodObject<{
66
42
  completedAt: z.ZodString;
67
- status: z.ZodEnum<["completed", "failed"]>;
43
+ status: z.ZodEnum<{
44
+ completed: "completed";
45
+ failed: "failed";
46
+ }>;
68
47
  error: z.ZodOptional<z.ZodString>;
69
- }, "strip", z.ZodTypeAny, {
70
- completedAt: string;
71
- status: "completed" | "failed";
72
- error?: string | undefined;
73
- }, {
74
- completedAt: string;
75
- status: "completed" | "failed";
76
- error?: string | undefined;
77
- }>;
48
+ }, z.core.$strip>;
78
49
  /**
79
50
  * Schema for job metadata (path and methods)
80
51
  */
81
52
  export declare const jobMetadataSchema: z.ZodObject<{
82
53
  path: z.ZodString;
83
- methods: z.ZodArray<z.ZodString, "many">;
54
+ methods: z.ZodArray<z.ZodString>;
84
55
  lastExecution: z.ZodOptional<z.ZodNullable<z.ZodObject<{
85
56
  startedAt: z.ZodString;
86
57
  completedAt: z.ZodString;
87
58
  duration: z.ZodNumber;
88
59
  error: z.ZodNullable<z.ZodString>;
89
- }, "strip", z.ZodTypeAny, {
90
- startedAt: string;
91
- completedAt: string;
92
- duration: number;
93
- error: string | null;
94
- }, {
95
- startedAt: string;
96
- completedAt: string;
97
- duration: number;
98
- error: string | null;
99
- }>>>;
100
- }, "strip", z.ZodTypeAny, {
101
- path: string;
102
- methods: string[];
103
- lastExecution?: {
104
- startedAt: string;
105
- completedAt: string;
106
- duration: number;
107
- error: string | null;
108
- } | null | undefined;
109
- }, {
110
- path: string;
111
- methods: string[];
112
- lastExecution?: {
113
- startedAt: string;
114
- completedAt: string;
115
- duration: number;
116
- error: string | null;
117
- } | null | undefined;
118
- }>;
60
+ }, z.core.$strip>>>;
61
+ }, z.core.$strip>;
119
62
  /**
120
63
  * Schema for the complete jobs response
121
64
  */
122
65
  export declare const jobsSchema: z.ZodObject<{
123
66
  jobs: z.ZodArray<z.ZodObject<{
124
67
  path: z.ZodString;
125
- methods: z.ZodArray<z.ZodString, "many">;
68
+ methods: z.ZodArray<z.ZodString>;
126
69
  lastExecution: z.ZodOptional<z.ZodNullable<z.ZodObject<{
127
70
  startedAt: z.ZodString;
128
71
  completedAt: z.ZodString;
129
72
  duration: z.ZodNumber;
130
73
  error: z.ZodNullable<z.ZodString>;
131
- }, "strip", z.ZodTypeAny, {
132
- startedAt: string;
133
- completedAt: string;
134
- duration: number;
135
- error: string | null;
136
- }, {
137
- startedAt: string;
138
- completedAt: string;
139
- duration: number;
140
- error: string | null;
141
- }>>>;
142
- }, "strip", z.ZodTypeAny, {
143
- path: string;
144
- methods: string[];
145
- lastExecution?: {
146
- startedAt: string;
147
- completedAt: string;
148
- duration: number;
149
- error: string | null;
150
- } | null | undefined;
151
- }, {
152
- path: string;
153
- methods: string[];
154
- lastExecution?: {
155
- startedAt: string;
156
- completedAt: string;
157
- duration: number;
158
- error: string | null;
159
- } | null | undefined;
160
- }>, "many">;
74
+ }, z.core.$strip>>>;
75
+ }, z.core.$strip>>;
161
76
  runningJobs: z.ZodArray<z.ZodObject<{
162
77
  jobId: z.ZodString;
163
78
  jobName: z.ZodString;
164
79
  method: z.ZodString;
165
- status: z.ZodEnum<["running", "completed", "failed"]>;
80
+ status: z.ZodEnum<{
81
+ completed: "completed";
82
+ failed: "failed";
83
+ running: "running";
84
+ }>;
166
85
  startedAt: z.ZodString;
167
86
  completedAt: z.ZodOptional<z.ZodString>;
168
87
  duration: z.ZodOptional<z.ZodNumber>;
169
88
  error: z.ZodOptional<z.ZodString>;
170
- }, "strip", z.ZodTypeAny, {
171
- jobId: string;
172
- jobName: string;
173
- method: string;
174
- status: "completed" | "failed" | "running";
175
- startedAt: string;
176
- completedAt?: string | undefined;
177
- duration?: number | undefined;
178
- error?: string | undefined;
179
- }, {
180
- jobId: string;
181
- jobName: string;
182
- method: string;
183
- status: "completed" | "failed" | "running";
184
- startedAt: string;
185
- completedAt?: string | undefined;
186
- duration?: number | undefined;
187
- error?: string | undefined;
188
- }>, "many">;
89
+ }, z.core.$strip>>;
189
90
  jobCompletions: z.ZodRecord<z.ZodString, z.ZodObject<{
190
91
  completedAt: z.ZodString;
191
- status: z.ZodEnum<["completed", "failed"]>;
92
+ status: z.ZodEnum<{
93
+ completed: "completed";
94
+ failed: "failed";
95
+ }>;
192
96
  error: z.ZodOptional<z.ZodString>;
193
- }, "strip", z.ZodTypeAny, {
194
- completedAt: string;
195
- status: "completed" | "failed";
196
- error?: string | undefined;
197
- }, {
198
- completedAt: string;
199
- status: "completed" | "failed";
200
- error?: string | undefined;
201
- }>>;
202
- }, "strip", z.ZodTypeAny, {
203
- jobs: {
204
- path: string;
205
- methods: string[];
206
- lastExecution?: {
207
- startedAt: string;
208
- completedAt: string;
209
- duration: number;
210
- error: string | null;
211
- } | null | undefined;
212
- }[];
213
- runningJobs: {
214
- jobId: string;
215
- jobName: string;
216
- method: string;
217
- status: "completed" | "failed" | "running";
218
- startedAt: string;
219
- completedAt?: string | undefined;
220
- duration?: number | undefined;
221
- error?: string | undefined;
222
- }[];
223
- jobCompletions: Record<string, {
224
- completedAt: string;
225
- status: "completed" | "failed";
226
- error?: string | undefined;
227
- }>;
228
- }, {
229
- jobs: {
230
- path: string;
231
- methods: string[];
232
- lastExecution?: {
233
- startedAt: string;
234
- completedAt: string;
235
- duration: number;
236
- error: string | null;
237
- } | null | undefined;
238
- }[];
239
- runningJobs: {
240
- jobId: string;
241
- jobName: string;
242
- method: string;
243
- status: "completed" | "failed" | "running";
244
- startedAt: string;
245
- completedAt?: string | undefined;
246
- duration?: number | undefined;
247
- error?: string | undefined;
248
- }[];
249
- jobCompletions: Record<string, {
250
- completedAt: string;
251
- status: "completed" | "failed";
252
- error?: string | undefined;
253
- }>;
254
- }>;
97
+ }, z.core.$strip>>;
98
+ }, z.core.$strip>;
255
99
  export type JobsSchema = z.infer<typeof jobsSchema>;
256
100
  export type RunningJobSchema = z.infer<typeof runningJobSchema>;
257
101
  export type JobCompletionSchema = z.infer<typeof jobCompletionSchema>;
@@ -63,5 +63,5 @@ exports.jobMetadataSchema = zod_1.z.object({
63
63
  exports.jobsSchema = zod_1.z.object({
64
64
  jobs: zod_1.z.array(exports.jobMetadataSchema),
65
65
  runningJobs: zod_1.z.array(exports.runningJobSchema),
66
- jobCompletions: zod_1.z.record(exports.jobCompletionSchema),
66
+ jobCompletions: zod_1.z.record(zod_1.z.string(), exports.jobCompletionSchema),
67
67
  });
@@ -1,129 +1,45 @@
1
1
  import { z } from 'zod';
2
2
  export declare const queueNameParamsSchema: z.ZodObject<{
3
3
  name: z.ZodString;
4
- }, "strip", z.ZodTypeAny, {
5
- name: string;
6
- }, {
7
- name: string;
8
- }>;
4
+ }, z.core.$strip>;
9
5
  export declare const queueJobParamsSchema: z.ZodObject<{
10
6
  queue: z.ZodString;
11
7
  id: z.ZodString;
12
- }, "strip", z.ZodTypeAny, {
13
- queue: string;
14
- id: string;
15
- }, {
16
- queue: string;
17
- id: string;
18
- }>;
8
+ }, z.core.$strip>;
19
9
  export declare const scheduleNameParamsSchema: z.ZodObject<{
20
10
  name: z.ZodString;
21
- }, "strip", z.ZodTypeAny, {
22
- name: string;
23
- }, {
24
- name: string;
25
- }>;
11
+ }, z.core.$strip>;
26
12
  export declare const warningsQuerySchema: z.ZodObject<{
27
- limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
28
- }, "strip", z.ZodTypeAny, {
29
- limit: number;
30
- }, {
31
- limit?: number | undefined;
32
- }>;
13
+ limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
14
+ }, z.core.$strip>;
33
15
  export declare const listJobsQuerySchema: z.ZodObject<{
34
- limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
- offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
36
- }, "strip", z.ZodTypeAny, {
37
- limit: number;
38
- offset: number;
39
- }, {
40
- limit?: number | undefined;
41
- offset?: number | undefined;
42
- }>;
16
+ limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
17
+ offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
18
+ }, z.core.$strip>;
43
19
  export declare const enqueueBodySchema: z.ZodObject<{
44
20
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
45
21
  options: z.ZodOptional<z.ZodObject<{
46
22
  priority: z.ZodOptional<z.ZodNumber>;
47
- startAfter: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodDate]>>;
23
+ startAfter: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodDate]>>;
48
24
  singletonKey: z.ZodOptional<z.ZodString>;
49
25
  singletonSeconds: z.ZodOptional<z.ZodNumber>;
50
- }, "strict", z.ZodTypeAny, {
51
- priority?: number | undefined;
52
- startAfter?: string | number | Date | undefined;
53
- singletonKey?: string | undefined;
54
- singletonSeconds?: number | undefined;
55
- }, {
56
- priority?: number | undefined;
57
- startAfter?: string | number | Date | undefined;
58
- singletonKey?: string | undefined;
59
- singletonSeconds?: number | undefined;
60
- }>>;
61
- }, "strip", z.ZodTypeAny, {
62
- data?: Record<string, unknown> | undefined;
63
- options?: {
64
- priority?: number | undefined;
65
- startAfter?: string | number | Date | undefined;
66
- singletonKey?: string | undefined;
67
- singletonSeconds?: number | undefined;
68
- } | undefined;
69
- }, {
70
- data?: Record<string, unknown> | undefined;
71
- options?: {
72
- priority?: number | undefined;
73
- startAfter?: string | number | Date | undefined;
74
- singletonKey?: string | undefined;
75
- singletonSeconds?: number | undefined;
76
- } | undefined;
77
- }>;
26
+ }, z.core.$strict>>;
27
+ }, z.core.$strip>;
78
28
  export declare const scheduleBodySchema: z.ZodObject<{
79
29
  name: z.ZodString;
80
30
  cron: z.ZodString;
81
31
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
82
32
  options: z.ZodOptional<z.ZodObject<{
83
33
  tz: z.ZodOptional<z.ZodString>;
84
- }, "strict", z.ZodTypeAny, {
85
- tz?: string | undefined;
86
- }, {
87
- tz?: string | undefined;
88
- }>>;
89
- }, "strip", z.ZodTypeAny, {
90
- name: string;
91
- cron: string;
92
- data?: Record<string, unknown> | undefined;
93
- options?: {
94
- tz?: string | undefined;
95
- } | undefined;
96
- }, {
97
- name: string;
98
- cron: string;
99
- data?: Record<string, unknown> | undefined;
100
- options?: {
101
- tz?: string | undefined;
102
- } | undefined;
103
- }>;
34
+ }, z.core.$strict>>;
35
+ }, z.core.$strip>;
104
36
  export declare const updateScheduleBodySchema: z.ZodObject<{
105
37
  cron: z.ZodString;
106
38
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
107
39
  options: z.ZodOptional<z.ZodObject<{
108
40
  tz: z.ZodOptional<z.ZodString>;
109
- }, "strict", z.ZodTypeAny, {
110
- tz?: string | undefined;
111
- }, {
112
- tz?: string | undefined;
113
- }>>;
114
- }, "strip", z.ZodTypeAny, {
115
- cron: string;
116
- data?: Record<string, unknown> | undefined;
117
- options?: {
118
- tz?: string | undefined;
119
- } | undefined;
120
- }, {
121
- cron: string;
122
- data?: Record<string, unknown> | undefined;
123
- options?: {
124
- tz?: string | undefined;
125
- } | undefined;
126
- }>;
41
+ }, z.core.$strict>>;
42
+ }, z.core.$strip>;
127
43
  export declare const queueStatsSchema: z.ZodObject<{
128
44
  name: z.ZodString;
129
45
  policy: z.ZodOptional<z.ZodString>;
@@ -135,29 +51,7 @@ export declare const queueStatsSchema: z.ZodObject<{
135
51
  queuedCount: z.ZodNumber;
136
52
  activeCount: z.ZodNumber;
137
53
  totalCount: z.ZodNumber;
138
- }, "strip", z.ZodTypeAny, {
139
- name: string;
140
- policy?: string | undefined;
141
- retryLimit?: number | undefined;
142
- retryDelay?: number | undefined;
143
- retryBackoff?: boolean | undefined;
144
- expireInSeconds?: number | undefined;
145
- deadLetter?: string | null | undefined;
146
- queuedCount: number;
147
- activeCount: number;
148
- totalCount: number;
149
- }, {
150
- name: string;
151
- policy?: string | undefined;
152
- retryLimit?: number | undefined;
153
- retryDelay?: number | undefined;
154
- retryBackoff?: boolean | undefined;
155
- expireInSeconds?: number | undefined;
156
- deadLetter?: string | null | undefined;
157
- queuedCount: number;
158
- activeCount: number;
159
- totalCount: number;
160
- }>;
54
+ }, z.core.$strip>;
161
55
  export declare const queueStatsArraySchema: z.ZodArray<z.ZodObject<{
162
56
  name: z.ZodString;
163
57
  policy: z.ZodOptional<z.ZodString>;
@@ -169,48 +63,16 @@ export declare const queueStatsArraySchema: z.ZodArray<z.ZodObject<{
169
63
  queuedCount: z.ZodNumber;
170
64
  activeCount: z.ZodNumber;
171
65
  totalCount: z.ZodNumber;
172
- }, "strip", z.ZodTypeAny, {
173
- name: string;
174
- policy?: string | undefined;
175
- retryLimit?: number | undefined;
176
- retryDelay?: number | undefined;
177
- retryBackoff?: boolean | undefined;
178
- expireInSeconds?: number | undefined;
179
- deadLetter?: string | null | undefined;
180
- queuedCount: number;
181
- activeCount: number;
182
- totalCount: number;
183
- }, {
184
- name: string;
185
- policy?: string | undefined;
186
- retryLimit?: number | undefined;
187
- retryDelay?: number | undefined;
188
- retryBackoff?: boolean | undefined;
189
- expireInSeconds?: number | undefined;
190
- deadLetter?: string | null | undefined;
191
- queuedCount: number;
192
- activeCount: number;
193
- totalCount: number;
194
- }>, "many">;
66
+ }, z.core.$strip>>;
195
67
  export declare const jobDetailSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
196
- export declare const jobArraySchema: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
68
+ export declare const jobArraySchema: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
197
69
  export declare const scheduleSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
198
- export declare const scheduleArraySchema: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
70
+ export declare const scheduleArraySchema: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
199
71
  export declare const warningSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
200
- export declare const warningArraySchema: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
72
+ export declare const warningArraySchema: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
201
73
  export declare const successResponseSchema: z.ZodObject<{
202
74
  success: z.ZodBoolean;
203
75
  jobId: z.ZodOptional<z.ZodString>;
204
76
  deleted: z.ZodOptional<z.ZodString>;
205
77
  name: z.ZodOptional<z.ZodString>;
206
- }, "strip", z.ZodTypeAny, {
207
- success: boolean;
208
- jobId?: string | undefined;
209
- deleted?: string | undefined;
210
- name?: string | undefined;
211
- }, {
212
- success: boolean;
213
- jobId?: string | undefined;
214
- deleted?: string | undefined;
215
- name?: string | undefined;
216
- }>;
78
+ }, z.core.$strip>;
@@ -42,18 +42,18 @@ const scheduleOptionsSchema = zod_1.z
42
42
  })
43
43
  .strict();
44
44
  exports.enqueueBodySchema = zod_1.z.object({
45
- data: zod_1.z.record(zod_1.z.unknown()).optional(),
45
+ data: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
46
46
  options: enqueueOptionsSchema.optional(),
47
47
  });
48
48
  exports.scheduleBodySchema = zod_1.z.object({
49
49
  name: zod_1.z.string(),
50
50
  cron: zod_1.z.string(),
51
- data: zod_1.z.record(zod_1.z.unknown()).optional(),
51
+ data: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
52
52
  options: scheduleOptionsSchema.optional(),
53
53
  });
54
54
  exports.updateScheduleBodySchema = zod_1.z.object({
55
55
  cron: zod_1.z.string(),
56
- data: zod_1.z.record(zod_1.z.unknown()).optional(),
56
+ data: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
57
57
  options: scheduleOptionsSchema.optional(),
58
58
  });
59
59
  // ── Response schemas ─────────────────────────────────────────────────
@@ -70,11 +70,11 @@ exports.queueStatsSchema = zod_1.z.object({
70
70
  totalCount: zod_1.z.number(),
71
71
  });
72
72
  exports.queueStatsArraySchema = zod_1.z.array(exports.queueStatsSchema);
73
- exports.jobDetailSchema = zod_1.z.record(zod_1.z.unknown());
73
+ exports.jobDetailSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
74
74
  exports.jobArraySchema = zod_1.z.array(exports.jobDetailSchema);
75
- exports.scheduleSchema = zod_1.z.record(zod_1.z.unknown());
75
+ exports.scheduleSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
76
76
  exports.scheduleArraySchema = zod_1.z.array(exports.scheduleSchema);
77
- exports.warningSchema = zod_1.z.record(zod_1.z.unknown());
77
+ exports.warningSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
78
78
  exports.warningArraySchema = zod_1.z.array(exports.warningSchema);
79
79
  exports.successResponseSchema = zod_1.z.object({
80
80
  success: zod_1.z.boolean(),
@@ -55,21 +55,11 @@ declare class ServiceIdentity {
55
55
  getIdentityJWKS: () => Promise<JWKS>;
56
56
  requireServiceIdentity: (service: string) => RequestHandler;
57
57
  requireServiceIdentityV3: (...services: string[]) => import("../api/types/middleware").Middleware<never[], undefined, undefined, undefined, z.ZodObject<{
58
- 'x-identity': z.ZodEffects<z.ZodString, string, string>;
59
- }, "strip", z.ZodTypeAny, {
60
- 'x-identity': string;
61
- }, {
62
- 'x-identity': string;
63
- }>, z.ZodObject<{
64
- payload: z.ZodAny;
65
- params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">, z.ZodUndefined]>>>;
66
- }, "strip", z.ZodTypeAny, {
67
- payload?: any;
68
- params?: Record<string, string | number | (string | number)[] | undefined> | undefined;
69
- }, {
70
- payload?: any;
71
- params?: Record<string, string | number | (string | number)[] | undefined> | undefined;
72
- }>>;
58
+ 'x-identity': z.ZodString;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ payload: z.ZodOptional<z.ZodAny>;
61
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>, z.ZodUndefined]>>>;
62
+ }, z.core.$strip>>;
73
63
  identityJWKSRoute: RequestHandler;
74
64
  }
75
65
  export { ServiceIdentity };
@@ -147,7 +147,7 @@ class ServiceIdentity {
147
147
  'x-identity': zod_1.z.string().refine(value => validator_1.default.isJWT(value)),
148
148
  }),
149
149
  context: zod_1.z.object({
150
- payload: zod_1.z.any(),
150
+ payload: zod_1.z.any().optional(),
151
151
  params: zod_1.z
152
152
  .record(zod_1.z.string(), zod_1.z.union([
153
153
  zod_1.z.string(),