@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.
- package/dist/feedback/contract.d.ts +125 -124
- package/dist/feedback/contract.js +6 -3
- package/package.json +1 -1
|
@@ -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:
|
|
3
|
-
'Idempotency-Key':
|
|
4
|
-
'X-POSTHOG-SESSION-ID':
|
|
5
|
-
},
|
|
6
|
-
declare const feedbackAttachmentSchema:
|
|
7
|
-
id:
|
|
8
|
-
name:
|
|
9
|
-
size:
|
|
10
|
-
url:
|
|
11
|
-
},
|
|
12
|
-
declare const feedbackCreateInputSchema:
|
|
13
|
-
subject:
|
|
14
|
-
description:
|
|
15
|
-
type:
|
|
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:
|
|
21
|
+
urgency: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
21
22
|
normal: "normal";
|
|
22
23
|
emergency: "emergency";
|
|
23
24
|
}>>>;
|
|
24
|
-
affectedScope:
|
|
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
|
-
},
|
|
31
|
-
declare const feedbackErrorResponseSchema:
|
|
32
|
-
detail:
|
|
33
|
-
code:
|
|
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:
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
declare const feedbackItemSchema:
|
|
47
|
-
id:
|
|
48
|
-
subject:
|
|
49
|
-
description:
|
|
50
|
-
type:
|
|
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:
|
|
56
|
+
urgency: z.ZodEnum<{
|
|
56
57
|
normal: "normal";
|
|
57
58
|
emergency: "emergency";
|
|
58
59
|
}>;
|
|
59
|
-
affectedScope:
|
|
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:
|
|
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:
|
|
74
|
-
updatedAt:
|
|
75
|
-
canEdit:
|
|
76
|
-
canWithdraw:
|
|
77
|
-
canReply:
|
|
78
|
-
createdAt_epoch_milliseconds:
|
|
79
|
-
updatedAt_epoch_milliseconds:
|
|
80
|
-
statusTimeline:
|
|
81
|
-
id:
|
|
82
|
-
status:
|
|
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:
|
|
91
|
-
createdAt_epoch_milliseconds:
|
|
92
|
-
},
|
|
93
|
-
messages:
|
|
94
|
-
id:
|
|
95
|
-
author:
|
|
96
|
-
role:
|
|
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:
|
|
101
|
-
},
|
|
102
|
-
body:
|
|
103
|
-
createdAt:
|
|
104
|
-
editedAt:
|
|
105
|
-
createdAt_epoch_milliseconds:
|
|
106
|
-
editedAt_epoch_milliseconds:
|
|
107
|
-
},
|
|
108
|
-
attachments:
|
|
109
|
-
id:
|
|
110
|
-
name:
|
|
111
|
-
size:
|
|
112
|
-
url:
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
declare const feedbackListResponseSchema:
|
|
116
|
-
items:
|
|
117
|
-
id:
|
|
118
|
-
subject:
|
|
119
|
-
description:
|
|
120
|
-
type:
|
|
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:
|
|
126
|
+
urgency: z.ZodEnum<{
|
|
126
127
|
normal: "normal";
|
|
127
128
|
emergency: "emergency";
|
|
128
129
|
}>;
|
|
129
|
-
affectedScope:
|
|
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:
|
|
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:
|
|
144
|
-
updatedAt:
|
|
145
|
-
canEdit:
|
|
146
|
-
canWithdraw:
|
|
147
|
-
canReply:
|
|
148
|
-
createdAt_epoch_milliseconds:
|
|
149
|
-
updatedAt_epoch_milliseconds:
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
declare const feedbackMessageCreateInputSchema:
|
|
153
|
-
body:
|
|
154
|
-
},
|
|
155
|
-
declare const feedbackMessageSchema:
|
|
156
|
-
id:
|
|
157
|
-
author:
|
|
158
|
-
role:
|
|
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:
|
|
163
|
-
},
|
|
164
|
-
body:
|
|
165
|
-
createdAt:
|
|
166
|
-
editedAt:
|
|
167
|
-
createdAt_epoch_milliseconds:
|
|
168
|
-
editedAt_epoch_milliseconds:
|
|
169
|
-
},
|
|
170
|
-
declare const feedbackStatusEventSchema:
|
|
171
|
-
id:
|
|
172
|
-
status:
|
|
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:
|
|
181
|
-
createdAt_epoch_milliseconds:
|
|
182
|
-
},
|
|
183
|
-
declare const feedbackStatusSchema:
|
|
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:
|
|
192
|
-
id:
|
|
193
|
-
subject:
|
|
194
|
-
description:
|
|
195
|
-
type:
|
|
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:
|
|
201
|
+
urgency: z.ZodEnum<{
|
|
201
202
|
normal: "normal";
|
|
202
203
|
emergency: "emergency";
|
|
203
204
|
}>;
|
|
204
|
-
affectedScope:
|
|
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:
|
|
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:
|
|
219
|
-
updatedAt:
|
|
220
|
-
canEdit:
|
|
221
|
-
canWithdraw:
|
|
222
|
-
canReply:
|
|
223
|
-
createdAt_epoch_milliseconds:
|
|
224
|
-
updatedAt_epoch_milliseconds:
|
|
225
|
-
},
|
|
226
|
-
declare const feedbackTypeSchema:
|
|
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:
|
|
232
|
-
subject:
|
|
233
|
-
description:
|
|
234
|
-
},
|
|
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
|
-
|
|
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().
|
|
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(
|
|
27
|
+
count: requireMaximum(feedbackFilesMaximum ?? null, "files"),
|
|
25
28
|
bytes: requireMaximum(zFeedbackAttachment.shape.size.maxValue, "attachment size"),
|
|
26
29
|
};
|
|
27
30
|
function requireMaximum(value, field) {
|