@encatch/schema 0.1.24 → 0.1.26

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.
@@ -0,0 +1,23 @@
1
+ export declare function convertObject<TInput extends object, TResult extends ObjectToCamel<TInput> | ObjectToSnake<TInput> | ObjectToPascal<TInput>>(obj: TInput, keyConverter: (arg: string) => string): TResult;
2
+ export declare function toCamel<T extends string>(term: T): ToCamel<T>;
3
+ export declare function objectToCamel<T extends object>(obj: T): ObjectToCamel<T>;
4
+ export declare function toSnake<T extends string>(term: T): ToSnake<T>;
5
+ export declare function objectToSnake<T extends object>(obj: T): ObjectToSnake<T>;
6
+ export declare function toPascal<T extends string>(term: T): ToPascal<T>;
7
+ export declare function objectToPascal<T extends object>(obj: T): ObjectToPascal<T>;
8
+ export type ToCamel<S extends string | number | symbol> = S extends string ? S extends `${infer Head}_${infer Tail}` ? `${ToCamel<Uncapitalize<Head>>}${Capitalize<ToCamel<Tail>>}` : S extends `${infer Head}-${infer Tail}` ? `${ToCamel<Uncapitalize<Head>>}${Capitalize<ToCamel<Tail>>}` : Uncapitalize<S> : never;
9
+ export type ObjectToCamel<T extends object | undefined | null> = T extends undefined ? undefined : T extends null ? null : T extends Array<infer ArrayType> ? ArrayType extends object ? Array<ObjectToCamel<ArrayType>> : Array<ArrayType> : T extends Uint8Array ? Uint8Array : T extends Date ? Date : {
10
+ [K in keyof T as K extends `${string}-${string}` ? K : ToCamel<K>]: T[K] extends Array<infer ArrayType> | undefined | null ? ArrayType extends object ? Array<ObjectToCamel<ArrayType>> : Array<ArrayType> : T[K] extends object | undefined | null ? ObjectToCamel<T[K]> : T[K];
11
+ };
12
+ export type ToPascal<S extends string | number | symbol> = S extends string ? S extends `${infer Head}_${infer Tail}` ? `${Capitalize<ToCamel<Head>>}${Capitalize<ToCamel<Tail>>}` : S extends `${infer Head}-${infer Tail}` ? `${Capitalize<ToCamel<Head>>}${Capitalize<ToCamel<Tail>>}` : Capitalize<S> : never;
13
+ export type ObjectToPascal<T extends object | undefined | null> = T extends undefined ? undefined : T extends null ? null : T extends Array<infer ArrayType> ? ArrayType extends object ? Array<ObjectToPascal<ArrayType>> : Array<ArrayType> : T extends Uint8Array ? Uint8Array : T extends Date ? Date : {
14
+ [K in keyof T as K extends `${string}-${string}` ? K : ToPascal<K>]: T[K] extends Array<infer ArrayType> | undefined | null ? ArrayType extends object ? Array<ObjectToPascal<ArrayType>> : Array<ArrayType> : T[K] extends object | undefined | null ? ObjectToPascal<T[K]> : T[K];
15
+ };
16
+ export type ToSnake<S extends string | number | symbol> = S extends string ? S extends `${infer Head}${CapitalChars}${infer Tail}` ? Head extends '' ? Tail extends '' ? Lowercase<S> : S extends `${infer Caps}${Tail}` ? Caps extends CapitalChars ? Tail extends CapitalLetters ? `${Lowercase<Caps>}_${Lowercase<Tail>}` : Tail extends `${CapitalLetters}${string}` ? `${ToSnake<Caps>}_${ToSnake<Tail>}` : `${ToSnake<Caps>}${ToSnake<Tail>}` : never : never : Tail extends '' ? S extends `${Head}${infer Caps}` ? Caps extends CapitalChars ? Head extends Lowercase<Head> ? Caps extends Numbers ? Head extends `${string}${Numbers}` ? never : `${ToSnake<Head>}_${Caps}` : `${ToSnake<Head>}_${ToSnake<Caps>}` : never : never : never : S extends `${Head}${infer Caps}${Tail}` ? Caps extends CapitalChars ? Head extends Lowercase<Head> ? Tail extends CapitalLetters ? `${ToSnake<Head>}_${ToSnake<Caps>}_${Lowercase<Tail>}` : Tail extends `${CapitalLetters}${string}` ? Head extends Numbers ? never : Head extends `${string}${Numbers}` ? never : `${Head}_${ToSnake<Caps>}_${ToSnake<Tail>}` : `${ToSnake<Head>}_${Lowercase<Caps>}${ToSnake<Tail>}` : never : never : never : S : never;
17
+ export type ObjectToSnake<T extends object | undefined | null> = T extends undefined ? undefined : T extends null ? null : T extends Array<infer ArrayType> ? ArrayType extends object ? Array<ObjectToSnake<ArrayType>> : Array<ArrayType> : T extends Uint8Array ? Uint8Array : T extends Date ? Date : {
18
+ [K in keyof T as K extends `${string}-${string}` ? K : ToSnake<K>]: T[K] extends Array<infer ArrayType> | undefined | null ? ArrayType extends object ? Array<ObjectToSnake<ArrayType>> : Array<ArrayType> : T[K] extends object | undefined | null ? ObjectToSnake<T[K]> : T[K];
19
+ };
20
+ type CapitalLetters = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
21
+ type Numbers = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
22
+ type CapitalChars = CapitalLetters | Numbers;
23
+ export {};
@@ -1,5 +1,5 @@
1
1
  export { questionTypeSchema, validationRuleTypeSchema, validationRuleSchema, visibilityConditionSchema, sectionSchema, questionStatusSchema, ratingDisplayStyleSchema, ratingRepresentationSizeSchema, multipleChoiceDisplayStyleSchema, multipleChoiceMultipleDisplayStyleSchema, choiceOrderOptionSchema, questionSchema, ratingQuestionSchema, annotationQuestionSchema, questionOptionSchema, nestedOptionSchema, multipleChoiceSingleQuestionSchema, multipleChoiceMultipleQuestionSchema, npsQuestionSchema, shortAnswerQuestionSchema, longAnswerQuestionSchema, nestedDropdownQuestionSchema, combinedQuestionSchema, QuestionTypes, ValidationRuleTypes, VisibilityConditionOperators, QuestionStatuses, RatingDisplayStyles, RatingRepresentationSizes, MultipleChoiceDisplayStyles, MultipleChoiceMultipleDisplayStyles, ChoiceOrderOptions, type QuestionType, type ValidationRule, type VisibilityCondition, type QuestionStatus, type Question, type RatingDisplayStyle, type RatingRepresentationSize, type RatingQuestion, type AnnotationQuestion, type QuestionOption, type NestedOption, type MultipleChoiceDisplayStyle, type MultipleChoiceSingleQuestion, type MultipleChoiceMultipleDisplayStyle, type MultipleChoiceMultipleQuestion, type NpsQuestion, type ShortAnswerQuestion, type LongAnswerQuestion, type ChoiceOrderOption, type NestedDropdownQuestion, type Section, type CombinedQuestion, } from "./schemas/fields/field-schema";
2
- export { AnnotationMarkerSchema, AnnotationSchema, AnswerItemSchema, QuestionsResponseSchema, AnswerSchema, type AnnotationMarker, type Annotation, type AnswerItem, type QuestionsResponse, type Answer, } from "./schemas/fields/answer-schema";
2
+ export { AnnotationMarkerSchema, AnnotationSchema, AnswerItemSchema, AnswerSchema, type AnnotationMarker, type Annotation, type AnswerItem, type Answer, } from "./schemas/fields/answer-schema";
3
3
  export { surveyTypeSchema, yesNoSchema, recurringUnitSchema, frequencyAndSchedulingPropertiesSchema, externalPublishingPropertiesSchema, publicationStatusSchema, feedbackConfigurationSchema, SurveyTypes, YesNoValues, RecurringUnits, PublicationStatuses, type SurveyType, type YesNo, type RecurringUnit, type PublicationStatus, type FeedbackConfiguration, type FrequencyAndSchedulingProperties, type ExternalPublishingProperties, } from "./schemas/fields/form-schema";
4
4
  export { otherConfigurationPropertiesSchema, welcomeScreenPropertiesSchema, endScreenPropertiesSchema, appearancePropertiesSchema, formPropertiesSchema, type FormProperties, type OtherConfigurationProperties, type WelcomeScreenProperties, type EndScreenProperties, type AppearanceProperties, } from "./schemas/fields/form-properties-schema";
5
5
  export { dismissBehaviorSchema, WelcomeScreenFieldsSchema, EndScreenFieldsSchema, WelcomeFieldsTranslationSchema, EndFieldsTranslationSchema, OtherFieldsSchema, LanguageFieldSchema, LanguagesSchema, OtherFieldsTranslationSchema, DismissBehaviors, type WelcomeFields, type EndFields, type WelcomeFieldsTranslation, type EndFieldsTranslation, type OtherFields, type OtherFieldsTranslation, type LanguageField, type Languages, } from "./schemas/fields/other-screen-schema";
@@ -10,4 +10,7 @@ export { masterPropertiesSchema, type MasterProperties, } from "./schemas/fields
10
10
  export { deviceThemeSchema, deviceInfoSchema, sessionInfoSchema, deviceSessionInfoSchema, userPropertiesSchema, userInfoSchema, DeviceThemes, type DeviceTheme, type DeviceInfo, type SessionInfo, type DeviceSessionInfo, type UserProperties, type UserInfo, } from "./schemas/api/other-schema";
11
11
  export { userActionSchema, formConfigSchema, questionResponseSchema, responseSchema, matchedTriggerPropertiesSchema, baseSubmitFeedbackSchema, viewFeedbackSchema, submitFeedbackSchema, feedbackRequestSchema, UserActions, type UserAction, type FormConfig, type QuestionResponse, type Response, type MatchedTriggerProperties, type BaseSubmitFeedback, type ViewFeedback, type SubmitFeedback, type FeedbackRequest, } from "./schemas/api/submit-feedback-schema";
12
12
  export { feedbackConfigurationItemSchema, fetchFormConfigSchema, fetchConfigurationListSchema, fetchFeedbackDetailsSchema, formConfigurationResponseSchema, questionnaireFieldsResponseSchema, fetchFeedbackDetailsResponseSchema, fetchConfigurationListResponseSchema, type FeedbackConfigurationItem, type FetchFormConfig, type FetchConfigurationListRequest, type FetchFeedbackDetailsRequest, type FormConfigurationResponse, type QuestionnaireFieldsResponse, type FetchFeedbackDetailsResponse, type FetchConfigurationListResponse, } from "./schemas/api/fetch-feedback-schema";
13
+ export { RefineTextParams, RefineTextResponse, RefineTextData, refineTextDataSchema, refineTextParamsSchema, refineTextResponseSchema, } from "./schemas/api/refine-text-schema";
14
+ export { objectToCamel, objectToSnake, toSnake, toCamel, toPascal, objectToPascal, } from './helpers/case-convert-helper';
15
+ export type { ObjectToCamel, ObjectToSnake, ToSnake, ToCamel, ToPascal, ObjectToPascal, } from './helpers/case-convert-helper';
13
16
  export { z } from "zod";
@@ -103,21 +103,22 @@ export declare const fetchFormConfigSchema: z.ZodObject<{
103
103
  }, z.core.$strip>;
104
104
  export declare const fetchConfigurationListSchema: z.ZodObject<{
105
105
  deviceInfo: z.ZodObject<{
106
- deviceType: z.ZodString;
107
- timezone: z.ZodString;
108
- theme: z.ZodEnum<{
106
+ $deviceType: z.ZodString;
107
+ $timezone: z.ZodString;
108
+ $theme: z.ZodEnum<{
109
109
  light: "light";
110
110
  dark: "dark";
111
111
  system: "system";
112
112
  }>;
113
- os: z.ZodString;
114
- osVersion: z.ZodString;
115
- appVersion: z.ZodString;
116
- app: z.ZodString;
117
- language: z.ZodString;
113
+ $os: z.ZodString;
114
+ $osVersion: z.ZodString;
115
+ $appVersion: z.ZodString;
116
+ $app: z.ZodString;
117
+ $language: z.ZodString;
118
118
  }, z.core.$strip>;
119
119
  sessionInfo: z.ZodObject<{
120
- sessionId: z.ZodString;
120
+ $sessionId: z.ZodString;
121
+ $timestamp: z.ZodOptional<z.ZodString>;
121
122
  }, z.core.$strip>;
122
123
  userInfo: z.ZodOptional<z.ZodObject<{
123
124
  userName: z.ZodString;
@@ -135,21 +136,22 @@ export declare const fetchFeedbackDetailsSchema: z.ZodObject<{
135
136
  responseLanguageCode: z.ZodString;
136
137
  }, z.core.$strip>;
137
138
  deviceInfo: z.ZodObject<{
138
- deviceType: z.ZodString;
139
- timezone: z.ZodString;
140
- theme: z.ZodEnum<{
139
+ $deviceType: z.ZodString;
140
+ $timezone: z.ZodString;
141
+ $theme: z.ZodEnum<{
141
142
  light: "light";
142
143
  dark: "dark";
143
144
  system: "system";
144
145
  }>;
145
- os: z.ZodString;
146
- osVersion: z.ZodString;
147
- appVersion: z.ZodString;
148
- app: z.ZodString;
149
- language: z.ZodString;
146
+ $os: z.ZodString;
147
+ $osVersion: z.ZodString;
148
+ $appVersion: z.ZodString;
149
+ $app: z.ZodString;
150
+ $language: z.ZodString;
150
151
  }, z.core.$strip>;
151
152
  sessionInfo: z.ZodObject<{
152
- sessionId: z.ZodString;
153
+ $sessionId: z.ZodString;
154
+ $timestamp: z.ZodOptional<z.ZodString>;
153
155
  }, z.core.$strip>;
154
156
  userInfo: z.ZodOptional<z.ZodObject<{
155
157
  userName: z.ZodString;
@@ -10,39 +10,41 @@ export declare const DeviceThemes: {
10
10
  readonly SYSTEM: "system";
11
11
  };
12
12
  export declare const deviceInfoSchema: z.ZodObject<{
13
- deviceType: z.ZodString;
14
- timezone: z.ZodString;
15
- theme: z.ZodEnum<{
13
+ $deviceType: z.ZodString;
14
+ $timezone: z.ZodString;
15
+ $theme: z.ZodEnum<{
16
16
  light: "light";
17
17
  dark: "dark";
18
18
  system: "system";
19
19
  }>;
20
- os: z.ZodString;
21
- osVersion: z.ZodString;
22
- appVersion: z.ZodString;
23
- app: z.ZodString;
24
- language: z.ZodString;
20
+ $os: z.ZodString;
21
+ $osVersion: z.ZodString;
22
+ $appVersion: z.ZodString;
23
+ $app: z.ZodString;
24
+ $language: z.ZodString;
25
25
  }, z.core.$strip>;
26
26
  export declare const sessionInfoSchema: z.ZodObject<{
27
- sessionId: z.ZodString;
27
+ $sessionId: z.ZodString;
28
+ $timestamp: z.ZodOptional<z.ZodString>;
28
29
  }, z.core.$strip>;
29
30
  export declare const deviceSessionInfoSchema: z.ZodObject<{
30
31
  deviceInfo: z.ZodObject<{
31
- deviceType: z.ZodString;
32
- timezone: z.ZodString;
33
- theme: z.ZodEnum<{
32
+ $deviceType: z.ZodString;
33
+ $timezone: z.ZodString;
34
+ $theme: z.ZodEnum<{
34
35
  light: "light";
35
36
  dark: "dark";
36
37
  system: "system";
37
38
  }>;
38
- os: z.ZodString;
39
- osVersion: z.ZodString;
40
- appVersion: z.ZodString;
41
- app: z.ZodString;
42
- language: z.ZodString;
39
+ $os: z.ZodString;
40
+ $osVersion: z.ZodString;
41
+ $appVersion: z.ZodString;
42
+ $app: z.ZodString;
43
+ $language: z.ZodString;
43
44
  }, z.core.$strip>;
44
45
  sessionInfo: z.ZodObject<{
45
- sessionId: z.ZodString;
46
+ $sessionId: z.ZodString;
47
+ $timestamp: z.ZodOptional<z.ZodString>;
46
48
  }, z.core.$strip>;
47
49
  }, z.core.$strip>;
48
50
  export declare const userPropertiesSchema: z.ZodObject<{
@@ -0,0 +1,25 @@
1
+ import { z } from "zod";
2
+ export declare const refineTextParamsSchema: z.ZodObject<{
3
+ question_id: z.ZodString;
4
+ identifier: z.ZodString;
5
+ feedback_configuration_id: z.ZodString;
6
+ user_text: z.ZodString;
7
+ }, z.core.$strict>;
8
+ export declare const refineTextDataSchema: z.ZodObject<{
9
+ user_text: z.ZodString;
10
+ refined_text: z.ZodString;
11
+ }, z.core.$strip>;
12
+ export declare const refineTextResponseSchema: z.ZodObject<{
13
+ success: z.ZodBoolean;
14
+ code: z.ZodString;
15
+ message: z.ZodString;
16
+ messageId: z.ZodString;
17
+ data: z.ZodObject<{
18
+ user_text: z.ZodString;
19
+ refined_text: z.ZodString;
20
+ }, z.core.$strip>;
21
+ error: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$strict>;
23
+ export type RefineTextParams = z.infer<typeof refineTextParamsSchema>;
24
+ export type RefineTextData = z.infer<typeof refineTextDataSchema>;
25
+ export type RefineTextResponse = z.infer<typeof refineTextResponseSchema>;
@@ -82,21 +82,22 @@ export declare const baseSubmitFeedbackSchema: z.ZodObject<{
82
82
  responseLanguageCode: z.ZodString;
83
83
  }, z.core.$strip>;
84
84
  deviceInfo: z.ZodObject<{
85
- deviceType: z.ZodString;
86
- timezone: z.ZodString;
87
- theme: z.ZodEnum<{
85
+ $deviceType: z.ZodString;
86
+ $timezone: z.ZodString;
87
+ $theme: z.ZodEnum<{
88
88
  light: "light";
89
89
  dark: "dark";
90
90
  system: "system";
91
91
  }>;
92
- os: z.ZodString;
93
- osVersion: z.ZodString;
94
- appVersion: z.ZodString;
95
- app: z.ZodString;
96
- language: z.ZodString;
92
+ $os: z.ZodString;
93
+ $osVersion: z.ZodString;
94
+ $appVersion: z.ZodString;
95
+ $app: z.ZodString;
96
+ $language: z.ZodString;
97
97
  }, z.core.$strip>;
98
98
  sessionInfo: z.ZodObject<{
99
- sessionId: z.ZodString;
99
+ $sessionId: z.ZodString;
100
+ $timestamp: z.ZodOptional<z.ZodString>;
100
101
  }, z.core.$strip>;
101
102
  userInfo: z.ZodOptional<z.ZodObject<{
102
103
  userName: z.ZodString;
@@ -115,21 +116,22 @@ export declare const baseSubmitFeedbackSchema: z.ZodObject<{
115
116
  }, z.core.$strip>;
116
117
  export declare const viewFeedbackSchema: z.ZodObject<{
117
118
  deviceInfo: z.ZodObject<{
118
- deviceType: z.ZodString;
119
- timezone: z.ZodString;
120
- theme: z.ZodEnum<{
119
+ $deviceType: z.ZodString;
120
+ $timezone: z.ZodString;
121
+ $theme: z.ZodEnum<{
121
122
  light: "light";
122
123
  dark: "dark";
123
124
  system: "system";
124
125
  }>;
125
- os: z.ZodString;
126
- osVersion: z.ZodString;
127
- appVersion: z.ZodString;
128
- app: z.ZodString;
129
- language: z.ZodString;
126
+ $os: z.ZodString;
127
+ $osVersion: z.ZodString;
128
+ $appVersion: z.ZodString;
129
+ $app: z.ZodString;
130
+ $language: z.ZodString;
130
131
  }, z.core.$strip>;
131
132
  sessionInfo: z.ZodObject<{
132
- sessionId: z.ZodString;
133
+ $sessionId: z.ZodString;
134
+ $timestamp: z.ZodOptional<z.ZodString>;
133
135
  }, z.core.$strip>;
134
136
  userInfo: z.ZodOptional<z.ZodObject<{
135
137
  userName: z.ZodString;
@@ -155,21 +157,22 @@ export declare const viewFeedbackSchema: z.ZodObject<{
155
157
  }, z.core.$strict>;
156
158
  export declare const submitFeedbackSchema: z.ZodObject<{
157
159
  deviceInfo: z.ZodObject<{
158
- deviceType: z.ZodString;
159
- timezone: z.ZodString;
160
- theme: z.ZodEnum<{
160
+ $deviceType: z.ZodString;
161
+ $timezone: z.ZodString;
162
+ $theme: z.ZodEnum<{
161
163
  light: "light";
162
164
  dark: "dark";
163
165
  system: "system";
164
166
  }>;
165
- os: z.ZodString;
166
- osVersion: z.ZodString;
167
- appVersion: z.ZodString;
168
- app: z.ZodString;
169
- language: z.ZodString;
167
+ $os: z.ZodString;
168
+ $osVersion: z.ZodString;
169
+ $appVersion: z.ZodString;
170
+ $app: z.ZodString;
171
+ $language: z.ZodString;
170
172
  }, z.core.$strip>;
171
173
  sessionInfo: z.ZodObject<{
172
- sessionId: z.ZodString;
174
+ $sessionId: z.ZodString;
175
+ $timestamp: z.ZodOptional<z.ZodString>;
173
176
  }, z.core.$strip>;
174
177
  userInfo: z.ZodOptional<z.ZodObject<{
175
178
  userName: z.ZodString;
@@ -220,21 +223,22 @@ export declare const submitFeedbackSchema: z.ZodObject<{
220
223
  }, z.core.$strict>;
221
224
  export declare const feedbackRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
222
225
  deviceInfo: z.ZodObject<{
223
- deviceType: z.ZodString;
224
- timezone: z.ZodString;
225
- theme: z.ZodEnum<{
226
+ $deviceType: z.ZodString;
227
+ $timezone: z.ZodString;
228
+ $theme: z.ZodEnum<{
226
229
  light: "light";
227
230
  dark: "dark";
228
231
  system: "system";
229
232
  }>;
230
- os: z.ZodString;
231
- osVersion: z.ZodString;
232
- appVersion: z.ZodString;
233
- app: z.ZodString;
234
- language: z.ZodString;
233
+ $os: z.ZodString;
234
+ $osVersion: z.ZodString;
235
+ $appVersion: z.ZodString;
236
+ $app: z.ZodString;
237
+ $language: z.ZodString;
235
238
  }, z.core.$strip>;
236
239
  sessionInfo: z.ZodObject<{
237
- sessionId: z.ZodString;
240
+ $sessionId: z.ZodString;
241
+ $timestamp: z.ZodOptional<z.ZodString>;
238
242
  }, z.core.$strip>;
239
243
  userInfo: z.ZodOptional<z.ZodObject<{
240
244
  userName: z.ZodString;
@@ -259,21 +263,22 @@ export declare const feedbackRequestSchema: z.ZodUnion<readonly [z.ZodObject<{
259
263
  }, z.core.$strip>;
260
264
  }, z.core.$strict>, z.ZodObject<{
261
265
  deviceInfo: z.ZodObject<{
262
- deviceType: z.ZodString;
263
- timezone: z.ZodString;
264
- theme: z.ZodEnum<{
266
+ $deviceType: z.ZodString;
267
+ $timezone: z.ZodString;
268
+ $theme: z.ZodEnum<{
265
269
  light: "light";
266
270
  dark: "dark";
267
271
  system: "system";
268
272
  }>;
269
- os: z.ZodString;
270
- osVersion: z.ZodString;
271
- appVersion: z.ZodString;
272
- app: z.ZodString;
273
- language: z.ZodString;
273
+ $os: z.ZodString;
274
+ $osVersion: z.ZodString;
275
+ $appVersion: z.ZodString;
276
+ $app: z.ZodString;
277
+ $language: z.ZodString;
274
278
  }, z.core.$strip>;
275
279
  sessionInfo: z.ZodObject<{
276
- sessionId: z.ZodString;
280
+ $sessionId: z.ZodString;
281
+ $timestamp: z.ZodOptional<z.ZodString>;
277
282
  }, z.core.$strip>;
278
283
  userInfo: z.ZodOptional<z.ZodObject<{
279
284
  userName: z.ZodString;
@@ -32,30 +32,6 @@ export declare const AnswerItemSchema: z.ZodObject<{
32
32
  }, z.core.$strip>>;
33
33
  others: z.ZodOptional<z.ZodString>;
34
34
  }, z.core.$strip>;
35
- export declare const QuestionsResponseSchema: z.ZodObject<{
36
- question_id: z.ZodString;
37
- error: z.ZodOptional<z.ZodString>;
38
- answer: z.ZodObject<{
39
- nps: z.ZodOptional<z.ZodNumber>;
40
- nested_selection: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
- long_text: z.ZodOptional<z.ZodString>;
42
- short_answer: z.ZodOptional<z.ZodString>;
43
- single_choice: z.ZodOptional<z.ZodString>;
44
- rating: z.ZodOptional<z.ZodNumber>;
45
- multiple_choice_multiple: z.ZodOptional<z.ZodArray<z.ZodString>>;
46
- annotation: z.ZodOptional<z.ZodObject<{
47
- file_type: z.ZodString;
48
- file_name: z.ZodString;
49
- markers: z.ZodArray<z.ZodObject<{
50
- marker_no: z.ZodString;
51
- timeline: z.ZodString;
52
- comment: z.ZodString;
53
- }, z.core.$strip>>;
54
- }, z.core.$strip>>;
55
- others: z.ZodOptional<z.ZodString>;
56
- }, z.core.$strip>;
57
- type: z.ZodString;
58
- }, z.core.$strip>;
59
35
  export declare const AnswerSchema: z.ZodObject<{
60
36
  nps: z.ZodOptional<z.ZodNumber>;
61
37
  nested_selection: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -78,5 +54,4 @@ export declare const AnswerSchema: z.ZodObject<{
78
54
  export type AnnotationMarker = z.infer<typeof AnnotationMarkerSchema>;
79
55
  export type Annotation = z.infer<typeof AnnotationSchema>;
80
56
  export type AnswerItem = z.infer<typeof AnswerItemSchema>;
81
- export type QuestionsResponse = z.infer<typeof QuestionsResponseSchema>;
82
57
  export type Answer = z.infer<typeof AnswerSchema>;
package/package.json CHANGED
@@ -1,14 +1,17 @@
1
1
  {
2
2
  "name": "@encatch/schema",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "TypeScript schema definitions using Zod for validation and type inference of encatch product",
5
+ "homepage": "https://encatch.com",
6
+ "type": "module",
5
7
  "main": "dist/esm/index.js",
6
8
  "module": "dist/esm/index.js",
7
9
  "types": "dist/types/index.d.ts",
8
10
  "exports": {
9
11
  ".": {
10
12
  "types": "./dist/types/index.d.ts",
11
- "import": "./dist/esm/index.js"
13
+ "import": "./dist/esm/index.js",
14
+ "require": "./dist/esm/index.js"
12
15
  }
13
16
  },
14
17
  "files": [
@@ -24,10 +27,42 @@
24
27
  ],
25
28
  "author": "",
26
29
  "license": "AGPL-3.0",
27
- "type": "module",
28
- "homepage": "https://encatch.com",
30
+ "dependencies": {
31
+ "@types/node": "^24.3.0",
32
+ "typescript": "^5.9.2",
33
+ "uuid": "^11.1.0"
34
+ },
29
35
  "peerDependencies": {
30
36
  "zod": ">=3.0.0 <6.0.0"
31
37
  },
32
- "packageManager": "pnpm@10.4.1"
38
+ "devDependencies": {
39
+ "@release-it/bumper": "^7.0.5",
40
+ "@vitest/ui": "^3.2.4",
41
+ "esbuild": "^0.25.9",
42
+ "release-it": "^19.0.4",
43
+ "tsx": "^4.20.5",
44
+ "vitest": "^3.2.4"
45
+ },
46
+ "scripts": {
47
+ "build": "pnpm run build:types && pnpm run build:bundle",
48
+ "build:types": "tsc --project tsconfig.types.json",
49
+ "build:bundle": "node esbuild.config.js",
50
+ "build:esm": "tsc --project tsconfig.esm.json",
51
+ "dev": "tsc --watch",
52
+ "clean": "rm -rf dist",
53
+ "generate-json-schemas": "tsx generate-json-schemas.ts",
54
+ "publish:clean": "node scripts/publish-clean.js --generate && cp package.json package.json.backup && mv package.clean.json package.json && npm publish && node scripts/publish-clean.js --restore && node scripts/publish-clean.js --cleanup",
55
+ "release": "release-it --ci",
56
+ "release:minor": "release-it minor --ci",
57
+ "release:major": "release-it major --ci",
58
+ "release:patch": "release-it patch --ci",
59
+ "release:pre": "release-it --preRelease=beta",
60
+ "release:beta": "release-it --preRelease=beta",
61
+ "release:alpha": "release-it --preRelease=alpha",
62
+ "release:rc": "release-it --preRelease=rc",
63
+ "test": "vitest",
64
+ "test:run": "vitest run",
65
+ "test:ui": "vitest --ui",
66
+ "test:coverage": "vitest --coverage"
67
+ }
33
68
  }
File without changes