@myclub_se/data-access 2.3.0 → 2.4.1

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.
Files changed (36) hide show
  1. package/esm2020/lib/api-models/api-invoice/api-member-invoice.mjs +1 -1
  2. package/esm2020/lib/api-models/api-member-public-form.mjs +1 -1
  3. package/esm2020/lib/api-models/api-member-type.mjs +2 -0
  4. package/esm2020/lib/api-models/api-search-team.mjs +1 -1
  5. package/esm2020/lib/api-models/index.mjs +2 -1
  6. package/esm2020/lib/models/index.mjs +2 -1
  7. package/esm2020/lib/models/invoice/member-invoice.mjs +3 -2
  8. package/esm2020/lib/models/member-public-form.mjs +8 -2
  9. package/esm2020/lib/models/member-type.mjs +8 -0
  10. package/esm2020/lib/models/search-team.mjs +3 -2
  11. package/esm2020/lib/services/factories/index.mjs +4 -1
  12. package/esm2020/lib/services/factories/member-invoice-factory.mjs +2 -2
  13. package/esm2020/lib/services/factories/member-public-form-factory.mjs +9 -5
  14. package/esm2020/lib/services/factories/member-public-form-field-factory.mjs +5 -0
  15. package/esm2020/lib/services/factories/member-public-form-field-option-factory.mjs +3 -0
  16. package/esm2020/lib/services/factories/member-type-factory.mjs +3 -0
  17. package/esm2020/lib/services/factories/search-team-factory.mjs +2 -2
  18. package/fesm2015/myclub_se-data-access.mjs +36 -12
  19. package/fesm2015/myclub_se-data-access.mjs.map +1 -1
  20. package/fesm2020/myclub_se-data-access.mjs +36 -12
  21. package/fesm2020/myclub_se-data-access.mjs.map +1 -1
  22. package/lib/api-models/api-invoice/api-member-invoice.d.ts +1 -0
  23. package/lib/api-models/api-member-public-form.d.ts +9 -2
  24. package/lib/api-models/api-member-type.d.ts +5 -0
  25. package/lib/api-models/api-search-team.d.ts +3 -1
  26. package/lib/api-models/index.d.ts +1 -0
  27. package/lib/models/index.d.ts +1 -0
  28. package/lib/models/invoice/member-invoice.d.ts +2 -1
  29. package/lib/models/member-public-form.d.ts +9 -1
  30. package/lib/models/member-type.d.ts +6 -0
  31. package/lib/models/search-team.d.ts +2 -1
  32. package/lib/services/factories/index.d.ts +3 -0
  33. package/lib/services/factories/member-public-form-field-factory.d.ts +3 -0
  34. package/lib/services/factories/member-public-form-field-option-factory.d.ts +3 -0
  35. package/lib/services/factories/member-type-factory.d.ts +3 -0
  36. package/package.json +1 -1
@@ -712,7 +712,7 @@ class MemberFee {
712
712
  }
713
713
 
714
714
  class MemberInvoice {
715
- constructor(id, amount, amountPaid, balance, clubBillId, clubName, creditCard, datePaid, dueDate, giro, invoiceRows, invoiceText, isPaid, memberId, payee, paymentUrl, reference, swish, zimpler) {
715
+ constructor(id, amount, amountPaid, balance, clubBillId, clubName, creditCard, datePaid, dueDate, giro, invoiceRows, invoiceText, isPaid, memberId, organisationName, payee, paymentUrl, reference, swish, zimpler) {
716
716
  this.id = id;
717
717
  this.amount = amount;
718
718
  this.amountPaid = amountPaid;
@@ -727,6 +727,7 @@ class MemberInvoice {
727
727
  this.invoiceText = invoiceText;
728
728
  this.isPaid = isPaid;
729
729
  this.memberId = memberId;
730
+ this.organisationName = organisationName;
730
731
  this.payee = payee;
731
732
  this.paymentUrl = paymentUrl;
732
733
  this.reference = reference;
@@ -1061,16 +1062,22 @@ class MemberActivityInvite {
1061
1062
  }
1062
1063
 
1063
1064
  class MemberPublicForm {
1064
- constructor(id, active_form, active_to, userToken, comment, fields, max_registered_in_form_total, name, num_registered, url) {
1065
+ constructor(id, active_form, active_to, userToken, comment, dataprotection_policy_choice, dataprotection_policy_url, fields, full_text, max_registered_in_form_total, member_types, name, num_registered, team_help_text, teams, url) {
1065
1066
  this.id = id;
1066
1067
  this.active_form = active_form;
1067
1068
  this.active_to = active_to;
1068
1069
  this.userToken = userToken;
1069
1070
  this.comment = comment;
1071
+ this.dataprotection_policy_choice = dataprotection_policy_choice;
1072
+ this.dataprotection_policy_url = dataprotection_policy_url;
1070
1073
  this.fields = fields;
1074
+ this.full_text = full_text;
1071
1075
  this.max_registered_in_form_total = max_registered_in_form_total;
1076
+ this.member_types = member_types;
1072
1077
  this.name = name;
1073
1078
  this.num_registered = num_registered;
1079
+ this.team_help_text = team_help_text;
1080
+ this.teams = teams;
1074
1081
  this.url = url;
1075
1082
  }
1076
1083
  }
@@ -1127,6 +1134,14 @@ class MemberTeamThrough {
1127
1134
  }
1128
1135
  }
1129
1136
 
1137
+ class MemberType {
1138
+ constructor(id, club_id, name) {
1139
+ this.id = id;
1140
+ this.club_id = club_id;
1141
+ this.name = name;
1142
+ }
1143
+ }
1144
+
1130
1145
  class News {
1131
1146
  constructor(id, club_id, created, created_by_id, section_id, team_id, active_to, author, ingress, news_image, news_image_text, published_date, read, show_on_my_pages, show_on_webpage, text, title, updated, urls) {
1132
1147
  this.id = id;
@@ -1202,10 +1217,11 @@ class SearchClub {
1202
1217
  }
1203
1218
 
1204
1219
  class SearchTeam {
1205
- constructor(club, section, id, name, section_name) {
1220
+ constructor(club, section, id, club_name, name, section_name) {
1206
1221
  this.club = club;
1207
1222
  this.section = section;
1208
1223
  this.id = id;
1224
+ this.club_name = club_name;
1209
1225
  this.name = name;
1210
1226
  this.section_name = section_name;
1211
1227
  }
@@ -1448,22 +1464,32 @@ const zimplerFactory = (apiZimpler) => new Zimpler(apiZimpler.club_id, apiZimple
1448
1464
 
1449
1465
  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);
1450
1466
 
1451
- 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);
1467
+ 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.organisation_name, apiMemberInvoice.payee, apiMemberInvoice.payment_url, apiMemberInvoice.reference, apiMemberInvoice.swish ? swishFactory(apiMemberInvoice.swish) : null, apiMemberInvoice.zimpler ? zimplerFactory(apiMemberInvoice.zimpler) : null);
1468
+
1469
+ const sectionFactory = (apiSection) => new Section(apiSection.id, apiSection.name);
1470
+
1471
+ const searchTeamFactory = (apiSearchTeam) => new SearchTeam(apiSearchTeam.club ? clubFactory(apiSearchTeam.club) : undefined, apiSearchTeam.section ? sectionFactory(apiSearchTeam.section) : undefined, apiSearchTeam.id, apiSearchTeam.club_name, apiSearchTeam.name, apiSearchTeam.section_name);
1472
+
1473
+ const memberPublicFormFieldOptionFactory = (apiMemberPublicFormFieldOption) => new MemberPublicFormFieldOption(apiMemberPublicFormFieldOption.id, apiMemberPublicFormFieldOption.name, apiMemberPublicFormFieldOption.selected, apiMemberPublicFormFieldOption.default);
1474
+
1475
+ const memberPublicFormFieldFactory = (apiMemberPublicFormField) => new MemberPublicFormField(apiMemberPublicFormField.all_choice_options && apiMemberPublicFormField.all_choice_options.length ?
1476
+ apiMemberPublicFormField.all_choice_options.map((option) => memberPublicFormFieldOptionFactory(option)) : [], apiMemberPublicFormField.divider, apiMemberPublicFormField.familys, apiMemberPublicFormField.field_id, apiMemberPublicFormField.field_name, apiMemberPublicFormField.field_order, apiMemberPublicFormField.header, apiMemberPublicFormField.help_text, apiMemberPublicFormField.required, apiMemberPublicFormField.type, apiMemberPublicFormField.value);
1477
+
1478
+ const memberTypeFactory = (apiMemberType) => new MemberType(apiMemberType.id, apiMemberType.club_id, apiMemberType.name);
1452
1479
 
1453
1480
  const memberPublicFormFactory = (apiMemberPublicForm) => {
1454
1481
  const fields = new Map();
1455
1482
  if (apiMemberPublicForm.fields) {
1456
1483
  Object.entries(apiMemberPublicForm.fields)
1457
1484
  .forEach(([key, field]) => {
1458
- fields.set(key, new MemberPublicFormField(field.all_choice_options && field.all_choice_options.length ?
1459
- field.all_choice_options.map((option) => new MemberPublicFormFieldOption(option.id, option.name, option.selected, option.default)) : [], field.divider, field.familys, field.field_id, field.field_name, field.field_order, field.header, field.help_text, field.required, field.type, field.value));
1485
+ fields.set(key, memberPublicFormFieldFactory(field));
1460
1486
  });
1461
1487
  }
1462
- return new MemberPublicForm(apiMemberPublicForm.id, apiMemberPublicForm.active_from, apiMemberPublicForm.active_to, apiMemberPublicForm.user_token, apiMemberPublicForm.comment, fields, apiMemberPublicForm.max_registered_in_form_total, apiMemberPublicForm.name, apiMemberPublicForm.num_registered, apiMemberPublicForm.url);
1488
+ return new MemberPublicForm(apiMemberPublicForm.id, apiMemberPublicForm.active_from, apiMemberPublicForm.active_to, apiMemberPublicForm.user_token, apiMemberPublicForm.comment, apiMemberPublicForm.dataprotection_policy_choice, apiMemberPublicForm.dataprotection_policy_url, fields, apiMemberPublicForm.full_text, apiMemberPublicForm.max_registered_in_form_total, apiMemberPublicForm.member_types && apiMemberPublicForm.member_types.length ?
1489
+ apiMemberPublicForm.member_types.map((memberType) => memberTypeFactory(memberType)) : [], apiMemberPublicForm.name, apiMemberPublicForm.num_registered, apiMemberPublicForm.team_help_text, apiMemberPublicForm.teams && apiMemberPublicForm.teams.length
1490
+ ? apiMemberPublicForm.teams.map((team) => searchTeamFactory(team)) : [], apiMemberPublicForm.url);
1463
1491
  };
1464
1492
 
1465
- const sectionFactory = (apiSection) => new Section(apiSection.id, apiSection.name);
1466
-
1467
1493
  const memberTeamFactory = (apiMemberTeam) => new MemberTeam(clubFactory(apiMemberTeam.club), apiMemberTeam.section ? sectionFactory(apiMemberTeam.section) : null, apiMemberTeam.id, apiMemberTeam.email, apiMemberTeam.has_extra_members, apiMemberTeam.name, apiMemberTeam.phone, apiMemberTeam.section_name);
1468
1494
 
1469
1495
  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);
@@ -2608,8 +2634,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
2608
2634
  }]
2609
2635
  }], ctorParameters: function () { return [{ type: ApiService }]; } });
2610
2636
 
2611
- const searchTeamFactory = (apiSearchTeam) => new SearchTeam(apiSearchTeam.club ? clubFactory(apiSearchTeam.club) : undefined, apiSearchTeam.section ? sectionFactory(apiSearchTeam.section) : undefined, apiSearchTeam.id, apiSearchTeam.name, apiSearchTeam.section_name);
2612
-
2613
2637
  const CLUB_TEAMS_PATH = ':clubId/teams/';
2614
2638
  const MEMBER_TEAM_MEMBER_PATH = ':memberId/teams/:teamId/team-members/:id/';
2615
2639
  const MEMBER_TEAM_MEMBERS_PATH = ':memberId/teams/:teamId/team-members/';
@@ -3022,5 +3046,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.11", ngImpo
3022
3046
  * Generated bundle index. Do not edit.
3023
3047
  */
3024
3048
 
3025
- export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityLocationGroup, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, BookingCalendar, BookingCalendarService, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, Calendar, CalendarEvent, Card, CardDeal, CardLogo, CardLogoUrls, CardMemberTicket, CardTheme, CardTicket, CardTicketLocation, Club, ClubImage, ClubSection, ClubService, Collection, ConstantService, Contact, CreditCard, DataAccessModule, Directory, Email, EmailService, Event, ExternalLink, ExternalLinkService, FileObject, FileService, GeneralImage, Giro, HandleGrantTokenGuard, HomeTeam, ImageUrls, InvoiceService, Member, MemberActivityInvite, MemberAttribute, MemberCard, MemberCardService, MemberContact, MemberFee, MemberFunction, MemberInvoice, MemberInvoiceRow, MemberPublicForm, MemberPublicFormField, MemberPublicFormFieldOption, MemberPublicFormService, MemberService, MemberTeam, MemberTeamThrough, MemberValidationSettings, News, NewsService, Partner, PaymentAttempt, PaymentAttemptService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchTeam, Section, SectionService, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
3049
+ export { APP, Activity, ActivityExtraMember, ActivityInvite, ActivityLocation, ActivityLocationGroup, ActivityService, ActivitySettings, ActivityType, Auth, AuthMember, AuthSection, AuthService, AuthTeam, AuthTeamSection, AuthenticatedGuard, Authentication, AuthenticationInterceptor, AuthenticationService, BookingCalendar, BookingCalendarService, BookingCalendarSlot, BookingCalendarSlotSession, BookingSettings, Calendar, CalendarEvent, Card, CardDeal, CardLogo, CardLogoUrls, CardMemberTicket, CardTheme, CardTicket, CardTicketLocation, Club, ClubImage, ClubSection, ClubService, Collection, ConstantService, Contact, CreditCard, DataAccessModule, Directory, Email, EmailService, Event, ExternalLink, ExternalLinkService, FileObject, FileService, GeneralImage, Giro, HandleGrantTokenGuard, HomeTeam, ImageUrls, InvoiceService, Member, MemberActivityInvite, MemberAttribute, MemberCard, MemberCardService, MemberContact, MemberFee, MemberFunction, MemberInvoice, MemberInvoiceRow, MemberPublicForm, MemberPublicFormField, MemberPublicFormFieldOption, MemberPublicFormService, MemberService, MemberTeam, MemberTeamThrough, MemberType, MemberValidationSettings, News, NewsService, Partner, PaymentAttempt, PaymentAttemptService, Role, SearchClub, SearchMember, SearchMemberCard, SearchMemberInvoice, SearchTeam, Section, SectionService, Swish, SwishQrCode, TeamService, Token, TokenService, USER_NOTIFICATIONS_PATH, UnpaidMemberInvoice, User, UserNotification, UserNotificationService, UserService, Zimpler };
3026
3050
  //# sourceMappingURL=myclub_se-data-access.mjs.map