@myclub_se/data-access 1.1.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 +22 -0
- package/esm2020/index.mjs +10 -0
- package/esm2020/lib/api-models/api-activity-extra-member.mjs +2 -0
- package/esm2020/lib/api-models/api-activity-invite.mjs +2 -0
- package/esm2020/lib/api-models/api-activity-location.mjs +2 -0
- package/esm2020/lib/api-models/api-activity-settings.mjs +2 -0
- package/esm2020/lib/api-models/api-activity-type.mjs +2 -0
- package/esm2020/lib/api-models/api-activity.mjs +2 -0
- package/esm2020/lib/api-models/api-auth/api-auth-member.mjs +2 -0
- package/esm2020/lib/api-models/api-auth/api-auth-section.mjs +2 -0
- package/esm2020/lib/api-models/api-auth/api-auth-team-section.mjs +2 -0
- package/esm2020/lib/api-models/api-auth/api-auth-team.mjs +2 -0
- package/esm2020/lib/api-models/api-auth/api-auth.mjs +2 -0
- package/esm2020/lib/api-models/api-auth/index.mjs +6 -0
- package/esm2020/lib/api-models/api-calendar-event.mjs +2 -0
- package/esm2020/lib/api-models/api-calendar.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-card-deal.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-card-logo-urls.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-card-logo.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-card-member-ticket.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-card-theme.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-card-ticket-location.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-card-ticket.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-card.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-home-team.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-member-card.mjs +2 -0
- package/esm2020/lib/api-models/api-card/api-search-member-card.mjs +2 -0
- package/esm2020/lib/api-models/api-card/index.mjs +12 -0
- package/esm2020/lib/api-models/api-club-image.mjs +2 -0
- package/esm2020/lib/api-models/api-club-section.mjs +2 -0
- package/esm2020/lib/api-models/api-club-team.mjs +2 -0
- package/esm2020/lib/api-models/api-club.mjs +2 -0
- package/esm2020/lib/api-models/api-collection.mjs +2 -0
- package/esm2020/lib/api-models/api-directory.mjs +2 -0
- package/esm2020/lib/api-models/api-event.mjs +2 -0
- package/esm2020/lib/api-models/api-external-link.mjs +2 -0
- package/esm2020/lib/api-models/api-file-object.mjs +2 -0
- package/esm2020/lib/api-models/api-general-image.mjs +2 -0
- package/esm2020/lib/api-models/api-image-urls.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-invoice-payments/api-credit-card.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-invoice-payments/api-giro.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-invoice-payments/api-swish.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-invoice-payments/api-zimpler.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-invoice-payments/index.mjs +5 -0
- package/esm2020/lib/api-models/api-invoice/api-member-fee.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-member-invoice-row.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-member-invoice.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-payment-attempt-create.mjs +7 -0
- package/esm2020/lib/api-models/api-invoice/api-payment-attempt.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-search-member-invoice.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-swish-qr-code.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/api-unpaid-member-invoice.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/index.mjs +11 -0
- package/esm2020/lib/api-models/api-invoice/payment-attempt-data-types/api-payment-attempt-credit-card-data-type.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/payment-attempt-data-types/api-payment-attempt-swish-data-type.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/payment-attempt-data-types/api-payment-attempt-zimpler-data-type.mjs +2 -0
- package/esm2020/lib/api-models/api-invoice/payment-attempt-data-types/index.mjs +4 -0
- package/esm2020/lib/api-models/api-member/api-contact.mjs +2 -0
- package/esm2020/lib/api-models/api-member/api-member-attribute.mjs +2 -0
- package/esm2020/lib/api-models/api-member/api-member-contact.mjs +2 -0
- package/esm2020/lib/api-models/api-member/api-member-function.mjs +2 -0
- package/esm2020/lib/api-models/api-member/api-member-validation-settings.mjs +2 -0
- package/esm2020/lib/api-models/api-member/api-member.mjs +2 -0
- package/esm2020/lib/api-models/api-member/api-search-member.mjs +2 -0
- package/esm2020/lib/api-models/api-member/index.mjs +8 -0
- package/esm2020/lib/api-models/api-member-activity-invite.mjs +2 -0
- package/esm2020/lib/api-models/api-member-public-form.mjs +2 -0
- package/esm2020/lib/api-models/api-member-team-through.mjs +2 -0
- package/esm2020/lib/api-models/api-member-team.mjs +2 -0
- package/esm2020/lib/api-models/api-news.mjs +2 -0
- package/esm2020/lib/api-models/api-partner.mjs +2 -0
- package/esm2020/lib/api-models/api-search-club.mjs +2 -0
- package/esm2020/lib/api-models/api-search-member-team.mjs +2 -0
- package/esm2020/lib/api-models/api-section-team.mjs +2 -0
- package/esm2020/lib/api-models/api-section.mjs +2 -0
- package/esm2020/lib/api-models/api-token.mjs +2 -0
- package/esm2020/lib/api-models/api-user-notification.mjs +2 -0
- package/esm2020/lib/api-models/api-user.mjs +2 -0
- package/esm2020/lib/api-models/index.mjs +36 -0
- package/esm2020/lib/authentication/authentication.config.mjs +2 -0
- package/esm2020/lib/authentication/authentication.interceptor.mjs +44 -0
- package/esm2020/lib/authentication/authentication.service.mjs +73 -0
- package/esm2020/lib/authentication/guards/authenticated.guard.mjs +36 -0
- package/esm2020/lib/authentication/guards/handle-grant-token.guard.mjs +29 -0
- package/esm2020/lib/authentication/index.mjs +5 -0
- package/esm2020/lib/data-access.module.mjs +29 -0
- package/esm2020/lib/interfaces/index.mjs +3 -0
- package/esm2020/lib/interfaces/new-account.interface.mjs +2 -0
- package/esm2020/lib/interfaces/option.interface.mjs +2 -0
- package/esm2020/lib/models/activity-extra-member.mjs +12 -0
- package/esm2020/lib/models/activity-invite.mjs +18 -0
- package/esm2020/lib/models/activity-location.mjs +12 -0
- package/esm2020/lib/models/activity-settings.mjs +14 -0
- package/esm2020/lib/models/activity-type.mjs +11 -0
- package/esm2020/lib/models/activity.mjs +87 -0
- package/esm2020/lib/models/auth/auth-member.mjs +10 -0
- package/esm2020/lib/models/auth/auth-section.mjs +7 -0
- package/esm2020/lib/models/auth/auth-team-section.mjs +7 -0
- package/esm2020/lib/models/auth/auth-team.mjs +9 -0
- package/esm2020/lib/models/auth/auth.mjs +15 -0
- package/esm2020/lib/models/auth/index.mjs +6 -0
- package/esm2020/lib/models/authentication.mjs +7 -0
- package/esm2020/lib/models/calendar-event.mjs +20 -0
- package/esm2020/lib/models/calendar.mjs +10 -0
- package/esm2020/lib/models/card/card-deal.mjs +10 -0
- package/esm2020/lib/models/card/card-logo-urls.mjs +13 -0
- package/esm2020/lib/models/card/card-logo.mjs +8 -0
- package/esm2020/lib/models/card/card-member-ticket.mjs +11 -0
- package/esm2020/lib/models/card/card-theme.mjs +10 -0
- package/esm2020/lib/models/card/card-ticket-location.mjs +9 -0
- package/esm2020/lib/models/card/card-ticket.mjs +21 -0
- package/esm2020/lib/models/card/card.mjs +13 -0
- package/esm2020/lib/models/card/home-team.mjs +8 -0
- package/esm2020/lib/models/card/index.mjs +12 -0
- package/esm2020/lib/models/card/member-card.mjs +12 -0
- package/esm2020/lib/models/card/search-member-card.mjs +8 -0
- package/esm2020/lib/models/club-image.mjs +18 -0
- package/esm2020/lib/models/club-section.mjs +7 -0
- package/esm2020/lib/models/club-team.mjs +7 -0
- package/esm2020/lib/models/club.mjs +7 -0
- package/esm2020/lib/models/collection.mjs +15 -0
- package/esm2020/lib/models/contact.mjs +46 -0
- package/esm2020/lib/models/directory.mjs +20 -0
- package/esm2020/lib/models/email-recipient.mjs +7 -0
- package/esm2020/lib/models/email.mjs +8 -0
- package/esm2020/lib/models/event.mjs +20 -0
- package/esm2020/lib/models/external-link.mjs +7 -0
- package/esm2020/lib/models/file-object.mjs +13 -0
- package/esm2020/lib/models/general-image.mjs +8 -0
- package/esm2020/lib/models/image-urls.mjs +10 -0
- package/esm2020/lib/models/index.mjs +42 -0
- package/esm2020/lib/models/invoice/index.mjs +10 -0
- package/esm2020/lib/models/invoice/member-fee.mjs +9 -0
- package/esm2020/lib/models/invoice/member-invoice-row.mjs +17 -0
- package/esm2020/lib/models/invoice/member-invoice.mjs +24 -0
- package/esm2020/lib/models/invoice/payment-attempt-data-types/index.mjs +4 -0
- package/esm2020/lib/models/invoice/payment-attempt-data-types/payment-attempt-credit-card-data-type.mjs +2 -0
- package/esm2020/lib/models/invoice/payment-attempt-data-types/payment-attempt-swish-data-type.mjs +2 -0
- package/esm2020/lib/models/invoice/payment-attempt-data-types/payment-attempt-zimpler-data-type.mjs +2 -0
- package/esm2020/lib/models/invoice/payment-attempt.mjs +13 -0
- package/esm2020/lib/models/invoice/payment-types/credit-card.mjs +16 -0
- package/esm2020/lib/models/invoice/payment-types/giro.mjs +11 -0
- package/esm2020/lib/models/invoice/payment-types/index.mjs +5 -0
- package/esm2020/lib/models/invoice/payment-types/swish.mjs +14 -0
- package/esm2020/lib/models/invoice/payment-types/zimpler.mjs +12 -0
- package/esm2020/lib/models/invoice/search-member-invoice.mjs +17 -0
- package/esm2020/lib/models/invoice/swish-qr-code.mjs +6 -0
- package/esm2020/lib/models/invoice/unpaid-member-invoice.mjs +9 -0
- package/esm2020/lib/models/member/index.mjs +7 -0
- package/esm2020/lib/models/member/member-attribute.mjs +24 -0
- package/esm2020/lib/models/member/member-contact.mjs +21 -0
- package/esm2020/lib/models/member/member-function.mjs +19 -0
- package/esm2020/lib/models/member/member-validation-settings.mjs +13 -0
- package/esm2020/lib/models/member/member.mjs +75 -0
- package/esm2020/lib/models/member/search-member.mjs +20 -0
- package/esm2020/lib/models/member-activity-invite.mjs +27 -0
- package/esm2020/lib/models/member-public-form.mjs +10 -0
- package/esm2020/lib/models/member-team-through.mjs +14 -0
- package/esm2020/lib/models/member-team.mjs +11 -0
- package/esm2020/lib/models/news.mjs +22 -0
- package/esm2020/lib/models/partner.mjs +9 -0
- package/esm2020/lib/models/role.mjs +10 -0
- package/esm2020/lib/models/search-club.mjs +9 -0
- package/esm2020/lib/models/search-member-team.mjs +9 -0
- package/esm2020/lib/models/section-team.mjs +7 -0
- package/esm2020/lib/models/section.mjs +7 -0
- package/esm2020/lib/models/token.mjs +7 -0
- package/esm2020/lib/models/user-notification.mjs +13 -0
- package/esm2020/lib/models/user.mjs +31 -0
- package/esm2020/lib/services/activity.service.mjs +178 -0
- package/esm2020/lib/services/api.service.mjs +85 -0
- package/esm2020/lib/services/auth.service.mjs +56 -0
- package/esm2020/lib/services/club.service.mjs +29 -0
- package/esm2020/lib/services/constant.service.mjs +131 -0
- package/esm2020/lib/services/email.service.mjs +53 -0
- package/esm2020/lib/services/external-link.service.mjs +24 -0
- package/esm2020/lib/services/factories/activity-extra-member-factory.mjs +6 -0
- package/esm2020/lib/services/factories/activity-factory.mjs +5 -0
- package/esm2020/lib/services/factories/activity-invite-factory.mjs +6 -0
- package/esm2020/lib/services/factories/activity-location-factory.mjs +3 -0
- package/esm2020/lib/services/factories/activity-settings-factory.mjs +3 -0
- package/esm2020/lib/services/factories/activity-type-factory.mjs +3 -0
- package/esm2020/lib/services/factories/auth-factory.mjs +6 -0
- package/esm2020/lib/services/factories/auth-member-factory.mjs +3 -0
- package/esm2020/lib/services/factories/auth-section-factory.mjs +3 -0
- package/esm2020/lib/services/factories/auth-team-factory.mjs +4 -0
- package/esm2020/lib/services/factories/auth-team-section-factory.mjs +3 -0
- package/esm2020/lib/services/factories/card-deal-factory.mjs +4 -0
- package/esm2020/lib/services/factories/card-factory.mjs +5 -0
- package/esm2020/lib/services/factories/card-logo-factory.mjs +4 -0
- package/esm2020/lib/services/factories/card-logo-urls-factory.mjs +3 -0
- package/esm2020/lib/services/factories/card-member-ticket-factory.mjs +3 -0
- package/esm2020/lib/services/factories/card-theme-factory.mjs +4 -0
- package/esm2020/lib/services/factories/card-ticket-factory.mjs +7 -0
- package/esm2020/lib/services/factories/card-ticket-location-factory.mjs +3 -0
- package/esm2020/lib/services/factories/club-factory.mjs +3 -0
- package/esm2020/lib/services/factories/club-image-factory.mjs +3 -0
- package/esm2020/lib/services/factories/club-section-factory.mjs +3 -0
- package/esm2020/lib/services/factories/contact-factory.mjs +3 -0
- package/esm2020/lib/services/factories/credit-card-factory.mjs +3 -0
- package/esm2020/lib/services/factories/directory-factory.mjs +4 -0
- package/esm2020/lib/services/factories/event-factory.mjs +3 -0
- package/esm2020/lib/services/factories/external-link-factory.mjs +3 -0
- package/esm2020/lib/services/factories/file-factory.mjs +3 -0
- package/esm2020/lib/services/factories/general-image-factory.mjs +4 -0
- package/esm2020/lib/services/factories/giro-factory.mjs +3 -0
- package/esm2020/lib/services/factories/home-team-factory.mjs +4 -0
- package/esm2020/lib/services/factories/image-urls-factory.mjs +3 -0
- package/esm2020/lib/services/factories/index.mjs +62 -0
- package/esm2020/lib/services/factories/member-attribute-factory.mjs +3 -0
- package/esm2020/lib/services/factories/member-card-factory.mjs +4 -0
- package/esm2020/lib/services/factories/member-contact-factory.mjs +4 -0
- package/esm2020/lib/services/factories/member-factory.mjs +8 -0
- package/esm2020/lib/services/factories/member-fee-factory.mjs +3 -0
- package/esm2020/lib/services/factories/member-function-factory.mjs +3 -0
- package/esm2020/lib/services/factories/member-invite-factory.mjs +3 -0
- package/esm2020/lib/services/factories/member-invoice-factory.mjs +8 -0
- package/esm2020/lib/services/factories/member-invoice-row-factory.mjs +4 -0
- package/esm2020/lib/services/factories/member-public-form-factory.mjs +3 -0
- package/esm2020/lib/services/factories/member-team-factory.mjs +5 -0
- package/esm2020/lib/services/factories/member-team-through-factory.mjs +4 -0
- package/esm2020/lib/services/factories/member-validation-settings-factory.mjs +3 -0
- package/esm2020/lib/services/factories/news-factory.mjs +3 -0
- package/esm2020/lib/services/factories/partner-factory.mjs +4 -0
- package/esm2020/lib/services/factories/payment-attempt-factory.mjs +23 -0
- package/esm2020/lib/services/factories/search-club-factory.mjs +3 -0
- package/esm2020/lib/services/factories/search-member-card-factory.mjs +3 -0
- package/esm2020/lib/services/factories/search-member-factory.mjs +3 -0
- package/esm2020/lib/services/factories/search-member-invoice-factory.mjs +3 -0
- package/esm2020/lib/services/factories/search-member-team-factory.mjs +5 -0
- package/esm2020/lib/services/factories/search-member-team-through-factory.mjs +4 -0
- package/esm2020/lib/services/factories/section-factory.mjs +3 -0
- package/esm2020/lib/services/factories/swish-factory.mjs +3 -0
- package/esm2020/lib/services/factories/token-factory.mjs +3 -0
- package/esm2020/lib/services/factories/unpaid-invoice-factory.mjs +3 -0
- package/esm2020/lib/services/factories/user-factory.mjs +3 -0
- package/esm2020/lib/services/factories/user-notification-factory.mjs +3 -0
- package/esm2020/lib/services/factories/zimpler-factory.mjs +3 -0
- package/esm2020/lib/services/file.service.mjs +29 -0
- package/esm2020/lib/services/index.mjs +18 -0
- package/esm2020/lib/services/invoice/index.mjs +3 -0
- package/esm2020/lib/services/invoice/invoice.service.mjs +41 -0
- package/esm2020/lib/services/invoice/payment-attempt.service.mjs +51 -0
- package/esm2020/lib/services/member-card.service.mjs +82 -0
- package/esm2020/lib/services/member-public-form.service.mjs +24 -0
- package/esm2020/lib/services/member.service.mjs +58 -0
- package/esm2020/lib/services/news.service.mjs +30 -0
- package/esm2020/lib/services/section.service.mjs +23 -0
- package/esm2020/lib/services/team.service.mjs +81 -0
- package/esm2020/lib/services/token.service.mjs +57 -0
- package/esm2020/lib/services/user-notification.service.mjs +23 -0
- package/esm2020/lib/services/user.service.mjs +68 -0
- package/esm2020/lib/types/attribute-type.mjs +2 -0
- package/esm2020/lib/types/contact-type.mjs +2 -0
- package/esm2020/lib/types/index.mjs +6 -0
- package/esm2020/lib/types/payment-attempt-status-type.mjs +2 -0
- package/esm2020/lib/types/payment-attempt-type.mjs +2 -0
- package/esm2020/lib/types/sex-type.mjs +2 -0
- package/esm2020/myclub_se-data-access.mjs +5 -0
- package/fesm2015/myclub_se-data-access.mjs +2425 -0
- package/fesm2015/myclub_se-data-access.mjs.map +1 -0
- package/fesm2020/myclub_se-data-access.mjs +2423 -0
- package/fesm2020/myclub_se-data-access.mjs.map +1 -0
- package/index.d.ts +6 -0
- package/lib/api-models/api-activity-extra-member.d.ts +10 -0
- package/lib/api-models/api-activity-invite.d.ts +18 -0
- package/lib/api-models/api-activity-location.d.ts +9 -0
- package/lib/api-models/api-activity-settings.d.ts +12 -0
- package/lib/api-models/api-activity-type.d.ts +8 -0
- package/lib/api-models/api-activity.d.ts +45 -0
- package/lib/api-models/api-auth/api-auth-member.d.ts +5 -0
- package/lib/api-models/api-auth/api-auth-section.d.ts +4 -0
- package/lib/api-models/api-auth/api-auth-team-section.d.ts +4 -0
- package/lib/api-models/api-auth/api-auth-team.d.ts +7 -0
- package/lib/api-models/api-auth/api-auth.d.ts +15 -0
- package/lib/api-models/api-auth/index.d.ts +5 -0
- package/lib/api-models/api-calendar-event.d.ts +18 -0
- package/lib/api-models/api-calendar.d.ts +7 -0
- package/lib/api-models/api-card/api-card-deal.d.ts +8 -0
- package/lib/api-models/api-card/api-card-logo-urls.d.ts +11 -0
- package/lib/api-models/api-card/api-card-logo.d.ts +6 -0
- package/lib/api-models/api-card/api-card-member-ticket.d.ts +8 -0
- package/lib/api-models/api-card/api-card-theme.d.ts +8 -0
- package/lib/api-models/api-card/api-card-ticket-location.d.ts +6 -0
- package/lib/api-models/api-card/api-card-ticket.d.ts +20 -0
- package/lib/api-models/api-card/api-card.d.ts +12 -0
- package/lib/api-models/api-card/api-home-team.d.ts +6 -0
- package/lib/api-models/api-card/api-member-card.d.ts +10 -0
- package/lib/api-models/api-card/api-search-member-card.d.ts +5 -0
- package/lib/api-models/api-card/index.d.ts +11 -0
- package/lib/api-models/api-club-image.d.ts +15 -0
- package/lib/api-models/api-club-section.d.ts +4 -0
- package/lib/api-models/api-club-team.d.ts +4 -0
- package/lib/api-models/api-club.d.ts +4 -0
- package/lib/api-models/api-collection.d.ts +6 -0
- package/lib/api-models/api-directory.d.ts +12 -0
- package/lib/api-models/api-event.d.ts +17 -0
- package/lib/api-models/api-external-link.d.ts +4 -0
- package/lib/api-models/api-file-object.d.ts +10 -0
- package/lib/api-models/api-general-image.d.ts +6 -0
- package/lib/api-models/api-image-urls.d.ts +7 -0
- package/lib/api-models/api-invoice/api-invoice-payments/api-credit-card.d.ts +13 -0
- package/lib/api-models/api-invoice/api-invoice-payments/api-giro.d.ts +8 -0
- package/lib/api-models/api-invoice/api-invoice-payments/api-swish.d.ts +11 -0
- package/lib/api-models/api-invoice/api-invoice-payments/api-zimpler.d.ts +9 -0
- package/lib/api-models/api-invoice/api-invoice-payments/index.d.ts +4 -0
- package/lib/api-models/api-invoice/api-member-fee.d.ts +6 -0
- package/lib/api-models/api-invoice/api-member-invoice-row.d.ts +15 -0
- package/lib/api-models/api-invoice/api-member-invoice.d.ts +23 -0
- package/lib/api-models/api-invoice/api-payment-attempt-create.d.ts +6 -0
- package/lib/api-models/api-invoice/api-payment-attempt.d.ts +12 -0
- package/lib/api-models/api-invoice/api-search-member-invoice.d.ts +11 -0
- package/lib/api-models/api-invoice/api-swish-qr-code.d.ts +3 -0
- package/lib/api-models/api-invoice/api-unpaid-member-invoice.d.ts +6 -0
- package/lib/api-models/api-invoice/index.d.ts +10 -0
- package/lib/api-models/api-invoice/payment-attempt-data-types/api-payment-attempt-credit-card-data-type.d.ts +4 -0
- package/lib/api-models/api-invoice/payment-attempt-data-types/api-payment-attempt-swish-data-type.d.ts +3 -0
- package/lib/api-models/api-invoice/payment-attempt-data-types/api-payment-attempt-zimpler-data-type.d.ts +3 -0
- package/lib/api-models/api-invoice/payment-attempt-data-types/index.d.ts +3 -0
- package/lib/api-models/api-member/api-contact.d.ts +17 -0
- package/lib/api-models/api-member/api-member-attribute.d.ts +15 -0
- package/lib/api-models/api-member/api-member-contact.d.ts +9 -0
- package/lib/api-models/api-member/api-member-function.d.ts +7 -0
- package/lib/api-models/api-member/api-member-validation-settings.d.ts +10 -0
- package/lib/api-models/api-member/api-member.d.ts +30 -0
- package/lib/api-models/api-member/api-search-member.d.ts +17 -0
- package/lib/api-models/api-member/index.d.ts +7 -0
- package/lib/api-models/api-member-activity-invite.d.ts +9 -0
- package/lib/api-models/api-member-public-form.d.ts +7 -0
- package/lib/api-models/api-member-team-through.d.ts +12 -0
- package/lib/api-models/api-member-team.d.ts +9 -0
- package/lib/api-models/api-news.d.ts +20 -0
- package/lib/api-models/api-partner.d.ts +7 -0
- package/lib/api-models/api-search-club.d.ts +6 -0
- package/lib/api-models/api-search-member-team.d.ts +7 -0
- package/lib/api-models/api-section-team.d.ts +4 -0
- package/lib/api-models/api-section.d.ts +6 -0
- package/lib/api-models/api-token.d.ts +7 -0
- package/lib/api-models/api-user-notification.d.ts +10 -0
- package/lib/api-models/api-user.d.ts +18 -0
- package/lib/api-models/index.d.ts +35 -0
- package/lib/authentication/authentication.config.d.ts +1 -0
- package/lib/authentication/authentication.interceptor.d.ts +11 -0
- package/lib/authentication/authentication.service.d.ts +31 -0
- package/lib/authentication/guards/authenticated.guard.d.ts +11 -0
- package/lib/authentication/guards/handle-grant-token.guard.d.ts +11 -0
- package/lib/authentication/index.d.ts +4 -0
- package/lib/data-access.module.d.ts +14 -0
- package/lib/interfaces/index.d.ts +2 -0
- package/lib/interfaces/new-account.interface.d.ts +7 -0
- package/lib/interfaces/option.interface.d.ts +4 -0
- package/lib/models/activity-extra-member.d.ts +11 -0
- package/lib/models/activity-invite.d.ts +19 -0
- package/lib/models/activity-location.d.ts +10 -0
- package/lib/models/activity-settings.d.ts +13 -0
- package/lib/models/activity-type.d.ts +9 -0
- package/lib/models/activity.d.ts +48 -0
- package/lib/models/auth/auth-member.d.ts +8 -0
- package/lib/models/auth/auth-section.d.ts +5 -0
- package/lib/models/auth/auth-team-section.d.ts +5 -0
- package/lib/models/auth/auth-team.d.ts +8 -0
- package/lib/models/auth/auth.d.ts +16 -0
- package/lib/models/auth/index.d.ts +5 -0
- package/lib/models/authentication.d.ts +5 -0
- package/lib/models/calendar-event.d.ts +19 -0
- package/lib/models/calendar.d.ts +8 -0
- package/lib/models/card/card-deal.d.ts +9 -0
- package/lib/models/card/card-logo-urls.d.ts +11 -0
- package/lib/models/card/card-logo.d.ts +7 -0
- package/lib/models/card/card-member-ticket.d.ts +9 -0
- package/lib/models/card/card-theme.d.ts +9 -0
- package/lib/models/card/card-ticket-location.d.ts +7 -0
- package/lib/models/card/card-ticket.d.ts +21 -0
- package/lib/models/card/card.d.ts +13 -0
- package/lib/models/card/home-team.d.ts +7 -0
- package/lib/models/card/index.d.ts +11 -0
- package/lib/models/card/member-card.d.ts +11 -0
- package/lib/models/card/search-member-card.d.ts +6 -0
- package/lib/models/club-image.d.ts +16 -0
- package/lib/models/club-section.d.ts +5 -0
- package/lib/models/club-team.d.ts +5 -0
- package/lib/models/club.d.ts +5 -0
- package/lib/models/collection.d.ts +9 -0
- package/lib/models/contact.d.ts +21 -0
- package/lib/models/directory.d.ts +15 -0
- package/lib/models/email-recipient.d.ts +5 -0
- package/lib/models/email.d.ts +7 -0
- package/lib/models/event.d.ts +18 -0
- package/lib/models/external-link.d.ts +5 -0
- package/lib/models/file-object.d.ts +11 -0
- package/lib/models/general-image.d.ts +7 -0
- package/lib/models/image-urls.d.ts +8 -0
- package/lib/models/index.d.ts +41 -0
- package/lib/models/invoice/index.d.ts +9 -0
- package/lib/models/invoice/member-fee.d.ts +7 -0
- package/lib/models/invoice/member-invoice-row.d.ts +16 -0
- package/lib/models/invoice/member-invoice.d.ts +24 -0
- package/lib/models/invoice/payment-attempt-data-types/index.d.ts +3 -0
- package/lib/models/invoice/payment-attempt-data-types/payment-attempt-credit-card-data-type.d.ts +4 -0
- package/lib/models/invoice/payment-attempt-data-types/payment-attempt-swish-data-type.d.ts +3 -0
- package/lib/models/invoice/payment-attempt-data-types/payment-attempt-zimpler-data-type.d.ts +3 -0
- package/lib/models/invoice/payment-attempt.d.ts +13 -0
- package/lib/models/invoice/payment-types/credit-card.d.ts +14 -0
- package/lib/models/invoice/payment-types/giro.d.ts +9 -0
- package/lib/models/invoice/payment-types/index.d.ts +4 -0
- package/lib/models/invoice/payment-types/swish.d.ts +12 -0
- package/lib/models/invoice/payment-types/zimpler.d.ts +10 -0
- package/lib/models/invoice/search-member-invoice.d.ts +13 -0
- package/lib/models/invoice/swish-qr-code.d.ts +4 -0
- package/lib/models/invoice/unpaid-member-invoice.d.ts +7 -0
- package/lib/models/member/index.d.ts +6 -0
- package/lib/models/member/member-attribute.d.ts +22 -0
- package/lib/models/member/member-contact.d.ts +12 -0
- package/lib/models/member/member-function.d.ts +10 -0
- package/lib/models/member/member-validation-settings.d.ts +11 -0
- package/lib/models/member/member.d.ts +34 -0
- package/lib/models/member/search-member.d.ts +18 -0
- package/lib/models/member-activity-invite.d.ts +11 -0
- package/lib/models/member-public-form.d.ts +8 -0
- package/lib/models/member-team-through.d.ts +13 -0
- package/lib/models/member-team.d.ts +10 -0
- package/lib/models/news.d.ts +20 -0
- package/lib/models/partner.d.ts +8 -0
- package/lib/models/role.d.ts +8 -0
- package/lib/models/search-club.d.ts +7 -0
- package/lib/models/search-member-team.d.ts +8 -0
- package/lib/models/section-team.d.ts +5 -0
- package/lib/models/section.d.ts +5 -0
- package/lib/models/token.d.ts +5 -0
- package/lib/models/user-notification.d.ts +11 -0
- package/lib/models/user.d.ts +16 -0
- package/lib/services/activity.service.d.ts +32 -0
- package/lib/services/api.service.d.ts +39 -0
- package/lib/services/auth.service.d.ts +15 -0
- package/lib/services/club.service.d.ts +10 -0
- package/lib/services/constant.service.d.ts +33 -0
- package/lib/services/email.service.d.ts +18 -0
- package/lib/services/external-link.service.d.ts +9 -0
- package/lib/services/factories/activity-extra-member-factory.d.ts +3 -0
- package/lib/services/factories/activity-factory.d.ts +3 -0
- package/lib/services/factories/activity-invite-factory.d.ts +3 -0
- package/lib/services/factories/activity-location-factory.d.ts +3 -0
- package/lib/services/factories/activity-settings-factory.d.ts +3 -0
- package/lib/services/factories/activity-type-factory.d.ts +3 -0
- package/lib/services/factories/auth-factory.d.ts +3 -0
- package/lib/services/factories/auth-member-factory.d.ts +3 -0
- package/lib/services/factories/auth-section-factory.d.ts +3 -0
- package/lib/services/factories/auth-team-factory.d.ts +3 -0
- package/lib/services/factories/auth-team-section-factory.d.ts +3 -0
- package/lib/services/factories/card-deal-factory.d.ts +3 -0
- package/lib/services/factories/card-factory.d.ts +3 -0
- package/lib/services/factories/card-logo-factory.d.ts +3 -0
- package/lib/services/factories/card-logo-urls-factory.d.ts +3 -0
- package/lib/services/factories/card-member-ticket-factory.d.ts +3 -0
- package/lib/services/factories/card-theme-factory.d.ts +3 -0
- package/lib/services/factories/card-ticket-factory.d.ts +3 -0
- package/lib/services/factories/card-ticket-location-factory.d.ts +3 -0
- package/lib/services/factories/club-factory.d.ts +3 -0
- package/lib/services/factories/club-image-factory.d.ts +3 -0
- package/lib/services/factories/club-section-factory.d.ts +3 -0
- package/lib/services/factories/contact-factory.d.ts +3 -0
- package/lib/services/factories/credit-card-factory.d.ts +3 -0
- package/lib/services/factories/directory-factory.d.ts +3 -0
- package/lib/services/factories/event-factory.d.ts +3 -0
- package/lib/services/factories/external-link-factory.d.ts +3 -0
- package/lib/services/factories/file-factory.d.ts +3 -0
- package/lib/services/factories/general-image-factory.d.ts +3 -0
- package/lib/services/factories/giro-factory.d.ts +3 -0
- package/lib/services/factories/home-team-factory.d.ts +3 -0
- package/lib/services/factories/image-urls-factory.d.ts +3 -0
- package/lib/services/factories/index.d.ts +61 -0
- package/lib/services/factories/member-attribute-factory.d.ts +3 -0
- package/lib/services/factories/member-card-factory.d.ts +3 -0
- package/lib/services/factories/member-contact-factory.d.ts +3 -0
- package/lib/services/factories/member-factory.d.ts +3 -0
- package/lib/services/factories/member-fee-factory.d.ts +3 -0
- package/lib/services/factories/member-function-factory.d.ts +3 -0
- package/lib/services/factories/member-invite-factory.d.ts +3 -0
- package/lib/services/factories/member-invoice-factory.d.ts +3 -0
- package/lib/services/factories/member-invoice-row-factory.d.ts +3 -0
- package/lib/services/factories/member-public-form-factory.d.ts +3 -0
- package/lib/services/factories/member-team-factory.d.ts +3 -0
- package/lib/services/factories/member-team-through-factory.d.ts +3 -0
- package/lib/services/factories/member-validation-settings-factory.d.ts +3 -0
- package/lib/services/factories/news-factory.d.ts +3 -0
- package/lib/services/factories/partner-factory.d.ts +3 -0
- package/lib/services/factories/payment-attempt-factory.d.ts +3 -0
- package/lib/services/factories/search-club-factory.d.ts +3 -0
- package/lib/services/factories/search-member-card-factory.d.ts +3 -0
- package/lib/services/factories/search-member-factory.d.ts +3 -0
- package/lib/services/factories/search-member-invoice-factory.d.ts +3 -0
- package/lib/services/factories/search-member-team-factory.d.ts +3 -0
- package/lib/services/factories/search-member-team-through-factory.d.ts +3 -0
- package/lib/services/factories/section-factory.d.ts +3 -0
- package/lib/services/factories/swish-factory.d.ts +3 -0
- package/lib/services/factories/token-factory.d.ts +3 -0
- package/lib/services/factories/unpaid-invoice-factory.d.ts +3 -0
- package/lib/services/factories/user-factory.d.ts +3 -0
- package/lib/services/factories/user-notification-factory.d.ts +3 -0
- package/lib/services/factories/zimpler-factory.d.ts +3 -0
- package/lib/services/file.service.d.ts +11 -0
- package/lib/services/index.d.ts +17 -0
- package/lib/services/invoice/index.d.ts +2 -0
- package/lib/services/invoice/invoice.service.d.ts +17 -0
- package/lib/services/invoice/payment-attempt.service.d.ts +19 -0
- package/lib/services/member-card.service.d.ts +27 -0
- package/lib/services/member-public-form.service.d.ts +10 -0
- package/lib/services/member.service.d.ts +17 -0
- package/lib/services/news.service.d.ts +9 -0
- package/lib/services/section.service.d.ts +10 -0
- package/lib/services/team.service.d.ts +24 -0
- package/lib/services/token.service.d.ts +15 -0
- package/lib/services/user-notification.service.d.ts +10 -0
- package/lib/services/user.service.d.ts +16 -0
- package/lib/types/attribute-type.d.ts +1 -0
- package/lib/types/contact-type.d.ts +1 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/payment-attempt-status-type.d.ts +1 -0
- package/lib/types/payment-attempt-type.d.ts +1 -0
- package/lib/types/sex-type.d.ts +1 -0
- package/package.json +35 -0
|
@@ -0,0 +1,2425 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injectable, Inject, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common/http';
|
|
4
|
+
import { HttpErrorResponse, HttpParams, HttpRequest, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
5
|
+
import { map, catchError, tap, mergeMap } from 'rxjs/operators';
|
|
6
|
+
import { of, throwError, BehaviorSubject } from 'rxjs';
|
|
7
|
+
import { FormGroup, FormControl, Validators, FormArray } from '@angular/forms';
|
|
8
|
+
import { format } from 'date-fns';
|
|
9
|
+
import * as i2 from '@angular/router';
|
|
10
|
+
|
|
11
|
+
class Activity {
|
|
12
|
+
constructor(id, activity_group_id, activity_type_id, club_id, location_id, team_id, activity_location, activity_type_name, allow_maybe, calendar_name, created, current_num_attendants, day, description, end_time, file, invitation_text, invite_first_days, invite_groups, invite_hide_before_sent, invite_last_response_date, invite_remind, invite_remind_receivers, invite_second_days, invite_settings, invited_members, last_response_date, max_num_attendants, max_num_attendants_type, meet_up_place, meet_up_time, meet_up_time_display, repeat, repeat_num, repeat_to_day, repeat_type, show_other_invited, start_time, title, updated, use_invite, update_repeating) {
|
|
13
|
+
this.id = id;
|
|
14
|
+
this.activity_group_id = activity_group_id;
|
|
15
|
+
this.activity_type_id = activity_type_id;
|
|
16
|
+
this.club_id = club_id;
|
|
17
|
+
this.location_id = location_id;
|
|
18
|
+
this.team_id = team_id;
|
|
19
|
+
this.activity_location = activity_location;
|
|
20
|
+
this.activity_type_name = activity_type_name;
|
|
21
|
+
this.allow_maybe = allow_maybe;
|
|
22
|
+
this.calendar_name = calendar_name;
|
|
23
|
+
this.created = created;
|
|
24
|
+
this.current_num_attendants = current_num_attendants;
|
|
25
|
+
this.day = day;
|
|
26
|
+
this.description = description;
|
|
27
|
+
this.end_time = end_time;
|
|
28
|
+
this.file = file;
|
|
29
|
+
this.invitation_text = invitation_text;
|
|
30
|
+
this.invite_first_days = invite_first_days;
|
|
31
|
+
this.invite_groups = invite_groups;
|
|
32
|
+
this.invite_hide_before_sent = invite_hide_before_sent;
|
|
33
|
+
this.invite_last_response_date = invite_last_response_date;
|
|
34
|
+
this.invite_remind = invite_remind;
|
|
35
|
+
this.invite_remind_receivers = invite_remind_receivers;
|
|
36
|
+
this.invite_second_days = invite_second_days;
|
|
37
|
+
this.invite_settings = invite_settings;
|
|
38
|
+
this.invited_members = invited_members;
|
|
39
|
+
this.last_response_date = last_response_date;
|
|
40
|
+
this.max_num_attendants = max_num_attendants;
|
|
41
|
+
this.max_num_attendants_type = max_num_attendants_type;
|
|
42
|
+
this.meet_up_place = meet_up_place;
|
|
43
|
+
this.meet_up_time = meet_up_time;
|
|
44
|
+
this.meet_up_time_display = meet_up_time_display;
|
|
45
|
+
this.repeat = repeat;
|
|
46
|
+
this.repeat_num = repeat_num;
|
|
47
|
+
this.repeat_to_day = repeat_to_day;
|
|
48
|
+
this.repeat_type = repeat_type;
|
|
49
|
+
this.show_other_invited = show_other_invited;
|
|
50
|
+
this.start_time = start_time;
|
|
51
|
+
this.title = title;
|
|
52
|
+
this.updated = updated;
|
|
53
|
+
this.use_invite = use_invite;
|
|
54
|
+
this.update_repeating = update_repeating;
|
|
55
|
+
}
|
|
56
|
+
static asFormGroup(activity = null) {
|
|
57
|
+
return new FormGroup({
|
|
58
|
+
id: new FormControl((activity === null || activity === void 0 ? void 0 : activity.id) || ''),
|
|
59
|
+
activity_group_id: new FormControl((activity === null || activity === void 0 ? void 0 : activity.activity_group_id) || null, { nonNullable: false }),
|
|
60
|
+
activity_type_id: new FormControl((activity === null || activity === void 0 ? void 0 : activity.activity_type_id) || '', [Validators.required]),
|
|
61
|
+
club_id: new FormControl((activity === null || activity === void 0 ? void 0 : activity.club_id) || ''),
|
|
62
|
+
location_id: new FormControl((activity === null || activity === void 0 ? void 0 : activity.location_id) || '', [Validators.required]),
|
|
63
|
+
team_id: new FormControl((activity === null || activity === void 0 ? void 0 : activity.team_id) || ''),
|
|
64
|
+
activity_location: new FormControl((activity === null || activity === void 0 ? void 0 : activity.activity_location) || '', [Validators.required]),
|
|
65
|
+
activity_type_name: new FormControl((activity === null || activity === void 0 ? void 0 : activity.activity_type_name) || ''),
|
|
66
|
+
allow_maybe: new FormControl(typeof (activity === null || activity === void 0 ? void 0 : activity.allow_maybe) !== 'undefined' ? activity.allow_maybe : false),
|
|
67
|
+
day: new FormControl((activity === null || activity === void 0 ? void 0 : activity.day) || '', [Validators.required]),
|
|
68
|
+
description: new FormControl((activity === null || activity === void 0 ? void 0 : activity.description) || ''),
|
|
69
|
+
end_time: new FormControl((activity === null || activity === void 0 ? void 0 : activity.end_time) || '', [Validators.required]),
|
|
70
|
+
file: new FormControl(''),
|
|
71
|
+
invitation_text: new FormControl((activity === null || activity === void 0 ? void 0 : activity.invitation_text) || ''),
|
|
72
|
+
invite_first_days: new FormControl((activity === null || activity === void 0 ? void 0 : activity.invite_first_days) || 7),
|
|
73
|
+
invite_groups: new FormControl((activity === null || activity === void 0 ? void 0 : activity.invite_groups) || []),
|
|
74
|
+
invite_hide_before_sent: new FormControl(typeof (activity === null || activity === void 0 ? void 0 : activity.invite_hide_before_sent) !== 'undefined' ? activity === null || activity === void 0 ? void 0 : activity.invite_hide_before_sent : false),
|
|
75
|
+
invite_last_response_date: new FormControl((activity === null || activity === void 0 ? void 0 : activity.invite_last_response_date) || ''),
|
|
76
|
+
invite_remind: new FormControl((activity === null || activity === void 0 ? void 0 : activity.invite_remind) || 0),
|
|
77
|
+
invite_remind_receivers: new FormControl((activity === null || activity === void 0 ? void 0 : activity.invite_remind_receivers) || ''),
|
|
78
|
+
invite_second_days: new FormControl((activity === null || activity === void 0 ? void 0 : activity.invite_second_days) || 2),
|
|
79
|
+
invite_settings: new FormControl((activity === null || activity === void 0 ? void 0 : activity.invite_settings) || ''),
|
|
80
|
+
last_response_date: new FormControl((activity === null || activity === void 0 ? void 0 : activity.last_response_date) || ''),
|
|
81
|
+
max_num_attendants: new FormControl((activity === null || activity === void 0 ? void 0 : activity.max_num_attendants) || 0),
|
|
82
|
+
meet_up_place: new FormControl((activity === null || activity === void 0 ? void 0 : activity.meet_up_place) || ''),
|
|
83
|
+
meet_up_time: new FormControl((activity === null || activity === void 0 ? void 0 : activity.meet_up_time) || 0),
|
|
84
|
+
repeat: new FormControl((activity === null || activity === void 0 ? void 0 : activity.repeat) || 'none'),
|
|
85
|
+
repeat_num: new FormControl((activity === null || activity === void 0 ? void 0 : activity.repeat_num) || 6),
|
|
86
|
+
repeat_to_day: new FormControl((activity === null || activity === void 0 ? void 0 : activity.repeat_to_day) || ''),
|
|
87
|
+
repeat_type: new FormControl((activity === null || activity === void 0 ? void 0 : activity.repeat_type) || ''),
|
|
88
|
+
show_other_invited: new FormControl((activity === null || activity === void 0 ? void 0 : activity.show_other_invited) || 'all'),
|
|
89
|
+
start_time: new FormControl((activity === null || activity === void 0 ? void 0 : activity.start_time) || '', [Validators.required]),
|
|
90
|
+
title: new FormControl((activity === null || activity === void 0 ? void 0 : activity.title) || '', [Validators.required]),
|
|
91
|
+
use_invite: new FormControl(typeof (activity === null || activity === void 0 ? void 0 : activity.use_invite) !== 'undefined' ? activity === null || activity === void 0 ? void 0 : activity.use_invite : false),
|
|
92
|
+
update_repeating: new FormControl(typeof (activity === null || activity === void 0 ? void 0 : activity.update_repeating) !== 'undefined' ? activity === null || activity === void 0 ? void 0 : activity.update_repeating : false)
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
class ActivityExtraMember {
|
|
98
|
+
constructor(id, member_id, team_id, created, leader, member, member_name) {
|
|
99
|
+
this.id = id;
|
|
100
|
+
this.member_id = member_id;
|
|
101
|
+
this.team_id = team_id;
|
|
102
|
+
this.created = created;
|
|
103
|
+
this.leader = leader;
|
|
104
|
+
this.member = member;
|
|
105
|
+
this.member_name = member_name;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
class ActivityInvite {
|
|
110
|
+
constructor(id, activity, comment, created, has_unpaid_invoices, last_invite, member, reminded, response_date, status, token, unpaid_invoices, updated) {
|
|
111
|
+
this.id = id;
|
|
112
|
+
this.activity = activity;
|
|
113
|
+
this.comment = comment;
|
|
114
|
+
this.created = created;
|
|
115
|
+
this.has_unpaid_invoices = has_unpaid_invoices;
|
|
116
|
+
this.last_invite = last_invite;
|
|
117
|
+
this.member = member;
|
|
118
|
+
this.reminded = reminded;
|
|
119
|
+
this.response_date = response_date;
|
|
120
|
+
this.status = status;
|
|
121
|
+
this.token = token;
|
|
122
|
+
this.unpaid_invoices = unpaid_invoices;
|
|
123
|
+
this.updated = updated;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
class ActivityLocation {
|
|
128
|
+
constructor(id, club_id, section_id, active, mun_location_city_area, mun_location_name, name) {
|
|
129
|
+
this.id = id;
|
|
130
|
+
this.club_id = club_id;
|
|
131
|
+
this.section_id = section_id;
|
|
132
|
+
this.active = active;
|
|
133
|
+
this.mun_location_city_area = mun_location_city_area;
|
|
134
|
+
this.mun_location_name = mun_location_name;
|
|
135
|
+
this.name = name;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
class ActivitySettings {
|
|
140
|
+
constructor(dayOptions, hourOptions, inviteGroupOptions, inviteSettingsOptions, maxAttendanceOptions, meetUpTimeOptions, remindReceiverOptions, repeatOptions, repeatTypeOptions) {
|
|
141
|
+
this.dayOptions = dayOptions;
|
|
142
|
+
this.hourOptions = hourOptions;
|
|
143
|
+
this.inviteGroupOptions = inviteGroupOptions;
|
|
144
|
+
this.inviteSettingsOptions = inviteSettingsOptions;
|
|
145
|
+
this.maxAttendanceOptions = maxAttendanceOptions;
|
|
146
|
+
this.meetUpTimeOptions = meetUpTimeOptions;
|
|
147
|
+
this.remindReceiverOptions = remindReceiverOptions;
|
|
148
|
+
this.repeatOptions = repeatOptions;
|
|
149
|
+
this.repeatTypeOptions = repeatTypeOptions;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
class ActivityType {
|
|
154
|
+
constructor(id, club_id, section_id, active, base_type, name) {
|
|
155
|
+
this.id = id;
|
|
156
|
+
this.club_id = club_id;
|
|
157
|
+
this.section_id = section_id;
|
|
158
|
+
this.active = active;
|
|
159
|
+
this.base_type = base_type;
|
|
160
|
+
this.name = name;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
class Auth {
|
|
165
|
+
constructor(id, name, clubAdmin, isSectionClub, members, registrationEnabled, sections, siteEnabled, teams, user_name) {
|
|
166
|
+
this.id = id;
|
|
167
|
+
this.name = name;
|
|
168
|
+
this.clubAdmin = clubAdmin;
|
|
169
|
+
this.isSectionClub = isSectionClub;
|
|
170
|
+
this.members = members;
|
|
171
|
+
this.registrationEnabled = registrationEnabled;
|
|
172
|
+
this.sections = sections;
|
|
173
|
+
this.siteEnabled = siteEnabled;
|
|
174
|
+
this.teams = teams;
|
|
175
|
+
this.user_name = user_name;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
class AuthMember {
|
|
180
|
+
constructor(id, name, calendar_url) {
|
|
181
|
+
this.id = id;
|
|
182
|
+
this.name = name;
|
|
183
|
+
this.calendar_url = calendar_url;
|
|
184
|
+
this.eventColor = '';
|
|
185
|
+
this.eventBackgroundColor = '';
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
class AuthSection {
|
|
190
|
+
constructor(id, name) {
|
|
191
|
+
this.id = id;
|
|
192
|
+
this.name = name;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
class AuthTeam {
|
|
197
|
+
constructor(id, calendar_url, name, section) {
|
|
198
|
+
this.id = id;
|
|
199
|
+
this.calendar_url = calendar_url;
|
|
200
|
+
this.name = name;
|
|
201
|
+
this.section = section;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
class AuthTeamSection {
|
|
206
|
+
constructor(id, name) {
|
|
207
|
+
this.id = id;
|
|
208
|
+
this.name = name;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
class Authentication {
|
|
213
|
+
constructor(accessToken, refreshToken) {
|
|
214
|
+
this.accessToken = accessToken;
|
|
215
|
+
this.refreshToken = refreshToken;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
class Calendar {
|
|
220
|
+
constructor(id, club_id, section_id, name, types_to_show) {
|
|
221
|
+
this.id = id;
|
|
222
|
+
this.club_id = club_id;
|
|
223
|
+
this.section_id = section_id;
|
|
224
|
+
this.name = name;
|
|
225
|
+
this.types_to_show = types_to_show;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
class CalendarEvent {
|
|
230
|
+
constructor(id, calendar, created, day, description, end_time, location, meet_up_place, meet_up_time, meet_up_time_display, push_to_all, sequence, start_time, title, updated) {
|
|
231
|
+
this.id = id;
|
|
232
|
+
this.calendar = calendar;
|
|
233
|
+
this.created = created;
|
|
234
|
+
this.day = day;
|
|
235
|
+
this.description = description;
|
|
236
|
+
this.end_time = end_time;
|
|
237
|
+
this.location = location;
|
|
238
|
+
this.meet_up_place = meet_up_place;
|
|
239
|
+
this.meet_up_time = meet_up_time;
|
|
240
|
+
this.meet_up_time_display = meet_up_time_display;
|
|
241
|
+
this.push_to_all = push_to_all;
|
|
242
|
+
this.sequence = sequence;
|
|
243
|
+
this.start_time = start_time;
|
|
244
|
+
this.title = title;
|
|
245
|
+
this.updated = updated;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
class Card {
|
|
250
|
+
constructor(id, deals_count, header_1, name, logo, theme, ticket_count, use_pdf_version) {
|
|
251
|
+
this.id = id;
|
|
252
|
+
this.deals_count = deals_count;
|
|
253
|
+
this.header_1 = header_1;
|
|
254
|
+
this.name = name;
|
|
255
|
+
this.logo = logo;
|
|
256
|
+
this.theme = theme;
|
|
257
|
+
this.ticket_count = ticket_count;
|
|
258
|
+
this.use_pdf_version = use_pdf_version;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
class CardDeal {
|
|
263
|
+
constructor(id, partner, text, title, url) {
|
|
264
|
+
this.id = id;
|
|
265
|
+
this.partner = partner;
|
|
266
|
+
this.text = text;
|
|
267
|
+
this.title = title;
|
|
268
|
+
this.url = url;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
class CardLogo {
|
|
273
|
+
constructor(id, name, urls) {
|
|
274
|
+
this.id = id;
|
|
275
|
+
this.name = name;
|
|
276
|
+
this.urls = urls;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
class CardLogoUrls {
|
|
281
|
+
constructor(lg, md, sm, w16, w32, w64, w180, w192) {
|
|
282
|
+
this.lg = lg;
|
|
283
|
+
this.md = md;
|
|
284
|
+
this.sm = sm;
|
|
285
|
+
this.w16 = w16;
|
|
286
|
+
this.w32 = w32;
|
|
287
|
+
this.w64 = w64;
|
|
288
|
+
this.w180 = w180;
|
|
289
|
+
this.w192 = w192;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
class CardMemberTicket {
|
|
294
|
+
constructor(id, member_id, ticket_id, member_name, ticket_image_url, ticket_number) {
|
|
295
|
+
this.id = id;
|
|
296
|
+
this.member_id = member_id;
|
|
297
|
+
this.ticket_id = ticket_id;
|
|
298
|
+
this.member_name = member_name;
|
|
299
|
+
this.ticket_image_url = ticket_image_url;
|
|
300
|
+
this.ticket_number = ticket_number;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
class CardTicket {
|
|
305
|
+
constructor(id, activation_end_hours, activation_end_time, activation_start_hours, activation_start_time, away_team, card_member_ticket, description, event_time, home_team, image, location, name, ticket_type, ticket_type_nice, uses_pin) {
|
|
306
|
+
this.id = id;
|
|
307
|
+
this.activation_end_hours = activation_end_hours;
|
|
308
|
+
this.activation_end_time = activation_end_time;
|
|
309
|
+
this.activation_start_hours = activation_start_hours;
|
|
310
|
+
this.activation_start_time = activation_start_time;
|
|
311
|
+
this.away_team = away_team;
|
|
312
|
+
this.card_member_ticket = card_member_ticket;
|
|
313
|
+
this.description = description;
|
|
314
|
+
this.event_time = event_time;
|
|
315
|
+
this.home_team = home_team;
|
|
316
|
+
this.image = image;
|
|
317
|
+
this.location = location;
|
|
318
|
+
this.name = name;
|
|
319
|
+
this.ticket_type = ticket_type;
|
|
320
|
+
this.ticket_type_nice = ticket_type_nice;
|
|
321
|
+
this.uses_pin = uses_pin;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
class CardTicketLocation {
|
|
326
|
+
constructor(id, club_id, section_id, location) {
|
|
327
|
+
this.id = id;
|
|
328
|
+
this.club_id = club_id;
|
|
329
|
+
this.section_id = section_id;
|
|
330
|
+
this.location = location;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
class CardTheme {
|
|
335
|
+
constructor(id, background_color, background_image_urls, name, text_color) {
|
|
336
|
+
this.id = id;
|
|
337
|
+
this.background_color = background_color;
|
|
338
|
+
this.background_image_urls = background_image_urls;
|
|
339
|
+
this.name = name;
|
|
340
|
+
this.text_color = text_color;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
class HomeTeam {
|
|
345
|
+
constructor(id, logo, name) {
|
|
346
|
+
this.id = id;
|
|
347
|
+
this.logo = logo;
|
|
348
|
+
this.name = name;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
class MemberCard {
|
|
353
|
+
constructor(id, card, header_2, member_name, membership_text, name, pdf_url) {
|
|
354
|
+
this.id = id;
|
|
355
|
+
this.card = card;
|
|
356
|
+
this.header_2 = header_2;
|
|
357
|
+
this.member_name = member_name;
|
|
358
|
+
this.membership_text = membership_text;
|
|
359
|
+
this.name = name;
|
|
360
|
+
this.pdf_url = pdf_url;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
class SearchMemberCard {
|
|
365
|
+
constructor(id, name, pdf_url) {
|
|
366
|
+
this.id = id;
|
|
367
|
+
this.name = name;
|
|
368
|
+
this.pdf_url = pdf_url;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
class Club {
|
|
373
|
+
constructor(id, name) {
|
|
374
|
+
this.id = id;
|
|
375
|
+
this.name = name;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
class ClubImage {
|
|
380
|
+
constructor(clubId, sectionId, comment, created, image, imageSmPath, imageLgPath, inUse, isLogo, originalHeight, originalWidth, title, updated) {
|
|
381
|
+
this.clubId = clubId;
|
|
382
|
+
this.sectionId = sectionId;
|
|
383
|
+
this.comment = comment;
|
|
384
|
+
this.created = created;
|
|
385
|
+
this.image = image;
|
|
386
|
+
this.imageSmPath = imageSmPath;
|
|
387
|
+
this.imageLgPath = imageLgPath;
|
|
388
|
+
this.inUse = inUse;
|
|
389
|
+
this.isLogo = isLogo;
|
|
390
|
+
this.originalHeight = originalHeight;
|
|
391
|
+
this.originalWidth = originalWidth;
|
|
392
|
+
this.title = title;
|
|
393
|
+
this.updated = updated;
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
class ClubSection {
|
|
398
|
+
constructor(id, name) {
|
|
399
|
+
this.id = id;
|
|
400
|
+
this.name = name;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
class ClubTeam {
|
|
405
|
+
constructor(id, name) {
|
|
406
|
+
this.id = id;
|
|
407
|
+
this.name = name;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
class Collection {
|
|
412
|
+
constructor(count, next, previous, resources) {
|
|
413
|
+
this.count = count;
|
|
414
|
+
this.next = next;
|
|
415
|
+
this.previous = previous;
|
|
416
|
+
this.resources = resources;
|
|
417
|
+
}
|
|
418
|
+
[Symbol.iterator]() {
|
|
419
|
+
return this.resources.values();
|
|
420
|
+
}
|
|
421
|
+
toArray() {
|
|
422
|
+
return this.resources;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
class Contact {
|
|
427
|
+
constructor(id, club_id, member_id, address1, address2, address3, country, district, email, first_name, home_phone, last_name, mobile_phone, work_phone, zip) {
|
|
428
|
+
this.id = id;
|
|
429
|
+
this.club_id = club_id;
|
|
430
|
+
this.member_id = member_id;
|
|
431
|
+
this.address1 = address1;
|
|
432
|
+
this.address2 = address2;
|
|
433
|
+
this.address3 = address3;
|
|
434
|
+
this.country = country;
|
|
435
|
+
this.district = district;
|
|
436
|
+
this.email = email;
|
|
437
|
+
this.first_name = first_name;
|
|
438
|
+
this.home_phone = home_phone;
|
|
439
|
+
this.last_name = last_name;
|
|
440
|
+
this.mobile_phone = mobile_phone;
|
|
441
|
+
this.work_phone = work_phone;
|
|
442
|
+
this.zip = zip;
|
|
443
|
+
}
|
|
444
|
+
static asFormGroup(contact) {
|
|
445
|
+
return new FormGroup({
|
|
446
|
+
id: new FormControl((contact === null || contact === void 0 ? void 0 : contact.id) || ''),
|
|
447
|
+
club_id: new FormControl((contact === null || contact === void 0 ? void 0 : contact.club_id) || ''),
|
|
448
|
+
member_id: new FormControl((contact === null || contact === void 0 ? void 0 : contact.member_id) || ''),
|
|
449
|
+
address1: new FormControl((contact === null || contact === void 0 ? void 0 : contact.address1) || ''),
|
|
450
|
+
address2: new FormControl((contact === null || contact === void 0 ? void 0 : contact.address2) || ''),
|
|
451
|
+
address3: new FormControl((contact === null || contact === void 0 ? void 0 : contact.address3) || ''),
|
|
452
|
+
country: new FormControl((contact === null || contact === void 0 ? void 0 : contact.country) || ''),
|
|
453
|
+
district: new FormControl((contact === null || contact === void 0 ? void 0 : contact.district) || ''),
|
|
454
|
+
email: new FormControl((contact === null || contact === void 0 ? void 0 : contact.email) || '', Validators.email),
|
|
455
|
+
first_name: new FormControl((contact === null || contact === void 0 ? void 0 : contact.first_name) || '', Validators.required),
|
|
456
|
+
home_phone: new FormControl((contact === null || contact === void 0 ? void 0 : contact.home_phone) || ''),
|
|
457
|
+
last_name: new FormControl((contact === null || contact === void 0 ? void 0 : contact.last_name) || '', Validators.required),
|
|
458
|
+
mobile_phone: new FormControl((contact === null || contact === void 0 ? void 0 : contact.mobile_phone) || ''),
|
|
459
|
+
work_phone: new FormControl((contact === null || contact === void 0 ? void 0 : contact.work_phone) || ''),
|
|
460
|
+
zip: new FormControl((contact === null || contact === void 0 ? void 0 : contact.zip) || '')
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
get name() {
|
|
464
|
+
if (this.first_name) {
|
|
465
|
+
return [this.first_name, this.last_name].join(' ');
|
|
466
|
+
}
|
|
467
|
+
return this.email;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
class Directory {
|
|
472
|
+
constructor(id, club_id, section_id, team_id, created, files, name, location_name, updated) {
|
|
473
|
+
this.id = id;
|
|
474
|
+
this.club_id = club_id;
|
|
475
|
+
this.section_id = section_id;
|
|
476
|
+
this.team_id = team_id;
|
|
477
|
+
this.created = created;
|
|
478
|
+
this.files = files;
|
|
479
|
+
this.name = name;
|
|
480
|
+
this.location_name = location_name;
|
|
481
|
+
this.updated = updated;
|
|
482
|
+
}
|
|
483
|
+
belongsToTeam() {
|
|
484
|
+
return this.team_id !== null;
|
|
485
|
+
}
|
|
486
|
+
belongsToSection() {
|
|
487
|
+
return this.section_id !== null;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
class Email {
|
|
492
|
+
constructor(body, subject, recipients = []) {
|
|
493
|
+
this.body = body;
|
|
494
|
+
this.subject = subject;
|
|
495
|
+
this.recipients = recipients;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
class EmailRecipient {
|
|
500
|
+
constructor(id, name) {
|
|
501
|
+
this.id = id;
|
|
502
|
+
this.name = name;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
class Event {
|
|
507
|
+
constructor(id, activity_id, activity_type, calendar_name, description, end, invitation_id, invitation_response, location, meet_up_place, meet_up_time, member_id, start, title, type) {
|
|
508
|
+
this.id = id;
|
|
509
|
+
this.activity_id = activity_id;
|
|
510
|
+
this.activity_type = activity_type;
|
|
511
|
+
this.calendar_name = calendar_name;
|
|
512
|
+
this.description = description;
|
|
513
|
+
this.end = end;
|
|
514
|
+
this.invitation_id = invitation_id;
|
|
515
|
+
this.invitation_response = invitation_response;
|
|
516
|
+
this.location = location;
|
|
517
|
+
this.meet_up_place = meet_up_place;
|
|
518
|
+
this.meet_up_time = meet_up_time;
|
|
519
|
+
this.member_id = member_id;
|
|
520
|
+
this.start = start;
|
|
521
|
+
this.title = title;
|
|
522
|
+
this.type = type;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
class ExternalLink {
|
|
527
|
+
constructor(text, value) {
|
|
528
|
+
this.text = text;
|
|
529
|
+
this.value = value;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
class FileObject {
|
|
534
|
+
constructor(id, created, member, name, section, team, updated, url) {
|
|
535
|
+
this.id = id;
|
|
536
|
+
this.created = created;
|
|
537
|
+
this.member = member;
|
|
538
|
+
this.name = name;
|
|
539
|
+
this.section = section;
|
|
540
|
+
this.team = team;
|
|
541
|
+
this.updated = updated;
|
|
542
|
+
this.url = url;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
class GeneralImage {
|
|
547
|
+
constructor(id, name, urls) {
|
|
548
|
+
this.id = id;
|
|
549
|
+
this.name = name;
|
|
550
|
+
this.urls = urls;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
class ImageUrls {
|
|
555
|
+
constructor(lg, md, raw, sm, xs) {
|
|
556
|
+
this.lg = lg;
|
|
557
|
+
this.md = md;
|
|
558
|
+
this.raw = raw;
|
|
559
|
+
this.sm = sm;
|
|
560
|
+
this.xs = xs;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
class MemberFee {
|
|
565
|
+
constructor(id, clubId, sectionId, name) {
|
|
566
|
+
this.id = id;
|
|
567
|
+
this.clubId = clubId;
|
|
568
|
+
this.sectionId = sectionId;
|
|
569
|
+
this.name = name;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
class MemberInvoice {
|
|
574
|
+
constructor(id, amount, amountPaid, balance, clubBillId, clubName, creditCard, datePaid, dueDate, giro, invoiceRows, invoiceText, isPaid, memberId, payee, paymentUrl, reference, swish, zimpler) {
|
|
575
|
+
this.id = id;
|
|
576
|
+
this.amount = amount;
|
|
577
|
+
this.amountPaid = amountPaid;
|
|
578
|
+
this.balance = balance;
|
|
579
|
+
this.clubBillId = clubBillId;
|
|
580
|
+
this.clubName = clubName;
|
|
581
|
+
this.creditCard = creditCard;
|
|
582
|
+
this.datePaid = datePaid;
|
|
583
|
+
this.dueDate = dueDate;
|
|
584
|
+
this.giro = giro;
|
|
585
|
+
this.invoiceRows = invoiceRows;
|
|
586
|
+
this.invoiceText = invoiceText;
|
|
587
|
+
this.isPaid = isPaid;
|
|
588
|
+
this.memberId = memberId;
|
|
589
|
+
this.payee = payee;
|
|
590
|
+
this.paymentUrl = paymentUrl;
|
|
591
|
+
this.reference = reference;
|
|
592
|
+
this.swish = swish;
|
|
593
|
+
this.zimpler = zimpler;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
class MemberInvoiceRow {
|
|
598
|
+
constructor(id, amount, amountPaid, balance, created, datePaid, fee, hasCreditType, invoice, isCredit, isPaid, updated) {
|
|
599
|
+
this.id = id;
|
|
600
|
+
this.amount = amount;
|
|
601
|
+
this.amountPaid = amountPaid;
|
|
602
|
+
this.balance = balance;
|
|
603
|
+
this.created = created;
|
|
604
|
+
this.datePaid = datePaid;
|
|
605
|
+
this.fee = fee;
|
|
606
|
+
this.hasCreditType = hasCreditType;
|
|
607
|
+
this.invoice = invoice;
|
|
608
|
+
this.isCredit = isCredit;
|
|
609
|
+
this.isPaid = isPaid;
|
|
610
|
+
this.updated = updated;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
class PaymentAttempt {
|
|
615
|
+
constructor(id, amount, error, invoiceId, paidDate, paymentData, status, type) {
|
|
616
|
+
this.id = id;
|
|
617
|
+
this.amount = amount;
|
|
618
|
+
this.error = error;
|
|
619
|
+
this.invoiceId = invoiceId;
|
|
620
|
+
this.paidDate = paidDate;
|
|
621
|
+
this.paymentData = paymentData;
|
|
622
|
+
this.status = status;
|
|
623
|
+
this.type = type;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
class CreditCard {
|
|
628
|
+
constructor(clubId, sectionId, defaultActivated, merchantId, name, paymentTermsName, paymentTermsOrganisationId, paymentTermsUrl, rsaKey, status, testAccount) {
|
|
629
|
+
this.clubId = clubId;
|
|
630
|
+
this.sectionId = sectionId;
|
|
631
|
+
this.defaultActivated = defaultActivated;
|
|
632
|
+
this.merchantId = merchantId;
|
|
633
|
+
this.name = name;
|
|
634
|
+
this.paymentTermsName = paymentTermsName;
|
|
635
|
+
this.paymentTermsOrganisationId = paymentTermsOrganisationId;
|
|
636
|
+
this.paymentTermsUrl = paymentTermsUrl;
|
|
637
|
+
this.rsaKey = rsaKey;
|
|
638
|
+
this.status = status;
|
|
639
|
+
this.testAccount = testAccount;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
class Giro {
|
|
644
|
+
constructor(clubId, sectionId, giroType, name, number, ocr) {
|
|
645
|
+
this.clubId = clubId;
|
|
646
|
+
this.sectionId = sectionId;
|
|
647
|
+
this.giroType = giroType;
|
|
648
|
+
this.name = name;
|
|
649
|
+
this.number = number;
|
|
650
|
+
this.ocr = ocr;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
class Swish {
|
|
655
|
+
constructor(clubId, sectionId, certificateValidUntil, defaultActivated, name, status, swishPayeeAlias, testAccount, usesMyClubCertificate) {
|
|
656
|
+
this.clubId = clubId;
|
|
657
|
+
this.sectionId = sectionId;
|
|
658
|
+
this.certificateValidUntil = certificateValidUntil;
|
|
659
|
+
this.defaultActivated = defaultActivated;
|
|
660
|
+
this.name = name;
|
|
661
|
+
this.status = status;
|
|
662
|
+
this.swishPayeeAlias = swishPayeeAlias;
|
|
663
|
+
this.testAccount = testAccount;
|
|
664
|
+
this.usesMyClubCertificate = usesMyClubCertificate;
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
class Zimpler {
|
|
669
|
+
constructor(clubId, sectionId, defaultActivated, merchantId, name, status, testAccount) {
|
|
670
|
+
this.clubId = clubId;
|
|
671
|
+
this.sectionId = sectionId;
|
|
672
|
+
this.defaultActivated = defaultActivated;
|
|
673
|
+
this.merchantId = merchantId;
|
|
674
|
+
this.name = name;
|
|
675
|
+
this.status = status;
|
|
676
|
+
this.testAccount = testAccount;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
class SearchMemberInvoice {
|
|
681
|
+
constructor(id, amount, amountPaid, balance, clubBillId, datePaid, dueDate, isPaid, member) {
|
|
682
|
+
this.id = id;
|
|
683
|
+
this.amount = amount;
|
|
684
|
+
this.amountPaid = amountPaid;
|
|
685
|
+
this.balance = balance;
|
|
686
|
+
this.clubBillId = clubBillId;
|
|
687
|
+
this.datePaid = datePaid;
|
|
688
|
+
this.dueDate = dueDate;
|
|
689
|
+
this.isPaid = isPaid;
|
|
690
|
+
this.member = member;
|
|
691
|
+
}
|
|
692
|
+
is_due() {
|
|
693
|
+
return new Date().toISOString() > this.dueDate;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
class SwishQrCode {
|
|
698
|
+
constructor(qrCode) {
|
|
699
|
+
this.qrCode = qrCode;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
class UnpaidMemberInvoice {
|
|
704
|
+
constructor(id, club_bill_id, member_id, token) {
|
|
705
|
+
this.id = id;
|
|
706
|
+
this.club_bill_id = club_bill_id;
|
|
707
|
+
this.member_id = member_id;
|
|
708
|
+
this.token = token;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
class Member {
|
|
713
|
+
constructor(id, club_id, address1, address2, address_field, attributes, birth_date, calendar_url, comment, contacts, country, created, district, email, first_name, functions, home_phone, image, last_name, mobile_phone, public_member_id, sex, updated, validation_settings, work_phone, zip) {
|
|
714
|
+
this.id = id;
|
|
715
|
+
this.club_id = club_id;
|
|
716
|
+
this.address1 = address1;
|
|
717
|
+
this.address2 = address2;
|
|
718
|
+
this.address_field = address_field;
|
|
719
|
+
this.attributes = attributes;
|
|
720
|
+
this.birth_date = birth_date;
|
|
721
|
+
this.calendar_url = calendar_url;
|
|
722
|
+
this.comment = comment;
|
|
723
|
+
this.contacts = contacts;
|
|
724
|
+
this.country = country;
|
|
725
|
+
this.created = created;
|
|
726
|
+
this.district = district;
|
|
727
|
+
this.email = email;
|
|
728
|
+
this.first_name = first_name;
|
|
729
|
+
this.functions = functions;
|
|
730
|
+
this.home_phone = home_phone;
|
|
731
|
+
this.image = image;
|
|
732
|
+
this.last_name = last_name;
|
|
733
|
+
this.mobile_phone = mobile_phone;
|
|
734
|
+
this.public_member_id = public_member_id;
|
|
735
|
+
this.sex = sex;
|
|
736
|
+
this.updated = updated;
|
|
737
|
+
this.validation_settings = validation_settings;
|
|
738
|
+
this.work_phone = work_phone;
|
|
739
|
+
this.zip = zip;
|
|
740
|
+
}
|
|
741
|
+
static asFormGroup(member = null) {
|
|
742
|
+
const attributes = [];
|
|
743
|
+
const contacts = [];
|
|
744
|
+
const functions = [];
|
|
745
|
+
if (member === null || member === void 0 ? void 0 : member.attributes) {
|
|
746
|
+
member.attributes.forEach((attribute) => attributes.push(MemberAttribute.asFormGroup(attribute)));
|
|
747
|
+
}
|
|
748
|
+
if (member === null || member === void 0 ? void 0 : member.contacts) {
|
|
749
|
+
member.contacts.forEach((memberContact) => contacts.push(MemberContact.asFormGroup(memberContact)));
|
|
750
|
+
}
|
|
751
|
+
if (member === null || member === void 0 ? void 0 : member.functions) {
|
|
752
|
+
member.functions.forEach((memberFunction) => functions.push(MemberFunction.asFormGroup(memberFunction)));
|
|
753
|
+
}
|
|
754
|
+
return new FormGroup({
|
|
755
|
+
id: new FormControl((member === null || member === void 0 ? void 0 : member.id) || ''),
|
|
756
|
+
club_id: new FormControl((member === null || member === void 0 ? void 0 : member.club_id) || ''),
|
|
757
|
+
address1: new FormControl((member === null || member === void 0 ? void 0 : member.address1) || ''),
|
|
758
|
+
address2: new FormControl((member === null || member === void 0 ? void 0 : member.address2) || ''),
|
|
759
|
+
attributes: new FormArray(attributes),
|
|
760
|
+
birth_date: new FormControl((member === null || member === void 0 ? void 0 : member.birth_date) || ''),
|
|
761
|
+
comment: new FormControl((member === null || member === void 0 ? void 0 : member.comment) || ''),
|
|
762
|
+
contacts: new FormArray(contacts),
|
|
763
|
+
country: new FormControl((member === null || member === void 0 ? void 0 : member.country) || ''),
|
|
764
|
+
district: new FormControl((member === null || member === void 0 ? void 0 : member.district) || ''),
|
|
765
|
+
email: new FormControl((member === null || member === void 0 ? void 0 : member.email) || '', Validators.email),
|
|
766
|
+
first_name: new FormControl((member === null || member === void 0 ? void 0 : member.first_name) || '', Validators.required),
|
|
767
|
+
functions: new FormArray(functions),
|
|
768
|
+
home_phone: new FormControl((member === null || member === void 0 ? void 0 : member.home_phone) || ''),
|
|
769
|
+
last_name: new FormControl((member === null || member === void 0 ? void 0 : member.last_name) || '', Validators.required),
|
|
770
|
+
mobile_phone: new FormControl((member === null || member === void 0 ? void 0 : member.mobile_phone) || ''),
|
|
771
|
+
public_member_id: new FormControl((member === null || member === void 0 ? void 0 : member.public_member_id) || 0),
|
|
772
|
+
sex: new FormControl((member === null || member === void 0 ? void 0 : member.sex) || ''),
|
|
773
|
+
work_phone: new FormControl((member === null || member === void 0 ? void 0 : member.work_phone) || ''),
|
|
774
|
+
zip: new FormControl((member === null || member === void 0 ? void 0 : member.zip) || '')
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
get name() {
|
|
778
|
+
if (this.first_name) {
|
|
779
|
+
return [this.first_name, this.last_name].join(' ');
|
|
780
|
+
}
|
|
781
|
+
return this.email;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
class MemberAttribute {
|
|
786
|
+
constructor(display_value, field_id, leader_editable, member_id, member_editable, name, options, order, section_id, type, value) {
|
|
787
|
+
this.display_value = display_value;
|
|
788
|
+
this.field_id = field_id;
|
|
789
|
+
this.leader_editable = leader_editable;
|
|
790
|
+
this.member_id = member_id;
|
|
791
|
+
this.member_editable = member_editable;
|
|
792
|
+
this.name = name;
|
|
793
|
+
this.options = options;
|
|
794
|
+
this.order = order;
|
|
795
|
+
this.section_id = section_id;
|
|
796
|
+
this.type = type;
|
|
797
|
+
this.value = value;
|
|
798
|
+
}
|
|
799
|
+
static asFormGroup(attribute = null) {
|
|
800
|
+
return new FormGroup({
|
|
801
|
+
field_id: new FormControl((attribute === null || attribute === void 0 ? void 0 : attribute.field_id) || ''),
|
|
802
|
+
member_id: new FormControl((attribute === null || attribute === void 0 ? void 0 : attribute.member_id) || ''),
|
|
803
|
+
value: new FormControl((attribute === null || attribute === void 0 ? void 0 : attribute.value) || '')
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
class MemberContact {
|
|
809
|
+
constructor(id, club_id, member_id, contact, contact_type) {
|
|
810
|
+
this.id = id;
|
|
811
|
+
this.club_id = club_id;
|
|
812
|
+
this.member_id = member_id;
|
|
813
|
+
this.contact = contact;
|
|
814
|
+
this.contact_type = contact_type;
|
|
815
|
+
}
|
|
816
|
+
static asFormGroup(memberContact) {
|
|
817
|
+
return new FormGroup({
|
|
818
|
+
id: new FormControl((memberContact === null || memberContact === void 0 ? void 0 : memberContact.id) || ''),
|
|
819
|
+
club_id: new FormControl((memberContact === null || memberContact === void 0 ? void 0 : memberContact.club_id) || ''),
|
|
820
|
+
member_id: new FormControl((memberContact === null || memberContact === void 0 ? void 0 : memberContact.member_id) || ''),
|
|
821
|
+
contact: Contact.asFormGroup(memberContact === null || memberContact === void 0 ? void 0 : memberContact.contact),
|
|
822
|
+
contact_type: new FormControl((memberContact === null || memberContact === void 0 ? void 0 : memberContact.contact_type) || '')
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
class MemberFunction {
|
|
828
|
+
constructor(id, comment, end_date, name, start_date) {
|
|
829
|
+
this.id = id;
|
|
830
|
+
this.comment = comment;
|
|
831
|
+
this.end_date = end_date;
|
|
832
|
+
this.name = name;
|
|
833
|
+
this.start_date = start_date;
|
|
834
|
+
}
|
|
835
|
+
static asFormGroup(memberFunction = null) {
|
|
836
|
+
return new FormGroup({
|
|
837
|
+
id: new FormControl((memberFunction === null || memberFunction === void 0 ? void 0 : memberFunction.id) || ''),
|
|
838
|
+
comment: new FormControl((memberFunction === null || memberFunction === void 0 ? void 0 : memberFunction.comment) || ''),
|
|
839
|
+
start_date: new FormControl((memberFunction === null || memberFunction === void 0 ? void 0 : memberFunction.start_date) || ''),
|
|
840
|
+
end_date: new FormControl((memberFunction === null || memberFunction === void 0 ? void 0 : memberFunction.end_date) || ''),
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
class MemberValidationSettings {
|
|
846
|
+
constructor(address, birth_date, district, email, home_phone, mobile_phone, work_phone, zip) {
|
|
847
|
+
this.address = address;
|
|
848
|
+
this.birth_date = birth_date;
|
|
849
|
+
this.district = district;
|
|
850
|
+
this.email = email;
|
|
851
|
+
this.home_phone = home_phone;
|
|
852
|
+
this.mobile_phone = mobile_phone;
|
|
853
|
+
this.work_phone = work_phone;
|
|
854
|
+
this.zip = zip;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
class SearchMember {
|
|
859
|
+
constructor(id, club_id, team_id, address1, address2, calendar_url, country, district, email, first_name, image, last_name, mobile_phone, name, zip) {
|
|
860
|
+
this.id = id;
|
|
861
|
+
this.club_id = club_id;
|
|
862
|
+
this.team_id = team_id;
|
|
863
|
+
this.address1 = address1;
|
|
864
|
+
this.address2 = address2;
|
|
865
|
+
this.calendar_url = calendar_url;
|
|
866
|
+
this.country = country;
|
|
867
|
+
this.district = district;
|
|
868
|
+
this.email = email;
|
|
869
|
+
this.first_name = first_name;
|
|
870
|
+
this.image = image;
|
|
871
|
+
this.last_name = last_name;
|
|
872
|
+
this.mobile_phone = mobile_phone;
|
|
873
|
+
this.name = name;
|
|
874
|
+
this.zip = zip;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
class MemberActivityInvite {
|
|
879
|
+
constructor(id, comment, last_invite, leader, member_id, member_name, status) {
|
|
880
|
+
this.id = id;
|
|
881
|
+
this.comment = comment;
|
|
882
|
+
this.last_invite = last_invite;
|
|
883
|
+
this.leader = leader;
|
|
884
|
+
this.member_id = member_id;
|
|
885
|
+
this.member_name = member_name;
|
|
886
|
+
this.status = status;
|
|
887
|
+
}
|
|
888
|
+
getColorByStatus() {
|
|
889
|
+
let color = 'none';
|
|
890
|
+
switch (this.status) {
|
|
891
|
+
case 'accepted':
|
|
892
|
+
color = 'myclub-accepted';
|
|
893
|
+
break;
|
|
894
|
+
case 'denied':
|
|
895
|
+
color = 'myclub-denied';
|
|
896
|
+
break;
|
|
897
|
+
case 'maybe':
|
|
898
|
+
color = 'myclub-maybe';
|
|
899
|
+
break;
|
|
900
|
+
}
|
|
901
|
+
return color;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
class MemberPublicForm {
|
|
906
|
+
constructor(id, active_form, active_to, name, url) {
|
|
907
|
+
this.id = id;
|
|
908
|
+
this.active_form = active_form;
|
|
909
|
+
this.active_to = active_to;
|
|
910
|
+
this.name = name;
|
|
911
|
+
this.url = url;
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
class MemberTeam {
|
|
916
|
+
constructor(club, section, id, email, name, phone) {
|
|
917
|
+
this.club = club;
|
|
918
|
+
this.section = section;
|
|
919
|
+
this.id = id;
|
|
920
|
+
this.email = email;
|
|
921
|
+
this.name = name;
|
|
922
|
+
this.phone = phone;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
class MemberTeamThrough {
|
|
927
|
+
constructor(id, created, dateHidden, image, leader, member, roleId, showOnWeb, updated) {
|
|
928
|
+
this.id = id;
|
|
929
|
+
this.created = created;
|
|
930
|
+
this.dateHidden = dateHidden;
|
|
931
|
+
this.image = image;
|
|
932
|
+
this.leader = leader;
|
|
933
|
+
this.member = member;
|
|
934
|
+
this.roleId = roleId;
|
|
935
|
+
this.showOnWeb = showOnWeb;
|
|
936
|
+
this.updated = updated;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
class News {
|
|
941
|
+
constructor(id, club_id, created, created_by_id, section_id, team_id, active_to, author, ingress, news_image, news_image_text, original_height, original_width, published_date, text, title, updated) {
|
|
942
|
+
this.id = id;
|
|
943
|
+
this.club_id = club_id;
|
|
944
|
+
this.created = created;
|
|
945
|
+
this.created_by_id = created_by_id;
|
|
946
|
+
this.section_id = section_id;
|
|
947
|
+
this.team_id = team_id;
|
|
948
|
+
this.active_to = active_to;
|
|
949
|
+
this.author = author;
|
|
950
|
+
this.ingress = ingress;
|
|
951
|
+
this.news_image = news_image;
|
|
952
|
+
this.news_image_text = news_image_text;
|
|
953
|
+
this.original_height = original_height;
|
|
954
|
+
this.original_width = original_width;
|
|
955
|
+
this.published_date = published_date;
|
|
956
|
+
this.text = text;
|
|
957
|
+
this.title = title;
|
|
958
|
+
this.updated = updated;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
class Partner {
|
|
963
|
+
constructor(id, image, name, url) {
|
|
964
|
+
this.id = id;
|
|
965
|
+
this.image = image;
|
|
966
|
+
this.name = name;
|
|
967
|
+
this.url = url;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
var Role;
|
|
972
|
+
(function (Role) {
|
|
973
|
+
Role[Role["ClubAdmin"] = 0] = "ClubAdmin";
|
|
974
|
+
Role[Role["SectionAdmin"] = 1] = "SectionAdmin";
|
|
975
|
+
Role[Role["TeamAdmin"] = 2] = "TeamAdmin";
|
|
976
|
+
Role[Role["MemberAdmin"] = 3] = "MemberAdmin";
|
|
977
|
+
Role[Role["Public"] = 4] = "Public";
|
|
978
|
+
Role[Role["None"] = 5] = "None";
|
|
979
|
+
})(Role || (Role = {}));
|
|
980
|
+
|
|
981
|
+
class SearchClub {
|
|
982
|
+
constructor(id, leader_member_search, member_search, name) {
|
|
983
|
+
this.id = id;
|
|
984
|
+
this.leader_member_search = leader_member_search;
|
|
985
|
+
this.member_search = member_search;
|
|
986
|
+
this.name = name;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
class SearchMemberTeam {
|
|
991
|
+
constructor(club, id, name, section) {
|
|
992
|
+
this.club = club;
|
|
993
|
+
this.id = id;
|
|
994
|
+
this.name = name;
|
|
995
|
+
this.section = section;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
class Section {
|
|
1000
|
+
constructor(id, name) {
|
|
1001
|
+
this.id = id;
|
|
1002
|
+
this.name = name;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
class SectionTeam {
|
|
1007
|
+
constructor(id, name) {
|
|
1008
|
+
this.id = id;
|
|
1009
|
+
this.name = name;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
class Token {
|
|
1014
|
+
constructor(accessToken, refreshToken) {
|
|
1015
|
+
this.accessToken = accessToken;
|
|
1016
|
+
this.refreshToken = refreshToken;
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
class User {
|
|
1021
|
+
constructor(deviceToken, email, firstName, isStaff, language, lastName, newEmail, newPassword = '', verifyPassword = '', password = '') {
|
|
1022
|
+
this.deviceToken = deviceToken;
|
|
1023
|
+
this.email = email;
|
|
1024
|
+
this.firstName = firstName;
|
|
1025
|
+
this.isStaff = isStaff;
|
|
1026
|
+
this.language = language;
|
|
1027
|
+
this.lastName = lastName;
|
|
1028
|
+
this.newEmail = newEmail;
|
|
1029
|
+
this.newPassword = newPassword;
|
|
1030
|
+
this.verifyPassword = verifyPassword;
|
|
1031
|
+
this.password = password;
|
|
1032
|
+
}
|
|
1033
|
+
static asFormGroup(user = null) {
|
|
1034
|
+
return new FormGroup({
|
|
1035
|
+
email: new FormControl((user === null || user === void 0 ? void 0 : user.email) || '', [Validators.required, Validators.email]),
|
|
1036
|
+
firstName: new FormControl((user === null || user === void 0 ? void 0 : user.firstName) || ''),
|
|
1037
|
+
language: new FormControl((user === null || user === void 0 ? void 0 : user.language) || 'sv'),
|
|
1038
|
+
lastName: new FormControl((user === null || user === void 0 ? void 0 : user.lastName) || ''),
|
|
1039
|
+
newEmail: new FormControl((user === null || user === void 0 ? void 0 : user.email) || ''),
|
|
1040
|
+
newPassword: new FormControl(''),
|
|
1041
|
+
verifyPassword: new FormControl(''),
|
|
1042
|
+
password: new FormControl('')
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
name() {
|
|
1046
|
+
return `${this.firstName} ${this.lastName}`;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
class UserNotification {
|
|
1051
|
+
constructor(id, club_id, member_id, object_id, created, message, title, type) {
|
|
1052
|
+
this.id = id;
|
|
1053
|
+
this.club_id = club_id;
|
|
1054
|
+
this.member_id = member_id;
|
|
1055
|
+
this.object_id = object_id;
|
|
1056
|
+
this.created = created;
|
|
1057
|
+
this.message = message;
|
|
1058
|
+
this.title = title;
|
|
1059
|
+
this.type = type;
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
const DOMAIN = new InjectionToken('domain');
|
|
1064
|
+
const API_PATH = 'api/v3/';
|
|
1065
|
+
const ROLE_PATH = {
|
|
1066
|
+
[Role.ClubAdmin]: 'club-admin/',
|
|
1067
|
+
[Role.SectionAdmin]: 'section-admin/',
|
|
1068
|
+
[Role.TeamAdmin]: 'team-admin/',
|
|
1069
|
+
[Role.MemberAdmin]: 'member-admin/',
|
|
1070
|
+
[Role.Public]: 'public/',
|
|
1071
|
+
[Role.None]: ''
|
|
1072
|
+
};
|
|
1073
|
+
class ApiService {
|
|
1074
|
+
constructor(http, domain) {
|
|
1075
|
+
this.http = http;
|
|
1076
|
+
this.domain = domain;
|
|
1077
|
+
}
|
|
1078
|
+
deleteResource(role, path, pathParams = {}, options = {}) {
|
|
1079
|
+
return this.delete(role, path, pathParams, options)
|
|
1080
|
+
.pipe(map((response) => response.status === 204));
|
|
1081
|
+
}
|
|
1082
|
+
getCollection(factory, role, path, pathParams = {}, options = {}) {
|
|
1083
|
+
return this.get(role, path, pathParams, options).pipe(map((apiCollection) => {
|
|
1084
|
+
const resources = apiCollection.results.map((resource) => factory(resource));
|
|
1085
|
+
return new Collection(apiCollection.count, apiCollection.next, apiCollection.previous, resources);
|
|
1086
|
+
}));
|
|
1087
|
+
}
|
|
1088
|
+
getResource(factory, role, path, pathParams = {}, options = {}) {
|
|
1089
|
+
return this.get(role, path, pathParams, options).pipe(map((apiResource) => factory(apiResource)));
|
|
1090
|
+
}
|
|
1091
|
+
postFormData(factory, role, path, pathParams = {}, data) {
|
|
1092
|
+
const body = new FormData();
|
|
1093
|
+
for (const [key, value] of Object.entries(data)) {
|
|
1094
|
+
body.append(key, value);
|
|
1095
|
+
}
|
|
1096
|
+
return this.http.post(this.url(this.path(role, path, pathParams)), body)
|
|
1097
|
+
.pipe(map((apiResource) => factory(apiResource)));
|
|
1098
|
+
}
|
|
1099
|
+
postResource(factory, role, path, pathParams = {}, data, options = {}) {
|
|
1100
|
+
return this.post(role, path, pathParams, data, options).pipe(map((apiResource) => factory(apiResource)));
|
|
1101
|
+
}
|
|
1102
|
+
updateResource(responseFactory, role, path, pathParams = {}, data, options = {}) {
|
|
1103
|
+
return this.patch(role, path, pathParams, data, options).pipe(map((apiResource) => responseFactory(apiResource)));
|
|
1104
|
+
}
|
|
1105
|
+
delete(role, path, pathParams, options) {
|
|
1106
|
+
if (options.body) {
|
|
1107
|
+
return this.http.request('delete', this.url(this.path(role, path, pathParams)), options);
|
|
1108
|
+
}
|
|
1109
|
+
return this.http.delete(this.url(this.path(role, path, pathParams)), Object.assign(Object.assign({}, options), { observe: 'response' }));
|
|
1110
|
+
}
|
|
1111
|
+
get(role, path, pathParams, options) {
|
|
1112
|
+
return this.http.get(this.url(this.path(role, path, pathParams)), options);
|
|
1113
|
+
}
|
|
1114
|
+
patch(role, path, pathParams, data, options) {
|
|
1115
|
+
return this.http.patch(this.url(this.path(role, path, pathParams)), data, options);
|
|
1116
|
+
}
|
|
1117
|
+
path(role, path, params) {
|
|
1118
|
+
for (const [key, value] of Object.entries(params)) {
|
|
1119
|
+
const regexp = new RegExp(':' + key, 'g');
|
|
1120
|
+
path = path.replace(regexp, value);
|
|
1121
|
+
}
|
|
1122
|
+
return ROLE_PATH[role] + path;
|
|
1123
|
+
}
|
|
1124
|
+
post(role, path, pathParams, data, options) {
|
|
1125
|
+
return this.http.post(this.url(this.path(role, path, pathParams)), data, options);
|
|
1126
|
+
}
|
|
1127
|
+
url(path) {
|
|
1128
|
+
return this.domain + API_PATH + path;
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
ApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ApiService, deps: [{ token: i1.HttpClient }, { token: DOMAIN }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1132
|
+
ApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ApiService, providedIn: 'root' });
|
|
1133
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ApiService, decorators: [{
|
|
1134
|
+
type: Injectable,
|
|
1135
|
+
args: [{
|
|
1136
|
+
providedIn: 'root'
|
|
1137
|
+
}]
|
|
1138
|
+
}], ctorParameters: function () {
|
|
1139
|
+
return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1140
|
+
type: Inject,
|
|
1141
|
+
args: [DOMAIN]
|
|
1142
|
+
}] }];
|
|
1143
|
+
} });
|
|
1144
|
+
|
|
1145
|
+
const searchMemberFactory = (apiSearchMember) => new SearchMember(apiSearchMember.id, apiSearchMember.club_id, apiSearchMember.team_id, apiSearchMember.address1, apiSearchMember.address2, apiSearchMember.calendar_url, apiSearchMember.country, apiSearchMember.district, apiSearchMember.email, apiSearchMember.first_name, apiSearchMember.image, apiSearchMember.last_name, apiSearchMember.mobile_phone, apiSearchMember.name, apiSearchMember.zip);
|
|
1146
|
+
|
|
1147
|
+
const memberAttributeFactory = (attribute) => new MemberAttribute(attribute.display_value, attribute.field, attribute.leader_editable, attribute.member_id, attribute.member_editable, attribute.name, attribute.options, attribute.order, attribute.section_id, attribute.type, attribute.value);
|
|
1148
|
+
|
|
1149
|
+
const contactFactory = (contact) => new Contact(contact.id, contact.club_id, contact.member_id, contact.address1, contact.address2, contact.address3, contact.country, contact.district, contact.email, contact.first_name, contact.home_phone, contact.last_name, contact.mobile_phone, contact.work_phone, contact.zip);
|
|
1150
|
+
|
|
1151
|
+
const memberContactFactory = (memberContact) => new MemberContact(memberContact.id, memberContact.club_id, memberContact.member_id, contactFactory(memberContact.contact), memberContact.contact_type);
|
|
1152
|
+
|
|
1153
|
+
const memberFunctionFactory = (memberFunction) => new MemberFunction(memberFunction.id, memberFunction.comment, memberFunction.end_date, memberFunction.name, memberFunction.start_date);
|
|
1154
|
+
|
|
1155
|
+
const memberValidationSettingsFactory = (apiMemberValidationSettings) => new MemberValidationSettings(apiMemberValidationSettings.address, apiMemberValidationSettings.birth_date, apiMemberValidationSettings.district, apiMemberValidationSettings.email, apiMemberValidationSettings.home_phone, apiMemberValidationSettings.mobile_phone, apiMemberValidationSettings.work_phone, apiMemberValidationSettings.zip);
|
|
1156
|
+
|
|
1157
|
+
const memberFactory = (apiMember) => new Member(apiMember.id, apiMember.club_id, apiMember.address1, apiMember.address2, apiMember.address_field, apiMember.attributes.map((attribute) => memberAttributeFactory(attribute)), apiMember.birth_date, apiMember.calendar_url, apiMember.comment, apiMember.contacts.map((contactMember) => memberContactFactory(contactMember)), apiMember.country, apiMember.created, apiMember.district, apiMember.email, apiMember.first_name, apiMember.functions ?
|
|
1158
|
+
apiMember.functions.map((memberFunction) => memberFunctionFactory(memberFunction)) : [], apiMember.home_phone, apiMember.image, apiMember.last_name, apiMember.mobile_phone, apiMember.public_member_id, apiMember.sex, apiMember.updated, memberValidationSettingsFactory(apiMember.validation_settings), apiMember.work_phone, apiMember.zip);
|
|
1159
|
+
|
|
1160
|
+
const activityExtraMemberFactory = (apiActivityExtraMember) => new ActivityExtraMember(apiActivityExtraMember.id, apiActivityExtraMember.member_id, apiActivityExtraMember.team_id, apiActivityExtraMember.created, apiActivityExtraMember.leader, apiActivityExtraMember.member.birth_date ?
|
|
1161
|
+
memberFactory(apiActivityExtraMember.member) : searchMemberFactory(apiActivityExtraMember.member), apiActivityExtraMember.member_name);
|
|
1162
|
+
|
|
1163
|
+
const memberActivityInviteFactory = (invitedMember) => new MemberActivityInvite(invitedMember.id, invitedMember.comment, invitedMember.last_invite, invitedMember.leader, invitedMember.member_id, invitedMember.member_name, invitedMember.status);
|
|
1164
|
+
|
|
1165
|
+
const activityFactory = (apiActivity) => new Activity(apiActivity.id, apiActivity.activity_group_id, apiActivity.activity_type_id, apiActivity.club_id, apiActivity.location_id, apiActivity.team_id, apiActivity.activity_location, apiActivity.activity_type_name, apiActivity.allow_maybe, apiActivity.calendar_name, apiActivity.created, apiActivity.current_num_attendants, apiActivity.day, apiActivity.description, apiActivity.end_time, apiActivity.file, apiActivity.invitation_text, apiActivity.invite_first_days, [], apiActivity.invite_hide_before_sent, apiActivity.invite_last_response_date, apiActivity.invite_remind, apiActivity.invite_remind_receivers, apiActivity.invite_second_days, 'same_as_last', (apiActivity.invited_members && apiActivity.invited_members.length) ? apiActivity.invited_members.map((invitedMember) => memberActivityInviteFactory(invitedMember)) : [], apiActivity.last_response_date, apiActivity.max_num_attendants, apiActivity.max_num_attendants_type, apiActivity.meet_up_place, apiActivity.meet_up_time, apiActivity.meet_up_time_display, 'none', 6, format(new Date(), 'yyyy-MM-dd'), 'repeat_until', apiActivity.show_other_invited, apiActivity.start_time, apiActivity.title, apiActivity.updated, apiActivity.use_invite, false);
|
|
1166
|
+
|
|
1167
|
+
const unpaidInvoiceFactory = (apiUnpaidInvoice) => new UnpaidMemberInvoice(apiUnpaidInvoice.id, apiUnpaidInvoice.club_bill_id, apiUnpaidInvoice.member_id, apiUnpaidInvoice.token);
|
|
1168
|
+
|
|
1169
|
+
const activityInviteFactory = (apiActivityInvite) => new ActivityInvite(apiActivityInvite.id, activityFactory(apiActivityInvite.activity), apiActivityInvite.comment, apiActivityInvite.created, apiActivityInvite.has_unpaid_invoices, apiActivityInvite.last_invite, searchMemberFactory(apiActivityInvite.member), apiActivityInvite.reminded, apiActivityInvite.response_date, apiActivityInvite.status, apiActivityInvite.token, apiActivityInvite.unpaid_invoices && apiActivityInvite.unpaid_invoices.length ? apiActivityInvite.unpaid_invoices.map((apiUnpaidInvoice) => unpaidInvoiceFactory(apiUnpaidInvoice)) : [], apiActivityInvite.updated);
|
|
1170
|
+
|
|
1171
|
+
const activityLocationFactory = (apiActivityLocation) => new ActivityLocation(apiActivityLocation.id, apiActivityLocation.club_id, apiActivityLocation.section_id, apiActivityLocation.active, apiActivityLocation.mun_location_city_area, apiActivityLocation.mun_location_name, apiActivityLocation.name);
|
|
1172
|
+
|
|
1173
|
+
const activitySettingsFactory = (apiActivitySettings) => new ActivitySettings(apiActivitySettings.day_options, apiActivitySettings.hour_options, apiActivitySettings.invite_group_options, apiActivitySettings.invite_settings_options, apiActivitySettings.max_attendance_options, apiActivitySettings.meet_up_time_options, apiActivitySettings.remind_receiver_options, apiActivitySettings.repeat_options, apiActivitySettings.repeat_type_options);
|
|
1174
|
+
|
|
1175
|
+
const activityTypeFactory = (apiActivityType) => new ActivityType(apiActivityType.id, apiActivityType.club_id, apiActivityType.section_id, apiActivityType.active, apiActivityType.base_type, apiActivityType.name);
|
|
1176
|
+
|
|
1177
|
+
const authSectionFactory = (apiAuthSection) => new AuthSection(apiAuthSection.id, apiAuthSection.name);
|
|
1178
|
+
|
|
1179
|
+
const authMemberFactory = (apiAuthMember) => new AuthMember(apiAuthMember.id, apiAuthMember.name, apiAuthMember.calendar_url);
|
|
1180
|
+
|
|
1181
|
+
const authTeamSectionFactory = (apiAuthTeamSection) => new AuthTeamSection(apiAuthTeamSection.id, apiAuthTeamSection.name);
|
|
1182
|
+
|
|
1183
|
+
const authTeamFactory = (apiAuthTeam) => new AuthTeam(apiAuthTeam.id, apiAuthTeam.calendar_url, apiAuthTeam.name, apiAuthTeam.section ? authTeamSectionFactory(apiAuthTeam.section) : null);
|
|
1184
|
+
|
|
1185
|
+
const authFactory = (apiAuth) => new Auth(apiAuth.id, apiAuth.name, apiAuth.club_admin, apiAuth.is_section_club, apiAuth.members.map((apiAuthMember) => authMemberFactory(apiAuthMember)), apiAuth.registration_enabled, apiAuth.sections.map((apiAuthSection) => authSectionFactory(apiAuthSection)), apiAuth.site_enabled, apiAuth.teams.map((apiAuthTeam) => authTeamFactory(apiAuthTeam)), apiAuth.user_name);
|
|
1186
|
+
|
|
1187
|
+
const imageUrlsFactory = (apiImageUrls) => new ImageUrls(apiImageUrls.lg, apiImageUrls.md, apiImageUrls.raw, apiImageUrls.sm, apiImageUrls.xs);
|
|
1188
|
+
|
|
1189
|
+
const generalImageFactory = (image) => image ? new GeneralImage(image.id, image.name, imageUrlsFactory(image.urls)) : null;
|
|
1190
|
+
|
|
1191
|
+
const partnerFactory = (apiPartner) => new Partner(apiPartner.id, apiPartner.image ? generalImageFactory(apiPartner.image) : null, apiPartner.name, apiPartner.url);
|
|
1192
|
+
|
|
1193
|
+
const cardDealFactory = (apiCardDeal) => new CardDeal(apiCardDeal.id, partnerFactory(apiCardDeal.partner), apiCardDeal.text, apiCardDeal.title, apiCardDeal.url);
|
|
1194
|
+
|
|
1195
|
+
const cardLogoUrlsFactory = (apiCardLogoUrls) => new CardLogoUrls(apiCardLogoUrls.lg, apiCardLogoUrls.md, apiCardLogoUrls.sm, apiCardLogoUrls.w16, apiCardLogoUrls.w32, apiCardLogoUrls.w64, apiCardLogoUrls.w180, apiCardLogoUrls.w192);
|
|
1196
|
+
|
|
1197
|
+
const cardLogoFactory = (apiCardLogo) => new CardLogo(apiCardLogo.id, apiCardLogo.name, cardLogoUrlsFactory(apiCardLogo.urls));
|
|
1198
|
+
|
|
1199
|
+
const cardThemeFactory = (apiCardTheme) => new CardTheme(apiCardTheme.id, apiCardTheme.background_color, imageUrlsFactory(apiCardTheme.background_image_urls), apiCardTheme.name, apiCardTheme.text_color);
|
|
1200
|
+
|
|
1201
|
+
const cardFactory = (apiCard) => new Card(apiCard.id, apiCard.deals_count, apiCard.header_1, apiCard.name, cardLogoFactory(apiCard.logo), cardThemeFactory(apiCard.theme), apiCard.ticket_count, apiCard.use_pdf_version);
|
|
1202
|
+
|
|
1203
|
+
const cardMemberTicketFactory = (apiCardMemberTicket) => new CardMemberTicket(apiCardMemberTicket.id, apiCardMemberTicket.member_id, apiCardMemberTicket.ticket_id, apiCardMemberTicket.member_name, apiCardMemberTicket.ticket_image_url, apiCardMemberTicket.ticket_number);
|
|
1204
|
+
|
|
1205
|
+
const homeTeamFactory = (apiHomeTeam) => new HomeTeam(apiHomeTeam.id, apiHomeTeam.logo ? generalImageFactory(apiHomeTeam.logo) : null, apiHomeTeam.name);
|
|
1206
|
+
|
|
1207
|
+
const cardTicketLocationFactory = (apiCardTicketLocation) => new CardTicketLocation(apiCardTicketLocation.id, apiCardTicketLocation.club_id, apiCardTicketLocation.section_id, apiCardTicketLocation.location);
|
|
1208
|
+
|
|
1209
|
+
const cardTicketFactory = (apiCardTicket) => new CardTicket(apiCardTicket.id, apiCardTicket.activation_end_hours, apiCardTicket.activation_end_time, apiCardTicket.activation_start_hours, apiCardTicket.activation_start_time, apiCardTicket.away_team, apiCardTicket.card_member_ticket ? cardMemberTicketFactory(apiCardTicket.card_member_ticket) : null, apiCardTicket.description, apiCardTicket.event_time, apiCardTicket.home_team ? homeTeamFactory(apiCardTicket.home_team) : null, apiCardTicket.image ? generalImageFactory(apiCardTicket.image) : null, cardTicketLocationFactory(apiCardTicket.location), apiCardTicket.name, apiCardTicket.ticket_type, apiCardTicket.ticket_type_nice, apiCardTicket.uses_pin);
|
|
1210
|
+
|
|
1211
|
+
const clubFactory = (apiClub) => new Club(apiClub.id, apiClub.name);
|
|
1212
|
+
|
|
1213
|
+
const clubImageFactory = (apiClubImage) => new ClubImage(apiClubImage.club_id, apiClubImage.section_id, apiClubImage.comment, apiClubImage.created, apiClubImage.image, apiClubImage.image_sm_path, apiClubImage.image_lg_path, apiClubImage.in_use, apiClubImage.is_logo, apiClubImage.original_height, apiClubImage.original_width, apiClubImage.title, apiClubImage.updated);
|
|
1214
|
+
|
|
1215
|
+
const clubSectionFactory = (apiSection) => new ClubSection(apiSection.id, apiSection.name);
|
|
1216
|
+
|
|
1217
|
+
const creditCardFactory = (apiCreditCard) => new CreditCard(apiCreditCard.club_id, apiCreditCard.section_id, apiCreditCard.default_activated, apiCreditCard.merchant_id, apiCreditCard.name, apiCreditCard.payment_terms_name, apiCreditCard.payment_terms_organisation_id, apiCreditCard.payment_terms_url, apiCreditCard.rsa_key, apiCreditCard.status, apiCreditCard.test_account);
|
|
1218
|
+
|
|
1219
|
+
const fileFactory = (file) => new FileObject(file.id, file.created, typeof file.member === 'undefined' ? null : file.member, file.name, typeof file.section === 'undefined' ? null : file.section, typeof file.team === 'undefined' ? null : file.team, file.updated, file.url);
|
|
1220
|
+
|
|
1221
|
+
const directoryFactory = (directory) => new Directory(directory.id, directory.club_id, directory.section_id, directory.team_id, directory.created, directory.files.map((file) => fileFactory(file)), directory.name, directory.location_name, directory.updated);
|
|
1222
|
+
|
|
1223
|
+
const eventFactory = (apiEvent) => new Event(apiEvent.id, apiEvent.activity_id, apiEvent.activity_type, apiEvent.calendar_name, apiEvent.description, apiEvent.end, apiEvent.invitation_id, apiEvent.invitation_response, apiEvent.location, apiEvent.meet_up_place, apiEvent.meet_up_time, apiEvent.member_id, apiEvent.start, apiEvent.title, apiEvent.type);
|
|
1224
|
+
|
|
1225
|
+
const externalLinkFactory = (apiExternalLink) => new ExternalLink(apiExternalLink.text, apiExternalLink.value);
|
|
1226
|
+
|
|
1227
|
+
const giroFactory = (apiGiro) => new Giro(apiGiro.club_id, apiGiro.section_id, apiGiro.giro_type, apiGiro.name, apiGiro.number, apiGiro.ocr);
|
|
1228
|
+
|
|
1229
|
+
const memberCardFactory = (apiMemberCard) => new MemberCard(apiMemberCard.id, cardFactory(apiMemberCard.card), apiMemberCard.header_2, apiMemberCard.member_name, apiMemberCard.membership_text, apiMemberCard.name, apiMemberCard.pdf_url);
|
|
1230
|
+
|
|
1231
|
+
const memberFeeFactory = (apiMemberFee) => new MemberFee(apiMemberFee.id, apiMemberFee.club_id, apiMemberFee.section_id, apiMemberFee.name);
|
|
1232
|
+
|
|
1233
|
+
const swishFactory = (apiSwish) => new Swish(apiSwish.club_id, apiSwish.section_id, apiSwish.certificate_valid_until, apiSwish.default_activated, apiSwish.name, apiSwish.status, apiSwish.swish_payee_alias, apiSwish.test_account, apiSwish.uses_myclub_certificate);
|
|
1234
|
+
|
|
1235
|
+
const zimplerFactory = (apiZimpler) => new Zimpler(apiZimpler.club_id, apiZimpler.section_id, apiZimpler.default_activated, apiZimpler.merchant_id, apiZimpler.name, apiZimpler.status, apiZimpler.test_account);
|
|
1236
|
+
|
|
1237
|
+
const memberInvoiceRowFactory = (apiMemberInvoiceRow) => new MemberInvoiceRow(apiMemberInvoiceRow.id, apiMemberInvoiceRow.amount, apiMemberInvoiceRow.amount_paid, apiMemberInvoiceRow.balance, apiMemberInvoiceRow.created, apiMemberInvoiceRow.date_paid, memberFeeFactory(apiMemberInvoiceRow.fee), apiMemberInvoiceRow.has_credit_type, apiMemberInvoiceRow.invoice, apiMemberInvoiceRow.is_credit, apiMemberInvoiceRow.is_paid, apiMemberInvoiceRow.updated);
|
|
1238
|
+
|
|
1239
|
+
const memberInvoiceFactory = (apiMemberInvoice) => new MemberInvoice(apiMemberInvoice.id, apiMemberInvoice.amount, apiMemberInvoice.amount_paid, apiMemberInvoice.balance, apiMemberInvoice.club_bill_id, apiMemberInvoice.club_name, apiMemberInvoice.credit_card ? creditCardFactory(apiMemberInvoice.credit_card) : null, apiMemberInvoice.date_paid, apiMemberInvoice.due_date, apiMemberInvoice.giro ? giroFactory(apiMemberInvoice.giro) : null, apiMemberInvoice.invoice_rows.map((row) => memberInvoiceRowFactory(row)), apiMemberInvoice.invoice_text, apiMemberInvoice.is_paid, apiMemberInvoice.member_id, apiMemberInvoice.payee, apiMemberInvoice.payment_url, apiMemberInvoice.reference, apiMemberInvoice.swish ? swishFactory(apiMemberInvoice.swish) : null, apiMemberInvoice.zimpler ? zimplerFactory(apiMemberInvoice.zimpler) : null);
|
|
1240
|
+
|
|
1241
|
+
const memberPublicFormFactory = (apiMemberPublicForm) => new MemberPublicForm(apiMemberPublicForm.id, apiMemberPublicForm.active_from, apiMemberPublicForm.active_to, apiMemberPublicForm.name, apiMemberPublicForm.url);
|
|
1242
|
+
|
|
1243
|
+
const sectionFactory = (apiSection) => new Section(apiSection.id, apiSection.name);
|
|
1244
|
+
|
|
1245
|
+
const memberTeamFactory = (apiMemberTeam) => new MemberTeam(clubFactory(apiMemberTeam.club), apiMemberTeam.section ? sectionFactory(apiMemberTeam.section) : null, apiMemberTeam.id, apiMemberTeam.email, apiMemberTeam.name, apiMemberTeam.phone);
|
|
1246
|
+
|
|
1247
|
+
const memberTeamThroughFactory = (apiMemberTeamThrough) => new MemberTeamThrough(apiMemberTeamThrough.id, apiMemberTeamThrough.created, apiMemberTeamThrough.date_hidden, apiMemberTeamThrough.image, apiMemberTeamThrough.leader, memberFactory(apiMemberTeamThrough.member), apiMemberTeamThrough.role_id, apiMemberTeamThrough.show_on_web, apiMemberTeamThrough.updated);
|
|
1248
|
+
|
|
1249
|
+
const newsFactory = (apiNews) => new News(apiNews.id, apiNews.club_id, apiNews.created, apiNews.created_by_id, apiNews.section_id, apiNews.team_id, apiNews.active_to, apiNews.author, apiNews.ingress, apiNews.news_image, apiNews.news_image_text, apiNews.original_height, apiNews.original_width, apiNews.published_date, apiNews.text, apiNews.title, apiNews.updated);
|
|
1250
|
+
|
|
1251
|
+
const paymentAttemptFactory = (apiPaymentAttempt) => {
|
|
1252
|
+
let paymentAttemptData = null;
|
|
1253
|
+
if (apiPaymentAttempt.type === 'mondido') {
|
|
1254
|
+
const data = apiPaymentAttempt.payment_data;
|
|
1255
|
+
paymentAttemptData = {
|
|
1256
|
+
hash: data.hash,
|
|
1257
|
+
paymentAttemptId: data.payment_attempt_id
|
|
1258
|
+
};
|
|
1259
|
+
}
|
|
1260
|
+
else if (apiPaymentAttempt.type === 'swish') {
|
|
1261
|
+
paymentAttemptData = {
|
|
1262
|
+
paymentRequestToken: apiPaymentAttempt.payment_data.payment_request_token
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
|
+
else {
|
|
1266
|
+
paymentAttemptData = {
|
|
1267
|
+
userFormUrl: apiPaymentAttempt.payment_data.user_form_url
|
|
1268
|
+
};
|
|
1269
|
+
}
|
|
1270
|
+
return new PaymentAttempt(apiPaymentAttempt.id, apiPaymentAttempt.amount, apiPaymentAttempt.error, apiPaymentAttempt.invoice_id, apiPaymentAttempt.paid_date, paymentAttemptData, apiPaymentAttempt.status, apiPaymentAttempt.type);
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
const searchClubFactory = (apiSearchClub) => new SearchClub(apiSearchClub.id, apiSearchClub.leader_member_search, apiSearchClub.member_search, apiSearchClub.name);
|
|
1274
|
+
|
|
1275
|
+
const searchMemberCardFactory = (apiSearchMemberCard) => new SearchMemberCard(apiSearchMemberCard.id, apiSearchMemberCard.name, apiSearchMemberCard.pdf_url);
|
|
1276
|
+
|
|
1277
|
+
const searchMemberInvoiceFactory = (apiSearchMemberInvoice) => new SearchMemberInvoice(apiSearchMemberInvoice.id, apiSearchMemberInvoice.amount, apiSearchMemberInvoice.amount_paid, apiSearchMemberInvoice.balance, apiSearchMemberInvoice.club_bill_id, apiSearchMemberInvoice.date_paid, apiSearchMemberInvoice.due_date, apiSearchMemberInvoice.is_paid, apiSearchMemberInvoice.member_id);
|
|
1278
|
+
|
|
1279
|
+
const searchMemberTeamFactory = (apiSearchMemberTeam) => new SearchMemberTeam(clubFactory(apiSearchMemberTeam.club), apiSearchMemberTeam.id, apiSearchMemberTeam.name, apiSearchMemberTeam.section ? sectionFactory(apiSearchMemberTeam.section) : null);
|
|
1280
|
+
|
|
1281
|
+
const searchMemberTeamThroughFactory = (apiMemberTeamThrough) => new MemberTeamThrough(apiMemberTeamThrough.id, apiMemberTeamThrough.created, apiMemberTeamThrough.date_hidden, apiMemberTeamThrough.image, apiMemberTeamThrough.leader, searchMemberFactory(apiMemberTeamThrough.member), apiMemberTeamThrough.role_id, apiMemberTeamThrough.show_on_web, apiMemberTeamThrough.updated);
|
|
1282
|
+
|
|
1283
|
+
const tokenFactory = (apiToken) => new Token(apiToken.access_token, apiToken.refresh_token);
|
|
1284
|
+
|
|
1285
|
+
const userFactory = (apiUser) => new User(apiUser.device_token, apiUser.email, apiUser.first_name, apiUser.is_staff, apiUser.language, apiUser.last_name, apiUser.new_email);
|
|
1286
|
+
|
|
1287
|
+
const userNotificationFactory = (apiUserNotification) => new UserNotification(apiUserNotification.id, apiUserNotification.club_id, apiUserNotification.member_id, apiUserNotification.object_id, apiUserNotification.created, apiUserNotification.message, apiUserNotification.title, apiUserNotification.type);
|
|
1288
|
+
|
|
1289
|
+
const AUTHS_PATH = 'every-admin/auths/';
|
|
1290
|
+
const REMOVE_AUTH_PATH = 'accounts/remove-auth/:authId/:authType/:id/';
|
|
1291
|
+
class AuthService {
|
|
1292
|
+
constructor(apiService) {
|
|
1293
|
+
this.apiService = apiService;
|
|
1294
|
+
}
|
|
1295
|
+
getAuth(id) {
|
|
1296
|
+
return this.apiService
|
|
1297
|
+
.getCollection(authFactory, Role.None, AUTHS_PATH, {}, { params: { club_id: id } })
|
|
1298
|
+
.pipe(map((collection) => {
|
|
1299
|
+
if (collection.count === 0) {
|
|
1300
|
+
return null;
|
|
1301
|
+
}
|
|
1302
|
+
return collection.toArray()[0];
|
|
1303
|
+
}));
|
|
1304
|
+
}
|
|
1305
|
+
getAuths(role = null) {
|
|
1306
|
+
return this.apiService.getCollection(authFactory, Role.None, AUTHS_PATH, {}, role ? { params: { role } } : {});
|
|
1307
|
+
}
|
|
1308
|
+
removeClubAuth(authId, clubId) {
|
|
1309
|
+
return this.removeAuth(authId, clubId, 'club');
|
|
1310
|
+
}
|
|
1311
|
+
removeMemberAuth(authId, memberId) {
|
|
1312
|
+
return this.removeAuth(authId, memberId, 'member');
|
|
1313
|
+
}
|
|
1314
|
+
removeSectionAuth(authId, sectionId) {
|
|
1315
|
+
return this.removeAuth(authId, sectionId, 'section');
|
|
1316
|
+
}
|
|
1317
|
+
removeTeamAuth(authId, teamId) {
|
|
1318
|
+
return this.removeAuth(authId, teamId, 'team');
|
|
1319
|
+
}
|
|
1320
|
+
removeAuth(authId, authTypeId, authType) {
|
|
1321
|
+
return this.apiService.postResource(() => { }, Role.None, REMOVE_AUTH_PATH, {
|
|
1322
|
+
authId,
|
|
1323
|
+
authType,
|
|
1324
|
+
id: authTypeId
|
|
1325
|
+
}, {})
|
|
1326
|
+
.pipe(map(() => true), catchError(() => of(false)));
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1330
|
+
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
1331
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthService, decorators: [{
|
|
1332
|
+
type: Injectable,
|
|
1333
|
+
args: [{
|
|
1334
|
+
providedIn: 'root'
|
|
1335
|
+
}]
|
|
1336
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1337
|
+
|
|
1338
|
+
const MEMBER_ACTIVITY_INVITE_PATH = ':memberId/activities/:activityInviteId/';
|
|
1339
|
+
const MEMBER_ACTIVITY_INVITES_PATH = ':memberId/activities/';
|
|
1340
|
+
const MEMBER_CALENDAR_PATH = ':memberId/activities/calendar/';
|
|
1341
|
+
const PUBLIC_ACTIVITY_INVITE_PATH = 'activities/:id/:token/';
|
|
1342
|
+
const TEAM_ACTIVITIES_PATH = ':teamId/activities/';
|
|
1343
|
+
const TEAM_ACTIVITY_INVITES_PATH = ':teamId/activities/:activityId/invites/';
|
|
1344
|
+
const TEAM_ACTIVITY_LOCATIONS_PATH = ':teamId/activities/locations/';
|
|
1345
|
+
const TEAM_ACTIVITY_NEW_PATH = ':teamId/activities/new/';
|
|
1346
|
+
const TEAM_ACTIVITY_PARTICIPANTS_PATH = ':teamId/activities/:activityId/participants/';
|
|
1347
|
+
const TEAM_ACTIVITY_PATH = ':teamId/activities/:id/';
|
|
1348
|
+
const TEAM_ACTIVITY_SETTINGS_PATH = ':teamId/activities/settings/';
|
|
1349
|
+
const TEAM_ACTIVITY_TYPES_PATH = ':teamId/activities/types/';
|
|
1350
|
+
const TEAM_CALENDAR_PATH = ':teamId/activities/calendar/';
|
|
1351
|
+
class ActivityService {
|
|
1352
|
+
constructor(apiService) {
|
|
1353
|
+
this.apiService = apiService;
|
|
1354
|
+
}
|
|
1355
|
+
addTeamActivityInvites(teamId, activityId, memberIds) {
|
|
1356
|
+
return this.apiService
|
|
1357
|
+
.postResource(() => true, Role.TeamAdmin, TEAM_ACTIVITY_INVITES_PATH, {
|
|
1358
|
+
teamId,
|
|
1359
|
+
activityId
|
|
1360
|
+
}, {
|
|
1361
|
+
members: memberIds
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
createTeamActivity(teamId, data) {
|
|
1365
|
+
return this.apiService
|
|
1366
|
+
.postResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITIES_PATH, {
|
|
1367
|
+
teamId
|
|
1368
|
+
}, data);
|
|
1369
|
+
}
|
|
1370
|
+
deleteTeamActivity(teamId, id) {
|
|
1371
|
+
return this.apiService
|
|
1372
|
+
.deleteResource(Role.TeamAdmin, TEAM_ACTIVITY_PATH, {
|
|
1373
|
+
teamId,
|
|
1374
|
+
id
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
getMemberActivityInvite(memberId, activityInviteId) {
|
|
1378
|
+
return this.apiService
|
|
1379
|
+
.getResource(activityInviteFactory, Role.MemberAdmin, MEMBER_ACTIVITY_INVITE_PATH, {
|
|
1380
|
+
memberId,
|
|
1381
|
+
activityInviteId
|
|
1382
|
+
});
|
|
1383
|
+
}
|
|
1384
|
+
getMemberActivityInvites(memberId) {
|
|
1385
|
+
const params = { limit: 'null' };
|
|
1386
|
+
return this.apiService
|
|
1387
|
+
.getCollection(activityInviteFactory, Role.MemberAdmin, MEMBER_ACTIVITY_INVITES_PATH, { memberId }, {
|
|
1388
|
+
params
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
getMemberCalendarEvents(memberId, startDate = null, endDate = null) {
|
|
1392
|
+
const params = { limit: 'null' };
|
|
1393
|
+
if (startDate) {
|
|
1394
|
+
params['search_start_day'] = startDate;
|
|
1395
|
+
}
|
|
1396
|
+
if (endDate) {
|
|
1397
|
+
params['search_end_day'] = endDate;
|
|
1398
|
+
}
|
|
1399
|
+
return this.apiService
|
|
1400
|
+
.getCollection(eventFactory, Role.MemberAdmin, MEMBER_CALENDAR_PATH, { memberId }, {
|
|
1401
|
+
params
|
|
1402
|
+
});
|
|
1403
|
+
}
|
|
1404
|
+
getPublicActivityInvite(id, token) {
|
|
1405
|
+
return this.apiService
|
|
1406
|
+
.getResource(activityInviteFactory, Role.Public, PUBLIC_ACTIVITY_INVITE_PATH, {
|
|
1407
|
+
id,
|
|
1408
|
+
token
|
|
1409
|
+
});
|
|
1410
|
+
}
|
|
1411
|
+
getTeamActivity(teamId, id) {
|
|
1412
|
+
return this.apiService
|
|
1413
|
+
.getResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITY_PATH, { teamId, id });
|
|
1414
|
+
}
|
|
1415
|
+
getTeamActivityLocations(teamId) {
|
|
1416
|
+
if (this.activityLocationResponseDate && this.activityLocationResponseDate > this.subtractHours(new Date(), 1)) {
|
|
1417
|
+
return of(this.activityLocationCollection);
|
|
1418
|
+
}
|
|
1419
|
+
return this.apiService
|
|
1420
|
+
.getCollection(activityLocationFactory, Role.TeamAdmin, TEAM_ACTIVITY_LOCATIONS_PATH, { teamId }, { params: { limit: 'null' } }).pipe(tap((activityLocationCollection) => {
|
|
1421
|
+
this.activityLocationResponseDate = new Date();
|
|
1422
|
+
this.activityLocationCollection = activityLocationCollection;
|
|
1423
|
+
}));
|
|
1424
|
+
}
|
|
1425
|
+
getTeamActivityNew(teamId) {
|
|
1426
|
+
return this.apiService
|
|
1427
|
+
.getResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITY_NEW_PATH, { teamId });
|
|
1428
|
+
}
|
|
1429
|
+
getTeamActivityParticipants(teamId, activityId) {
|
|
1430
|
+
return this.apiService
|
|
1431
|
+
.getCollection(searchMemberFactory, Role.TeamAdmin, TEAM_ACTIVITY_PARTICIPANTS_PATH, {
|
|
1432
|
+
teamId,
|
|
1433
|
+
activityId
|
|
1434
|
+
}, { params: { limit: 'null' } });
|
|
1435
|
+
}
|
|
1436
|
+
getTeamActivitySettings(teamId) {
|
|
1437
|
+
return this.apiService
|
|
1438
|
+
.getResource(activitySettingsFactory, Role.TeamAdmin, TEAM_ACTIVITY_SETTINGS_PATH, {
|
|
1439
|
+
teamId
|
|
1440
|
+
});
|
|
1441
|
+
}
|
|
1442
|
+
getTeamActivityTypes(teamId) {
|
|
1443
|
+
if (this.activityTypeResponseDate && this.activityTypeResponseDate > this.subtractHours(new Date(), 1)) {
|
|
1444
|
+
return of(this.activityTypeCollection);
|
|
1445
|
+
}
|
|
1446
|
+
return this.apiService
|
|
1447
|
+
.getCollection(activityTypeFactory, Role.TeamAdmin, TEAM_ACTIVITY_TYPES_PATH, { teamId }, { params: { limit: 'null' } }).pipe(tap((activityTypeCollection) => {
|
|
1448
|
+
this.activityTypeResponseDate = new Date();
|
|
1449
|
+
this.activityTypeCollection = activityTypeCollection;
|
|
1450
|
+
}));
|
|
1451
|
+
}
|
|
1452
|
+
getTeamCalendarEvents(teamId, startDate = null, endDate = null) {
|
|
1453
|
+
const params = { limit: 'null' };
|
|
1454
|
+
if (startDate) {
|
|
1455
|
+
params['search_start_day'] = startDate;
|
|
1456
|
+
}
|
|
1457
|
+
if (endDate) {
|
|
1458
|
+
params['search_end_day'] = endDate;
|
|
1459
|
+
}
|
|
1460
|
+
return this.apiService
|
|
1461
|
+
.getCollection(eventFactory, Role.TeamAdmin, TEAM_CALENDAR_PATH, { teamId }, {
|
|
1462
|
+
params
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1465
|
+
updateMemberActivity(memberId, activityInviteId, activityInvite) {
|
|
1466
|
+
return this.apiService
|
|
1467
|
+
.updateResource(activityInviteFactory, Role.MemberAdmin, MEMBER_ACTIVITY_INVITE_PATH, {
|
|
1468
|
+
memberId,
|
|
1469
|
+
activityInviteId
|
|
1470
|
+
}, activityInvite);
|
|
1471
|
+
}
|
|
1472
|
+
updatePublicActivityInvite(id, token, activityInvite) {
|
|
1473
|
+
return this.apiService
|
|
1474
|
+
.updateResource(activityInviteFactory, Role.Public, PUBLIC_ACTIVITY_INVITE_PATH, {
|
|
1475
|
+
id,
|
|
1476
|
+
token
|
|
1477
|
+
}, activityInvite);
|
|
1478
|
+
}
|
|
1479
|
+
updateTeamActivity(teamId, activity) {
|
|
1480
|
+
return this.apiService
|
|
1481
|
+
.updateResource(activityFactory, Role.TeamAdmin, TEAM_ACTIVITY_PATH, {
|
|
1482
|
+
teamId,
|
|
1483
|
+
id: activity.id
|
|
1484
|
+
}, activity);
|
|
1485
|
+
}
|
|
1486
|
+
updateTeamActivityParticipants(teamId, activityId, members) {
|
|
1487
|
+
return this.apiService
|
|
1488
|
+
.postResource(() => { }, Role.TeamAdmin, TEAM_ACTIVITY_PARTICIPANTS_PATH, {
|
|
1489
|
+
teamId,
|
|
1490
|
+
activityId
|
|
1491
|
+
}, {
|
|
1492
|
+
members
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1495
|
+
subtractHours(date, hours) {
|
|
1496
|
+
date.setHours(date.getHours() - hours);
|
|
1497
|
+
return date;
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
ActivityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ActivityService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1501
|
+
ActivityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ActivityService, providedIn: 'root' });
|
|
1502
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ActivityService, decorators: [{
|
|
1503
|
+
type: Injectable,
|
|
1504
|
+
args: [{
|
|
1505
|
+
providedIn: 'root'
|
|
1506
|
+
}]
|
|
1507
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1508
|
+
|
|
1509
|
+
const MEMBER_CLUB_INFO = ':memberId/club-info/';
|
|
1510
|
+
const TEAM_CLUB_INFO = ':teamId/club-info/';
|
|
1511
|
+
class ClubService {
|
|
1512
|
+
constructor(apiService) {
|
|
1513
|
+
this.apiService = apiService;
|
|
1514
|
+
}
|
|
1515
|
+
getMemberClubInfo(memberId) {
|
|
1516
|
+
return this.apiService
|
|
1517
|
+
.getResource(searchClubFactory, Role.MemberAdmin, MEMBER_CLUB_INFO, { memberId });
|
|
1518
|
+
}
|
|
1519
|
+
getTeamClubInfo(teamId) {
|
|
1520
|
+
return this.apiService
|
|
1521
|
+
.getResource(searchClubFactory, Role.TeamAdmin, TEAM_CLUB_INFO, { teamId });
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
ClubService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ClubService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1525
|
+
ClubService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ClubService, providedIn: 'root' });
|
|
1526
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ClubService, decorators: [{
|
|
1527
|
+
type: Injectable,
|
|
1528
|
+
args: [{
|
|
1529
|
+
providedIn: 'root'
|
|
1530
|
+
}]
|
|
1531
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1532
|
+
|
|
1533
|
+
const ACTIVITY_INVITE_SETTINGS_PATH = 'every-admin/constants/activity-invite-settings/';
|
|
1534
|
+
const ACTIVITY_MAX_ATTENDANT_TYPES_PATH = 'every-admin/constants/activity-max-attendant-types/';
|
|
1535
|
+
const ACTIVITY_MEET_UP_TIMES_PATH = 'every-admin/constants/activity-meet-up-times/';
|
|
1536
|
+
const ACTIVITY_REMINDER_DAYS_PATH = 'every-admin/constants/activity-invite-days/';
|
|
1537
|
+
const ACTIVITY_REMINDER_RECEIVERS_PATH = 'every-admin/constants/activity-remind-receivers/';
|
|
1538
|
+
const ACTIVITY_REMINDER_TIMES_PATH = 'every-admin/constants/activity-remind-hours/';
|
|
1539
|
+
const ACTIVITY_REPEAT_OPTIONS_PATH = 'every-admin/constants/activity-repeat-options/';
|
|
1540
|
+
const ACTIVITY_REPEAT_TYPE_OPTIONS_PATH = 'every-admin/constants/activity-repeat-type-options/';
|
|
1541
|
+
const COUNTRIES_PATH = 'every-admin/constants/countries/';
|
|
1542
|
+
const LANGUAGES_PATH = 'every-admin/constants/languages/';
|
|
1543
|
+
const MEMBER_CONTACT_TYPES_PATH = 'every-admin/constants/member-contact-types/';
|
|
1544
|
+
class ConstantService {
|
|
1545
|
+
constructor(apiService) {
|
|
1546
|
+
this.apiService = apiService;
|
|
1547
|
+
this.activityInviteSettings = [];
|
|
1548
|
+
this.activityMaxAttendantTypes = [];
|
|
1549
|
+
this.activityMeetUpTimes = [];
|
|
1550
|
+
this.activityReminderDays = [];
|
|
1551
|
+
this.activityReminderReceivers = [];
|
|
1552
|
+
this.activityReminderTimes = [];
|
|
1553
|
+
this.activityRepeatOptions = [];
|
|
1554
|
+
this.activityRepeatTypeOptions = [];
|
|
1555
|
+
this.countries = [];
|
|
1556
|
+
this.languages = [];
|
|
1557
|
+
this.memberContactTypes = [];
|
|
1558
|
+
}
|
|
1559
|
+
getActivityInviteSettings() {
|
|
1560
|
+
if (this.activityInviteSettings.length) {
|
|
1561
|
+
return of(this.activityInviteSettings);
|
|
1562
|
+
}
|
|
1563
|
+
return this.getConstants(ACTIVITY_INVITE_SETTINGS_PATH)
|
|
1564
|
+
.pipe(tap((activityInviteSettings) => this.activityInviteSettings = activityInviteSettings));
|
|
1565
|
+
}
|
|
1566
|
+
getActivityMaxAttendantsTypes() {
|
|
1567
|
+
if (this.activityMaxAttendantTypes.length) {
|
|
1568
|
+
return of(this.activityMaxAttendantTypes);
|
|
1569
|
+
}
|
|
1570
|
+
return this.getConstants(ACTIVITY_MAX_ATTENDANT_TYPES_PATH)
|
|
1571
|
+
.pipe(tap((activityMaxAttendantTypes) => this.activityMaxAttendantTypes = activityMaxAttendantTypes));
|
|
1572
|
+
}
|
|
1573
|
+
getActivityMeetUpTimes() {
|
|
1574
|
+
if (this.activityMeetUpTimes.length) {
|
|
1575
|
+
return of(this.activityMeetUpTimes);
|
|
1576
|
+
}
|
|
1577
|
+
return this.getConstants(ACTIVITY_MEET_UP_TIMES_PATH)
|
|
1578
|
+
.pipe(tap((activityMeetUpTimes) => this.activityMeetUpTimes = activityMeetUpTimes));
|
|
1579
|
+
}
|
|
1580
|
+
getActivityReminderDays() {
|
|
1581
|
+
if (this.activityReminderDays.length) {
|
|
1582
|
+
return of(this.activityReminderDays);
|
|
1583
|
+
}
|
|
1584
|
+
return this.getConstants(ACTIVITY_REMINDER_DAYS_PATH)
|
|
1585
|
+
.pipe(tap((activityReminderDays) => this.activityReminderDays = activityReminderDays));
|
|
1586
|
+
}
|
|
1587
|
+
getActivityReminderReceivers() {
|
|
1588
|
+
if (this.activityReminderReceivers.length) {
|
|
1589
|
+
return of(this.activityReminderReceivers);
|
|
1590
|
+
}
|
|
1591
|
+
return this.getConstants(ACTIVITY_REMINDER_RECEIVERS_PATH)
|
|
1592
|
+
.pipe(tap((activityReminderReceivers) => this.activityReminderReceivers = activityReminderReceivers));
|
|
1593
|
+
}
|
|
1594
|
+
getActivityReminderTimes() {
|
|
1595
|
+
if (this.activityReminderTimes.length) {
|
|
1596
|
+
return of(this.activityReminderTimes);
|
|
1597
|
+
}
|
|
1598
|
+
return this.getConstants(ACTIVITY_REMINDER_TIMES_PATH)
|
|
1599
|
+
.pipe(tap((activityReminderTimes) => this.activityReminderTimes = activityReminderTimes));
|
|
1600
|
+
}
|
|
1601
|
+
getActivityRepeatOptions() {
|
|
1602
|
+
if (this.activityRepeatOptions.length) {
|
|
1603
|
+
return of(this.activityRepeatOptions);
|
|
1604
|
+
}
|
|
1605
|
+
return this.getConstants(ACTIVITY_REPEAT_OPTIONS_PATH)
|
|
1606
|
+
.pipe(tap((activityRepeatOptions) => this.activityRepeatOptions = activityRepeatOptions));
|
|
1607
|
+
}
|
|
1608
|
+
getActivityRepeatTypeOptions() {
|
|
1609
|
+
if (this.activityRepeatTypeOptions.length) {
|
|
1610
|
+
return of(this.activityRepeatTypeOptions);
|
|
1611
|
+
}
|
|
1612
|
+
return this.getConstants(ACTIVITY_REPEAT_TYPE_OPTIONS_PATH)
|
|
1613
|
+
.pipe(tap((activityRepeatTypeOptions) => this.activityRepeatTypeOptions = activityRepeatTypeOptions));
|
|
1614
|
+
}
|
|
1615
|
+
getCountries() {
|
|
1616
|
+
if (this.countries.length) {
|
|
1617
|
+
return of(this.countries);
|
|
1618
|
+
}
|
|
1619
|
+
return this.getConstants(COUNTRIES_PATH)
|
|
1620
|
+
.pipe(tap((countries) => this.countries = countries));
|
|
1621
|
+
}
|
|
1622
|
+
getLanguages() {
|
|
1623
|
+
if (this.languages.length) {
|
|
1624
|
+
return of(this.languages);
|
|
1625
|
+
}
|
|
1626
|
+
return this.getConstants(LANGUAGES_PATH)
|
|
1627
|
+
.pipe(map((languages) => {
|
|
1628
|
+
// FIXME: For now - remove the french language.
|
|
1629
|
+
const index = languages.findIndex((language) => language.value === 'fr');
|
|
1630
|
+
if (index !== -1) {
|
|
1631
|
+
languages.splice(index, 1);
|
|
1632
|
+
}
|
|
1633
|
+
return languages;
|
|
1634
|
+
}), tap((languages) => this.languages = languages));
|
|
1635
|
+
}
|
|
1636
|
+
getMemberContactTypes() {
|
|
1637
|
+
if (this.memberContactTypes.length) {
|
|
1638
|
+
return of(this.memberContactTypes);
|
|
1639
|
+
}
|
|
1640
|
+
return this.getConstants(MEMBER_CONTACT_TYPES_PATH)
|
|
1641
|
+
.pipe(tap((memberContactTypes) => this.memberContactTypes = memberContactTypes));
|
|
1642
|
+
}
|
|
1643
|
+
getConstants(path) {
|
|
1644
|
+
return this.apiService
|
|
1645
|
+
.getCollection((option) => option, Role.None, path)
|
|
1646
|
+
.pipe(map((response) => response.toArray()));
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
ConstantService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ConstantService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1650
|
+
ConstantService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ConstantService, providedIn: 'root' });
|
|
1651
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ConstantService, decorators: [{
|
|
1652
|
+
type: Injectable,
|
|
1653
|
+
args: [{
|
|
1654
|
+
providedIn: 'root'
|
|
1655
|
+
}]
|
|
1656
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1657
|
+
|
|
1658
|
+
const TEAM_LEADER_CREATE_EMAIL_PATH = ':teamId/distribution/email/';
|
|
1659
|
+
class EmailService {
|
|
1660
|
+
constructor(apiService) {
|
|
1661
|
+
this.apiService = apiService;
|
|
1662
|
+
this.backHref = '';
|
|
1663
|
+
this.recipients = [];
|
|
1664
|
+
}
|
|
1665
|
+
clear() {
|
|
1666
|
+
this.backHref = '';
|
|
1667
|
+
this.recipients = [];
|
|
1668
|
+
}
|
|
1669
|
+
getBackHref() {
|
|
1670
|
+
return this.backHref;
|
|
1671
|
+
}
|
|
1672
|
+
getRecipients() {
|
|
1673
|
+
return this.recipients;
|
|
1674
|
+
}
|
|
1675
|
+
removeRecipient(id) {
|
|
1676
|
+
const index = this.recipients.findIndex((item) => item.id === id);
|
|
1677
|
+
if (index !== -1) {
|
|
1678
|
+
this.recipients.splice(index, 1);
|
|
1679
|
+
return true;
|
|
1680
|
+
}
|
|
1681
|
+
return false;
|
|
1682
|
+
}
|
|
1683
|
+
sendTeamLeaderEmail(teamId, email) {
|
|
1684
|
+
return this.apiService
|
|
1685
|
+
.postResource((email_count) => email_count.queued_emails, Role.TeamAdmin, TEAM_LEADER_CREATE_EMAIL_PATH, { teamId }, {
|
|
1686
|
+
body: email.body,
|
|
1687
|
+
subject: email.subject,
|
|
1688
|
+
recipients: email.recipients.map((value) => value.id)
|
|
1689
|
+
});
|
|
1690
|
+
}
|
|
1691
|
+
setBackHref(href) {
|
|
1692
|
+
this.backHref = href;
|
|
1693
|
+
}
|
|
1694
|
+
setRecipients(emailRecipients) {
|
|
1695
|
+
this.recipients = [...emailRecipients].sort((a, b) => (a.name < b.name ? -1 : 1));
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
EmailService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: EmailService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1699
|
+
EmailService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: EmailService, providedIn: 'root' });
|
|
1700
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: EmailService, decorators: [{
|
|
1701
|
+
type: Injectable,
|
|
1702
|
+
args: [{
|
|
1703
|
+
providedIn: 'root'
|
|
1704
|
+
}]
|
|
1705
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1706
|
+
|
|
1707
|
+
const MEMBER_EXTERNAL_LINK_PATH = ':memberId/others/externallinks/';
|
|
1708
|
+
class ExternalLinkService {
|
|
1709
|
+
constructor(apiService) {
|
|
1710
|
+
this.apiService = apiService;
|
|
1711
|
+
}
|
|
1712
|
+
getMemberExternalLinks(memberId) {
|
|
1713
|
+
return this.apiService
|
|
1714
|
+
.getCollection(externalLinkFactory, Role.MemberAdmin, MEMBER_EXTERNAL_LINK_PATH, { memberId });
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
ExternalLinkService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ExternalLinkService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1718
|
+
ExternalLinkService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ExternalLinkService, providedIn: 'root' });
|
|
1719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: ExternalLinkService, decorators: [{
|
|
1720
|
+
type: Injectable,
|
|
1721
|
+
args: [{
|
|
1722
|
+
providedIn: 'root'
|
|
1723
|
+
}]
|
|
1724
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1725
|
+
|
|
1726
|
+
const MEMBER_DIRECTORIES_PATH = ':memberId/files/';
|
|
1727
|
+
const TEAM_DIRECTORIES_PATH = ':teamId/files/';
|
|
1728
|
+
class FileService {
|
|
1729
|
+
constructor(apiService) {
|
|
1730
|
+
this.apiService = apiService;
|
|
1731
|
+
}
|
|
1732
|
+
getMemberDirectories(memberId) {
|
|
1733
|
+
return this.apiService
|
|
1734
|
+
.getCollection(directoryFactory, Role.MemberAdmin, MEMBER_DIRECTORIES_PATH, { memberId }, { params: { limit: 'null' } });
|
|
1735
|
+
}
|
|
1736
|
+
getTeamDirectories(teamId) {
|
|
1737
|
+
return this.apiService
|
|
1738
|
+
.getCollection(directoryFactory, Role.TeamAdmin, TEAM_DIRECTORIES_PATH, { teamId }, { params: { limit: 'null' } });
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
FileService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: FileService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1742
|
+
FileService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: FileService, providedIn: 'root' });
|
|
1743
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: FileService, decorators: [{
|
|
1744
|
+
type: Injectable,
|
|
1745
|
+
args: [{
|
|
1746
|
+
providedIn: 'root'
|
|
1747
|
+
}]
|
|
1748
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1749
|
+
|
|
1750
|
+
const MEMBER_INVOICE_PATH = ':memberId/invoices/:invoiceId/';
|
|
1751
|
+
const MEMBER_INVOICES_PATH = ':memberId/invoices/';
|
|
1752
|
+
const PUBLIC_INVOICE_PATH = 'invoices/:invoiceId/:token/';
|
|
1753
|
+
const PUBLIC_INVOICE_LOGO_PATH = 'invoices/:invoiceId/:token/logo/';
|
|
1754
|
+
class InvoiceService {
|
|
1755
|
+
constructor(apiService) {
|
|
1756
|
+
this.apiService = apiService;
|
|
1757
|
+
}
|
|
1758
|
+
getMemberInvoice(memberId, invoiceId) {
|
|
1759
|
+
return this.getInvoice(Role.MemberAdmin, MEMBER_INVOICE_PATH, { memberId, invoiceId });
|
|
1760
|
+
}
|
|
1761
|
+
getMemberInvoices(memberId, filterParams = {}) {
|
|
1762
|
+
return this.getInvoices(Role.MemberAdmin, MEMBER_INVOICES_PATH, { memberId }, filterParams);
|
|
1763
|
+
}
|
|
1764
|
+
getPublicInvoice(invoiceId, token) {
|
|
1765
|
+
return this.getInvoice(Role.Public, PUBLIC_INVOICE_PATH, { invoiceId, token });
|
|
1766
|
+
}
|
|
1767
|
+
getPublicInvoiceLogo(invoiceId, token) {
|
|
1768
|
+
return this.apiService.getResource(clubImageFactory, Role.Public, PUBLIC_INVOICE_LOGO_PATH, { invoiceId, token });
|
|
1769
|
+
}
|
|
1770
|
+
getInvoice(role, path, pathParams) {
|
|
1771
|
+
return this.apiService.getResource(memberInvoiceFactory, role, path, pathParams);
|
|
1772
|
+
}
|
|
1773
|
+
getInvoices(role, path, pathParams, filterParams = {}) {
|
|
1774
|
+
return this.apiService.getCollection(searchMemberInvoiceFactory, role, path, pathParams, { params: filterParams });
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
InvoiceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: InvoiceService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1778
|
+
InvoiceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: InvoiceService, providedIn: 'root' });
|
|
1779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: InvoiceService, decorators: [{
|
|
1780
|
+
type: Injectable,
|
|
1781
|
+
args: [{
|
|
1782
|
+
providedIn: 'root'
|
|
1783
|
+
}]
|
|
1784
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1785
|
+
|
|
1786
|
+
class ApiPaymentAttemptCreate {
|
|
1787
|
+
constructor(invoice_id, type) {
|
|
1788
|
+
this.invoice_id = invoice_id;
|
|
1789
|
+
this.type = type;
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
const MEMBER_PAYMENT_PATH = ':memberId/invoices/:invoiceId/payment-attempts/:id/';
|
|
1794
|
+
const MEMBER_PAYMENTS_PATH = ':memberId/invoices/:invoiceId/payment-attempts/';
|
|
1795
|
+
const PUBLIC_PAYMENT_PATH = 'invoices/:invoiceId/:token/payment-attempts/:id/';
|
|
1796
|
+
const PUBLIC_PAYMENTS_PATH = 'invoices/:invoiceId/:token/payment-attempts/';
|
|
1797
|
+
class PaymentAttemptService {
|
|
1798
|
+
constructor(apiService) {
|
|
1799
|
+
this.apiService = apiService;
|
|
1800
|
+
}
|
|
1801
|
+
createMemberPaymentAttempt(memberId, invoiceId, type) {
|
|
1802
|
+
return this.createPaymentAttempt(Role.MemberAdmin, MEMBER_PAYMENTS_PATH, { memberId, invoiceId }, new ApiPaymentAttemptCreate(invoiceId, type));
|
|
1803
|
+
}
|
|
1804
|
+
createPublicPaymentAttempt(invoiceId, token, type) {
|
|
1805
|
+
return this.createPaymentAttempt(Role.Public, PUBLIC_PAYMENTS_PATH, { invoiceId, token }, new ApiPaymentAttemptCreate(invoiceId, type));
|
|
1806
|
+
}
|
|
1807
|
+
getMemberPaymentAttempt(memberId, invoiceId, id) {
|
|
1808
|
+
return this.getPaymentAttempt(Role.MemberAdmin, MEMBER_PAYMENT_PATH, { memberId, invoiceId, id: id.toString() });
|
|
1809
|
+
}
|
|
1810
|
+
getMemberSwishQRCode(memberId, invoiceId, id) {
|
|
1811
|
+
return this.getSwishQRCode(Role.MemberAdmin, `${MEMBER_PAYMENT_PATH}swish-qr/`, { memberId, invoiceId, id: id.toString() });
|
|
1812
|
+
}
|
|
1813
|
+
getPublicPaymentAttempt(invoiceId, token, id) {
|
|
1814
|
+
return this.getPaymentAttempt(Role.Public, PUBLIC_PAYMENT_PATH, { invoiceId, token, id: id.toString() });
|
|
1815
|
+
}
|
|
1816
|
+
getPublicSwishQRCode(invoiceId, token, id) {
|
|
1817
|
+
return this.getSwishQRCode(Role.Public, `${PUBLIC_PAYMENT_PATH}swish-qr/`, { invoiceId, token, id: id.toString() });
|
|
1818
|
+
}
|
|
1819
|
+
createPaymentAttempt(role, path, pathParams, data) {
|
|
1820
|
+
return this.apiService.postResource(paymentAttemptFactory, role, path, pathParams, data);
|
|
1821
|
+
}
|
|
1822
|
+
getPaymentAttempt(role, path, pathParams) {
|
|
1823
|
+
return this.apiService.getResource(paymentAttemptFactory, role, path, pathParams);
|
|
1824
|
+
}
|
|
1825
|
+
getSwishQRCode(role, path, pathParams) {
|
|
1826
|
+
return this.apiService.getResource((apiSwishQrCode) => new SwishQrCode(apiSwishQrCode.qr_code), role, path, pathParams);
|
|
1827
|
+
}
|
|
1828
|
+
}
|
|
1829
|
+
PaymentAttemptService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PaymentAttemptService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1830
|
+
PaymentAttemptService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PaymentAttemptService, providedIn: 'root' });
|
|
1831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: PaymentAttemptService, decorators: [{
|
|
1832
|
+
type: Injectable,
|
|
1833
|
+
args: [{
|
|
1834
|
+
providedIn: 'root'
|
|
1835
|
+
}]
|
|
1836
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1837
|
+
|
|
1838
|
+
const MEMBER_OTHER_MEMBER_PATH = ':memberId/others/clubmembers/:id/';
|
|
1839
|
+
const MEMBER_OTHER_MEMBER_SEARCH_PATH = ':memberId/others/clubmembers/';
|
|
1840
|
+
const MEMBER_PROFILE_CONTACT_PATH = ':memberId/member-detail/contacts/:contactId/';
|
|
1841
|
+
const MEMBER_PROFILE_PATH = ':memberId/member-detail/';
|
|
1842
|
+
const TEAM_MEMBER_CONTACT_PATH = ':teamId/team-members/:memberId/contacts/:contactId/';
|
|
1843
|
+
const TEAM_OTHER_MEMBER_PATH = ':teamId/team-members/others/:id/';
|
|
1844
|
+
const TEAM_OTHER_MEMBER_SEARCH_PATH = ':teamId/team-members/others/';
|
|
1845
|
+
class MemberService {
|
|
1846
|
+
constructor(apiService) {
|
|
1847
|
+
this.apiService = apiService;
|
|
1848
|
+
}
|
|
1849
|
+
getMemberProfile(memberId) {
|
|
1850
|
+
return this.apiService
|
|
1851
|
+
.getResource(memberFactory, Role.MemberAdmin, MEMBER_PROFILE_PATH, { memberId });
|
|
1852
|
+
}
|
|
1853
|
+
getMemberOtherMember(memberId, id) {
|
|
1854
|
+
return this.apiService
|
|
1855
|
+
.getResource(memberFactory, Role.MemberAdmin, MEMBER_OTHER_MEMBER_PATH, { memberId, id });
|
|
1856
|
+
}
|
|
1857
|
+
getTeamOtherMember(teamId, id) {
|
|
1858
|
+
return this.apiService
|
|
1859
|
+
.getResource(memberFactory, Role.MemberAdmin, TEAM_OTHER_MEMBER_PATH, { teamId, id });
|
|
1860
|
+
}
|
|
1861
|
+
removeMemberProfileContact(memberId, contactId) {
|
|
1862
|
+
return this.apiService
|
|
1863
|
+
.deleteResource(Role.MemberAdmin, MEMBER_PROFILE_CONTACT_PATH, { memberId, contactId });
|
|
1864
|
+
}
|
|
1865
|
+
removeTeamMemberContact(teamId, memberId, contactId) {
|
|
1866
|
+
return this.apiService
|
|
1867
|
+
.deleteResource(Role.TeamAdmin, TEAM_MEMBER_CONTACT_PATH, { teamId, memberId, contactId });
|
|
1868
|
+
}
|
|
1869
|
+
searchMemberOtherMembers(memberId, searchTerm) {
|
|
1870
|
+
return this.apiService
|
|
1871
|
+
.getCollection(searchMemberFactory, Role.MemberAdmin, MEMBER_OTHER_MEMBER_SEARCH_PATH, { memberId }, { params: { q: searchTerm } });
|
|
1872
|
+
}
|
|
1873
|
+
searchTeamOtherMembers(teamId, searchTerm) {
|
|
1874
|
+
return this.apiService
|
|
1875
|
+
.getCollection(searchMemberFactory, Role.TeamAdmin, TEAM_OTHER_MEMBER_SEARCH_PATH, { teamId }, { params: { q: searchTerm } });
|
|
1876
|
+
}
|
|
1877
|
+
updateMemberProfile(memberId, memberProfile) {
|
|
1878
|
+
return this.apiService
|
|
1879
|
+
.updateResource(memberFactory, Role.MemberAdmin, MEMBER_PROFILE_PATH, { memberId }, memberProfile);
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
MemberService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: MemberService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1883
|
+
MemberService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: MemberService, providedIn: 'root' });
|
|
1884
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: MemberService, decorators: [{
|
|
1885
|
+
type: Injectable,
|
|
1886
|
+
args: [{
|
|
1887
|
+
providedIn: 'root'
|
|
1888
|
+
}]
|
|
1889
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1890
|
+
|
|
1891
|
+
const MEMBER_MEMBER_CARD_PATH = ':memberId/member-cards/:id/';
|
|
1892
|
+
const MEMBER_MEMBER_CARD_DEALS_PATH = ':memberId/member-cards/:id/deals/';
|
|
1893
|
+
const MEMBER_MEMBER_CARD_ACTIVATE_TICKET_PATH = ':memberId/member-cards/:cardId/tickets/:id/activate/';
|
|
1894
|
+
const MEMBER_MEMBER_CARD_TICKETS_PATH = ':memberId/member-cards/:id/tickets/';
|
|
1895
|
+
const MEMBER_MEMBER_CARDS_PATH = ':memberId/member-cards/';
|
|
1896
|
+
const PUBLIC_MEMBER_CARD_PATH = 'member-cards/:id/:token/';
|
|
1897
|
+
const PUBLIC_MEMBER_CARD_DEALS_PATH = 'member-cards/:id/:token/deals/';
|
|
1898
|
+
const PUBLIC_MEMBER_CARD_ACTIVATE_TICKET_PATH = 'member-cards/:cardId/:token/tickets/:id/activate/';
|
|
1899
|
+
const PUBLIC_MEMBER_CARD_TICKETS_PATH = 'member-cards/:id/:token/tickets/';
|
|
1900
|
+
const pinCodeFactory = (apiCardMemberTicket) => {
|
|
1901
|
+
return !!apiCardMemberTicket;
|
|
1902
|
+
};
|
|
1903
|
+
class MemberCardService {
|
|
1904
|
+
constructor(apiService) {
|
|
1905
|
+
this.apiService = apiService;
|
|
1906
|
+
}
|
|
1907
|
+
activateMemberCardTicket(memberId, cardId, id, pin_code) {
|
|
1908
|
+
return this.apiService
|
|
1909
|
+
.postResource(pinCodeFactory, Role.MemberAdmin, MEMBER_MEMBER_CARD_ACTIVATE_TICKET_PATH, { memberId, cardId, id }, { pin_code });
|
|
1910
|
+
}
|
|
1911
|
+
activatePublicCardTicket(cardId, token, id, pin_code) {
|
|
1912
|
+
return this.apiService
|
|
1913
|
+
.postResource(pinCodeFactory, Role.Public, PUBLIC_MEMBER_CARD_ACTIVATE_TICKET_PATH, {
|
|
1914
|
+
cardId,
|
|
1915
|
+
token,
|
|
1916
|
+
id
|
|
1917
|
+
}, {
|
|
1918
|
+
pin_code
|
|
1919
|
+
});
|
|
1920
|
+
}
|
|
1921
|
+
getMemberCard(memberId, id) {
|
|
1922
|
+
return this.apiService
|
|
1923
|
+
.getResource(memberCardFactory, Role.MemberAdmin, MEMBER_MEMBER_CARD_PATH, { memberId, id });
|
|
1924
|
+
}
|
|
1925
|
+
getMemberCardDeals(memberId, id, filterParams = {}) {
|
|
1926
|
+
return this.apiService
|
|
1927
|
+
.getCollection(cardDealFactory, Role.MemberAdmin, MEMBER_MEMBER_CARD_DEALS_PATH, { memberId, id }, { params: filterParams });
|
|
1928
|
+
}
|
|
1929
|
+
getMemberCardTickets(memberId, id, filterParams = {}) {
|
|
1930
|
+
return this.apiService
|
|
1931
|
+
.getCollection(cardTicketFactory, Role.MemberAdmin, MEMBER_MEMBER_CARD_TICKETS_PATH, { memberId, id }, { params: filterParams });
|
|
1932
|
+
}
|
|
1933
|
+
getMemberCards(memberId, filterParams = {}) {
|
|
1934
|
+
return this.apiService
|
|
1935
|
+
.getCollection(searchMemberCardFactory, Role.MemberAdmin, MEMBER_MEMBER_CARDS_PATH, { memberId }, { params: filterParams });
|
|
1936
|
+
}
|
|
1937
|
+
getPublicMemberCard(id, token) {
|
|
1938
|
+
return this.apiService
|
|
1939
|
+
.getResource(memberCardFactory, Role.Public, PUBLIC_MEMBER_CARD_PATH, {
|
|
1940
|
+
id,
|
|
1941
|
+
token
|
|
1942
|
+
});
|
|
1943
|
+
}
|
|
1944
|
+
getPublicMemberCardDeals(id, token, filterParams = {}) {
|
|
1945
|
+
return this.apiService
|
|
1946
|
+
.getCollection(cardDealFactory, Role.Public, PUBLIC_MEMBER_CARD_DEALS_PATH, {
|
|
1947
|
+
id,
|
|
1948
|
+
token
|
|
1949
|
+
}, { params: filterParams });
|
|
1950
|
+
}
|
|
1951
|
+
getPublicMemberCardTickets(id, token, filterParams = {}) {
|
|
1952
|
+
return this.apiService
|
|
1953
|
+
.getCollection(cardTicketFactory, Role.Public, PUBLIC_MEMBER_CARD_TICKETS_PATH, {
|
|
1954
|
+
id,
|
|
1955
|
+
token
|
|
1956
|
+
}, { params: filterParams });
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
MemberCardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: MemberCardService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1960
|
+
MemberCardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: MemberCardService, providedIn: 'root' });
|
|
1961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: MemberCardService, decorators: [{
|
|
1962
|
+
type: Injectable,
|
|
1963
|
+
args: [{
|
|
1964
|
+
providedIn: 'root'
|
|
1965
|
+
}]
|
|
1966
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1967
|
+
|
|
1968
|
+
const MEMBER_MEMBER_PUBLIC_FORMS_PATH = ':memberId/myclub-forms/';
|
|
1969
|
+
class MemberPublicFormService {
|
|
1970
|
+
constructor(apiService) {
|
|
1971
|
+
this.apiService = apiService;
|
|
1972
|
+
}
|
|
1973
|
+
getMemberMemberPublicForms(memberId) {
|
|
1974
|
+
return this.apiService
|
|
1975
|
+
.getCollection(memberPublicFormFactory, Role.MemberAdmin, MEMBER_MEMBER_PUBLIC_FORMS_PATH, { memberId });
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
MemberPublicFormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: MemberPublicFormService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1979
|
+
MemberPublicFormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: MemberPublicFormService, providedIn: 'root' });
|
|
1980
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: MemberPublicFormService, decorators: [{
|
|
1981
|
+
type: Injectable,
|
|
1982
|
+
args: [{
|
|
1983
|
+
providedIn: 'root'
|
|
1984
|
+
}]
|
|
1985
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
1986
|
+
|
|
1987
|
+
const TEAM_NEWS_LIST = ':teamId/news/';
|
|
1988
|
+
class NewsService {
|
|
1989
|
+
constructor(apiService) {
|
|
1990
|
+
this.apiService = apiService;
|
|
1991
|
+
}
|
|
1992
|
+
listTeamNews(teamId, offset) {
|
|
1993
|
+
return this.apiService
|
|
1994
|
+
.getCollection(newsFactory, Role.TeamAdmin, TEAM_NEWS_LIST, {
|
|
1995
|
+
teamId
|
|
1996
|
+
}, {
|
|
1997
|
+
params: {
|
|
1998
|
+
offset: offset.toString(10)
|
|
1999
|
+
}
|
|
2000
|
+
});
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
NewsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NewsService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2004
|
+
NewsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NewsService, providedIn: 'root' });
|
|
2005
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: NewsService, decorators: [{
|
|
2006
|
+
type: Injectable,
|
|
2007
|
+
args: [{
|
|
2008
|
+
providedIn: 'root'
|
|
2009
|
+
}]
|
|
2010
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
2011
|
+
|
|
2012
|
+
const CLUB_SECTIONS_PATH = 'clubs/:clubId/sections/';
|
|
2013
|
+
class SectionService {
|
|
2014
|
+
constructor(apiService) {
|
|
2015
|
+
this.apiService = apiService;
|
|
2016
|
+
}
|
|
2017
|
+
getClubSections(clubId) {
|
|
2018
|
+
return this.apiService.getCollection(clubSectionFactory, Role.ClubAdmin, CLUB_SECTIONS_PATH, { clubId });
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
SectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SectionService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2022
|
+
SectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SectionService, providedIn: 'root' });
|
|
2023
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: SectionService, decorators: [{
|
|
2024
|
+
type: Injectable,
|
|
2025
|
+
args: [{
|
|
2026
|
+
providedIn: 'root'
|
|
2027
|
+
}]
|
|
2028
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
2029
|
+
|
|
2030
|
+
const CLUB_TEAMS_PATH = 'clubs/:clubId/teams/';
|
|
2031
|
+
const MEMBER_TEAM_MEMBER_PATH = ':memberId/teams/:teamId/team-members/:id/';
|
|
2032
|
+
const MEMBER_TEAM_MEMBERS_PATH = ':memberId/teams/:teamId/team-members/';
|
|
2033
|
+
const MEMBER_TEAM_EXTRA_MEMBER_PATH = ':memberId/teams/:teamId/extra-members/:id/';
|
|
2034
|
+
const MEMBER_TEAM_EXTRA_MEMBERS_PATH = ':memberId/teams/:teamId/extra-members/';
|
|
2035
|
+
const MEMBER_TEAM_PATH = ':memberId/teams/:teamId/';
|
|
2036
|
+
const MEMBER_TEAMS_PATH = ':memberId/teams/';
|
|
2037
|
+
const SECTION_TEAMS_PATH = 'sections/:sectionId/teams/';
|
|
2038
|
+
const TEAM_LEADER_TEAM_MEMBER_PATH = ':teamId/team-members/:id/';
|
|
2039
|
+
const TEAM_LEADER_TEAM_MEMBERS_PATH = ':teamId/team-members/';
|
|
2040
|
+
const TEAM_LEADER_TEAM_PATH = ':teamId/team-detail/';
|
|
2041
|
+
const TEAM_LEADER_TEAM_EXTRA_MEMBER_PATH = ':teamId/team-members/extra-members/:id/';
|
|
2042
|
+
const TEAM_LEADER_TEAM_EXTRA_MEMBERS_PATH = ':teamId/team-members/extra-members/';
|
|
2043
|
+
class TeamService {
|
|
2044
|
+
constructor(apiService) {
|
|
2045
|
+
this.apiService = apiService;
|
|
2046
|
+
}
|
|
2047
|
+
deleteTeamLeaderTeamMember(teamId, id) {
|
|
2048
|
+
return this.apiService.deleteResource(Role.TeamAdmin, TEAM_LEADER_TEAM_MEMBER_PATH, { teamId, id });
|
|
2049
|
+
}
|
|
2050
|
+
getClubTeams(clubId) {
|
|
2051
|
+
return this.apiService.getCollection((apiClubTeam) => new SectionTeam(apiClubTeam.id, apiClubTeam.name), Role.ClubAdmin, CLUB_TEAMS_PATH, { clubId });
|
|
2052
|
+
}
|
|
2053
|
+
getMemberTeam(memberId, teamId) {
|
|
2054
|
+
return this.apiService.getResource(memberTeamFactory, Role.MemberAdmin, MEMBER_TEAM_PATH, { memberId, teamId });
|
|
2055
|
+
}
|
|
2056
|
+
getMemberTeamExtraMember(memberId, teamId, id) {
|
|
2057
|
+
return this.apiService.getResource(activityExtraMemberFactory, Role.MemberAdmin, MEMBER_TEAM_EXTRA_MEMBER_PATH, { memberId, teamId, id });
|
|
2058
|
+
}
|
|
2059
|
+
getMemberTeamExtraMembers(memberId, teamId, q, offset) {
|
|
2060
|
+
return this.apiService.getCollection(activityExtraMemberFactory, Role.MemberAdmin, MEMBER_TEAM_EXTRA_MEMBERS_PATH, { memberId, teamId }, { params: { member_q: q, offset: offset.toString(10) } });
|
|
2061
|
+
}
|
|
2062
|
+
getMemberTeamMember(memberId, teamId, id) {
|
|
2063
|
+
return this.apiService.getResource(memberTeamThroughFactory, Role.MemberAdmin, MEMBER_TEAM_MEMBER_PATH, { memberId, teamId, id });
|
|
2064
|
+
}
|
|
2065
|
+
getMemberTeamMembers(memberId, teamId, q, offset) {
|
|
2066
|
+
return this.apiService.getCollection(searchMemberTeamThroughFactory, Role.MemberAdmin, MEMBER_TEAM_MEMBERS_PATH, { memberId, teamId }, { params: { member_q: q, offset: offset.toString(10) } });
|
|
2067
|
+
}
|
|
2068
|
+
getMemberTeams(memberId) {
|
|
2069
|
+
return this.apiService.getCollection(searchMemberTeamFactory, Role.MemberAdmin, MEMBER_TEAMS_PATH, { memberId });
|
|
2070
|
+
}
|
|
2071
|
+
getSectionTeams(role, sectionId) {
|
|
2072
|
+
return this.apiService.getCollection((apiSectionTeam) => new SectionTeam(apiSectionTeam.id, apiSectionTeam.name), role, SECTION_TEAMS_PATH, { sectionId });
|
|
2073
|
+
}
|
|
2074
|
+
getTeamLeaderTeam(teamId) {
|
|
2075
|
+
return this.apiService.getResource(memberTeamFactory, Role.TeamAdmin, TEAM_LEADER_TEAM_PATH, { teamId });
|
|
2076
|
+
}
|
|
2077
|
+
getTeamLeaderTeamExtraMember(teamId, id) {
|
|
2078
|
+
return this.apiService.getResource(activityExtraMemberFactory, Role.TeamAdmin, TEAM_LEADER_TEAM_EXTRA_MEMBER_PATH, {
|
|
2079
|
+
teamId, id
|
|
2080
|
+
});
|
|
2081
|
+
}
|
|
2082
|
+
getTeamLeaderTeamExtraMembers(teamId, q, offset) {
|
|
2083
|
+
return this.apiService.getCollection(activityExtraMemberFactory, Role.TeamAdmin, TEAM_LEADER_TEAM_EXTRA_MEMBERS_PATH, {
|
|
2084
|
+
teamId
|
|
2085
|
+
}, { params: { member_q: q, offset: offset.toString(10) } });
|
|
2086
|
+
}
|
|
2087
|
+
getTeamLeaderTeamMember(teamId, id) {
|
|
2088
|
+
return this.apiService.getResource(memberTeamThroughFactory, Role.TeamAdmin, TEAM_LEADER_TEAM_MEMBER_PATH, { teamId, id });
|
|
2089
|
+
}
|
|
2090
|
+
getTeamLeaderTeamMembers(teamId, q, offset) {
|
|
2091
|
+
return this.apiService.getCollection(searchMemberTeamThroughFactory, Role.TeamAdmin, TEAM_LEADER_TEAM_MEMBERS_PATH, { teamId }, { params: { member_q: q, offset: offset.toString(10) } });
|
|
2092
|
+
}
|
|
2093
|
+
updateTeamLeaderTeamMember(teamId, id, teamMember) {
|
|
2094
|
+
return this.apiService.updateResource(memberTeamThroughFactory, Role.TeamAdmin, TEAM_LEADER_TEAM_MEMBER_PATH, { teamId, id }, teamMember);
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
TeamService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: TeamService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2098
|
+
TeamService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: TeamService, providedIn: 'root' });
|
|
2099
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: TeamService, decorators: [{
|
|
2100
|
+
type: Injectable,
|
|
2101
|
+
args: [{
|
|
2102
|
+
providedIn: 'root'
|
|
2103
|
+
}]
|
|
2104
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
2105
|
+
|
|
2106
|
+
const BASE_PATH$1 = 'accounts/token/';
|
|
2107
|
+
const CREDENTIAL_GRANT_TYPE = 'password';
|
|
2108
|
+
const CODE_GRANT_TYPE = 'authorization_code';
|
|
2109
|
+
const LOGOUT_PATH = 'accounts/logout/';
|
|
2110
|
+
const REFRESH_GRANT_TYPE = 'refresh_token';
|
|
2111
|
+
const SESSION_TOKEN_PATH = 'accounts/session-token/';
|
|
2112
|
+
class TokenService {
|
|
2113
|
+
constructor(apiService) {
|
|
2114
|
+
this.apiService = apiService;
|
|
2115
|
+
}
|
|
2116
|
+
getTokenByCredentials(clientId, clientSecret, username, password) {
|
|
2117
|
+
return this.getToken(clientId, clientSecret, CREDENTIAL_GRANT_TYPE, { username, password });
|
|
2118
|
+
}
|
|
2119
|
+
getTokenByCode(clientId, clientSecret, code) {
|
|
2120
|
+
return this.getToken(clientId, clientSecret, CODE_GRANT_TYPE, { code });
|
|
2121
|
+
}
|
|
2122
|
+
getTokenByRefreshToken(clientId, clientSecret, refreshToken) {
|
|
2123
|
+
return this.getToken(clientId, clientSecret, REFRESH_GRANT_TYPE, {
|
|
2124
|
+
refresh_token: refreshToken
|
|
2125
|
+
});
|
|
2126
|
+
}
|
|
2127
|
+
getTokenBySession() {
|
|
2128
|
+
return this.apiService.getResource(tokenFactory, Role.None, SESSION_TOKEN_PATH, {}).pipe(catchError((err) => {
|
|
2129
|
+
if (err.status === 401) {
|
|
2130
|
+
return of(null);
|
|
2131
|
+
}
|
|
2132
|
+
return throwError(err);
|
|
2133
|
+
}));
|
|
2134
|
+
}
|
|
2135
|
+
logout() {
|
|
2136
|
+
return this.apiService.postResource(() => { }, Role.None, LOGOUT_PATH, {}, {});
|
|
2137
|
+
}
|
|
2138
|
+
getToken(clientId, clientSecret, grantType, params) {
|
|
2139
|
+
return this.apiService.postFormData(tokenFactory, Role.None, BASE_PATH$1, {}, Object.assign({ client_id: clientId, client_secret: clientSecret, grant_type: grantType }, params));
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
TokenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: TokenService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2143
|
+
TokenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: TokenService, providedIn: 'root' });
|
|
2144
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: TokenService, decorators: [{
|
|
2145
|
+
type: Injectable,
|
|
2146
|
+
args: [{
|
|
2147
|
+
providedIn: 'root'
|
|
2148
|
+
}]
|
|
2149
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
2150
|
+
|
|
2151
|
+
const ACTIVATE_USER_PATH = 'accounts/activate/';
|
|
2152
|
+
const BASE_PATH = 'accounts/user/';
|
|
2153
|
+
const CREATE_USER_PATH = 'accounts/create-account/';
|
|
2154
|
+
const RESET_PASSWORD_PATH = 'accounts/reset-password/';
|
|
2155
|
+
const TERMINATE_USER_PATH = 'accounts/terminate/';
|
|
2156
|
+
class UserService {
|
|
2157
|
+
constructor(apiService) {
|
|
2158
|
+
this.apiService = apiService;
|
|
2159
|
+
}
|
|
2160
|
+
activateUser(uidb64, token) {
|
|
2161
|
+
return this.apiService.postResource(() => { }, Role.None, ACTIVATE_USER_PATH, {}, {
|
|
2162
|
+
uidb64,
|
|
2163
|
+
token
|
|
2164
|
+
}).pipe(map(() => true), catchError(() => of(false)));
|
|
2165
|
+
}
|
|
2166
|
+
createUser(newAccount) {
|
|
2167
|
+
return this.apiService.postResource(() => { }, Role.None, CREATE_USER_PATH, {}, newAccount)
|
|
2168
|
+
.pipe(map(() => true), catchError(() => of(false)));
|
|
2169
|
+
}
|
|
2170
|
+
getCurrentUser() {
|
|
2171
|
+
return this.apiService.getResource(userFactory, Role.None, BASE_PATH);
|
|
2172
|
+
}
|
|
2173
|
+
removeCurrentUser() {
|
|
2174
|
+
return this.apiService.postResource(() => { }, Role.None, TERMINATE_USER_PATH, {}, {})
|
|
2175
|
+
.pipe(map(() => true), catchError(() => of(false)));
|
|
2176
|
+
}
|
|
2177
|
+
resetPassword(email) {
|
|
2178
|
+
return this.apiService.postResource(() => { }, Role.None, RESET_PASSWORD_PATH, {}, {
|
|
2179
|
+
email
|
|
2180
|
+
}).pipe(map(() => true), catchError(() => of(false)));
|
|
2181
|
+
}
|
|
2182
|
+
updateCurrentUser(user) {
|
|
2183
|
+
let data = {
|
|
2184
|
+
email: user.email,
|
|
2185
|
+
first_name: user.firstName,
|
|
2186
|
+
last_name: user.lastName,
|
|
2187
|
+
device_token: user.deviceToken
|
|
2188
|
+
};
|
|
2189
|
+
if (user.newPassword) {
|
|
2190
|
+
data['new_password'] = user.newPassword;
|
|
2191
|
+
data['verify_password'] = user.verifyPassword;
|
|
2192
|
+
data['password'] = user.password;
|
|
2193
|
+
}
|
|
2194
|
+
if (user.newEmail) {
|
|
2195
|
+
data['email'] = user.newEmail;
|
|
2196
|
+
}
|
|
2197
|
+
if (user.language) {
|
|
2198
|
+
data['language'] = user.language;
|
|
2199
|
+
}
|
|
2200
|
+
return this.apiService.updateResource(userFactory, Role.None, BASE_PATH, {}, data);
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: UserService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2204
|
+
UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: UserService, providedIn: 'root' });
|
|
2205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: UserService, decorators: [{
|
|
2206
|
+
type: Injectable,
|
|
2207
|
+
args: [{
|
|
2208
|
+
providedIn: 'root'
|
|
2209
|
+
}]
|
|
2210
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
2211
|
+
|
|
2212
|
+
const USER_NOTIFICATIONS_PATH = 'every-admin/user-notifications/clubs/:clubId/';
|
|
2213
|
+
class UserNotificationService {
|
|
2214
|
+
constructor(apiService) {
|
|
2215
|
+
this.apiService = apiService;
|
|
2216
|
+
}
|
|
2217
|
+
getUserNotifications(clubId, offset = 0) {
|
|
2218
|
+
return this.apiService.getCollection(userNotificationFactory, Role.None, USER_NOTIFICATIONS_PATH, { clubId }, { params: { offset: offset.toString(10) } });
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
UserNotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: UserNotificationService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2222
|
+
UserNotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: UserNotificationService, providedIn: 'root' });
|
|
2223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: UserNotificationService, decorators: [{
|
|
2224
|
+
type: Injectable,
|
|
2225
|
+
args: [{
|
|
2226
|
+
providedIn: 'root'
|
|
2227
|
+
}]
|
|
2228
|
+
}], ctorParameters: function () { return [{ type: ApiService }]; } });
|
|
2229
|
+
|
|
2230
|
+
const APP = new InjectionToken('app');
|
|
2231
|
+
class AuthenticationService {
|
|
2232
|
+
constructor(apiService, app, tokenService) {
|
|
2233
|
+
this.apiService = apiService;
|
|
2234
|
+
this.app = app;
|
|
2235
|
+
this.tokenService = tokenService;
|
|
2236
|
+
this.currentTokenSubject = new BehaviorSubject(null);
|
|
2237
|
+
this.authentication = null;
|
|
2238
|
+
this.currentToken$ = this.currentTokenSubject.asObservable();
|
|
2239
|
+
}
|
|
2240
|
+
get isAuthenticated() {
|
|
2241
|
+
return !!this.authentication;
|
|
2242
|
+
}
|
|
2243
|
+
authenticateByCredentials(username, password) {
|
|
2244
|
+
return this.tokenService
|
|
2245
|
+
.getTokenByCredentials(this.app.clientId, this.app.clientSecret, username, password)
|
|
2246
|
+
.pipe(tap((token) => this.setToken(token)));
|
|
2247
|
+
}
|
|
2248
|
+
authenticateByToken(token) {
|
|
2249
|
+
return this.tokenService
|
|
2250
|
+
.getTokenByCode(this.app.clientId, this.app.clientSecret, token)
|
|
2251
|
+
.pipe(tap((token) => this.setToken(token)));
|
|
2252
|
+
}
|
|
2253
|
+
clearAuthentication() {
|
|
2254
|
+
this.authentication = null;
|
|
2255
|
+
this.currentTokenSubject.next(null);
|
|
2256
|
+
}
|
|
2257
|
+
getSessionToken() {
|
|
2258
|
+
return this.tokenService
|
|
2259
|
+
.getTokenBySession()
|
|
2260
|
+
.pipe(tap((token) => {
|
|
2261
|
+
if (token) {
|
|
2262
|
+
this.setToken(token);
|
|
2263
|
+
}
|
|
2264
|
+
}));
|
|
2265
|
+
}
|
|
2266
|
+
logout() {
|
|
2267
|
+
return this.tokenService
|
|
2268
|
+
.logout()
|
|
2269
|
+
.pipe(tap(() => this.clearAuthentication()));
|
|
2270
|
+
}
|
|
2271
|
+
reauthenticate() {
|
|
2272
|
+
var _a;
|
|
2273
|
+
return this.tokenService
|
|
2274
|
+
.getTokenByRefreshToken(this.app.clientId, this.app.clientSecret, (_a = this.authentication) === null || _a === void 0 ? void 0 : _a.refreshToken)
|
|
2275
|
+
.pipe(tap((token) => this.setToken(token)));
|
|
2276
|
+
}
|
|
2277
|
+
setAuthentication(accessToken, refreshToken) {
|
|
2278
|
+
this.authentication = new Authentication(accessToken, refreshToken);
|
|
2279
|
+
}
|
|
2280
|
+
setToken(token) {
|
|
2281
|
+
this.currentTokenSubject.next(token);
|
|
2282
|
+
this.setAuthentication(token.accessToken, token.refreshToken);
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
AuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthenticationService, deps: [{ token: ApiService }, { token: APP }, { token: TokenService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2286
|
+
AuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthenticationService, providedIn: 'root' });
|
|
2287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthenticationService, decorators: [{
|
|
2288
|
+
type: Injectable,
|
|
2289
|
+
args: [{
|
|
2290
|
+
providedIn: 'root'
|
|
2291
|
+
}]
|
|
2292
|
+
}], ctorParameters: function () {
|
|
2293
|
+
return [{ type: ApiService }, { type: undefined, decorators: [{
|
|
2294
|
+
type: Inject,
|
|
2295
|
+
args: [APP]
|
|
2296
|
+
}] }, { type: TokenService }];
|
|
2297
|
+
} });
|
|
2298
|
+
|
|
2299
|
+
class AuthenticationInterceptor {
|
|
2300
|
+
constructor(authenticationService) {
|
|
2301
|
+
this.authenticationService = authenticationService;
|
|
2302
|
+
}
|
|
2303
|
+
intercept(request, next) {
|
|
2304
|
+
const authentication = this.authenticationService.authentication;
|
|
2305
|
+
if (authentication) {
|
|
2306
|
+
request = this.addAuthorizationHeader(request, authentication.accessToken);
|
|
2307
|
+
}
|
|
2308
|
+
return next.handle(request).pipe(catchError((requestError) => {
|
|
2309
|
+
if (requestError instanceof HttpErrorResponse && requestError.status === 401) {
|
|
2310
|
+
if (authentication && request.url.indexOf('accounts/token/') === -1) {
|
|
2311
|
+
return this.authenticationService.reauthenticate().pipe(mergeMap((token) => {
|
|
2312
|
+
if (token && token.accessToken) {
|
|
2313
|
+
return next.handle(this.addAuthorizationHeader(request, token.accessToken));
|
|
2314
|
+
}
|
|
2315
|
+
return throwError(requestError);
|
|
2316
|
+
}));
|
|
2317
|
+
}
|
|
2318
|
+
}
|
|
2319
|
+
return throwError(requestError);
|
|
2320
|
+
}));
|
|
2321
|
+
}
|
|
2322
|
+
addAuthorizationHeader(request, token) {
|
|
2323
|
+
if (token) {
|
|
2324
|
+
return request.clone({
|
|
2325
|
+
setHeaders: { Authorization: `Bearer ${token}` }
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
return request;
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
AuthenticationInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthenticationInterceptor, deps: [{ token: AuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2332
|
+
AuthenticationInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthenticationInterceptor });
|
|
2333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthenticationInterceptor, decorators: [{
|
|
2334
|
+
type: Injectable
|
|
2335
|
+
}], ctorParameters: function () { return [{ type: AuthenticationService }]; } });
|
|
2336
|
+
|
|
2337
|
+
const REDIRECT_PARAM_NAME = 'next';
|
|
2338
|
+
|
|
2339
|
+
const GRANT_TOKEN_PATH = 'api/v3/accounts/user-token/';
|
|
2340
|
+
class AuthenticatedGuard {
|
|
2341
|
+
constructor(domain, authenticationService) {
|
|
2342
|
+
this.domain = domain;
|
|
2343
|
+
this.authenticationService = authenticationService;
|
|
2344
|
+
}
|
|
2345
|
+
canActivate(route, state) {
|
|
2346
|
+
if (!this.authenticationService.isAuthenticated) {
|
|
2347
|
+
const params = new HttpParams().set(REDIRECT_PARAM_NAME, state.url);
|
|
2348
|
+
const request = new HttpRequest('GET', this.domain + GRANT_TOKEN_PATH, {
|
|
2349
|
+
params
|
|
2350
|
+
});
|
|
2351
|
+
window.location.href = request.urlWithParams;
|
|
2352
|
+
return false;
|
|
2353
|
+
}
|
|
2354
|
+
return true;
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2357
|
+
AuthenticatedGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthenticatedGuard, deps: [{ token: DOMAIN }, { token: AuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2358
|
+
AuthenticatedGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthenticatedGuard, providedIn: 'root' });
|
|
2359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: AuthenticatedGuard, decorators: [{
|
|
2360
|
+
type: Injectable,
|
|
2361
|
+
args: [{
|
|
2362
|
+
providedIn: 'root'
|
|
2363
|
+
}]
|
|
2364
|
+
}], ctorParameters: function () {
|
|
2365
|
+
return [{ type: undefined, decorators: [{
|
|
2366
|
+
type: Inject,
|
|
2367
|
+
args: [DOMAIN]
|
|
2368
|
+
}] }, { type: AuthenticationService }];
|
|
2369
|
+
} });
|
|
2370
|
+
|
|
2371
|
+
class HandleGrantTokenGuard {
|
|
2372
|
+
constructor(authenticationService, router) {
|
|
2373
|
+
this.authenticationService = authenticationService;
|
|
2374
|
+
this.router = router;
|
|
2375
|
+
}
|
|
2376
|
+
canActivate(route) {
|
|
2377
|
+
return this.authenticationService.authenticateByToken(route.params['code']).pipe(map(() => {
|
|
2378
|
+
const redirectUrl = route.queryParamMap.get(REDIRECT_PARAM_NAME);
|
|
2379
|
+
return this.authenticationService.isAuthenticated && redirectUrl
|
|
2380
|
+
? this.router.parseUrl(redirectUrl)
|
|
2381
|
+
: false;
|
|
2382
|
+
}));
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
HandleGrantTokenGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: HandleGrantTokenGuard, deps: [{ token: AuthenticationService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2386
|
+
HandleGrantTokenGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: HandleGrantTokenGuard, providedIn: 'root' });
|
|
2387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: HandleGrantTokenGuard, decorators: [{
|
|
2388
|
+
type: Injectable,
|
|
2389
|
+
args: [{
|
|
2390
|
+
providedIn: 'root'
|
|
2391
|
+
}]
|
|
2392
|
+
}], ctorParameters: function () { return [{ type: AuthenticationService }, { type: i2.Router }]; } });
|
|
2393
|
+
|
|
2394
|
+
class DataAccessModule {
|
|
2395
|
+
static forRoot(config) {
|
|
2396
|
+
return {
|
|
2397
|
+
ngModule: DataAccessModule,
|
|
2398
|
+
providers: [
|
|
2399
|
+
{ provide: APP, useValue: config.app },
|
|
2400
|
+
{ provide: DOMAIN, useValue: config.domain },
|
|
2401
|
+
{ provide: HTTP_INTERCEPTORS, useClass: AuthenticationInterceptor, multi: true }
|
|
2402
|
+
]
|
|
2403
|
+
};
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
DataAccessModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: DataAccessModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2407
|
+
DataAccessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.11", ngImport: i0, type: DataAccessModule, imports: [HttpClientModule] });
|
|
2408
|
+
DataAccessModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: DataAccessModule, imports: [HttpClientModule] });
|
|
2409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImport: i0, type: DataAccessModule, decorators: [{
|
|
2410
|
+
type: NgModule,
|
|
2411
|
+
args: [{
|
|
2412
|
+
imports: [HttpClientModule]
|
|
2413
|
+
}]
|
|
2414
|
+
}] });
|
|
2415
|
+
|
|
2416
|
+
/*
|
|
2417
|
+
* Public API Surface of data-access
|
|
2418
|
+
*/
|
|
2419
|
+
|
|
2420
|
+
/**
|
|
2421
|
+
* Generated bundle index. Do not edit.
|
|
2422
|
+
*/
|
|
2423
|
+
|
|
2424
|
+
export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, Calendar, CalendarEvent, Card, CardDeal, CardLogo, CardLogoUrls, CardMemberTicket, CardTheme, CardTicket, CardTicketLocation, Club, ClubImage, ClubSection, ClubService, ClubTeam, Collection, ConstantService, Contact, CreditCard, DataAccessModule, Directory, Email, EmailRecipient, EmailService, Event, ExternalLink, ExternalLinkService, FileObject, FileService, GeneralImage, Giro, HandleGrantTokenGuard, HomeTeam, ImageUrls, InvoiceService, Member, MemberActivityInvite, MemberAttribute, MemberCard, MemberCardService, MemberContact, MemberFee, MemberFunction, MemberInvoice, MemberInvoiceRow, MemberPublicForm, MemberPublicFormService, MemberService, MemberTeam, MemberTeamThrough, MemberValidationSettings, News, NewsService, Partner, PaymentAttempt, PaymentAttemptService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchMemberTeam, Section, SectionService, SectionTeam, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
|
|
2425
|
+
//# sourceMappingURL=myclub_se-data-access.mjs.map
|