gymmonk-schema 0.1.2 → 0.2.0
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 +30 -80
- package/dist/common.d.ts +27 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +35 -0
- package/dist/common.js.map +1 -0
- package/dist/index.d.ts +10 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -17
- package/dist/index.js.map +1 -1
- package/package.json +9 -11
- package/dist/audit/audit-log.schema.d.ts +0 -78
- package/dist/audit/audit-log.schema.d.ts.map +0 -1
- package/dist/audit/audit-log.schema.js +0 -78
- package/dist/audit/audit-log.schema.js.map +0 -1
- package/dist/audit/index.d.ts +0 -2
- package/dist/audit/index.d.ts.map +0 -1
- package/dist/audit/index.js +0 -2
- package/dist/audit/index.js.map +0 -1
- package/dist/auth/device/device.schema.d.ts +0 -10
- package/dist/auth/device/device.schema.d.ts.map +0 -1
- package/dist/auth/device/device.schema.js +0 -10
- package/dist/auth/device/device.schema.js.map +0 -1
- package/dist/auth/device/index.d.ts +0 -2
- package/dist/auth/device/index.d.ts.map +0 -1
- package/dist/auth/device/index.js +0 -2
- package/dist/auth/device/index.js.map +0 -1
- package/dist/auth/index.d.ts +0 -10
- package/dist/auth/index.d.ts.map +0 -1
- package/dist/auth/index.js +0 -10
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/otp/index.d.ts +0 -2
- package/dist/auth/otp/index.d.ts.map +0 -1
- package/dist/auth/otp/index.js +0 -2
- package/dist/auth/otp/index.js.map +0 -1
- package/dist/auth/otp/otp.schema.d.ts +0 -8
- package/dist/auth/otp/otp.schema.d.ts.map +0 -1
- package/dist/auth/otp/otp.schema.js +0 -9
- package/dist/auth/otp/otp.schema.js.map +0 -1
- package/dist/auth/password-history/index.d.ts +0 -2
- package/dist/auth/password-history/index.d.ts.map +0 -1
- package/dist/auth/password-history/index.js +0 -2
- package/dist/auth/password-history/index.js.map +0 -1
- package/dist/auth/password-history/password-history.schema.d.ts +0 -8
- package/dist/auth/password-history/password-history.schema.d.ts.map +0 -1
- package/dist/auth/password-history/password-history.schema.js +0 -8
- package/dist/auth/password-history/password-history.schema.js.map +0 -1
- package/dist/auth/permission/index.d.ts +0 -3
- package/dist/auth/permission/index.d.ts.map +0 -1
- package/dist/auth/permission/index.js +0 -3
- package/dist/auth/permission/index.js.map +0 -1
- package/dist/auth/permission/permission.dto.d.ts +0 -7
- package/dist/auth/permission/permission.dto.d.ts.map +0 -1
- package/dist/auth/permission/permission.dto.js +0 -6
- package/dist/auth/permission/permission.dto.js.map +0 -1
- package/dist/auth/permission/permission.schema.d.ts +0 -7
- package/dist/auth/permission/permission.schema.d.ts.map +0 -1
- package/dist/auth/permission/permission.schema.js +0 -7
- package/dist/auth/permission/permission.schema.js.map +0 -1
- package/dist/auth/resource/index.d.ts +0 -2
- package/dist/auth/resource/index.d.ts.map +0 -1
- package/dist/auth/resource/index.js +0 -2
- package/dist/auth/resource/index.js.map +0 -1
- package/dist/auth/resource/resource.schema.d.ts +0 -7
- package/dist/auth/resource/resource.schema.d.ts.map +0 -1
- package/dist/auth/resource/resource.schema.js +0 -7
- package/dist/auth/resource/resource.schema.js.map +0 -1
- package/dist/auth/role/index.d.ts +0 -3
- package/dist/auth/role/index.d.ts.map +0 -1
- package/dist/auth/role/index.js +0 -3
- package/dist/auth/role/index.js.map +0 -1
- package/dist/auth/role/role.dto.d.ts +0 -8
- package/dist/auth/role/role.dto.d.ts.map +0 -1
- package/dist/auth/role/role.dto.js +0 -7
- package/dist/auth/role/role.dto.js.map +0 -1
- package/dist/auth/role/role.schema.d.ts +0 -8
- package/dist/auth/role/role.schema.d.ts.map +0 -1
- package/dist/auth/role/role.schema.js +0 -8
- package/dist/auth/role/role.schema.js.map +0 -1
- package/dist/auth/token/index.d.ts +0 -2
- package/dist/auth/token/index.d.ts.map +0 -1
- package/dist/auth/token/index.js +0 -2
- package/dist/auth/token/index.js.map +0 -1
- package/dist/auth/token/token.schema.d.ts +0 -7
- package/dist/auth/token/token.schema.d.ts.map +0 -1
- package/dist/auth/token/token.schema.js +0 -6
- package/dist/auth/token/token.schema.js.map +0 -1
- package/dist/auth/user/index.d.ts +0 -5
- package/dist/auth/user/index.d.ts.map +0 -1
- package/dist/auth/user/index.js +0 -5
- package/dist/auth/user/index.js.map +0 -1
- package/dist/auth/user/user.dto.d.ts +0 -21
- package/dist/auth/user/user.dto.d.ts.map +0 -1
- package/dist/auth/user/user.dto.js +0 -22
- package/dist/auth/user/user.dto.js.map +0 -1
- package/dist/auth/user/user.public.d.ts +0 -29
- package/dist/auth/user/user.public.d.ts.map +0 -1
- package/dist/auth/user/user.public.js +0 -19
- package/dist/auth/user/user.public.js.map +0 -1
- package/dist/auth/user/user.schema.d.ts +0 -34
- package/dist/auth/user/user.schema.d.ts.map +0 -1
- package/dist/auth/user/user.schema.js +0 -27
- package/dist/auth/user/user.schema.js.map +0 -1
- package/dist/auth/user/user.types.d.ts +0 -4
- package/dist/auth/user/user.types.d.ts.map +0 -1
- package/dist/auth/user/user.types.js +0 -2
- package/dist/auth/user/user.types.js.map +0 -1
- package/dist/auth/user-activity/index.d.ts +0 -2
- package/dist/auth/user-activity/index.d.ts.map +0 -1
- package/dist/auth/user-activity/index.js +0 -2
- package/dist/auth/user-activity/index.js.map +0 -1
- package/dist/auth/user-activity/user-activity.schema.d.ts +0 -10
- package/dist/auth/user-activity/user-activity.schema.d.ts.map +0 -1
- package/dist/auth/user-activity/user-activity.schema.js +0 -11
- package/dist/auth/user-activity/user-activity.schema.js.map +0 -1
- package/dist/common/enums/gender.enum.d.ts +0 -9
- package/dist/common/enums/gender.enum.d.ts.map +0 -1
- package/dist/common/enums/gender.enum.js +0 -4
- package/dist/common/enums/gender.enum.js.map +0 -1
- package/dist/common/enums/index.d.ts +0 -4
- package/dist/common/enums/index.d.ts.map +0 -1
- package/dist/common/enums/index.js +0 -4
- package/dist/common/enums/index.js.map +0 -1
- package/dist/common/enums/notification-type.enum.d.ts +0 -11
- package/dist/common/enums/notification-type.enum.d.ts.map +0 -1
- package/dist/common/enums/notification-type.enum.js +0 -10
- package/dist/common/enums/notification-type.enum.js.map +0 -1
- package/dist/common/enums/status.enum.d.ts +0 -10
- package/dist/common/enums/status.enum.d.ts.map +0 -1
- package/dist/common/enums/status.enum.js +0 -4
- package/dist/common/enums/status.enum.js.map +0 -1
- package/dist/common/index.d.ts +0 -5
- package/dist/common/index.d.ts.map +0 -1
- package/dist/common/index.js +0 -5
- package/dist/common/index.js.map +0 -1
- package/dist/common/pagination/index.d.ts +0 -2
- package/dist/common/pagination/index.d.ts.map +0 -1
- package/dist/common/pagination/index.js +0 -2
- package/dist/common/pagination/index.js.map +0 -1
- package/dist/common/pagination/pagination.schema.d.ts +0 -19
- package/dist/common/pagination/pagination.schema.d.ts.map +0 -1
- package/dist/common/pagination/pagination.schema.js +0 -22
- package/dist/common/pagination/pagination.schema.js.map +0 -1
- package/dist/common/primitives/date.schema.d.ts +0 -14
- package/dist/common/primitives/date.schema.d.ts.map +0 -1
- package/dist/common/primitives/date.schema.js +0 -17
- package/dist/common/primitives/date.schema.js.map +0 -1
- package/dist/common/primitives/index.d.ts +0 -4
- package/dist/common/primitives/index.d.ts.map +0 -1
- package/dist/common/primitives/index.js +0 -4
- package/dist/common/primitives/index.js.map +0 -1
- package/dist/common/primitives/object-id.schema.d.ts +0 -8
- package/dist/common/primitives/object-id.schema.d.ts.map +0 -1
- package/dist/common/primitives/object-id.schema.js +0 -9
- package/dist/common/primitives/object-id.schema.js.map +0 -1
- package/dist/common/primitives/string.schema.d.ts +0 -13
- package/dist/common/primitives/string.schema.d.ts.map +0 -1
- package/dist/common/primitives/string.schema.js +0 -16
- package/dist/common/primitives/string.schema.js.map +0 -1
- package/dist/common/value-objects/address.schema.d.ts +0 -11
- package/dist/common/value-objects/address.schema.d.ts.map +0 -1
- package/dist/common/value-objects/address.schema.js +0 -15
- package/dist/common/value-objects/address.schema.js.map +0 -1
- package/dist/common/value-objects/email.schema.d.ts +0 -4
- package/dist/common/value-objects/email.schema.d.ts.map +0 -1
- package/dist/common/value-objects/email.schema.js +0 -3
- package/dist/common/value-objects/email.schema.js.map +0 -1
- package/dist/common/value-objects/index.d.ts +0 -8
- package/dist/common/value-objects/index.d.ts.map +0 -1
- package/dist/common/value-objects/index.js +0 -8
- package/dist/common/value-objects/index.js.map +0 -1
- package/dist/common/value-objects/mfa.schema.d.ts +0 -19
- package/dist/common/value-objects/mfa.schema.d.ts.map +0 -1
- package/dist/common/value-objects/mfa.schema.js +0 -12
- package/dist/common/value-objects/mfa.schema.js.map +0 -1
- package/dist/common/value-objects/nutritional-values.schema.d.ts +0 -10
- package/dist/common/value-objects/nutritional-values.schema.d.ts.map +0 -1
- package/dist/common/value-objects/nutritional-values.schema.js +0 -9
- package/dist/common/value-objects/nutritional-values.schema.js.map +0 -1
- package/dist/common/value-objects/phone.schema.d.ts +0 -8
- package/dist/common/value-objects/phone.schema.d.ts.map +0 -1
- package/dist/common/value-objects/phone.schema.js +0 -11
- package/dist/common/value-objects/phone.schema.js.map +0 -1
- package/dist/common/value-objects/plan-variant.schema.d.ts +0 -24
- package/dist/common/value-objects/plan-variant.schema.d.ts.map +0 -1
- package/dist/common/value-objects/plan-variant.schema.js +0 -19
- package/dist/common/value-objects/plan-variant.schema.js.map +0 -1
- package/dist/common/value-objects/social-login.schema.d.ts +0 -20
- package/dist/common/value-objects/social-login.schema.d.ts.map +0 -1
- package/dist/common/value-objects/social-login.schema.js +0 -10
- package/dist/common/value-objects/social-login.schema.js.map +0 -1
- package/dist/community/conversation/conversation.schema.d.ts +0 -11
- package/dist/community/conversation/conversation.schema.d.ts.map +0 -1
- package/dist/community/conversation/conversation.schema.js +0 -29
- package/dist/community/conversation/conversation.schema.js.map +0 -1
- package/dist/community/conversation/index.d.ts +0 -2
- package/dist/community/conversation/index.d.ts.map +0 -1
- package/dist/community/conversation/index.js +0 -2
- package/dist/community/conversation/index.js.map +0 -1
- package/dist/community/index.d.ts +0 -4
- package/dist/community/index.d.ts.map +0 -1
- package/dist/community/index.js +0 -4
- package/dist/community/index.js.map +0 -1
- package/dist/community/message/index.d.ts +0 -2
- package/dist/community/message/index.d.ts.map +0 -1
- package/dist/community/message/index.js +0 -2
- package/dist/community/message/index.js.map +0 -1
- package/dist/community/message/message.schema.d.ts +0 -29
- package/dist/community/message/message.schema.d.ts.map +0 -1
- package/dist/community/message/message.schema.js +0 -28
- package/dist/community/message/message.schema.js.map +0 -1
- package/dist/community/post/index.d.ts +0 -2
- package/dist/community/post/index.d.ts.map +0 -1
- package/dist/community/post/index.js +0 -2
- package/dist/community/post/index.js.map +0 -1
- package/dist/community/post/post.schema.d.ts +0 -27
- package/dist/community/post/post.schema.d.ts.map +0 -1
- package/dist/community/post/post.schema.js +0 -32
- package/dist/community/post/post.schema.js.map +0 -1
- package/dist/feedback/feedback.schema.d.ts +0 -35
- package/dist/feedback/feedback.schema.d.ts.map +0 -1
- package/dist/feedback/feedback.schema.js +0 -41
- package/dist/feedback/feedback.schema.js.map +0 -1
- package/dist/feedback/index.d.ts +0 -2
- package/dist/feedback/index.d.ts.map +0 -1
- package/dist/feedback/index.js +0 -2
- package/dist/feedback/index.js.map +0 -1
- package/dist/gym/achievement-badge/achievement-badge.schema.d.ts +0 -11
- package/dist/gym/achievement-badge/achievement-badge.schema.d.ts.map +0 -1
- package/dist/gym/achievement-badge/achievement-badge.schema.js +0 -13
- package/dist/gym/achievement-badge/achievement-badge.schema.js.map +0 -1
- package/dist/gym/achievement-badge/index.d.ts +0 -2
- package/dist/gym/achievement-badge/index.d.ts.map +0 -1
- package/dist/gym/achievement-badge/index.js +0 -2
- package/dist/gym/achievement-badge/index.js.map +0 -1
- package/dist/gym/attendance/attendance.schema.d.ts +0 -25
- package/dist/gym/attendance/attendance.schema.d.ts.map +0 -1
- package/dist/gym/attendance/attendance.schema.js +0 -15
- package/dist/gym/attendance/attendance.schema.js.map +0 -1
- package/dist/gym/attendance/index.d.ts +0 -2
- package/dist/gym/attendance/index.d.ts.map +0 -1
- package/dist/gym/attendance/index.js +0 -2
- package/dist/gym/attendance/index.js.map +0 -1
- package/dist/gym/center/center.dto.d.ts +0 -2
- package/dist/gym/center/center.dto.d.ts.map +0 -1
- package/dist/gym/center/center.dto.js +0 -2
- package/dist/gym/center/center.dto.js.map +0 -1
- package/dist/gym/center/center.schema.d.ts +0 -28
- package/dist/gym/center/center.schema.d.ts.map +0 -1
- package/dist/gym/center/center.schema.js +0 -22
- package/dist/gym/center/center.schema.js.map +0 -1
- package/dist/gym/center/index.d.ts +0 -2
- package/dist/gym/center/index.d.ts.map +0 -1
- package/dist/gym/center/index.js +0 -2
- package/dist/gym/center/index.js.map +0 -1
- package/dist/gym/center-facility/center-facility.schema.d.ts +0 -15
- package/dist/gym/center-facility/center-facility.schema.d.ts.map +0 -1
- package/dist/gym/center-facility/center-facility.schema.js +0 -12
- package/dist/gym/center-facility/center-facility.schema.js.map +0 -1
- package/dist/gym/center-facility/index.d.ts +0 -2
- package/dist/gym/center-facility/index.d.ts.map +0 -1
- package/dist/gym/center-facility/index.js +0 -2
- package/dist/gym/center-facility/index.js.map +0 -1
- package/dist/gym/center-service/center-service.schema.d.ts +0 -27
- package/dist/gym/center-service/center-service.schema.d.ts.map +0 -1
- package/dist/gym/center-service/center-service.schema.js +0 -16
- package/dist/gym/center-service/center-service.schema.js.map +0 -1
- package/dist/gym/center-service/index.d.ts +0 -2
- package/dist/gym/center-service/index.d.ts.map +0 -1
- package/dist/gym/center-service/index.js +0 -2
- package/dist/gym/center-service/index.js.map +0 -1
- package/dist/gym/class-schedule/class-schedule.schema.d.ts +0 -15
- package/dist/gym/class-schedule/class-schedule.schema.d.ts.map +0 -1
- package/dist/gym/class-schedule/class-schedule.schema.js +0 -24
- package/dist/gym/class-schedule/class-schedule.schema.js.map +0 -1
- package/dist/gym/class-schedule/index.d.ts +0 -2
- package/dist/gym/class-schedule/index.d.ts.map +0 -1
- package/dist/gym/class-schedule/index.js +0 -2
- package/dist/gym/class-schedule/index.js.map +0 -1
- package/dist/gym/equipment-catalog/equipment-catalog.schema.d.ts +0 -11
- package/dist/gym/equipment-catalog/equipment-catalog.schema.d.ts.map +0 -1
- package/dist/gym/equipment-catalog/equipment-catalog.schema.js +0 -12
- package/dist/gym/equipment-catalog/equipment-catalog.schema.js.map +0 -1
- package/dist/gym/equipment-catalog/index.d.ts +0 -2
- package/dist/gym/equipment-catalog/index.d.ts.map +0 -1
- package/dist/gym/equipment-catalog/index.js +0 -2
- package/dist/gym/equipment-catalog/index.js.map +0 -1
- package/dist/gym/equipment-inventory/equipment-inventory.schema.d.ts +0 -24
- package/dist/gym/equipment-inventory/equipment-inventory.schema.d.ts.map +0 -1
- package/dist/gym/equipment-inventory/equipment-inventory.schema.js +0 -19
- package/dist/gym/equipment-inventory/equipment-inventory.schema.js.map +0 -1
- package/dist/gym/equipment-inventory/index.d.ts +0 -2
- package/dist/gym/equipment-inventory/index.d.ts.map +0 -1
- package/dist/gym/equipment-inventory/index.js +0 -2
- package/dist/gym/equipment-inventory/index.js.map +0 -1
- package/dist/gym/facility-catalog/facility-catalog.schema.d.ts +0 -8
- package/dist/gym/facility-catalog/facility-catalog.schema.d.ts.map +0 -1
- package/dist/gym/facility-catalog/facility-catalog.schema.js +0 -9
- package/dist/gym/facility-catalog/facility-catalog.schema.js.map +0 -1
- package/dist/gym/facility-catalog/index.d.ts +0 -2
- package/dist/gym/facility-catalog/index.d.ts.map +0 -1
- package/dist/gym/facility-catalog/index.js +0 -2
- package/dist/gym/facility-catalog/index.js.map +0 -1
- package/dist/gym/goal/goal.schema.d.ts +0 -26
- package/dist/gym/goal/goal.schema.d.ts.map +0 -1
- package/dist/gym/goal/goal.schema.js +0 -17
- package/dist/gym/goal/goal.schema.js.map +0 -1
- package/dist/gym/goal/index.d.ts +0 -2
- package/dist/gym/goal/index.d.ts.map +0 -1
- package/dist/gym/goal/index.js +0 -2
- package/dist/gym/goal/index.js.map +0 -1
- package/dist/gym/gym-layout/gym-layout.schema.d.ts +0 -22
- package/dist/gym/gym-layout/gym-layout.schema.d.ts.map +0 -1
- package/dist/gym/gym-layout/gym-layout.schema.js +0 -20
- package/dist/gym/gym-layout/gym-layout.schema.js.map +0 -1
- package/dist/gym/gym-layout/index.d.ts +0 -2
- package/dist/gym/gym-layout/index.d.ts.map +0 -1
- package/dist/gym/gym-layout/index.js +0 -2
- package/dist/gym/gym-layout/index.js.map +0 -1
- package/dist/gym/index.d.ts +0 -15
- package/dist/gym/index.d.ts.map +0 -1
- package/dist/gym/index.js +0 -15
- package/dist/gym/index.js.map +0 -1
- package/dist/gym/organisation/index.d.ts +0 -2
- package/dist/gym/organisation/index.d.ts.map +0 -1
- package/dist/gym/organisation/index.js +0 -2
- package/dist/gym/organisation/index.js.map +0 -1
- package/dist/gym/organisation/organisation.dto.d.ts +0 -2
- package/dist/gym/organisation/organisation.dto.d.ts.map +0 -1
- package/dist/gym/organisation/organisation.dto.js +0 -2
- package/dist/gym/organisation/organisation.dto.js.map +0 -1
- package/dist/gym/organisation/organisation.schema.d.ts +0 -28
- package/dist/gym/organisation/organisation.schema.d.ts.map +0 -1
- package/dist/gym/organisation/organisation.schema.js +0 -28
- package/dist/gym/organisation/organisation.schema.js.map +0 -1
- package/dist/gym/service-catalog/index.d.ts +0 -2
- package/dist/gym/service-catalog/index.d.ts.map +0 -1
- package/dist/gym/service-catalog/index.js +0 -2
- package/dist/gym/service-catalog/index.js.map +0 -1
- package/dist/gym/service-catalog/service-catalog.schema.d.ts +0 -11
- package/dist/gym/service-catalog/service-catalog.schema.d.ts.map +0 -1
- package/dist/gym/service-catalog/service-catalog.schema.js +0 -15
- package/dist/gym/service-catalog/service-catalog.schema.js.map +0 -1
- package/dist/gym/session-booking/index.d.ts +0 -2
- package/dist/gym/session-booking/index.d.ts.map +0 -1
- package/dist/gym/session-booking/index.js +0 -2
- package/dist/gym/session-booking/index.js.map +0 -1
- package/dist/gym/session-booking/session-booking.schema.d.ts +0 -29
- package/dist/gym/session-booking/session-booking.schema.d.ts.map +0 -1
- package/dist/gym/session-booking/session-booking.schema.js +0 -20
- package/dist/gym/session-booking/session-booking.schema.js.map +0 -1
- package/dist/internal/scaffolding.d.ts +0 -2
- package/dist/internal/scaffolding.d.ts.map +0 -1
- package/dist/internal/scaffolding.js +0 -2
- package/dist/internal/scaffolding.js.map +0 -1
- package/dist/landing/contact-request/contact-request.schema.d.ts +0 -13
- package/dist/landing/contact-request/contact-request.schema.d.ts.map +0 -1
- package/dist/landing/contact-request/contact-request.schema.js +0 -22
- package/dist/landing/contact-request/contact-request.schema.js.map +0 -1
- package/dist/landing/contact-request/index.d.ts +0 -2
- package/dist/landing/contact-request/index.d.ts.map +0 -1
- package/dist/landing/contact-request/index.js +0 -2
- package/dist/landing/contact-request/index.js.map +0 -1
- package/dist/landing/index.d.ts +0 -2
- package/dist/landing/index.d.ts.map +0 -1
- package/dist/landing/index.js +0 -2
- package/dist/landing/index.js.map +0 -1
- package/dist/marketing/advertisement/advertisement.schema.d.ts +0 -33
- package/dist/marketing/advertisement/advertisement.schema.d.ts.map +0 -1
- package/dist/marketing/advertisement/advertisement.schema.js +0 -37
- package/dist/marketing/advertisement/advertisement.schema.js.map +0 -1
- package/dist/marketing/advertisement/index.d.ts +0 -2
- package/dist/marketing/advertisement/index.d.ts.map +0 -1
- package/dist/marketing/advertisement/index.js +0 -2
- package/dist/marketing/advertisement/index.js.map +0 -1
- package/dist/marketing/brand/brand.schema.d.ts +0 -18
- package/dist/marketing/brand/brand.schema.d.ts.map +0 -1
- package/dist/marketing/brand/brand.schema.js +0 -26
- package/dist/marketing/brand/brand.schema.js.map +0 -1
- package/dist/marketing/brand/index.d.ts +0 -2
- package/dist/marketing/brand/index.d.ts.map +0 -1
- package/dist/marketing/brand/index.js +0 -2
- package/dist/marketing/brand/index.js.map +0 -1
- package/dist/marketing/index.d.ts +0 -5
- package/dist/marketing/index.d.ts.map +0 -1
- package/dist/marketing/index.js +0 -5
- package/dist/marketing/index.js.map +0 -1
- package/dist/marketing/marketing-campaign/index.d.ts +0 -2
- package/dist/marketing/marketing-campaign/index.d.ts.map +0 -1
- package/dist/marketing/marketing-campaign/index.js +0 -2
- package/dist/marketing/marketing-campaign/index.js.map +0 -1
- package/dist/marketing/marketing-campaign/marketing-campaign.schema.d.ts +0 -54
- package/dist/marketing/marketing-campaign/marketing-campaign.schema.d.ts.map +0 -1
- package/dist/marketing/marketing-campaign/marketing-campaign.schema.js +0 -41
- package/dist/marketing/marketing-campaign/marketing-campaign.schema.js.map +0 -1
- package/dist/marketing/referral/index.d.ts +0 -2
- package/dist/marketing/referral/index.d.ts.map +0 -1
- package/dist/marketing/referral/index.js +0 -2
- package/dist/marketing/referral/index.js.map +0 -1
- package/dist/marketing/referral/referral.schema.d.ts +0 -28
- package/dist/marketing/referral/referral.schema.d.ts.map +0 -1
- package/dist/marketing/referral/referral.schema.js +0 -25
- package/dist/marketing/referral/referral.schema.js.map +0 -1
- package/dist/notification/index.d.ts +0 -3
- package/dist/notification/index.d.ts.map +0 -1
- package/dist/notification/index.js +0 -3
- package/dist/notification/index.js.map +0 -1
- package/dist/notification/notification/index.d.ts +0 -2
- package/dist/notification/notification/index.d.ts.map +0 -1
- package/dist/notification/notification/index.js +0 -2
- package/dist/notification/notification/index.js.map +0 -1
- package/dist/notification/notification/notification.schema.d.ts +0 -59
- package/dist/notification/notification/notification.schema.d.ts.map +0 -1
- package/dist/notification/notification/notification.schema.js +0 -35
- package/dist/notification/notification/notification.schema.js.map +0 -1
- package/dist/notification/notification-template/index.d.ts +0 -2
- package/dist/notification/notification-template/index.d.ts.map +0 -1
- package/dist/notification/notification-template/index.js +0 -2
- package/dist/notification/notification-template/index.js.map +0 -1
- package/dist/notification/notification-template/notification-template.schema.d.ts +0 -43
- package/dist/notification/notification-template/notification-template.schema.d.ts.map +0 -1
- package/dist/notification/notification-template/notification-template.schema.js +0 -36
- package/dist/notification/notification-template/notification-template.schema.js.map +0 -1
- package/dist/nutrition/diet-plan/diet-plan.schema.d.ts +0 -95
- package/dist/nutrition/diet-plan/diet-plan.schema.d.ts.map +0 -1
- package/dist/nutrition/diet-plan/diet-plan.schema.js +0 -46
- package/dist/nutrition/diet-plan/diet-plan.schema.js.map +0 -1
- package/dist/nutrition/diet-plan/index.d.ts +0 -2
- package/dist/nutrition/diet-plan/index.d.ts.map +0 -1
- package/dist/nutrition/diet-plan/index.js +0 -2
- package/dist/nutrition/diet-plan/index.js.map +0 -1
- package/dist/nutrition/diet-tracking/diet-tracking.schema.d.ts +0 -24
- package/dist/nutrition/diet-tracking/diet-tracking.schema.d.ts.map +0 -1
- package/dist/nutrition/diet-tracking/diet-tracking.schema.js +0 -22
- package/dist/nutrition/diet-tracking/diet-tracking.schema.js.map +0 -1
- package/dist/nutrition/diet-tracking/index.d.ts +0 -2
- package/dist/nutrition/diet-tracking/index.d.ts.map +0 -1
- package/dist/nutrition/diet-tracking/index.js +0 -2
- package/dist/nutrition/diet-tracking/index.js.map +0 -1
- package/dist/nutrition/hydration-tracking/hydration-tracking.schema.d.ts +0 -27
- package/dist/nutrition/hydration-tracking/hydration-tracking.schema.d.ts.map +0 -1
- package/dist/nutrition/hydration-tracking/hydration-tracking.schema.js +0 -16
- package/dist/nutrition/hydration-tracking/hydration-tracking.schema.js.map +0 -1
- package/dist/nutrition/hydration-tracking/index.d.ts +0 -2
- package/dist/nutrition/hydration-tracking/index.d.ts.map +0 -1
- package/dist/nutrition/hydration-tracking/index.js +0 -2
- package/dist/nutrition/hydration-tracking/index.js.map +0 -1
- package/dist/nutrition/index.d.ts +0 -6
- package/dist/nutrition/index.d.ts.map +0 -1
- package/dist/nutrition/index.js +0 -6
- package/dist/nutrition/index.js.map +0 -1
- package/dist/nutrition/ingredient/index.d.ts +0 -2
- package/dist/nutrition/ingredient/index.d.ts.map +0 -1
- package/dist/nutrition/ingredient/index.js +0 -2
- package/dist/nutrition/ingredient/index.js.map +0 -1
- package/dist/nutrition/ingredient/ingredient.schema.d.ts +0 -38
- package/dist/nutrition/ingredient/ingredient.schema.d.ts.map +0 -1
- package/dist/nutrition/ingredient/ingredient.schema.js +0 -38
- package/dist/nutrition/ingredient/ingredient.schema.js.map +0 -1
- package/dist/nutrition/recipe/index.d.ts +0 -2
- package/dist/nutrition/recipe/index.d.ts.map +0 -1
- package/dist/nutrition/recipe/index.js +0 -2
- package/dist/nutrition/recipe/index.js.map +0 -1
- package/dist/nutrition/recipe/recipe.schema.d.ts +0 -46
- package/dist/nutrition/recipe/recipe.schema.d.ts.map +0 -1
- package/dist/nutrition/recipe/recipe.schema.js +0 -34
- package/dist/nutrition/recipe/recipe.schema.js.map +0 -1
- package/dist/subscription/coupon/coupon.schema.d.ts +0 -25
- package/dist/subscription/coupon/coupon.schema.d.ts.map +0 -1
- package/dist/subscription/coupon/coupon.schema.js +0 -20
- package/dist/subscription/coupon/coupon.schema.js.map +0 -1
- package/dist/subscription/coupon/index.d.ts +0 -2
- package/dist/subscription/coupon/index.d.ts.map +0 -1
- package/dist/subscription/coupon/index.js +0 -3
- package/dist/subscription/coupon/index.js.map +0 -1
- package/dist/subscription/index.d.ts +0 -7
- package/dist/subscription/index.d.ts.map +0 -1
- package/dist/subscription/index.js +0 -8
- package/dist/subscription/index.js.map +0 -1
- package/dist/subscription/membership/index.d.ts +0 -2
- package/dist/subscription/membership/index.d.ts.map +0 -1
- package/dist/subscription/membership/index.js +0 -2
- package/dist/subscription/membership/index.js.map +0 -1
- package/dist/subscription/membership/membership.schema.d.ts +0 -28
- package/dist/subscription/membership/membership.schema.d.ts.map +0 -1
- package/dist/subscription/membership/membership.schema.js +0 -18
- package/dist/subscription/membership/membership.schema.js.map +0 -1
- package/dist/subscription/membership-plan/index.d.ts +0 -2
- package/dist/subscription/membership-plan/index.d.ts.map +0 -1
- package/dist/subscription/membership-plan/index.js +0 -2
- package/dist/subscription/membership-plan/index.js.map +0 -1
- package/dist/subscription/membership-plan/membership-plan.schema.d.ts +0 -23
- package/dist/subscription/membership-plan/membership-plan.schema.d.ts.map +0 -1
- package/dist/subscription/membership-plan/membership-plan.schema.js +0 -19
- package/dist/subscription/membership-plan/membership-plan.schema.js.map +0 -1
- package/dist/subscription/payment-transaction/index.d.ts +0 -2
- package/dist/subscription/payment-transaction/index.d.ts.map +0 -1
- package/dist/subscription/payment-transaction/index.js +0 -2
- package/dist/subscription/payment-transaction/index.js.map +0 -1
- package/dist/subscription/payment-transaction/payment-transaction.schema.d.ts +0 -47
- package/dist/subscription/payment-transaction/payment-transaction.schema.d.ts.map +0 -1
- package/dist/subscription/payment-transaction/payment-transaction.schema.js +0 -24
- package/dist/subscription/payment-transaction/payment-transaction.schema.js.map +0 -1
- package/dist/subscription/subscription/index.d.ts +0 -2
- package/dist/subscription/subscription/index.d.ts.map +0 -1
- package/dist/subscription/subscription/index.js +0 -2
- package/dist/subscription/subscription/index.js.map +0 -1
- package/dist/subscription/subscription/subscription.schema.d.ts +0 -29
- package/dist/subscription/subscription/subscription.schema.d.ts.map +0 -1
- package/dist/subscription/subscription/subscription.schema.js +0 -21
- package/dist/subscription/subscription/subscription.schema.js.map +0 -1
- package/dist/subscription/subscription-plan/index.d.ts +0 -2
- package/dist/subscription/subscription-plan/index.d.ts.map +0 -1
- package/dist/subscription/subscription-plan/index.js +0 -3
- package/dist/subscription/subscription-plan/index.js.map +0 -1
- package/dist/subscription/subscription-plan/subscription-plan.schema.d.ts +0 -24
- package/dist/subscription/subscription-plan/subscription-plan.schema.d.ts.map +0 -1
- package/dist/subscription/subscription-plan/subscription-plan.schema.js +0 -18
- package/dist/subscription/subscription-plan/subscription-plan.schema.js.map +0 -1
- package/dist/support/index.d.ts +0 -2
- package/dist/support/index.d.ts.map +0 -1
- package/dist/support/index.js +0 -2
- package/dist/support/index.js.map +0 -1
- package/dist/support/support-ticket/index.d.ts +0 -2
- package/dist/support/support-ticket/index.d.ts.map +0 -1
- package/dist/support/support-ticket/index.js +0 -2
- package/dist/support/support-ticket/index.js.map +0 -1
- package/dist/support/support-ticket/support-ticket.schema.d.ts +0 -79
- package/dist/support/support-ticket/support-ticket.schema.d.ts.map +0 -1
- package/dist/support/support-ticket/support-ticket.schema.js +0 -73
- package/dist/support/support-ticket/support-ticket.schema.js.map +0 -1
- package/dist/workout/exercise/exercise.schema.d.ts +0 -36
- package/dist/workout/exercise/exercise.schema.d.ts.map +0 -1
- package/dist/workout/exercise/exercise.schema.js +0 -34
- package/dist/workout/exercise/exercise.schema.js.map +0 -1
- package/dist/workout/exercise/index.d.ts +0 -2
- package/dist/workout/exercise/index.d.ts.map +0 -1
- package/dist/workout/exercise/index.js +0 -2
- package/dist/workout/exercise/index.js.map +0 -1
- package/dist/workout/index.d.ts +0 -4
- package/dist/workout/index.d.ts.map +0 -1
- package/dist/workout/index.js +0 -4
- package/dist/workout/index.js.map +0 -1
- package/dist/workout/workout-plan/index.d.ts +0 -2
- package/dist/workout/workout-plan/index.d.ts.map +0 -1
- package/dist/workout/workout-plan/index.js +0 -2
- package/dist/workout/workout-plan/index.js.map +0 -1
- package/dist/workout/workout-plan/workout-plan.schema.d.ts +0 -28
- package/dist/workout/workout-plan/workout-plan.schema.d.ts.map +0 -1
- package/dist/workout/workout-plan/workout-plan.schema.js +0 -32
- package/dist/workout/workout-plan/workout-plan.schema.js.map +0 -1
- package/dist/workout/workout-tracking/index.d.ts +0 -2
- package/dist/workout/workout-tracking/index.d.ts.map +0 -1
- package/dist/workout/workout-tracking/index.js +0 -2
- package/dist/workout/workout-tracking/index.js.map +0 -1
- package/dist/workout/workout-tracking/workout-tracking.schema.d.ts +0 -26
- package/dist/workout/workout-tracking/workout-tracking.schema.d.ts.map +0 -1
- package/dist/workout/workout-tracking/workout-tracking.schema.js +0 -22
- package/dist/workout/workout-tracking/workout-tracking.schema.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,93 +1,43 @@
|
|
|
1
|
-
#
|
|
1
|
+
# gymmonk-schema
|
|
2
2
|
|
|
3
|
+
Shared **Zod** schemas, enums and domain types for **GymMonk** (fitness SaaS).
|
|
4
|
+
Single source of truth (SSOT) consumed by both `gymmonk-backend` and
|
|
5
|
+
`gymmonk-web-client`, so validation, wire types and enums never drift between
|
|
6
|
+
the API and the app.
|
|
3
7
|
|
|
8
|
+
## What's inside
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
- **Common** (`common.ts`) — reusable primitives: `objectIdSchema`,
|
|
11
|
+
`paginationSchema`, `optionalTrimmedString`, `emptyStringToUndefined`.
|
|
12
|
+
- Domain modules (workouts, training library, membership, check-in, …) are
|
|
13
|
+
added here as they land, each re-exported through `src/index.ts`.
|
|
6
14
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
|
|
10
|
-
|
|
11
|
-
## Add your files
|
|
12
|
-
|
|
13
|
-
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
|
|
14
|
-
- [ ] [Add files using the command line](https://docs.gitlab.com/topics/git/add_files/#add-files-to-a-git-repository) or push an existing Git repository with the following command:
|
|
15
|
+
## Build & publish (npm-first)
|
|
15
16
|
|
|
17
|
+
```bash
|
|
18
|
+
npm install
|
|
19
|
+
npm run build # tsc -> dist/
|
|
20
|
+
npm publish --access public
|
|
16
21
|
```
|
|
17
|
-
cd existing_repo
|
|
18
|
-
git remote add origin https://gitlab.com/transcybernetics-group/inhouse/gym-saas/gym-schema.git
|
|
19
|
-
git branch -M main
|
|
20
|
-
git push -uf origin main
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Integrate with your tools
|
|
24
|
-
|
|
25
|
-
- [ ] [Set up project integrations](https://gitlab.com/transcybernetics-group/inhouse/gym-saas/gym-schema/-/settings/integrations)
|
|
26
|
-
|
|
27
|
-
## Collaborate with your team
|
|
28
|
-
|
|
29
|
-
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
|
|
30
|
-
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
|
|
31
|
-
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
|
|
32
|
-
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
|
|
33
|
-
- [ ] [Set auto-merge](https://docs.gitlab.com/user/project/merge_requests/auto_merge/)
|
|
34
|
-
|
|
35
|
-
## Test and Deploy
|
|
36
|
-
|
|
37
|
-
Use the built-in continuous integration in GitLab.
|
|
38
|
-
|
|
39
|
-
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/)
|
|
40
|
-
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
|
|
41
|
-
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
|
|
42
|
-
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
|
|
43
|
-
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
|
|
44
|
-
|
|
45
|
-
***
|
|
46
22
|
|
|
47
|
-
|
|
23
|
+
`prepublishOnly` runs `build` + `check` (type-check + biome) as the publish gate.
|
|
24
|
+
`--access public` is a CLI flag, not a manifest field.
|
|
48
25
|
|
|
49
|
-
|
|
26
|
+
## Consume
|
|
50
27
|
|
|
51
|
-
|
|
28
|
+
In `gymmonk-backend` and `gymmonk-web-client`:
|
|
52
29
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
## Description
|
|
59
|
-
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
|
|
60
|
-
|
|
61
|
-
## Badges
|
|
62
|
-
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
|
|
63
|
-
|
|
64
|
-
## Visuals
|
|
65
|
-
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
|
|
66
|
-
|
|
67
|
-
## Installation
|
|
68
|
-
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
|
|
69
|
-
|
|
70
|
-
## Usage
|
|
71
|
-
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
|
|
72
|
-
|
|
73
|
-
## Support
|
|
74
|
-
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
|
|
75
|
-
|
|
76
|
-
## Roadmap
|
|
77
|
-
If you have ideas for releases in the future, it is a good idea to list them in the README.
|
|
78
|
-
|
|
79
|
-
## Contributing
|
|
80
|
-
State if you are open to contributions and what your requirements are for accepting them.
|
|
81
|
-
|
|
82
|
-
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
|
|
83
|
-
|
|
84
|
-
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
|
|
30
|
+
```bash
|
|
31
|
+
npm install gymmonk-schema@<version>
|
|
32
|
+
# then delete any nested Zod dup so a single Zod instance is used:
|
|
33
|
+
rm -rf node_modules/gymmonk-schema/node_modules
|
|
34
|
+
```
|
|
85
35
|
|
|
86
|
-
|
|
87
|
-
|
|
36
|
+
Bump the caret pin in each consumer's `package.json` on every publish (a `0.x`
|
|
37
|
+
caret locks to the same minor, so `npm install` won't auto-pick a new minor).
|
|
88
38
|
|
|
89
|
-
##
|
|
90
|
-
For open source projects, say how it is licensed.
|
|
39
|
+
## Convention
|
|
91
40
|
|
|
92
|
-
|
|
93
|
-
|
|
41
|
+
Mirrors the jansathi schema family (`dating-schema`, `near-me-schema`) exactly:
|
|
42
|
+
pure ESM, `tsc`-only build, Zod is a **peer** dependency (`^4.4.0`), NodeNext
|
|
43
|
+
`.js` import specifiers, const-object enums fed to `z.enum(...)`.
|
package/dist/common.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gymmonk-schema — Shared helpers and primitives
|
|
3
|
+
* ==============================================
|
|
4
|
+
* The stable building blocks reused across every GymMonk domain schema.
|
|
5
|
+
* Mirrors the `dating-schema` / `near-me-schema` idiom: pure Zod, const-object
|
|
6
|
+
* enums fed to `z.enum(...)`, NodeNext `.js` import specifiers.
|
|
7
|
+
*
|
|
8
|
+
* @module gymmonk-schema/common
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
/**
|
|
12
|
+
* Converts empty / whitespace-only strings to `undefined`
|
|
13
|
+
* so Zod `.optional()` treats them as "not provided".
|
|
14
|
+
*/
|
|
15
|
+
export declare const emptyStringToUndefined: (value: unknown) => unknown;
|
|
16
|
+
/** Optional trimmed string. Empty strings are coerced to `undefined`. */
|
|
17
|
+
export declare const optionalTrimmedString: (maxLength?: number) => z.ZodPreprocess<z.ZodOptional<z.ZodString>>;
|
|
18
|
+
/** A 24-character hex MongoDB ObjectId string. */
|
|
19
|
+
export declare const objectIdSchema: z.ZodString;
|
|
20
|
+
export type ObjectIdString = z.infer<typeof objectIdSchema>;
|
|
21
|
+
/** Pagination query params shared across list endpoints. */
|
|
22
|
+
export declare const paginationSchema: z.ZodObject<{
|
|
23
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
24
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type Pagination = z.infer<typeof paginationSchema>;
|
|
27
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,KAAG,OAGvD,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,GAAI,kBAAe,gDAC8B,CAAC;AAIpF,kDAAkD;AAClD,eAAO,MAAM,cAAc,aAGgB,CAAC;AAC5C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAI5D,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
package/dist/common.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gymmonk-schema — Shared helpers and primitives
|
|
3
|
+
* ==============================================
|
|
4
|
+
* The stable building blocks reused across every GymMonk domain schema.
|
|
5
|
+
* Mirrors the `dating-schema` / `near-me-schema` idiom: pure Zod, const-object
|
|
6
|
+
* enums fed to `z.enum(...)`, NodeNext `.js` import specifiers.
|
|
7
|
+
*
|
|
8
|
+
* @module gymmonk-schema/common
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
// ─── String helpers ──────────────────────────────────────────────────────────
|
|
12
|
+
/**
|
|
13
|
+
* Converts empty / whitespace-only strings to `undefined`
|
|
14
|
+
* so Zod `.optional()` treats them as "not provided".
|
|
15
|
+
*/
|
|
16
|
+
export const emptyStringToUndefined = (value) => {
|
|
17
|
+
if (typeof value === 'string' && value.trim() === '')
|
|
18
|
+
return undefined;
|
|
19
|
+
return value;
|
|
20
|
+
};
|
|
21
|
+
/** Optional trimmed string. Empty strings are coerced to `undefined`. */
|
|
22
|
+
export const optionalTrimmedString = (maxLength = 100) => z.preprocess(emptyStringToUndefined, z.string().trim().max(maxLength).optional());
|
|
23
|
+
// ─── Identifiers ─────────────────────────────────────────────────────────────
|
|
24
|
+
/** A 24-character hex MongoDB ObjectId string. */
|
|
25
|
+
export const objectIdSchema = z
|
|
26
|
+
.string()
|
|
27
|
+
.trim()
|
|
28
|
+
.regex(/^[0-9a-fA-F]{24}$/, 'Invalid id');
|
|
29
|
+
// ─── Pagination ──────────────────────────────────────────────────────────────
|
|
30
|
+
/** Pagination query params shared across list endpoints. */
|
|
31
|
+
export const paginationSchema = z.object({
|
|
32
|
+
page: z.coerce.number().int().min(1).default(1),
|
|
33
|
+
limit: z.coerce.number().int().min(1).max(100).default(20),
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAc,EAAW,EAAE;IAChE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IACvE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,yEAAyE;AACzE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,SAAS,GAAG,GAAG,EAAE,EAAE,CACvD,CAAC,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEpF,gFAAgF;AAEhF,kDAAkD;AAClD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,IAAI,EAAE;KACN,KAAK,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;AAG5C,gFAAgF;AAEhF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/C,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC3D,CAAC,CAAC","sourcesContent":["/**\n * gymmonk-schema — Shared helpers and primitives\n * ==============================================\n * The stable building blocks reused across every GymMonk domain schema.\n * Mirrors the `dating-schema` / `near-me-schema` idiom: pure Zod, const-object\n * enums fed to `z.enum(...)`, NodeNext `.js` import specifiers.\n *\n * @module gymmonk-schema/common\n */\n\nimport { z } from 'zod';\n\n// ─── String helpers ──────────────────────────────────────────────────────────\n\n/**\n * Converts empty / whitespace-only strings to `undefined`\n * so Zod `.optional()` treats them as \"not provided\".\n */\nexport const emptyStringToUndefined = (value: unknown): unknown => {\n if (typeof value === 'string' && value.trim() === '') return undefined;\n return value;\n};\n\n/** Optional trimmed string. Empty strings are coerced to `undefined`. */\nexport const optionalTrimmedString = (maxLength = 100) =>\n z.preprocess(emptyStringToUndefined, z.string().trim().max(maxLength).optional());\n\n// ─── Identifiers ─────────────────────────────────────────────────────────────\n\n/** A 24-character hex MongoDB ObjectId string. */\nexport const objectIdSchema = z\n .string()\n .trim()\n .regex(/^[0-9a-fA-F]{24}$/, 'Invalid id');\nexport type ObjectIdString = z.infer<typeof objectIdSchema>;\n\n// ─── Pagination ──────────────────────────────────────────────────────────────\n\n/** Pagination query params shared across list endpoints. */\nexport const paginationSchema = z.object({\n page: z.coerce.number().int().min(1).default(1),\n limit: z.coerce.number().int().min(1).max(100).default(20),\n});\nexport type Pagination = z.infer<typeof paginationSchema>;\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
export * as Subscription from './subscription/index.js';
|
|
12
|
-
export * as Support from './support/index.js';
|
|
13
|
-
export * as Workout from './workout/index.js';
|
|
1
|
+
/**
|
|
2
|
+
* gymmonk-schema — Public API
|
|
3
|
+
* ===========================
|
|
4
|
+
* Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS).
|
|
5
|
+
* Single SSOT consumed by both gymmonk-backend and gymmonk-web-client.
|
|
6
|
+
*
|
|
7
|
+
* Domain modules (workouts, library, membership, check-in, …) are added here
|
|
8
|
+
* as they land — each exported through this barrel.
|
|
9
|
+
*/
|
|
10
|
+
export { emptyStringToUndefined, type ObjectIdString, objectIdSchema, optionalTrimmedString, type Pagination, paginationSchema, } from './common.js';
|
|
14
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,sBAAsB,EACtB,KAAK,cAAc,EACnB,cAAc,EACd,qBAAqB,EACrB,KAAK,UAAU,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
export * as Marketing from './marketing/index.js';
|
|
13
|
-
export * as Notification from './notification/index.js';
|
|
14
|
-
export * as Nutrition from './nutrition/index.js';
|
|
15
|
-
export * as Subscription from './subscription/index.js';
|
|
16
|
-
export * as Support from './support/index.js';
|
|
17
|
-
export * as Workout from './workout/index.js';
|
|
1
|
+
/**
|
|
2
|
+
* gymmonk-schema — Public API
|
|
3
|
+
* ===========================
|
|
4
|
+
* Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS).
|
|
5
|
+
* Single SSOT consumed by both gymmonk-backend and gymmonk-web-client.
|
|
6
|
+
*
|
|
7
|
+
* Domain modules (workouts, library, membership, check-in, …) are added here
|
|
8
|
+
* as they land — each exported through this barrel.
|
|
9
|
+
*/
|
|
10
|
+
// ─── Common helpers + primitives ─────────────────────────────────────────────
|
|
11
|
+
export { emptyStringToUndefined, objectIdSchema, optionalTrimmedString, paginationSchema, } from './common.js';
|
|
18
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,gFAAgF;AAChF,OAAO,EACL,sBAAsB,EAEtB,cAAc,EACd,qBAAqB,EAErB,gBAAgB,GACjB,MAAM,aAAa,CAAC","sourcesContent":["/**\n * gymmonk-schema — Public API\n * ===========================\n * Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS).\n * Single SSOT consumed by both gymmonk-backend and gymmonk-web-client.\n *\n * Domain modules (workouts, library, membership, check-in, …) are added here\n * as they land — each exported through this barrel.\n */\n\n// ─── Common helpers + primitives ─────────────────────────────────────────────\nexport {\n emptyStringToUndefined,\n type ObjectIdString,\n objectIdSchema,\n optionalTrimmedString,\n type Pagination,\n paginationSchema,\n} from './common.js';\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gymmonk-schema",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Shared Zod domain
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Shared Zod schemas, enums and domain types for GymMonk (fitness SaaS) — single source of truth (SSOT) consumed by gymmonk-backend and gymmonk-web-client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -25,27 +25,25 @@
|
|
|
25
25
|
"format": "biome format --write .",
|
|
26
26
|
"check": "npm run type-check && biome check --write .",
|
|
27
27
|
"check:staged": "biome check --staged --write --no-errors-on-unmatched",
|
|
28
|
-
"prepublishOnly": "npm run build && npm run check"
|
|
29
|
-
"prepare": "husky"
|
|
28
|
+
"prepublishOnly": "npm run build && npm run check"
|
|
30
29
|
},
|
|
31
30
|
"keywords": [
|
|
32
31
|
"zod",
|
|
33
|
-
"
|
|
32
|
+
"schema",
|
|
33
|
+
"gymmonk",
|
|
34
34
|
"gym",
|
|
35
|
-
"
|
|
35
|
+
"fitness",
|
|
36
36
|
"typescript"
|
|
37
37
|
],
|
|
38
38
|
"author": "Hari",
|
|
39
39
|
"license": "MIT",
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"zod": "^
|
|
41
|
+
"zod": "^4.4.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@biomejs/biome": "2.
|
|
45
|
-
"@tsconfig/node22": "^22.0.5",
|
|
44
|
+
"@biomejs/biome": "^2.4.2",
|
|
46
45
|
"@types/node": "^24.10.1",
|
|
47
|
-
"husky": "^9.1.7",
|
|
48
46
|
"typescript": "^5.9.3",
|
|
49
|
-
"zod": "^4.
|
|
47
|
+
"zod": "^4.4.3"
|
|
50
48
|
}
|
|
51
49
|
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Who performed the action recorded in this audit log.
|
|
4
|
-
*/
|
|
5
|
-
export declare const auditActorTypeValues: readonly ["user", "system", "integration"];
|
|
6
|
-
export declare const AuditActorTypeSchema: z.ZodEnum<{
|
|
7
|
-
user: "user";
|
|
8
|
-
system: "system";
|
|
9
|
-
integration: "integration";
|
|
10
|
-
}>;
|
|
11
|
-
/**
|
|
12
|
-
* What kind of action was performed.
|
|
13
|
-
* Extend this list over time as needed, but prefer adding values
|
|
14
|
-
* instead of changing/removing existing ones to avoid breaking changes.
|
|
15
|
-
*/
|
|
16
|
-
export declare const auditActionValues: readonly ["create", "update", "delete", "restore", "login", "logout", "invite", "accept_invite", "reject_invite", "assign", "unassign", "status_change", "other"];
|
|
17
|
-
export declare const AuditActionSchema: z.ZodEnum<{
|
|
18
|
-
create: "create";
|
|
19
|
-
update: "update";
|
|
20
|
-
delete: "delete";
|
|
21
|
-
restore: "restore";
|
|
22
|
-
login: "login";
|
|
23
|
-
logout: "logout";
|
|
24
|
-
invite: "invite";
|
|
25
|
-
accept_invite: "accept_invite";
|
|
26
|
-
reject_invite: "reject_invite";
|
|
27
|
-
assign: "assign";
|
|
28
|
-
unassign: "unassign";
|
|
29
|
-
status_change: "status_change";
|
|
30
|
-
other: "other";
|
|
31
|
-
}>;
|
|
32
|
-
/**
|
|
33
|
-
* Generic audit log entry for the gym SaaS.
|
|
34
|
-
*
|
|
35
|
-
* This should be able to describe:
|
|
36
|
-
* - user logins / logouts
|
|
37
|
-
* - membership changes
|
|
38
|
-
* - plan updates
|
|
39
|
-
* - role/permission changes
|
|
40
|
-
* - critical configuration changes
|
|
41
|
-
*/
|
|
42
|
-
export declare const AuditLogSchema: z.ZodObject<{
|
|
43
|
-
id: z.ZodString;
|
|
44
|
-
createdAt: z.ZodString;
|
|
45
|
-
actorId: z.ZodOptional<z.ZodString>;
|
|
46
|
-
actorType: z.ZodDefault<z.ZodEnum<{
|
|
47
|
-
user: "user";
|
|
48
|
-
system: "system";
|
|
49
|
-
integration: "integration";
|
|
50
|
-
}>>;
|
|
51
|
-
resourceType: z.ZodString;
|
|
52
|
-
resourceId: z.ZodOptional<z.ZodString>;
|
|
53
|
-
organisationId: z.ZodOptional<z.ZodString>;
|
|
54
|
-
centerId: z.ZodOptional<z.ZodString>;
|
|
55
|
-
action: z.ZodEnum<{
|
|
56
|
-
create: "create";
|
|
57
|
-
update: "update";
|
|
58
|
-
delete: "delete";
|
|
59
|
-
restore: "restore";
|
|
60
|
-
login: "login";
|
|
61
|
-
logout: "logout";
|
|
62
|
-
invite: "invite";
|
|
63
|
-
accept_invite: "accept_invite";
|
|
64
|
-
reject_invite: "reject_invite";
|
|
65
|
-
assign: "assign";
|
|
66
|
-
unassign: "unassign";
|
|
67
|
-
status_change: "status_change";
|
|
68
|
-
other: "other";
|
|
69
|
-
}>;
|
|
70
|
-
description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
71
|
-
ipAddress: z.ZodOptional<z.ZodString>;
|
|
72
|
-
userAgent: z.ZodOptional<z.ZodString>;
|
|
73
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
74
|
-
}, z.core.$strip>;
|
|
75
|
-
export type AuditActorType = z.infer<typeof AuditActorTypeSchema>;
|
|
76
|
-
export type AuditAction = z.infer<typeof AuditActionSchema>;
|
|
77
|
-
export type AuditLog = z.infer<typeof AuditLogSchema>;
|
|
78
|
-
//# sourceMappingURL=audit-log.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audit-log.schema.d.ts","sourceRoot":"","sources":["../../src/audit/audit-log.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,eAAO,MAAM,oBAAoB,4CAA6C,CAAC;AAC/E,eAAO,MAAM,oBAAoB;;;;EAA+B,CAAC;AAEjE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,mKAcpB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;EAA4B,CAAC;AAE3D;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6CzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { IsoDateTimeStringSchema } from '../common/primitives/date.schema.js';
|
|
3
|
-
import { ObjectIdSchema } from '../common/primitives/object-id.schema.js';
|
|
4
|
-
import { NonEmptyStringSchema, OptionalStringSchema } from '../common/primitives/string.schema.js';
|
|
5
|
-
/**
|
|
6
|
-
* Who performed the action recorded in this audit log.
|
|
7
|
-
*/
|
|
8
|
-
export const auditActorTypeValues = ['user', 'system', 'integration'];
|
|
9
|
-
export const AuditActorTypeSchema = z.enum(auditActorTypeValues);
|
|
10
|
-
/**
|
|
11
|
-
* What kind of action was performed.
|
|
12
|
-
* Extend this list over time as needed, but prefer adding values
|
|
13
|
-
* instead of changing/removing existing ones to avoid breaking changes.
|
|
14
|
-
*/
|
|
15
|
-
export const auditActionValues = [
|
|
16
|
-
'create',
|
|
17
|
-
'update',
|
|
18
|
-
'delete',
|
|
19
|
-
'restore',
|
|
20
|
-
'login',
|
|
21
|
-
'logout',
|
|
22
|
-
'invite',
|
|
23
|
-
'accept_invite',
|
|
24
|
-
'reject_invite',
|
|
25
|
-
'assign',
|
|
26
|
-
'unassign',
|
|
27
|
-
'status_change',
|
|
28
|
-
'other',
|
|
29
|
-
];
|
|
30
|
-
export const AuditActionSchema = z.enum(auditActionValues);
|
|
31
|
-
/**
|
|
32
|
-
* Generic audit log entry for the gym SaaS.
|
|
33
|
-
*
|
|
34
|
-
* This should be able to describe:
|
|
35
|
-
* - user logins / logouts
|
|
36
|
-
* - membership changes
|
|
37
|
-
* - plan updates
|
|
38
|
-
* - role/permission changes
|
|
39
|
-
* - critical configuration changes
|
|
40
|
-
*/
|
|
41
|
-
export const AuditLogSchema = z.object({
|
|
42
|
-
/** Unique id for the audit log entry (usually Mongo ObjectId). */
|
|
43
|
-
id: ObjectIdSchema,
|
|
44
|
-
/** When the action happened (server-side timestamp, ISO 8601). */
|
|
45
|
-
createdAt: IsoDateTimeStringSchema,
|
|
46
|
-
/** Who performed the action. */
|
|
47
|
-
actorId: ObjectIdSchema.optional(),
|
|
48
|
-
actorType: AuditActorTypeSchema.default('user'),
|
|
49
|
-
/**
|
|
50
|
-
* High-level resource type.
|
|
51
|
-
* Example values: "user", "organisation", "center", "membership", "plan", "payment", etc.
|
|
52
|
-
* This is intentionally free-form so you can evolve it without breaking changes.
|
|
53
|
-
*/
|
|
54
|
-
resourceType: NonEmptyStringSchema,
|
|
55
|
-
/** Optional resource id if applicable (e.g. user id, membership id). */
|
|
56
|
-
resourceId: ObjectIdSchema.optional(),
|
|
57
|
-
/** Optional organisation / gym scope, useful for multi-tenant analytics. */
|
|
58
|
-
organisationId: ObjectIdSchema.optional(),
|
|
59
|
-
centerId: ObjectIdSchema.optional(),
|
|
60
|
-
/** What action was performed. */
|
|
61
|
-
action: AuditActionSchema,
|
|
62
|
-
/**
|
|
63
|
-
* Human-readable description for admins.
|
|
64
|
-
* Example: "User updated membership plan from BASIC to PRO".
|
|
65
|
-
*/
|
|
66
|
-
description: OptionalStringSchema,
|
|
67
|
-
/**
|
|
68
|
-
* Optional IP address and User-Agent, useful for security investigations.
|
|
69
|
-
*/
|
|
70
|
-
ipAddress: z.string().trim().min(3).max(100).optional(),
|
|
71
|
-
userAgent: z.string().trim().min(3).max(500).optional(),
|
|
72
|
-
/**
|
|
73
|
-
* Arbitrary structured metadata.
|
|
74
|
-
* For example, you can store previous vs new values, request ids, etc.
|
|
75
|
-
*/
|
|
76
|
-
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
77
|
-
});
|
|
78
|
-
//# sourceMappingURL=audit-log.schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audit-log.schema.js","sourceRoot":"","sources":["../../src/audit/audit-log.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAEnG;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAU,CAAC;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AAEjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,eAAe;IACf,eAAe;IACf,QAAQ;IACR,UAAU;IACV,eAAe;IACf,OAAO;CACC,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AAE3D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,kEAAkE;IAClE,EAAE,EAAE,cAAc;IAElB,kEAAkE;IAClE,SAAS,EAAE,uBAAuB;IAElC,gCAAgC;IAChC,OAAO,EAAE,cAAc,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC;IAE/C;;;;OAIG;IACH,YAAY,EAAE,oBAAoB;IAElC,wEAAwE;IACxE,UAAU,EAAE,cAAc,CAAC,QAAQ,EAAE;IAErC,4EAA4E;IAC5E,cAAc,EAAE,cAAc,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,cAAc,CAAC,QAAQ,EAAE;IAEnC,iCAAiC;IACjC,MAAM,EAAE,iBAAiB;IAEzB;;;OAGG;IACH,WAAW,EAAE,oBAAoB;IAEjC;;OAEG;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACvD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAEvD;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { IsoDateTimeStringSchema } from '../common/primitives/date.schema.js';\nimport { ObjectIdSchema } from '../common/primitives/object-id.schema.js';\nimport { NonEmptyStringSchema, OptionalStringSchema } from '../common/primitives/string.schema.js';\n\n/**\n * Who performed the action recorded in this audit log.\n */\nexport const auditActorTypeValues = ['user', 'system', 'integration'] as const;\nexport const AuditActorTypeSchema = z.enum(auditActorTypeValues);\n\n/**\n * What kind of action was performed.\n * Extend this list over time as needed, but prefer adding values\n * instead of changing/removing existing ones to avoid breaking changes.\n */\nexport const auditActionValues = [\n 'create',\n 'update',\n 'delete',\n 'restore',\n 'login',\n 'logout',\n 'invite',\n 'accept_invite',\n 'reject_invite',\n 'assign',\n 'unassign',\n 'status_change',\n 'other',\n] as const;\n\nexport const AuditActionSchema = z.enum(auditActionValues);\n\n/**\n * Generic audit log entry for the gym SaaS.\n *\n * This should be able to describe:\n * - user logins / logouts\n * - membership changes\n * - plan updates\n * - role/permission changes\n * - critical configuration changes\n */\nexport const AuditLogSchema = z.object({\n /** Unique id for the audit log entry (usually Mongo ObjectId). */\n id: ObjectIdSchema,\n\n /** When the action happened (server-side timestamp, ISO 8601). */\n createdAt: IsoDateTimeStringSchema,\n\n /** Who performed the action. */\n actorId: ObjectIdSchema.optional(),\n actorType: AuditActorTypeSchema.default('user'),\n\n /**\n * High-level resource type.\n * Example values: \"user\", \"organisation\", \"center\", \"membership\", \"plan\", \"payment\", etc.\n * This is intentionally free-form so you can evolve it without breaking changes.\n */\n resourceType: NonEmptyStringSchema,\n\n /** Optional resource id if applicable (e.g. user id, membership id). */\n resourceId: ObjectIdSchema.optional(),\n\n /** Optional organisation / gym scope, useful for multi-tenant analytics. */\n organisationId: ObjectIdSchema.optional(),\n centerId: ObjectIdSchema.optional(),\n\n /** What action was performed. */\n action: AuditActionSchema,\n\n /**\n * Human-readable description for admins.\n * Example: \"User updated membership plan from BASIC to PRO\".\n */\n description: OptionalStringSchema,\n\n /**\n * Optional IP address and User-Agent, useful for security investigations.\n */\n ipAddress: z.string().trim().min(3).max(100).optional(),\n userAgent: z.string().trim().min(3).max(500).optional(),\n\n /**\n * Arbitrary structured metadata.\n * For example, you can store previous vs new values, request ids, etc.\n */\n metadata: z.record(z.string(), z.unknown()).optional(),\n});\n\nexport type AuditActorType = z.infer<typeof AuditActorTypeSchema>;\nexport type AuditAction = z.infer<typeof AuditActionSchema>;\nexport type AuditLog = z.infer<typeof AuditLogSchema>;\n"]}
|
package/dist/audit/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/audit/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
package/dist/audit/index.js
DELETED
package/dist/audit/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/audit/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './audit-log.schema.js';\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const DeviceInfoSchema: z.ZodObject<{
|
|
3
|
-
userId: z.ZodString;
|
|
4
|
-
deviceId: z.ZodString;
|
|
5
|
-
userAgent: z.ZodOptional<z.ZodString>;
|
|
6
|
-
ipAddress: z.ZodOptional<z.ZodString>;
|
|
7
|
-
createdAt: z.ZodString;
|
|
8
|
-
}, z.core.$strip>;
|
|
9
|
-
export type DeviceInfo = z.infer<typeof DeviceInfoSchema>;
|
|
10
|
-
//# sourceMappingURL=device.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device.schema.d.ts","sourceRoot":"","sources":["../../../src/auth/device/device.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB;;;;;;iBAM3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { ObjectIdSchema } from '../../common/primitives/object-id.schema.js';
|
|
3
|
-
export const DeviceInfoSchema = z.object({
|
|
4
|
-
userId: ObjectIdSchema,
|
|
5
|
-
deviceId: z.string().min(1),
|
|
6
|
-
userAgent: z.string().optional(),
|
|
7
|
-
ipAddress: z.string().optional(),
|
|
8
|
-
createdAt: z.string().datetime({ offset: true }),
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=device.schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"device.schema.js","sourceRoot":"","sources":["../../../src/auth/device/device.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,cAAc;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;CACjD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { ObjectIdSchema } from '../../common/primitives/object-id.schema.js';\n\nexport const DeviceInfoSchema = z.object({\n userId: ObjectIdSchema,\n deviceId: z.string().min(1),\n userAgent: z.string().optional(),\n ipAddress: z.string().optional(),\n createdAt: z.string().datetime({ offset: true }),\n});\n\nexport type DeviceInfo = z.infer<typeof DeviceInfoSchema>;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/device/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/device/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './device.schema.js';\n"]}
|
package/dist/auth/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './device/index.js';
|
|
2
|
-
export * from './otp/index.js';
|
|
3
|
-
export * from './password-history/index.js';
|
|
4
|
-
export * from './permission/index.js';
|
|
5
|
-
export * from './resource/index.js';
|
|
6
|
-
export * from './role/index.js';
|
|
7
|
-
export * from './token/index.js';
|
|
8
|
-
export * from './user/index.js';
|
|
9
|
-
export * from './user-activity/index.js';
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/auth/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAElC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AAEtC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,0BAA0B,CAAC"}
|
package/dist/auth/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './device/index.js';
|
|
2
|
-
export * from './otp/index.js';
|
|
3
|
-
export * from './password-history/index.js';
|
|
4
|
-
export * from './permission/index.js';
|
|
5
|
-
export * from './resource/index.js';
|
|
6
|
-
export * from './role/index.js';
|
|
7
|
-
export * from './token/index.js';
|
|
8
|
-
export * from './user/index.js';
|
|
9
|
-
export * from './user-activity/index.js';
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
package/dist/auth/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAElC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AAEtC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './device/index.js';\n\nexport * from './otp/index.js';\n\nexport * from './password-history/index.js';\n\nexport * from './permission/index.js';\n\nexport * from './resource/index.js';\n\nexport * from './role/index.js';\n\nexport * from './token/index.js';\n\nexport * from './user/index.js';\n\nexport * from './user-activity/index.js';\n"]}
|
package/dist/auth/otp/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/otp/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
package/dist/auth/otp/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/otp/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './otp.schema.js';\n"]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const OtpSchema: z.ZodObject<{
|
|
3
|
-
target: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
4
|
-
code: z.ZodString;
|
|
5
|
-
expiresAt: z.ZodString;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
export type Otp = z.infer<typeof OtpSchema>;
|
|
8
|
-
//# sourceMappingURL=otp.schema.d.ts.map
|