@encatch/schema 1.3.0-beta.3 → 1.3.0-beta.5
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/esm/index.js +621 -572
- package/dist/esm/index.js.map +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/internal/type-assert.d.ts +19 -0
- package/dist/types/schemas/api/fetch-feedback-schema.d.ts +90 -72
- package/dist/types/schemas/api/submit-feedback-schema.d.ts +314 -25
- package/dist/types/schemas/fields/answer-schema.d.ts +121 -17
- package/dist/types/schemas/fields/app-props-schema.d.ts +45 -36
- package/dist/types/schemas/fields/field-schema.d.ts +103 -85
- package/dist/types/schemas/fields/form-properties-schema.d.ts +45 -36
- package/dist/types/schemas/fields/translations-example.d.ts +10 -0
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { platformCompletionCtaSchema, completionCtaSecondarySchema, completionCt
|
|
|
10
10
|
export { customEventFieldOperatorSchema, customEventFieldSchema, conditionalIfMetadataSchema, queryOutputSchema, conditionalIfSchema, triggerActionSchema, conditionalWhenSchema, filterConditionSchema, categorySpecificFiltersSchema, whoSchema, audienceSegmentSchema, audienceTriggerPropertiesSchema, type CustomEventFieldOperator, type CustomEventField, type ConditionalIfMetadata, type QueryOutput, type ConditionalIf, type TriggerAction, type ConditionalWhen, type FilterCondition, type CategorySpecificFilters, type Who, type AudienceSegment, type AudienceTriggerProperties, } from "./schemas/fields/auto-trigger-schema";
|
|
11
11
|
export { masterPropertiesSchema, type MasterProperties, } from "./schemas/fields/other-properties-schema";
|
|
12
12
|
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";
|
|
13
|
-
export { formConfigSchema, questionResponseSchema, responseSchema, matchedTriggerPropertiesSchema, baseSubmitFeedbackSchema, partialFeedbackSchema, submitFeedbackSchema, feedbackRequestSchema, type FormConfig, type QuestionResponse, type Response, type MatchedTriggerProperties, type BaseSubmitFeedback, type PartialFeedback, type SubmitFeedback, type FeedbackRequest, } from "./schemas/api/submit-feedback-schema";
|
|
13
|
+
export { formConfigSchema, questionResponseSchema, responseSchema, matchedTriggerPropertiesSchema, baseSubmitFeedbackSchema, partialFeedbackSchema, submitFeedbackSchema, feedbackRequestSchema, formDetailsSchema, submitFormRequestSchema, type FormConfig, type QuestionResponse, type Response, type MatchedTriggerProperties, type BaseSubmitFeedback, type PartialFeedback, type SubmitFeedback, type FeedbackRequest, type FormDetails, type FormDetailsResponse, type SubmitFormRequest, } from "./schemas/api/submit-feedback-schema";
|
|
14
14
|
export { feedbackConfigurationItemSchema, fetchFormConfigSchema, fetchConfigurationListSchema, fetchFeedbackDetailsSchema, formConfigurationResponseSchema, questionnaireFieldsResponseSchema, fetchFeedbackDetailsResponseSchema, fetchConfigurationListResponseSchema, logicJumpRuleSchema, logicJumpRulesSchema, type FeedbackConfigurationItem, type FetchFormConfig, type FetchConfigurationListRequest, type FetchFeedbackDetailsRequest, type FormConfigurationResponse, type QuestionnaireFieldsResponse, type FetchFeedbackDetailsResponse, type FetchConfigurationListResponse, type LogicJumpRule, type LogicJumpRules, } from "./schemas/api/fetch-feedback-schema";
|
|
15
15
|
export { RefineTextParams, RefineTextResponse, RefineTextData, refineTextDataSchema, refineTextParamsSchema, refineTextResponseSchema, } from "./schemas/api/refine-text-schema";
|
|
16
16
|
export { objectToCamel, objectToSnake, toSnake, toCamel, toPascal, objectToPascal, } from "./helpers/case-convert-helper";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compile-time helpers used to guarantee that the hand-authored, Zod-free
|
|
3
|
+
* public interfaces stay in lock-step with their Zod `z.infer` counterparts.
|
|
4
|
+
*
|
|
5
|
+
* These are pure type-level utilities — they emit no runtime code and are never
|
|
6
|
+
* re-exported from the package entrypoint, so they never leak into consumer
|
|
7
|
+
* (SDK) type bundles.
|
|
8
|
+
*/
|
|
9
|
+
/** True when `A` and `B` are mutually assignable (tuple-wrapped to avoid union distribution). */
|
|
10
|
+
export type MutuallyAssignable<A, B> = [A] extends [B] ? [B] extends [A] ? true : false : false;
|
|
11
|
+
/** True when `A` and `B` expose the exact same set of top-level keys. */
|
|
12
|
+
export type SameKeys<A, B> = [keyof A] extends [keyof B] ? [keyof B] extends [keyof A] ? true : false : false;
|
|
13
|
+
/**
|
|
14
|
+
* True when interface `I` is a faithful, drift-free representation of schema
|
|
15
|
+
* type `S` — i.e. structurally interchangeable AND with an identical key set.
|
|
16
|
+
*/
|
|
17
|
+
export type MatchesSchema<I, S> = MutuallyAssignable<I, S> extends true ? SameKeys<I, S> extends true ? true : false : false;
|
|
18
|
+
/** Compiles only when `T` is exactly `true`; otherwise raises a type error. */
|
|
19
|
+
export type AssertTrue<T extends true> = T;
|