@ciridae/ui 1.0.10 → 1.0.11

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,36 +1,37 @@
1
+ import { z } from "zod";
1
2
  import type { FeedbackCreateRequest, FeedbackAttachment, FeedbackErrorDetail, FeedbackItem, FeedbackMessage, FeedbackMessageCreateRequest, FeedbackStatusEvent, FeedbackSummary, FeedbackUpdateRequest } from "./generated/types.gen.js";
2
- declare const feedbackCreateHeadersSchema: import("zod").ZodObject<{
3
- 'Idempotency-Key': import("zod").ZodUUID;
4
- 'X-POSTHOG-SESSION-ID': import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
5
- }, import("zod/v4/core").$strip>;
6
- declare const feedbackAttachmentSchema: import("zod").ZodObject<{
7
- id: import("zod").ZodString;
8
- name: import("zod").ZodString;
9
- size: import("zod").ZodInt;
10
- url: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodURL>>;
11
- }, import("zod/v4/core").$strip>;
12
- declare const feedbackCreateInputSchema: import("zod").ZodObject<{
13
- subject: import("zod").ZodString;
14
- description: import("zod").ZodString;
15
- type: import("zod").ZodEnum<{
3
+ declare const feedbackCreateHeadersSchema: z.ZodObject<{
4
+ 'Idempotency-Key': z.ZodUUID;
5
+ 'X-POSTHOG-SESSION-ID': z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ }, z.core.$strip>;
7
+ declare const feedbackAttachmentSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ name: z.ZodString;
10
+ size: z.ZodInt;
11
+ url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
12
+ }, z.core.$strip>;
13
+ declare const feedbackCreateInputSchema: z.ZodObject<{
14
+ subject: z.ZodString;
15
+ description: z.ZodString;
16
+ type: z.ZodEnum<{
16
17
  general: "general";
17
18
  bug: "bug";
18
19
  feature: "feature";
19
20
  }>;
20
- urgency: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodEnum<{
21
+ urgency: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
21
22
  normal: "normal";
22
23
  emergency: "emergency";
23
24
  }>>>;
24
- affectedScope: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodEnum<{
25
+ affectedScope: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
25
26
  unknown: "unknown";
26
27
  everyone: "everyone";
27
28
  just_me: "just_me";
28
29
  my_team: "my_team";
29
30
  }>>>;
30
- }, import("zod/v4/core").$strict>;
31
- declare const feedbackErrorResponseSchema: import("zod").ZodObject<{
32
- detail: import("zod").ZodObject<{
33
- code: import("zod").ZodEnum<{
31
+ }, z.core.$strict>;
32
+ declare const feedbackErrorResponseSchema: z.ZodObject<{
33
+ detail: z.ZodObject<{
34
+ code: z.ZodEnum<{
34
35
  feedback_access_denied: "feedback_access_denied";
35
36
  feedback_auth_unavailable: "feedback_auth_unavailable";
36
37
  feedback_invalid_token: "feedback_invalid_token";
@@ -40,29 +41,29 @@ declare const feedbackErrorResponseSchema: import("zod").ZodObject<{
40
41
  feedback_scope_not_found: "feedback_scope_not_found";
41
42
  feedback_unavailable: "feedback_unavailable";
42
43
  }>;
43
- detail: import("zod").ZodString;
44
- }, import("zod/v4/core").$strip>;
45
- }, import("zod/v4/core").$strip>;
46
- declare const feedbackItemSchema: import("zod").ZodObject<{
47
- id: import("zod").ZodUUID;
48
- subject: import("zod").ZodString;
49
- description: import("zod").ZodString;
50
- type: import("zod").ZodEnum<{
44
+ detail: z.ZodString;
45
+ }, z.core.$strip>;
46
+ }, z.core.$strip>;
47
+ declare const feedbackItemSchema: z.ZodObject<{
48
+ id: z.ZodUUID;
49
+ subject: z.ZodString;
50
+ description: z.ZodString;
51
+ type: z.ZodEnum<{
51
52
  general: "general";
52
53
  bug: "bug";
53
54
  feature: "feature";
54
55
  }>;
55
- urgency: import("zod").ZodEnum<{
56
+ urgency: z.ZodEnum<{
56
57
  normal: "normal";
57
58
  emergency: "emergency";
58
59
  }>;
59
- affectedScope: import("zod").ZodEnum<{
60
+ affectedScope: z.ZodEnum<{
60
61
  unknown: "unknown";
61
62
  everyone: "everyone";
62
63
  just_me: "just_me";
63
64
  my_team: "my_team";
64
65
  }>;
65
- status: import("zod").ZodEnum<{
66
+ status: z.ZodEnum<{
66
67
  received: "received";
67
68
  in_progress: "in_progress";
68
69
  discussion_required: "discussion_required";
@@ -70,16 +71,16 @@ declare const feedbackItemSchema: import("zod").ZodObject<{
70
71
  no_action: "no_action";
71
72
  withdrawn: "withdrawn";
72
73
  }>;
73
- createdAt: import("zod").ZodISODateTime;
74
- updatedAt: import("zod").ZodISODateTime;
75
- canEdit: import("zod").ZodBoolean;
76
- canWithdraw: import("zod").ZodBoolean;
77
- canReply: import("zod").ZodBoolean;
78
- createdAt_epoch_milliseconds: import("zod").ZodInt;
79
- updatedAt_epoch_milliseconds: import("zod").ZodInt;
80
- statusTimeline: import("zod").ZodArray<import("zod").ZodObject<{
81
- id: import("zod").ZodString;
82
- status: import("zod").ZodEnum<{
74
+ createdAt: z.ZodISODateTime;
75
+ updatedAt: z.ZodISODateTime;
76
+ canEdit: z.ZodBoolean;
77
+ canWithdraw: z.ZodBoolean;
78
+ canReply: z.ZodBoolean;
79
+ createdAt_epoch_milliseconds: z.ZodInt;
80
+ updatedAt_epoch_milliseconds: z.ZodInt;
81
+ statusTimeline: z.ZodArray<z.ZodObject<{
82
+ id: z.ZodString;
83
+ status: z.ZodEnum<{
83
84
  received: "received";
84
85
  in_progress: "in_progress";
85
86
  discussion_required: "discussion_required";
@@ -87,52 +88,52 @@ declare const feedbackItemSchema: import("zod").ZodObject<{
87
88
  no_action: "no_action";
88
89
  withdrawn: "withdrawn";
89
90
  }>;
90
- createdAt: import("zod").ZodISODateTime;
91
- createdAt_epoch_milliseconds: import("zod").ZodInt;
92
- }, import("zod/v4/core").$strip>>;
93
- messages: import("zod").ZodArray<import("zod").ZodObject<{
94
- id: import("zod").ZodString;
95
- author: import("zod").ZodObject<{
96
- role: import("zod").ZodEnum<{
91
+ createdAt: z.ZodISODateTime;
92
+ createdAt_epoch_milliseconds: z.ZodInt;
93
+ }, z.core.$strip>>;
94
+ messages: z.ZodArray<z.ZodObject<{
95
+ id: z.ZodString;
96
+ author: z.ZodObject<{
97
+ role: z.ZodEnum<{
97
98
  operator: "operator";
98
99
  reporter: "reporter";
99
100
  }>;
100
- name: import("zod").ZodString;
101
- }, import("zod/v4/core").$strip>;
102
- body: import("zod").ZodString;
103
- createdAt: import("zod").ZodISODateTime;
104
- editedAt: import("zod").ZodNullable<import("zod").ZodISODateTime>;
105
- createdAt_epoch_milliseconds: import("zod").ZodInt;
106
- editedAt_epoch_milliseconds: import("zod").ZodNullable<import("zod").ZodInt>;
107
- }, import("zod/v4/core").$strip>>;
108
- attachments: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
109
- id: import("zod").ZodString;
110
- name: import("zod").ZodString;
111
- size: import("zod").ZodInt;
112
- url: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodURL>>;
113
- }, import("zod/v4/core").$strip>>>>;
114
- }, import("zod/v4/core").$strip>;
115
- declare const feedbackListResponseSchema: import("zod").ZodObject<{
116
- items: import("zod").ZodArray<import("zod").ZodObject<{
117
- id: import("zod").ZodUUID;
118
- subject: import("zod").ZodString;
119
- description: import("zod").ZodString;
120
- type: import("zod").ZodEnum<{
101
+ name: z.ZodString;
102
+ }, z.core.$strip>;
103
+ body: z.ZodString;
104
+ createdAt: z.ZodISODateTime;
105
+ editedAt: z.ZodNullable<z.ZodISODateTime>;
106
+ createdAt_epoch_milliseconds: z.ZodInt;
107
+ editedAt_epoch_milliseconds: z.ZodNullable<z.ZodInt>;
108
+ }, z.core.$strip>>;
109
+ attachments: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
110
+ id: z.ZodString;
111
+ name: z.ZodString;
112
+ size: z.ZodInt;
113
+ url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
114
+ }, z.core.$strip>>>>;
115
+ }, z.core.$strip>;
116
+ declare const feedbackListResponseSchema: z.ZodObject<{
117
+ items: z.ZodArray<z.ZodObject<{
118
+ id: z.ZodUUID;
119
+ subject: z.ZodString;
120
+ description: z.ZodString;
121
+ type: z.ZodEnum<{
121
122
  general: "general";
122
123
  bug: "bug";
123
124
  feature: "feature";
124
125
  }>;
125
- urgency: import("zod").ZodEnum<{
126
+ urgency: z.ZodEnum<{
126
127
  normal: "normal";
127
128
  emergency: "emergency";
128
129
  }>;
129
- affectedScope: import("zod").ZodEnum<{
130
+ affectedScope: z.ZodEnum<{
130
131
  unknown: "unknown";
131
132
  everyone: "everyone";
132
133
  just_me: "just_me";
133
134
  my_team: "my_team";
134
135
  }>;
135
- status: import("zod").ZodEnum<{
136
+ status: z.ZodEnum<{
136
137
  received: "received";
137
138
  in_progress: "in_progress";
138
139
  discussion_required: "discussion_required";
@@ -140,36 +141,36 @@ declare const feedbackListResponseSchema: import("zod").ZodObject<{
140
141
  no_action: "no_action";
141
142
  withdrawn: "withdrawn";
142
143
  }>;
143
- createdAt: import("zod").ZodISODateTime;
144
- updatedAt: import("zod").ZodISODateTime;
145
- canEdit: import("zod").ZodBoolean;
146
- canWithdraw: import("zod").ZodBoolean;
147
- canReply: import("zod").ZodBoolean;
148
- createdAt_epoch_milliseconds: import("zod").ZodInt;
149
- updatedAt_epoch_milliseconds: import("zod").ZodInt;
150
- }, import("zod/v4/core").$strip>>;
151
- }, import("zod/v4/core").$strip>;
152
- declare const feedbackMessageCreateInputSchema: import("zod").ZodObject<{
153
- body: import("zod").ZodString;
154
- }, import("zod/v4/core").$strict>;
155
- declare const feedbackMessageSchema: import("zod").ZodObject<{
156
- id: import("zod").ZodString;
157
- author: import("zod").ZodObject<{
158
- role: import("zod").ZodEnum<{
144
+ createdAt: z.ZodISODateTime;
145
+ updatedAt: z.ZodISODateTime;
146
+ canEdit: z.ZodBoolean;
147
+ canWithdraw: z.ZodBoolean;
148
+ canReply: z.ZodBoolean;
149
+ createdAt_epoch_milliseconds: z.ZodInt;
150
+ updatedAt_epoch_milliseconds: z.ZodInt;
151
+ }, z.core.$strip>>;
152
+ }, z.core.$strip>;
153
+ declare const feedbackMessageCreateInputSchema: z.ZodObject<{
154
+ body: z.ZodString;
155
+ }, z.core.$strict>;
156
+ declare const feedbackMessageSchema: z.ZodObject<{
157
+ id: z.ZodString;
158
+ author: z.ZodObject<{
159
+ role: z.ZodEnum<{
159
160
  operator: "operator";
160
161
  reporter: "reporter";
161
162
  }>;
162
- name: import("zod").ZodString;
163
- }, import("zod/v4/core").$strip>;
164
- body: import("zod").ZodString;
165
- createdAt: import("zod").ZodISODateTime;
166
- editedAt: import("zod").ZodNullable<import("zod").ZodISODateTime>;
167
- createdAt_epoch_milliseconds: import("zod").ZodInt;
168
- editedAt_epoch_milliseconds: import("zod").ZodNullable<import("zod").ZodInt>;
169
- }, import("zod/v4/core").$strip>;
170
- declare const feedbackStatusEventSchema: import("zod").ZodObject<{
171
- id: import("zod").ZodString;
172
- status: import("zod").ZodEnum<{
163
+ name: z.ZodString;
164
+ }, z.core.$strip>;
165
+ body: z.ZodString;
166
+ createdAt: z.ZodISODateTime;
167
+ editedAt: z.ZodNullable<z.ZodISODateTime>;
168
+ createdAt_epoch_milliseconds: z.ZodInt;
169
+ editedAt_epoch_milliseconds: z.ZodNullable<z.ZodInt>;
170
+ }, z.core.$strip>;
171
+ declare const feedbackStatusEventSchema: z.ZodObject<{
172
+ id: z.ZodString;
173
+ status: z.ZodEnum<{
173
174
  received: "received";
174
175
  in_progress: "in_progress";
175
176
  discussion_required: "discussion_required";
@@ -177,10 +178,10 @@ declare const feedbackStatusEventSchema: import("zod").ZodObject<{
177
178
  no_action: "no_action";
178
179
  withdrawn: "withdrawn";
179
180
  }>;
180
- createdAt: import("zod").ZodISODateTime;
181
- createdAt_epoch_milliseconds: import("zod").ZodInt;
182
- }, import("zod/v4/core").$strip>;
183
- declare const feedbackStatusSchema: import("zod").ZodEnum<{
181
+ createdAt: z.ZodISODateTime;
182
+ createdAt_epoch_milliseconds: z.ZodInt;
183
+ }, z.core.$strip>;
184
+ declare const feedbackStatusSchema: z.ZodEnum<{
184
185
  received: "received";
185
186
  in_progress: "in_progress";
186
187
  discussion_required: "discussion_required";
@@ -188,26 +189,26 @@ declare const feedbackStatusSchema: import("zod").ZodEnum<{
188
189
  no_action: "no_action";
189
190
  withdrawn: "withdrawn";
190
191
  }>;
191
- declare const feedbackSummarySchema: import("zod").ZodObject<{
192
- id: import("zod").ZodUUID;
193
- subject: import("zod").ZodString;
194
- description: import("zod").ZodString;
195
- type: import("zod").ZodEnum<{
192
+ declare const feedbackSummarySchema: z.ZodObject<{
193
+ id: z.ZodUUID;
194
+ subject: z.ZodString;
195
+ description: z.ZodString;
196
+ type: z.ZodEnum<{
196
197
  general: "general";
197
198
  bug: "bug";
198
199
  feature: "feature";
199
200
  }>;
200
- urgency: import("zod").ZodEnum<{
201
+ urgency: z.ZodEnum<{
201
202
  normal: "normal";
202
203
  emergency: "emergency";
203
204
  }>;
204
- affectedScope: import("zod").ZodEnum<{
205
+ affectedScope: z.ZodEnum<{
205
206
  unknown: "unknown";
206
207
  everyone: "everyone";
207
208
  just_me: "just_me";
208
209
  my_team: "my_team";
209
210
  }>;
210
- status: import("zod").ZodEnum<{
211
+ status: z.ZodEnum<{
211
212
  received: "received";
212
213
  in_progress: "in_progress";
213
214
  discussion_required: "discussion_required";
@@ -215,23 +216,23 @@ declare const feedbackSummarySchema: import("zod").ZodObject<{
215
216
  no_action: "no_action";
216
217
  withdrawn: "withdrawn";
217
218
  }>;
218
- createdAt: import("zod").ZodISODateTime;
219
- updatedAt: import("zod").ZodISODateTime;
220
- canEdit: import("zod").ZodBoolean;
221
- canWithdraw: import("zod").ZodBoolean;
222
- canReply: import("zod").ZodBoolean;
223
- createdAt_epoch_milliseconds: import("zod").ZodInt;
224
- updatedAt_epoch_milliseconds: import("zod").ZodInt;
225
- }, import("zod/v4/core").$strip>;
226
- declare const feedbackTypeSchema: import("zod").ZodEnum<{
219
+ createdAt: z.ZodISODateTime;
220
+ updatedAt: z.ZodISODateTime;
221
+ canEdit: z.ZodBoolean;
222
+ canWithdraw: z.ZodBoolean;
223
+ canReply: z.ZodBoolean;
224
+ createdAt_epoch_milliseconds: z.ZodInt;
225
+ updatedAt_epoch_milliseconds: z.ZodInt;
226
+ }, z.core.$strip>;
227
+ declare const feedbackTypeSchema: z.ZodEnum<{
227
228
  general: "general";
228
229
  bug: "bug";
229
230
  feature: "feature";
230
231
  }>;
231
- declare const feedbackUpdateInputSchema: import("zod").ZodObject<{
232
- subject: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
233
- description: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
234
- }, import("zod/v4/core").$strict>;
232
+ declare const feedbackUpdateInputSchema: z.ZodObject<{
233
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
235
+ }, z.core.$strict>;
235
236
  declare const feedbackMaxLengths: {
236
237
  readonly description: number;
237
238
  readonly subject: number;
@@ -1,3 +1,4 @@
1
+ import { z } from "zod";
1
2
  import { zBodyCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPost, zCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostHeaders, zFeedbackCreateRequest, zFeedbackAttachment, zFeedbackErrorResponse, zFeedbackItem, zFeedbackListResponse, zFeedbackMessage, zFeedbackMessageCreateRequest, zFeedbackStatusEvent, zFeedbackSummary, zFeedbackUpdateRequest, } from "./generated/zod.gen.js";
2
3
  const feedbackCreateHeadersSchema = zCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostHeaders;
3
4
  const feedbackAttachmentSchema = zFeedbackAttachment;
@@ -16,12 +17,14 @@ const feedbackMaxLengths = {
16
17
  description: requireMaximum(zFeedbackCreateRequest.shape.description.maxLength, "description"),
17
18
  subject: requireMaximum(zFeedbackCreateRequest.shape.subject.maxLength, "subject"),
18
19
  };
19
- const feedbackFilesMaximum = zBodyCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPost.shape.files
20
+ // Read through Zod's public JSON Schema projection. The private `_zod.bag` stopped carrying array
21
+ // maximums in Zod 4.6, which made this module throw at import in every app on a newer Zod.
22
+ const feedbackFilesMaximum = z.toJSONSchema(zBodyCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPost.shape.files
20
23
  .unwrap()
21
- .unwrap()._zod.bag.maximum;
24
+ .unwrap()).maxItems;
22
25
  /** How many files one create request takes, and the most bytes each may hold. */
23
26
  const feedbackAttachmentLimits = {
24
- count: requireMaximum(typeof feedbackFilesMaximum === "number" ? feedbackFilesMaximum : null, "files"),
27
+ count: requireMaximum(feedbackFilesMaximum ?? null, "files"),
25
28
  bytes: requireMaximum(zFeedbackAttachment.shape.size.maxValue, "attachment size"),
26
29
  };
27
30
  function requireMaximum(value, field) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciridae/ui",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",