@beabee/beabee-common 0.0.2 → 0.20.0-alpha.2
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/README.md +126 -0
- package/dist/cjs/data/callout-component-base-type.cjs +35 -0
- package/dist/cjs/data/callout-component-input-selectable-types.cjs +32 -0
- package/dist/cjs/data/callout-component-input-text-types.cjs +32 -0
- package/dist/cjs/data/callout-component-input-types.cjs +46 -0
- package/dist/cjs/data/callout-component-nestable-types.cjs +33 -0
- package/dist/cjs/data/callout-component-type.cjs +50 -0
- package/dist/cjs/data/callout-component-types.cjs +35 -0
- package/dist/cjs/data/contribution-period.cjs +32 -0
- package/dist/cjs/data/contribution-type.cjs +34 -0
- package/dist/cjs/data/index.cjs +48 -0
- package/dist/cjs/data/item-status.cjs +34 -0
- package/dist/cjs/data/membership-status.cjs +34 -0
- package/dist/cjs/data/newsletter-status.cjs +35 -0
- package/dist/cjs/data/payment-method.cjs +34 -0
- package/dist/cjs/data/payment-status.cjs +34 -0
- package/dist/cjs/error/InvalidRule.cjs +35 -0
- package/dist/cjs/error/index.cjs +22 -0
- package/dist/cjs/index.cjs +30 -0
- package/dist/cjs/search/api-keys.cjs +35 -0
- package/dist/cjs/search/callouts.cjs +131 -0
- package/dist/cjs/search/contacts.cjs +105 -0
- package/dist/cjs/search/index.cjs +32 -0
- package/dist/cjs/search/notices.cjs +61 -0
- package/dist/cjs/search/operators.cjs +89 -0
- package/dist/cjs/search/payments.cjs +51 -0
- package/dist/cjs/types/api-key-filter-name.cjs +16 -0
- package/dist/cjs/types/array-filter-args.cjs +16 -0
- package/dist/cjs/types/base-filter-args.cjs +16 -0
- package/dist/cjs/types/base-validated-rule.cjs +16 -0
- package/dist/cjs/types/callout-component-base-input-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-base-input-selectable-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-base-input-text-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-base-map.cjs +16 -0
- package/dist/cjs/types/callout-component-base-nestable-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-base-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-base-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-content-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-address-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-address-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-checkbox-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-checkbox-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-currency-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-currency-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-date-time-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-date-time-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-email-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-email-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-file-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-file-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-number-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-number-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-phone-number-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-phone-number-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-select-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-select-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-selectable-radio-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-selectable-radio-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-selectable-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-selectable-selectboxes-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-selectable-selectboxes-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-signature-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-signature-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-text-area-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-text-field-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-text-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-text-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-time-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-time-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-input-url-rules.cjs +16 -0
- package/dist/cjs/types/callout-component-input-url-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-map.cjs +16 -0
- package/dist/cjs/types/callout-component-nestable-panel-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-nestable-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-nestable-tabs-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-nestable-well-schema.cjs +16 -0
- package/dist/cjs/types/callout-component-schema.cjs +16 -0
- package/dist/cjs/types/callout-filter-name.cjs +16 -0
- package/dist/cjs/types/callout-form-schema.cjs +16 -0
- package/dist/cjs/types/callout-navigation-schema.cjs +16 -0
- package/dist/cjs/types/callout-response-answer-address.cjs +16 -0
- package/dist/cjs/types/callout-response-answer-file-upload.cjs +16 -0
- package/dist/cjs/types/callout-response-answer.cjs +16 -0
- package/dist/cjs/types/callout-response-answers-nestable.cjs +16 -0
- package/dist/cjs/types/callout-response-answers-slide.cjs +16 -0
- package/dist/cjs/types/callout-response-comment-filter-name.cjs +16 -0
- package/dist/cjs/types/callout-response-filter-name.cjs +16 -0
- package/dist/cjs/types/callout-slide-schema.cjs +16 -0
- package/dist/cjs/types/callout-tag-filter-name.cjs +16 -0
- package/dist/cjs/types/date-unit.cjs +16 -0
- package/dist/cjs/types/duration.cjs +16 -0
- package/dist/cjs/types/enum-filter-args.cjs +16 -0
- package/dist/cjs/types/feeable.cjs +16 -0
- package/dist/cjs/types/filter-args.cjs +16 -0
- package/dist/cjs/types/filter-type.cjs +16 -0
- package/dist/cjs/types/filters.cjs +16 -0
- package/dist/cjs/types/index.cjs +208 -0
- package/dist/cjs/types/notice-filter-name.cjs +16 -0
- package/dist/cjs/types/operators-by-type.cjs +16 -0
- package/dist/cjs/types/other-filter-args.cjs +16 -0
- package/dist/cjs/types/paginated-query.cjs +16 -0
- package/dist/cjs/types/paginated.cjs +16 -0
- package/dist/cjs/types/payment-filter-name.cjs +16 -0
- package/dist/cjs/types/role-type.cjs +16 -0
- package/dist/cjs/types/rule-group.cjs +16 -0
- package/dist/cjs/types/rule-operator.cjs +16 -0
- package/dist/cjs/types/rule-opperator-params.cjs +16 -0
- package/dist/cjs/types/rule-value.cjs +16 -0
- package/dist/cjs/types/rule.cjs +16 -0
- package/dist/cjs/types/stripe-fee-country.cjs +16 -0
- package/dist/cjs/types/text-case.cjs +16 -0
- package/dist/cjs/types/unit-matches.cjs +16 -0
- package/dist/cjs/types/validated-boolean-rule.cjs +16 -0
- package/dist/cjs/types/validated-number-rule.cjs +16 -0
- package/dist/cjs/types/validated-rule-group.cjs +16 -0
- package/dist/cjs/types/validated-rule-value.cjs +16 -0
- package/dist/cjs/types/validated-rule.cjs +16 -0
- package/dist/cjs/types/validated-string-rule.cjs +16 -0
- package/dist/cjs/types/validator-callout-component.cjs +16 -0
- package/dist/cjs/types/validator.cjs +16 -0
- package/dist/cjs/utils/callouts.cjs +175 -0
- package/dist/cjs/utils/conversions.cjs +53 -0
- package/dist/cjs/utils/date.cjs +104 -0
- package/dist/cjs/utils/index.cjs +34 -0
- package/dist/cjs/utils/payments.cjs +53 -0
- package/dist/cjs/utils/rules.cjs +109 -0
- package/dist/cjs/utils/slug.cjs +834 -0
- package/dist/cjs/utils/validations.cjs +177 -0
- package/dist/cjs/validators/callout-component-content.validator.cjs +30 -0
- package/dist/cjs/validators/callout-component-input-address.validator.cjs +36 -0
- package/dist/cjs/validators/callout-component-input-checkbox.validator.cjs +34 -0
- package/dist/cjs/validators/callout-component-input-currency.validator.cjs +35 -0
- package/dist/cjs/validators/callout-component-input-date-time.validator.cjs +38 -0
- package/dist/cjs/validators/callout-component-input-email.validator.cjs +39 -0
- package/dist/cjs/validators/callout-component-input-file.validator.cjs +35 -0
- package/dist/cjs/validators/callout-component-input-number.validator.cjs +38 -0
- package/dist/cjs/validators/callout-component-input-phone-number.validator.cjs +35 -0
- package/dist/cjs/validators/callout-component-input-select.validator.cjs +40 -0
- package/dist/cjs/validators/callout-component-input-selectable.validator.cjs +43 -0
- package/dist/cjs/validators/callout-component-input-signature.validator.cjs +32 -0
- package/dist/cjs/validators/callout-component-input-text.validator.cjs +53 -0
- package/dist/cjs/validators/callout-component-input-time.validator.cjs +36 -0
- package/dist/cjs/validators/callout-component-input-url.validator.cjs +39 -0
- package/dist/cjs/validators/callout-component.validator.cjs +104 -0
- package/dist/cjs/validators/index.cjs +52 -0
- package/dist/esm/data/callout-component-base-type.js +11 -0
- package/dist/esm/data/callout-component-input-selectable-types.js +8 -0
- package/dist/esm/data/callout-component-input-text-types.js +8 -0
- package/dist/esm/data/callout-component-input-types.js +22 -0
- package/dist/esm/data/callout-component-nestable-types.js +9 -0
- package/dist/esm/data/callout-component-type.js +26 -0
- package/dist/esm/data/callout-component-types.js +11 -0
- package/dist/esm/data/contribution-period.js +8 -0
- package/dist/esm/data/contribution-type.js +10 -0
- package/dist/esm/data/index.js +14 -0
- package/dist/esm/data/item-status.js +10 -0
- package/dist/esm/data/membership-status.js +10 -0
- package/dist/esm/data/newsletter-status.js +11 -0
- package/dist/esm/data/payment-method.js +10 -0
- package/dist/esm/data/payment-status.js +10 -0
- package/dist/esm/error/InvalidRule.js +11 -0
- package/dist/esm/error/index.js +1 -0
- package/dist/esm/index.js +5 -3
- package/dist/esm/search/api-keys.js +11 -0
- package/dist/esm/search/callouts.js +104 -0
- package/dist/esm/search/contacts.js +84 -0
- package/dist/esm/search/index.js +6 -0
- package/dist/esm/search/notices.js +37 -0
- package/dist/esm/search/operators.js +62 -0
- package/dist/esm/search/payments.js +27 -0
- package/dist/esm/types/api-key-filter-name.js +0 -0
- package/dist/esm/types/array-filter-args.js +0 -0
- package/dist/esm/types/base-filter-args.js +0 -0
- package/dist/esm/types/base-validated-rule.js +0 -0
- package/dist/esm/types/callout-component-base-input-schema.js +0 -0
- package/dist/esm/types/callout-component-base-input-selectable-schema.js +0 -0
- package/dist/esm/types/callout-component-base-input-text-schema.js +0 -0
- package/dist/esm/types/callout-component-base-map.js +0 -0
- package/dist/esm/types/callout-component-base-nestable-schema.js +0 -0
- package/dist/esm/types/callout-component-base-rules.js +0 -0
- package/dist/esm/types/callout-component-base-schema.js +0 -0
- package/dist/esm/types/callout-component-content-schema.js +0 -0
- package/dist/esm/types/callout-component-input-address-rules.js +0 -0
- package/dist/esm/types/callout-component-input-address-schema.js +0 -0
- package/dist/esm/types/callout-component-input-checkbox-rules.js +0 -0
- package/dist/esm/types/callout-component-input-checkbox-schema.js +0 -0
- package/dist/esm/types/callout-component-input-currency-rules.js +0 -0
- package/dist/esm/types/callout-component-input-currency-schema.js +0 -0
- package/dist/esm/types/callout-component-input-date-time-rules.js +0 -0
- package/dist/esm/types/callout-component-input-date-time-schema.js +0 -0
- package/dist/esm/types/callout-component-input-email-rules.js +0 -0
- package/dist/esm/types/callout-component-input-email-schema.js +0 -0
- package/dist/esm/types/callout-component-input-file-rules.js +0 -0
- package/dist/esm/types/callout-component-input-file-schema.js +0 -0
- package/dist/esm/types/callout-component-input-number-rules.js +0 -0
- package/dist/esm/types/callout-component-input-number-schema.js +0 -0
- package/dist/esm/types/callout-component-input-phone-number-rules.js +0 -0
- package/dist/esm/types/callout-component-input-phone-number-schema.js +0 -0
- package/dist/esm/types/callout-component-input-schema.js +0 -0
- package/dist/esm/types/callout-component-input-select-rules.js +0 -0
- package/dist/esm/types/callout-component-input-select-schema.js +0 -0
- package/dist/esm/types/callout-component-input-selectable-radio-rules.js +0 -0
- package/dist/esm/types/callout-component-input-selectable-radio-schema.js +0 -0
- package/dist/esm/types/callout-component-input-selectable-schema.js +0 -0
- package/dist/esm/types/callout-component-input-selectable-selectboxes-rules.js +0 -0
- package/dist/esm/types/callout-component-input-selectable-selectboxes-schema.js +0 -0
- package/dist/esm/types/callout-component-input-signature-rules.js +0 -0
- package/dist/esm/types/callout-component-input-signature-schema.js +0 -0
- package/dist/esm/types/callout-component-input-text-area-schema.js +0 -0
- package/dist/esm/types/callout-component-input-text-field-schema.js +0 -0
- package/dist/esm/types/callout-component-input-text-rules.js +0 -0
- package/dist/esm/types/callout-component-input-text-schema.js +0 -0
- package/dist/esm/types/callout-component-input-time-rules.js +0 -0
- package/dist/esm/types/callout-component-input-time-schema.js +0 -0
- package/dist/esm/types/callout-component-input-url-rules.js +0 -0
- package/dist/esm/types/callout-component-input-url-schema.js +0 -0
- package/dist/esm/types/callout-component-map.js +0 -0
- package/dist/esm/types/callout-component-nestable-panel-schema.js +0 -0
- package/dist/esm/types/callout-component-nestable-schema.js +0 -0
- package/dist/esm/types/callout-component-nestable-tabs-schema.js +0 -0
- package/dist/esm/types/callout-component-nestable-well-schema.js +0 -0
- package/dist/esm/types/callout-component-schema.js +0 -0
- package/dist/esm/types/callout-filter-name.js +0 -0
- package/dist/esm/types/callout-form-schema.js +0 -0
- package/dist/esm/types/callout-navigation-schema.js +0 -0
- package/dist/esm/types/callout-response-answer-address.js +0 -0
- package/dist/esm/types/callout-response-answer-file-upload.js +0 -0
- package/dist/esm/types/callout-response-answer.js +0 -0
- package/dist/esm/types/callout-response-answers-nestable.js +0 -0
- package/dist/esm/types/callout-response-answers-slide.js +0 -0
- package/dist/esm/types/callout-response-comment-filter-name.js +0 -0
- package/dist/esm/types/callout-response-filter-name.js +0 -0
- package/dist/esm/types/callout-slide-schema.js +0 -0
- package/dist/esm/types/callout-tag-filter-name.js +0 -0
- package/dist/esm/types/date-unit.js +0 -0
- package/dist/esm/types/duration.js +0 -0
- package/dist/esm/types/enum-filter-args.js +0 -0
- package/dist/esm/types/feeable.js +0 -0
- package/dist/esm/types/filter-args.js +0 -0
- package/dist/esm/types/filter-type.js +0 -0
- package/dist/esm/types/filters.js +0 -0
- package/dist/esm/types/index.js +94 -0
- package/dist/esm/types/notice-filter-name.js +0 -0
- package/dist/esm/types/operators-by-type.js +0 -0
- package/dist/esm/types/other-filter-args.js +0 -0
- package/dist/esm/types/paginated-query.js +0 -0
- package/dist/esm/types/paginated.js +0 -0
- package/dist/esm/types/payment-filter-name.js +0 -0
- package/dist/esm/types/role-type.js +0 -0
- package/dist/esm/types/rule-group.js +0 -0
- package/dist/esm/types/rule-operator.js +0 -0
- package/dist/esm/types/rule-opperator-params.js +0 -0
- package/dist/esm/types/rule-value.js +0 -0
- package/dist/esm/types/rule.js +0 -0
- package/dist/esm/types/stripe-fee-country.js +0 -0
- package/dist/esm/types/text-case.js +0 -0
- package/dist/esm/types/unit-matches.js +0 -0
- package/dist/esm/types/validated-boolean-rule.js +0 -0
- package/dist/esm/types/validated-number-rule.js +0 -0
- package/dist/esm/types/validated-rule-group.js +0 -0
- package/dist/esm/types/validated-rule-value.js +0 -0
- package/dist/esm/types/validated-rule.js +0 -0
- package/dist/esm/types/validated-string-rule.js +0 -0
- package/dist/esm/types/validator-callout-component.js +0 -0
- package/dist/esm/types/validator.js +0 -0
- package/dist/esm/utils/callouts.js +149 -0
- package/dist/esm/utils/conversions.js +28 -0
- package/dist/esm/utils/date.js +84 -0
- package/dist/esm/utils/index.js +7 -0
- package/dist/esm/utils/payments.js +29 -0
- package/dist/esm/utils/rules.js +80 -0
- package/dist/esm/utils/slug.js +810 -0
- package/dist/esm/utils/validations.js +138 -0
- package/dist/esm/validators/callout-component-content.validator.js +6 -0
- package/dist/esm/validators/callout-component-input-address.validator.js +11 -0
- package/dist/esm/validators/callout-component-input-checkbox.validator.js +9 -0
- package/dist/esm/validators/callout-component-input-currency.validator.js +10 -0
- package/dist/esm/validators/callout-component-input-date-time.validator.js +13 -0
- package/dist/esm/validators/callout-component-input-email.validator.js +14 -0
- package/dist/esm/validators/callout-component-input-file.validator.js +10 -0
- package/dist/esm/validators/callout-component-input-number.validator.js +13 -0
- package/dist/esm/validators/callout-component-input-phone-number.validator.js +10 -0
- package/dist/esm/validators/callout-component-input-select.validator.js +15 -0
- package/dist/esm/validators/callout-component-input-selectable.validator.js +18 -0
- package/dist/esm/validators/callout-component-input-signature.validator.js +8 -0
- package/dist/esm/validators/callout-component-input-text.validator.js +28 -0
- package/dist/esm/validators/callout-component-input-time.validator.js +11 -0
- package/dist/esm/validators/callout-component-input-url.validator.js +14 -0
- package/dist/esm/validators/callout-component.validator.js +79 -0
- package/dist/esm/validators/index.js +16 -0
- package/dist/types/data/callout-component-base-type.d.ts +8 -0
- package/dist/types/data/callout-component-input-selectable-types.d.ts +3 -0
- package/dist/types/data/callout-component-input-text-types.d.ts +3 -0
- package/dist/types/data/callout-component-input-types.d.ts +3 -0
- package/dist/types/data/callout-component-nestable-types.d.ts +3 -0
- package/dist/types/data/callout-component-type.d.ts +23 -0
- package/dist/types/data/callout-component-types.d.ts +3 -0
- package/dist/types/data/contribution-period.d.ts +4 -0
- package/dist/types/data/contribution-type.d.ts +6 -0
- package/dist/types/data/index.d.ts +14 -0
- package/dist/types/data/item-status.d.ts +6 -0
- package/dist/types/data/membership-status.d.ts +6 -0
- package/dist/types/data/newsletter-status.d.ts +7 -0
- package/dist/types/data/payment-method.d.ts +6 -0
- package/dist/types/data/payment-status.d.ts +6 -0
- package/dist/types/error/InvalidRule.d.ts +6 -0
- package/dist/types/error/index.d.ts +1 -0
- package/dist/types/index.d.cts +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/search/api-keys.d.ts +8 -0
- package/dist/types/search/callouts.d.ts +93 -0
- package/dist/types/search/contacts.d.ts +66 -0
- package/dist/types/search/index.d.ts +6 -0
- package/dist/types/search/notices.d.ts +29 -0
- package/dist/types/search/operators.d.ts +128 -0
- package/dist/types/search/payments.d.ts +19 -0
- package/dist/types/types/api-key-filter-name.d.ts +2 -0
- package/dist/types/types/array-filter-args.d.ts +5 -0
- package/dist/types/types/base-filter-args.d.ts +5 -0
- package/dist/types/types/base-validated-rule.d.ts +9 -0
- package/dist/types/types/callout-component-base-input-schema.d.ts +9 -0
- package/dist/types/types/callout-component-base-input-selectable-schema.d.ts +11 -0
- package/dist/types/types/callout-component-base-input-text-schema.d.ts +12 -0
- package/dist/types/types/callout-component-base-map.d.ts +16 -0
- package/dist/types/types/callout-component-base-nestable-schema.d.ts +7 -0
- package/dist/types/types/callout-component-base-rules.d.ts +6 -0
- package/dist/types/types/callout-component-base-schema.d.ts +22 -0
- package/dist/types/types/callout-component-content-schema.d.ts +5 -0
- package/dist/types/types/callout-component-input-address-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-address-schema.d.ts +7 -0
- package/dist/types/types/callout-component-input-checkbox-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-checkbox-schema.d.ts +11 -0
- package/dist/types/types/callout-component-input-currency-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-currency-schema.d.ts +17 -0
- package/dist/types/types/callout-component-input-date-time-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-date-time-schema.d.ts +39 -0
- package/dist/types/types/callout-component-input-email-rules.d.ts +9 -0
- package/dist/types/types/callout-component-input-email-schema.d.ts +11 -0
- package/dist/types/types/callout-component-input-file-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-file-schema.d.ts +19 -0
- package/dist/types/types/callout-component-input-number-rules.d.ts +9 -0
- package/dist/types/types/callout-component-input-number-schema.d.ts +17 -0
- package/dist/types/types/callout-component-input-phone-number-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-phone-number-schema.d.ts +7 -0
- package/dist/types/types/callout-component-input-schema.d.ts +3 -0
- package/dist/types/types/callout-component-input-select-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-select-schema.d.ts +15 -0
- package/dist/types/types/callout-component-input-selectable-radio-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-selectable-radio-schema.d.ts +6 -0
- package/dist/types/types/callout-component-input-selectable-schema.d.ts +3 -0
- package/dist/types/types/callout-component-input-selectable-selectboxes-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-selectable-selectboxes-schema.d.ts +6 -0
- package/dist/types/types/callout-component-input-signature-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-signature-schema.d.ts +7 -0
- package/dist/types/types/callout-component-input-text-area-schema.d.ts +5 -0
- package/dist/types/types/callout-component-input-text-field-schema.d.ts +5 -0
- package/dist/types/types/callout-component-input-text-rules.d.ts +13 -0
- package/dist/types/types/callout-component-input-text-schema.d.ts +3 -0
- package/dist/types/types/callout-component-input-time-rules.d.ts +2 -0
- package/dist/types/types/callout-component-input-time-schema.d.ts +9 -0
- package/dist/types/types/callout-component-input-url-rules.d.ts +9 -0
- package/dist/types/types/callout-component-input-url-schema.d.ts +11 -0
- package/dist/types/types/callout-component-map.d.ts +31 -0
- package/dist/types/types/callout-component-nestable-panel-schema.d.ts +5 -0
- package/dist/types/types/callout-component-nestable-schema.d.ts +2 -0
- package/dist/types/types/callout-component-nestable-tabs-schema.d.ts +5 -0
- package/dist/types/types/callout-component-nestable-well-schema.d.ts +5 -0
- package/dist/types/types/callout-component-schema.d.ts +3 -0
- package/dist/types/types/callout-filter-name.d.ts +2 -0
- package/dist/types/types/callout-form-schema.d.ts +4 -0
- package/dist/types/types/callout-navigation-schema.d.ts +6 -0
- package/dist/types/types/callout-response-answer-address.d.ts +9 -0
- package/dist/types/types/callout-response-answer-file-upload.d.ts +3 -0
- package/dist/types/types/callout-response-answer.d.ts +2 -0
- package/dist/types/types/callout-response-answers-nestable.d.ts +5 -0
- package/dist/types/types/callout-response-answers-slide.d.ts +5 -0
- package/dist/types/types/callout-response-comment-filter-name.d.ts +2 -0
- package/dist/types/types/callout-response-filter-name.d.ts +2 -0
- package/dist/types/types/callout-slide-schema.d.ts +7 -0
- package/dist/types/types/callout-tag-filter-name.d.ts +2 -0
- package/dist/types/types/date-unit.d.ts +2 -0
- package/dist/types/types/duration.d.ts +1 -0
- package/dist/types/types/enum-filter-args.d.ts +5 -0
- package/dist/types/types/feeable.d.ts +6 -0
- package/dist/types/types/filter-args.d.ts +2 -0
- package/dist/types/types/filter-type.d.ts +1 -0
- package/dist/types/types/filters.d.ts +2 -0
- package/dist/types/types/index.d.ts +94 -0
- package/dist/types/types/notice-filter-name.d.ts +2 -0
- package/dist/types/types/operators-by-type.d.ts +2 -0
- package/dist/types/types/other-filter-args.d.ts +4 -0
- package/dist/types/types/paginated-query.d.ts +8 -0
- package/dist/types/types/paginated.d.ts +6 -0
- package/dist/types/types/payment-filter-name.d.ts +2 -0
- package/dist/types/types/role-type.d.ts +2 -0
- package/dist/types/types/rule-group.d.ts +5 -0
- package/dist/types/types/rule-operator.d.ts +2 -0
- package/dist/types/types/rule-opperator-params.d.ts +3 -0
- package/dist/types/types/rule-value.d.ts +1 -0
- package/dist/types/types/rule.d.ts +6 -0
- package/dist/types/types/stripe-fee-country.d.ts +1 -0
- package/dist/types/types/text-case.d.ts +1 -0
- package/dist/types/types/unit-matches.d.ts +2 -0
- package/dist/types/types/validated-boolean-rule.d.ts +2 -0
- package/dist/types/types/validated-number-rule.d.ts +2 -0
- package/dist/types/types/validated-rule-group.d.ts +5 -0
- package/dist/types/types/validated-rule-value.d.ts +2 -0
- package/dist/types/types/validated-rule.d.ts +2 -0
- package/dist/types/types/validated-string-rule.d.ts +2 -0
- package/dist/types/types/validator-callout-component.d.ts +2 -0
- package/dist/types/types/validator.d.ts +1 -0
- package/dist/types/utils/callouts.d.ts +30 -0
- package/dist/types/utils/conversions.d.ts +14 -0
- package/dist/types/utils/date.d.ts +8 -0
- package/dist/types/utils/index.d.ts +7 -0
- package/dist/types/utils/payments.d.ts +2 -0
- package/dist/types/utils/rules.d.ts +4 -0
- package/dist/types/utils/slug.d.ts +16 -0
- package/dist/types/utils/validations.d.ts +90 -0
- package/dist/types/validators/callout-component-content.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-address.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-checkbox.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-currency.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-date-time.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-email.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-file.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-number.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-phone-number.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-select.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-selectable.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-signature.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-text.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-time.validator.d.ts +2 -0
- package/dist/types/validators/callout-component-input-url.validator.d.ts +2 -0
- package/dist/types/validators/callout-component.validator.d.ts +3 -0
- package/dist/types/validators/index.d.ts +16 -0
- package/package.json +39 -9
- package/dist/cjs/index.d.ts +0 -1
- package/dist/cjs/index.js +0 -7
- package/dist/esm/index.d.ts +0 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { ItemStatus } from "../data/index.ts";
|
|
2
|
+
export declare const calloutFilters: {
|
|
3
|
+
readonly slug: {
|
|
4
|
+
readonly type: "text";
|
|
5
|
+
};
|
|
6
|
+
readonly title: {
|
|
7
|
+
readonly type: "text";
|
|
8
|
+
};
|
|
9
|
+
readonly status: {
|
|
10
|
+
readonly type: "enum";
|
|
11
|
+
readonly options: readonly [ItemStatus.Draft, ItemStatus.Scheduled, ItemStatus.Open, ItemStatus.Ended];
|
|
12
|
+
};
|
|
13
|
+
readonly answeredBy: {
|
|
14
|
+
readonly type: "contact";
|
|
15
|
+
};
|
|
16
|
+
readonly starts: {
|
|
17
|
+
readonly type: "date";
|
|
18
|
+
readonly nullable: true;
|
|
19
|
+
};
|
|
20
|
+
readonly expires: {
|
|
21
|
+
readonly type: "date";
|
|
22
|
+
readonly nullable: true;
|
|
23
|
+
};
|
|
24
|
+
readonly hidden: {
|
|
25
|
+
readonly type: "boolean";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export declare const calloutResponseFilters: {
|
|
29
|
+
readonly id: {
|
|
30
|
+
readonly type: "text";
|
|
31
|
+
};
|
|
32
|
+
readonly contact: {
|
|
33
|
+
readonly type: "contact";
|
|
34
|
+
readonly nullable: true;
|
|
35
|
+
};
|
|
36
|
+
readonly callout: {
|
|
37
|
+
readonly type: "text";
|
|
38
|
+
};
|
|
39
|
+
readonly createdAt: {
|
|
40
|
+
readonly type: "date";
|
|
41
|
+
};
|
|
42
|
+
readonly updatedAt: {
|
|
43
|
+
readonly type: "date";
|
|
44
|
+
};
|
|
45
|
+
readonly bucket: {
|
|
46
|
+
readonly type: "text";
|
|
47
|
+
readonly nullable: true;
|
|
48
|
+
};
|
|
49
|
+
readonly tags: {
|
|
50
|
+
readonly type: "array";
|
|
51
|
+
};
|
|
52
|
+
readonly assignee: {
|
|
53
|
+
readonly type: "contact";
|
|
54
|
+
readonly nullable: true;
|
|
55
|
+
};
|
|
56
|
+
readonly answers: {
|
|
57
|
+
readonly type: "blob";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export declare const calloutResponseCommentFilters: {
|
|
61
|
+
readonly id: {
|
|
62
|
+
readonly type: "text";
|
|
63
|
+
};
|
|
64
|
+
readonly responseId: {
|
|
65
|
+
readonly type: "text";
|
|
66
|
+
};
|
|
67
|
+
readonly contact: {
|
|
68
|
+
readonly type: "contact";
|
|
69
|
+
};
|
|
70
|
+
readonly createdAt: {
|
|
71
|
+
readonly type: "date";
|
|
72
|
+
};
|
|
73
|
+
readonly updatedAt: {
|
|
74
|
+
readonly type: "date";
|
|
75
|
+
};
|
|
76
|
+
readonly text: {
|
|
77
|
+
readonly type: "text";
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export declare const calloutTagFilters: {
|
|
81
|
+
readonly id: {
|
|
82
|
+
readonly type: "text";
|
|
83
|
+
};
|
|
84
|
+
readonly name: {
|
|
85
|
+
readonly type: "text";
|
|
86
|
+
};
|
|
87
|
+
readonly description: {
|
|
88
|
+
readonly type: "text";
|
|
89
|
+
};
|
|
90
|
+
readonly calloutSlug: {
|
|
91
|
+
readonly type: "text";
|
|
92
|
+
};
|
|
93
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ContributionPeriod, ContributionType, NewsletterStatus } from "../data/index.ts";
|
|
2
|
+
export declare const RoleTypes: readonly ["member", "admin", "superadmin"];
|
|
3
|
+
export declare const contactFilters: {
|
|
4
|
+
readonly id: {
|
|
5
|
+
readonly type: "contact";
|
|
6
|
+
};
|
|
7
|
+
readonly firstname: {
|
|
8
|
+
readonly type: "text";
|
|
9
|
+
};
|
|
10
|
+
readonly lastname: {
|
|
11
|
+
readonly type: "text";
|
|
12
|
+
};
|
|
13
|
+
readonly email: {
|
|
14
|
+
readonly type: "text";
|
|
15
|
+
};
|
|
16
|
+
readonly joined: {
|
|
17
|
+
readonly type: "date";
|
|
18
|
+
};
|
|
19
|
+
readonly lastSeen: {
|
|
20
|
+
readonly type: "date";
|
|
21
|
+
};
|
|
22
|
+
readonly contributionCancelled: {
|
|
23
|
+
readonly type: "date";
|
|
24
|
+
readonly nullable: true;
|
|
25
|
+
};
|
|
26
|
+
readonly contributionType: {
|
|
27
|
+
readonly type: "enum";
|
|
28
|
+
readonly options: readonly [ContributionType.Automatic, ContributionType.Gift, ContributionType.Manual, ContributionType.None];
|
|
29
|
+
};
|
|
30
|
+
readonly contributionMonthlyAmount: {
|
|
31
|
+
readonly type: "number";
|
|
32
|
+
};
|
|
33
|
+
readonly contributionPeriod: {
|
|
34
|
+
readonly type: "enum";
|
|
35
|
+
readonly options: readonly [ContributionPeriod.Monthly, ContributionPeriod.Annually];
|
|
36
|
+
};
|
|
37
|
+
readonly deliveryOptIn: {
|
|
38
|
+
readonly type: "boolean";
|
|
39
|
+
};
|
|
40
|
+
readonly newsletterStatus: {
|
|
41
|
+
readonly type: "enum";
|
|
42
|
+
readonly options: readonly [NewsletterStatus.Subscribed, NewsletterStatus.Unsubscribed, NewsletterStatus.Cleaned, NewsletterStatus.Pending, NewsletterStatus.None];
|
|
43
|
+
};
|
|
44
|
+
readonly activePermission: {
|
|
45
|
+
readonly type: "enum";
|
|
46
|
+
readonly options: readonly ["member", "admin", "superadmin"];
|
|
47
|
+
};
|
|
48
|
+
readonly activeMembership: {
|
|
49
|
+
readonly type: "boolean";
|
|
50
|
+
};
|
|
51
|
+
readonly membershipStarts: {
|
|
52
|
+
readonly type: "date";
|
|
53
|
+
};
|
|
54
|
+
readonly membershipExpires: {
|
|
55
|
+
readonly type: "date";
|
|
56
|
+
};
|
|
57
|
+
readonly manualPaymentSource: {
|
|
58
|
+
readonly type: "text";
|
|
59
|
+
readonly nullable: true;
|
|
60
|
+
};
|
|
61
|
+
readonly tags: {
|
|
62
|
+
readonly type: "array";
|
|
63
|
+
readonly nullable: true;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export type ContactFilterName = keyof typeof contactFilters;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ItemStatus } from "../data/index.ts";
|
|
2
|
+
export declare const noticeFilters: {
|
|
3
|
+
readonly id: {
|
|
4
|
+
readonly type: "text";
|
|
5
|
+
};
|
|
6
|
+
readonly createdAt: {
|
|
7
|
+
readonly type: "date";
|
|
8
|
+
};
|
|
9
|
+
readonly updatedAt: {
|
|
10
|
+
readonly type: "date";
|
|
11
|
+
};
|
|
12
|
+
readonly name: {
|
|
13
|
+
readonly type: "text";
|
|
14
|
+
};
|
|
15
|
+
readonly expires: {
|
|
16
|
+
readonly type: "date";
|
|
17
|
+
readonly nullable: true;
|
|
18
|
+
};
|
|
19
|
+
readonly enabled: {
|
|
20
|
+
readonly type: "boolean";
|
|
21
|
+
};
|
|
22
|
+
readonly text: {
|
|
23
|
+
readonly type: "text";
|
|
24
|
+
};
|
|
25
|
+
readonly status: {
|
|
26
|
+
readonly type: "enum";
|
|
27
|
+
readonly options: readonly [ItemStatus.Draft, ItemStatus.Scheduled, ItemStatus.Open, ItemStatus.Ended];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { OperatorsByType } from "../types/index.ts";
|
|
2
|
+
export declare const nullableOperators: {
|
|
3
|
+
is_empty: {
|
|
4
|
+
args: number;
|
|
5
|
+
};
|
|
6
|
+
is_not_empty: {
|
|
7
|
+
args: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const operatorsByType: {
|
|
11
|
+
readonly text: {
|
|
12
|
+
readonly begins_with: {
|
|
13
|
+
args: number;
|
|
14
|
+
};
|
|
15
|
+
readonly ends_with: {
|
|
16
|
+
args: number;
|
|
17
|
+
};
|
|
18
|
+
readonly not_begins_with: {
|
|
19
|
+
args: number;
|
|
20
|
+
};
|
|
21
|
+
readonly not_ends_with: {
|
|
22
|
+
args: number;
|
|
23
|
+
};
|
|
24
|
+
readonly contains: {
|
|
25
|
+
args: number;
|
|
26
|
+
};
|
|
27
|
+
readonly not_contains: {
|
|
28
|
+
args: number;
|
|
29
|
+
};
|
|
30
|
+
readonly equal: {
|
|
31
|
+
args: number;
|
|
32
|
+
};
|
|
33
|
+
readonly not_equal: {
|
|
34
|
+
args: number;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
readonly blob: {
|
|
38
|
+
contains: {
|
|
39
|
+
args: number;
|
|
40
|
+
};
|
|
41
|
+
not_contains: {
|
|
42
|
+
args: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
readonly date: {
|
|
46
|
+
between: {
|
|
47
|
+
args: number;
|
|
48
|
+
};
|
|
49
|
+
not_between: {
|
|
50
|
+
args: number;
|
|
51
|
+
};
|
|
52
|
+
less: {
|
|
53
|
+
args: number;
|
|
54
|
+
};
|
|
55
|
+
greater: {
|
|
56
|
+
args: number;
|
|
57
|
+
};
|
|
58
|
+
less_or_equal: {
|
|
59
|
+
args: number;
|
|
60
|
+
};
|
|
61
|
+
greater_or_equal: {
|
|
62
|
+
args: number;
|
|
63
|
+
};
|
|
64
|
+
equal: {
|
|
65
|
+
args: number;
|
|
66
|
+
};
|
|
67
|
+
not_equal: {
|
|
68
|
+
args: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
readonly number: {
|
|
72
|
+
between: {
|
|
73
|
+
args: number;
|
|
74
|
+
};
|
|
75
|
+
not_between: {
|
|
76
|
+
args: number;
|
|
77
|
+
};
|
|
78
|
+
less: {
|
|
79
|
+
args: number;
|
|
80
|
+
};
|
|
81
|
+
greater: {
|
|
82
|
+
args: number;
|
|
83
|
+
};
|
|
84
|
+
less_or_equal: {
|
|
85
|
+
args: number;
|
|
86
|
+
};
|
|
87
|
+
greater_or_equal: {
|
|
88
|
+
args: number;
|
|
89
|
+
};
|
|
90
|
+
equal: {
|
|
91
|
+
args: number;
|
|
92
|
+
};
|
|
93
|
+
not_equal: {
|
|
94
|
+
args: number;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
readonly boolean: {
|
|
98
|
+
readonly equal: {
|
|
99
|
+
args: number;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
readonly array: {
|
|
103
|
+
contains: {
|
|
104
|
+
args: number;
|
|
105
|
+
};
|
|
106
|
+
not_contains: {
|
|
107
|
+
args: number;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
readonly enum: {
|
|
111
|
+
equal: {
|
|
112
|
+
args: number;
|
|
113
|
+
};
|
|
114
|
+
not_equal: {
|
|
115
|
+
args: number;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
readonly contact: {
|
|
119
|
+
equal: {
|
|
120
|
+
args: number;
|
|
121
|
+
};
|
|
122
|
+
not_equal: {
|
|
123
|
+
args: number;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
export declare const operatorsByTypeMap: OperatorsByType;
|
|
128
|
+
export declare const ruleOperators: readonly ["equal", "not_equal", "less", "less_or_equal", "greater", "greater_or_equal", "between", "not_between", "begins_with", "not_begins_with", "contains", "not_contains", "ends_with", "not_ends_with", "is_empty", "is_not_empty"];
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PaymentStatus } from "../data/index.ts";
|
|
2
|
+
export declare const paymentFilters: {
|
|
3
|
+
readonly id: {
|
|
4
|
+
readonly type: "text";
|
|
5
|
+
};
|
|
6
|
+
readonly contact: {
|
|
7
|
+
readonly type: "contact";
|
|
8
|
+
};
|
|
9
|
+
readonly chargeDate: {
|
|
10
|
+
readonly type: "date";
|
|
11
|
+
};
|
|
12
|
+
readonly amount: {
|
|
13
|
+
readonly type: "number";
|
|
14
|
+
};
|
|
15
|
+
readonly status: {
|
|
16
|
+
readonly type: "enum";
|
|
17
|
+
readonly options: readonly [PaymentStatus.Successful, PaymentStatus.Pending, PaymentStatus.Failed, PaymentStatus.Cancelled];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FilterType, ValidatedRuleValue } from "./index.ts";
|
|
2
|
+
import type { operatorsByType } from "../search/operators.ts";
|
|
3
|
+
export interface BaseValidatedRule<T extends FilterType, F extends string> {
|
|
4
|
+
type: T;
|
|
5
|
+
field: F;
|
|
6
|
+
nullable: boolean;
|
|
7
|
+
operator: keyof (typeof operatorsByType)[T];
|
|
8
|
+
value: ValidatedRuleValue<T>[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseRules, CalloutComponentBaseSchema } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentBaseInputSchema extends CalloutComponentBaseSchema {
|
|
4
|
+
type: CalloutComponentType.INPUT_ADDRESS | CalloutComponentType.INPUT_CHECKBOX | CalloutComponentType.INPUT_CURRENCY | CalloutComponentType.INPUT_DATE_TIME | CalloutComponentType.INPUT_EMAIL | CalloutComponentType.INPUT_FILE | CalloutComponentType.INPUT_NUMBER | CalloutComponentType.INPUT_PHONE_NUMBER | CalloutComponentType.INPUT_SELECT | CalloutComponentType.INPUT_SELECTABLE_RADIO | CalloutComponentType.INPUT_SELECTABLE_SELECTBOXES | CalloutComponentType.INPUT_SIGNATURE | CalloutComponentType.INPUT_TEXT_AREA | CalloutComponentType.INPUT_TEXT_FIELD | CalloutComponentType.INPUT_TIME | CalloutComponentType.INPUT_URL;
|
|
5
|
+
/** This is always true for input forms */
|
|
6
|
+
input: true;
|
|
7
|
+
/** The validation rules for input forms */
|
|
8
|
+
validate?: CalloutComponentBaseRules;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseInputSchema, CalloutComponentBaseRules } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentBaseInputSelectableSchema extends CalloutComponentBaseInputSchema {
|
|
4
|
+
type: CalloutComponentType.INPUT_SELECTABLE_RADIO | CalloutComponentType.INPUT_SELECTABLE_SELECTBOXES;
|
|
5
|
+
values: {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
nextSlideId: string;
|
|
9
|
+
}[];
|
|
10
|
+
validate?: CalloutComponentBaseRules;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseInputSchema, CalloutComponentInputTextRules, TextCase } from "./index.ts";
|
|
3
|
+
/** The schema for input text forms */
|
|
4
|
+
export interface CalloutComponentBaseInputTextSchema extends CalloutComponentBaseInputSchema {
|
|
5
|
+
type: CalloutComponentType.INPUT_TEXT_FIELD | CalloutComponentType.INPUT_TEXT_AREA;
|
|
6
|
+
/** Placeholder for the form */
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** The text case for the form */
|
|
9
|
+
case?: TextCase;
|
|
10
|
+
/** The validation rules for the form */
|
|
11
|
+
validate?: CalloutComponentInputTextRules;
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CalloutComponentBaseType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentContentSchema, CalloutComponentInputSchema, CalloutComponentInputSelectableSchema, CalloutComponentInputTextSchema, CalloutComponentNestableSchema } from "./index.ts";
|
|
3
|
+
type CalloutComponentBaseSchemas = {
|
|
4
|
+
[CalloutComponentBaseType.CONTENT]: CalloutComponentContentSchema;
|
|
5
|
+
[CalloutComponentBaseType.INPUT]: CalloutComponentInputSchema;
|
|
6
|
+
[CalloutComponentBaseType.INPUT_TEXT]: CalloutComponentInputTextSchema;
|
|
7
|
+
[CalloutComponentBaseType.INPUT_SELECTABLE]: CalloutComponentInputSelectableSchema;
|
|
8
|
+
[CalloutComponentBaseType.NESTABLE]: CalloutComponentNestableSchema;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Each key is a CalloutComponentBaseType and the value is the corresponding schema from CalloutComponentBaseSchemas
|
|
12
|
+
*/
|
|
13
|
+
export type CalloutComponentBaseMap = {
|
|
14
|
+
[K in CalloutComponentBaseType]: CalloutComponentBaseSchemas[K];
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseSchema, CalloutComponentSchema } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentBaseNestableSchema extends CalloutComponentBaseSchema {
|
|
4
|
+
type: CalloutComponentType.NESTABLE_TABS | CalloutComponentType.NESTABLE_PANEL | CalloutComponentType.NESTABLE_WELL;
|
|
5
|
+
input: false;
|
|
6
|
+
components: CalloutComponentSchema[];
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface CalloutComponentBaseRules {
|
|
2
|
+
/** A required field must be filled in before the form can be submitted. */
|
|
3
|
+
required?: boolean;
|
|
4
|
+
/** Probably unused property from [formio](https://github.com/beabee-communityrm/formio.js) */
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseRules, CalloutResponseAnswer } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentBaseSchema {
|
|
4
|
+
id: string;
|
|
5
|
+
type: CalloutComponentType;
|
|
6
|
+
key: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
/** `true` if this is an input component */
|
|
9
|
+
input?: boolean;
|
|
10
|
+
/** `true` if the answer should only visible for admins */
|
|
11
|
+
adminOnly?: boolean;
|
|
12
|
+
/** Validation rules */
|
|
13
|
+
validate?: CalloutComponentBaseRules;
|
|
14
|
+
/** True if multiple responses / answers allowed */
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
/** If defined then this is the default value */
|
|
17
|
+
defaultValue?: CalloutResponseAnswer | CalloutResponseAnswer[];
|
|
18
|
+
/** `true` if this component should be hidden */
|
|
19
|
+
hidden?: boolean;
|
|
20
|
+
/** Unused property */
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseInputSchema, CalloutComponentInputAddressRules } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentInputAddressSchema extends CalloutComponentBaseInputSchema {
|
|
4
|
+
type: CalloutComponentType.INPUT_ADDRESS;
|
|
5
|
+
/** The validation rules for the form */
|
|
6
|
+
validate?: CalloutComponentInputAddressRules;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseInputSchema, CalloutComponentInputCheckboxRules } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentInputCheckboxSchema extends CalloutComponentBaseInputSchema {
|
|
4
|
+
type: CalloutComponentType.INPUT_CHECKBOX;
|
|
5
|
+
/** Can not be set to true for checkboxes */
|
|
6
|
+
multiple?: false;
|
|
7
|
+
/** The default value for the checkbox */
|
|
8
|
+
defaultValue?: boolean;
|
|
9
|
+
/** The validation rules for the form */
|
|
10
|
+
validate?: CalloutComponentInputCheckboxRules;
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseInputSchema, CalloutComponentInputCurrencyRules, TextCase } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentInputCurrencySchema extends CalloutComponentBaseInputSchema {
|
|
4
|
+
type: CalloutComponentType.INPUT_CURRENCY;
|
|
5
|
+
/** Placeholder for the form */
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** The text case for the form */
|
|
8
|
+
case: TextCase;
|
|
9
|
+
/** If `true` multiple spaces will be truncated to a single space */
|
|
10
|
+
truncateMultipleSpaces?: boolean;
|
|
11
|
+
/** E.g. USD, EUR, GBP, etc. */
|
|
12
|
+
currency: string;
|
|
13
|
+
/** The default value for the form */
|
|
14
|
+
defaultValue?: number | number[];
|
|
15
|
+
/** The validation rules for the form */
|
|
16
|
+
validate?: CalloutComponentInputCurrencyRules;
|
|
17
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseInputSchema, CalloutComponentInputDateTimeRules, TextCase } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentInputDateTimeSchema extends CalloutComponentBaseInputSchema {
|
|
4
|
+
type: CalloutComponentType.INPUT_DATE_TIME;
|
|
5
|
+
/** Placeholder for the form */
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** The text case for the form */
|
|
8
|
+
case?: TextCase;
|
|
9
|
+
/** If `true` multiple spaces will be truncated to a single space */
|
|
10
|
+
truncateMultipleSpaces?: boolean;
|
|
11
|
+
datePicker?: {
|
|
12
|
+
disableWeekends: boolean;
|
|
13
|
+
disableWeekdays: boolean;
|
|
14
|
+
/** Unused property */
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
};
|
|
17
|
+
widget: {
|
|
18
|
+
mode: "single";
|
|
19
|
+
enableTime: boolean;
|
|
20
|
+
/** E.g. "yyyy-MM-dd hh:mm a" */
|
|
21
|
+
format: string;
|
|
22
|
+
hourIncrement?: number;
|
|
23
|
+
minuteIncrement?: number;
|
|
24
|
+
/** E.g. "en" */
|
|
25
|
+
locale: string;
|
|
26
|
+
minDate: string | null;
|
|
27
|
+
maxDate: string | null;
|
|
28
|
+
disableWeekends: boolean;
|
|
29
|
+
disableWeekdays: boolean;
|
|
30
|
+
/** Unused property */
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
};
|
|
33
|
+
/** E.g. "2024-02-02T13:02:00+01:00" */
|
|
34
|
+
defaultValue?: string | string[];
|
|
35
|
+
enableMinDateInput: boolean;
|
|
36
|
+
enableMaxDateInput: boolean;
|
|
37
|
+
/** The validation rules for the form */
|
|
38
|
+
validate?: CalloutComponentInputDateTimeRules;
|
|
39
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CalloutComponentBaseRules } from "./index.ts";
|
|
2
|
+
export interface CalloutComponentInputEmailRules extends CalloutComponentBaseRules {
|
|
3
|
+
/** The regular expression pattern test that the field value must pass before the form can be submitted. */
|
|
4
|
+
pattern?: string;
|
|
5
|
+
/** The maximum length requirement this field must meet */
|
|
6
|
+
maxLength?: number;
|
|
7
|
+
/** The minimum length requirement this field must meet. */
|
|
8
|
+
minLength?: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseInputSchema, CalloutComponentInputEmailRules, TextCase } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentInputEmailSchema extends CalloutComponentBaseInputSchema {
|
|
4
|
+
type: CalloutComponentType.INPUT_EMAIL;
|
|
5
|
+
/** Placeholder for the form */
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** The text case for the form */
|
|
8
|
+
case?: TextCase;
|
|
9
|
+
/** The validation rules for the form */
|
|
10
|
+
validate?: CalloutComponentInputEmailRules;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseInputSchema, CalloutComponentInputFileRules } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentInputFileSchema extends CalloutComponentBaseInputSchema {
|
|
4
|
+
type: CalloutComponentType.INPUT_FILE;
|
|
5
|
+
filePattern?: string;
|
|
6
|
+
/** E.g. `"0KB"` */
|
|
7
|
+
fileMinSize?: string;
|
|
8
|
+
/** E.g. `"1GB"` */
|
|
9
|
+
fileMaxSize?: string;
|
|
10
|
+
/** E.g. `"200"` */
|
|
11
|
+
imageSize?: string;
|
|
12
|
+
/** The storage target for the uploaded file */
|
|
13
|
+
storage?: string;
|
|
14
|
+
/** If the file must be an image */
|
|
15
|
+
image?: boolean;
|
|
16
|
+
/** Allow the user to upload a file from their device's webcam */
|
|
17
|
+
webcam?: boolean;
|
|
18
|
+
validate?: CalloutComponentInputFileRules;
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CalloutComponentBaseRules } from "./index.ts";
|
|
2
|
+
export interface CalloutComponentInputNumberRules extends CalloutComponentBaseRules {
|
|
3
|
+
/** TODO: For what is this property? */
|
|
4
|
+
integer?: "";
|
|
5
|
+
/** The maximum value that can be entered for this field. */
|
|
6
|
+
max?: number;
|
|
7
|
+
/** The minimum value that can be entered for this field. */
|
|
8
|
+
min?: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseInputSchema, CalloutComponentInputNumberRules } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentInputNumberSchema extends CalloutComponentBaseInputSchema {
|
|
4
|
+
type: CalloutComponentType.INPUT_NUMBER;
|
|
5
|
+
/** Placeholder for the form */
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** `100` -> `100.00` if `true` */
|
|
8
|
+
requireDecimal?: boolean;
|
|
9
|
+
/** `3.14159265358979323846` -> `3.14159` if `decimalLimit === 5` */
|
|
10
|
+
decimalLimit?: number;
|
|
11
|
+
/** `10000000000` -> `10,000,000,000` if `true` */
|
|
12
|
+
delimiter?: boolean;
|
|
13
|
+
/** The default value for the form */
|
|
14
|
+
defaultValue?: number | number[];
|
|
15
|
+
/** The validation rules for the form */
|
|
16
|
+
validate?: CalloutComponentInputNumberRules;
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CalloutComponentType } from "../data/index.ts";
|
|
2
|
+
import type { CalloutComponentBaseInputSchema, CalloutComponentInputPhoneNumberRules } from "./index.ts";
|
|
3
|
+
export interface CalloutComponentInputPhoneNumberSchema extends CalloutComponentBaseInputSchema {
|
|
4
|
+
type: CalloutComponentType.INPUT_PHONE_NUMBER;
|
|
5
|
+
/** The validation rules for the form */
|
|
6
|
+
validate?: CalloutComponentInputPhoneNumberRules;
|
|
7
|
+
}
|