@stevenkellner/team-conduct-api 1.0.35 → 2.0.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 (218) hide show
  1. package/lib/src/firebase/FirebaseConfiguration.d.ts +45 -1
  2. package/lib/src/firebase/FirebaseConfiguration.js +44 -0
  3. package/lib/src/firebase/Firestore.d.ts +196 -0
  4. package/lib/src/firebase/Firestore.js +235 -0
  5. package/lib/src/{FirestoreScheme.d.ts → firebase/FirestoreScheme.d.ts} +15 -1
  6. package/lib/src/firebase/Messaging.d.ts +64 -0
  7. package/lib/src/firebase/checkAuthentication.d.ts +37 -0
  8. package/lib/src/{checkAuthentication.js → firebase/checkAuthentication.js} +26 -1
  9. package/lib/src/firebase/index.d.ts +4 -0
  10. package/lib/src/firebase/index.js +4 -0
  11. package/lib/src/firebase/pushNotification.d.ts +39 -0
  12. package/lib/src/firebase/pushNotification.js +88 -0
  13. package/lib/src/functions/fine/add.d.ts +10 -13
  14. package/lib/src/functions/fine/add.js +3 -30
  15. package/lib/src/functions/fine/delete.d.ts +10 -13
  16. package/lib/src/functions/fine/delete.js +3 -27
  17. package/lib/src/functions/fine/update.d.ts +10 -13
  18. package/lib/src/functions/fine/update.js +3 -28
  19. package/lib/src/functions/fineTemplate/add.d.ts +6 -9
  20. package/lib/src/functions/fineTemplate/add.js +3 -12
  21. package/lib/src/functions/fineTemplate/delete.d.ts +6 -9
  22. package/lib/src/functions/fineTemplate/delete.js +3 -12
  23. package/lib/src/functions/fineTemplate/update.d.ts +6 -9
  24. package/lib/src/functions/fineTemplate/update.js +3 -12
  25. package/lib/src/functions/invitation/getInvitation.d.ts +41 -42
  26. package/lib/src/functions/invitation/getInvitation.js +58 -81
  27. package/lib/src/functions/invitation/invite.d.ts +1 -2
  28. package/lib/src/functions/invitation/invite.js +3 -18
  29. package/lib/src/functions/invitation/register.d.ts +6 -11
  30. package/lib/src/functions/invitation/register.js +3 -39
  31. package/lib/src/functions/invitation/withdraw.d.ts +1 -2
  32. package/lib/src/functions/invitation/withdraw.js +3 -13
  33. package/lib/src/functions/notification/register.d.ts +7 -10
  34. package/lib/src/functions/notification/register.js +3 -15
  35. package/lib/src/functions/notification/subscribe.d.ts +8 -11
  36. package/lib/src/functions/notification/subscribe.js +3 -14
  37. package/lib/src/functions/paypalMe/edit.d.ts +6 -9
  38. package/lib/src/functions/paypalMe/edit.js +3 -14
  39. package/lib/src/functions/person/add.d.ts +7 -10
  40. package/lib/src/functions/person/add.js +3 -12
  41. package/lib/src/functions/person/delete.d.ts +6 -9
  42. package/lib/src/functions/person/delete.js +3 -14
  43. package/lib/src/functions/person/update.d.ts +7 -10
  44. package/lib/src/functions/person/update.js +3 -13
  45. package/lib/src/functions/team/new.d.ts +9 -12
  46. package/lib/src/functions/team/new.js +3 -22
  47. package/lib/src/functions/user/kickout.d.ts +6 -9
  48. package/lib/src/functions/user/kickout.js +3 -25
  49. package/lib/src/functions/user/login.d.ts +1 -2
  50. package/lib/src/functions/user/login.js +3 -13
  51. package/lib/src/functions/user/roleEdit.d.ts +8 -11
  52. package/lib/src/functions/user/roleEdit.js +3 -18
  53. package/lib/src/index.d.ts +0 -5
  54. package/lib/src/index.js +0 -5
  55. package/lib/src/locales/de.d.ts +10 -67
  56. package/lib/src/locales/de.js +8 -0
  57. package/lib/src/locales/en.d.ts +10 -0
  58. package/lib/src/locales/en.js +19 -2
  59. package/lib/src/types/Configuration.d.ts +33 -15
  60. package/lib/src/types/Configuration.js +24 -12
  61. package/lib/src/types/Currency.d.ts +20 -0
  62. package/lib/src/types/Currency.js +19 -0
  63. package/lib/src/types/Fine.d.ts +41 -0
  64. package/lib/src/types/Fine.js +32 -0
  65. package/lib/src/types/FineAmount.d.ts +160 -9
  66. package/lib/src/types/FineAmount.js +128 -7
  67. package/lib/src/types/FineTemplate.d.ts +41 -0
  68. package/lib/src/types/FineTemplate.js +32 -0
  69. package/lib/src/types/FineTemplateRepetition.d.ts +72 -10
  70. package/lib/src/types/FineTemplateRepetition.js +66 -12
  71. package/lib/src/types/Invitation.d.ts +48 -0
  72. package/lib/src/types/Invitation.js +39 -0
  73. package/lib/src/types/Locale.d.ts +16 -0
  74. package/lib/src/types/Locale.js +16 -0
  75. package/lib/src/types/Localization.d.ts +74 -74
  76. package/lib/src/types/Localization.js +80 -41
  77. package/lib/src/types/MoneyAmount.d.ts +67 -1
  78. package/lib/src/types/MoneyAmount.js +62 -0
  79. package/lib/src/types/NotificationProperties.d.ts +70 -9
  80. package/lib/src/types/NotificationProperties.js +49 -5
  81. package/lib/src/types/PayedState.d.ts +25 -9
  82. package/lib/src/types/PayedState.js +17 -27
  83. package/lib/src/types/Person.d.ts +45 -0
  84. package/lib/src/types/Person.js +36 -0
  85. package/lib/src/types/PersonPrivateProperties.d.ts +28 -0
  86. package/lib/src/types/PersonPrivateProperties.js +25 -0
  87. package/lib/src/types/PersonSignInProperties.d.ts +30 -0
  88. package/lib/src/types/PersonSignInProperties.js +27 -0
  89. package/lib/src/types/Pluralization.d.ts +46 -0
  90. package/lib/src/types/Pluralization.js +46 -0
  91. package/lib/src/types/Team.d.ts +38 -0
  92. package/lib/src/types/Team.js +29 -0
  93. package/lib/src/types/User.d.ts +68 -3
  94. package/lib/src/types/User.js +59 -5
  95. package/lib/src/types/UserRole.d.ts +26 -4
  96. package/lib/src/types/UserRole.js +25 -9
  97. package/lib/src/types/index.d.ts +2 -0
  98. package/lib/src/types/index.js +2 -0
  99. package/lib/test/firebase/FirebaseConfiguration.test.js +155 -0
  100. package/lib/test/firebase/Firestore.test.js +46 -0
  101. package/lib/test/firebase/checkAuthentication.test.d.ts +1 -0
  102. package/lib/test/firebase/checkAuthentication.test.js +305 -0
  103. package/lib/test/firebase/firebase-utils.d.ts +32 -0
  104. package/lib/test/firebase/firebase-utils.js +131 -0
  105. package/lib/test/firebase/pushNotification.test.d.ts +1 -0
  106. package/lib/test/firebase/pushNotification.test.js +300 -0
  107. package/lib/test/locales/localization.de.test.d.ts +1 -0
  108. package/lib/test/locales/localization.de.test.js +144 -0
  109. package/lib/test/locales/localization.en.test.d.ts +1 -0
  110. package/lib/test/locales/localization.en.test.js +144 -0
  111. package/lib/test/types/Configuration.test.d.ts +1 -0
  112. package/lib/test/types/Configuration.test.js +84 -0
  113. package/lib/test/types/Currency.test.d.ts +1 -0
  114. package/lib/test/types/Currency.test.js +41 -0
  115. package/lib/test/types/Fine.test.d.ts +1 -0
  116. package/lib/test/types/Fine.test.js +265 -0
  117. package/lib/test/types/FineAmount.test.d.ts +1 -0
  118. package/lib/test/types/FineAmount.test.js +445 -0
  119. package/lib/test/types/FineTemplate.test.d.ts +1 -0
  120. package/lib/test/types/FineTemplate.test.js +271 -0
  121. package/lib/test/types/FineTemplateRepetition.test.d.ts +1 -0
  122. package/lib/test/types/FineTemplateRepetition.test.js +361 -0
  123. package/lib/test/types/Invitation.test.d.ts +1 -0
  124. package/lib/test/types/Invitation.test.js +269 -0
  125. package/lib/test/types/Locale.test.d.ts +1 -0
  126. package/lib/test/types/Locale.test.js +46 -0
  127. package/lib/test/types/Localization.test.d.ts +1 -0
  128. package/lib/test/types/Localization.test.js +241 -0
  129. package/lib/test/types/MoneyAmount.test.d.ts +1 -0
  130. package/lib/test/types/MoneyAmount.test.js +276 -0
  131. package/lib/test/types/NotificationProperties.test.d.ts +1 -0
  132. package/lib/test/types/NotificationProperties.test.js +258 -0
  133. package/lib/test/types/PayedState.test.d.ts +1 -0
  134. package/lib/test/types/PayedState.test.js +105 -0
  135. package/lib/test/types/Person.test.d.ts +1 -0
  136. package/lib/test/types/Person.test.js +266 -0
  137. package/lib/test/types/PersonPrivateProperties.test.d.ts +1 -0
  138. package/lib/test/types/PersonPrivateProperties.test.js +155 -0
  139. package/lib/test/types/PersonSignInProperties.test.d.ts +1 -0
  140. package/lib/test/types/PersonSignInProperties.test.js +208 -0
  141. package/lib/test/types/Pluralization.test.d.ts +1 -0
  142. package/lib/test/types/Pluralization.test.js +206 -0
  143. package/lib/test/types/Team.test.d.ts +1 -0
  144. package/lib/test/types/Team.test.js +145 -0
  145. package/lib/test/types/User.test.d.ts +1 -0
  146. package/lib/test/types/User.test.js +232 -0
  147. package/lib/test/types/UserRole.test.d.ts +1 -0
  148. package/lib/test/types/UserRole.test.js +140 -0
  149. package/lib/tsconfig.tsbuildinfo +1 -1
  150. package/package.json +10 -9
  151. package/src/firebase/FirebaseConfiguration.ts +49 -1
  152. package/src/firebase/Firestore.ts +248 -0
  153. package/src/{FirestoreScheme.ts → firebase/FirestoreScheme.ts} +15 -1
  154. package/src/firebase/Messaging.ts +64 -0
  155. package/src/{checkAuthentication.ts → firebase/checkAuthentication.ts} +39 -1
  156. package/src/firebase/index.ts +5 -0
  157. package/src/firebase/pushNotification.ts +90 -0
  158. package/src/functions/fine/add.ts +10 -48
  159. package/src/functions/fine/delete.ts +9 -43
  160. package/src/functions/fine/update.ts +10 -44
  161. package/src/functions/fineTemplate/add.ts +7 -23
  162. package/src/functions/fineTemplate/delete.ts +7 -23
  163. package/src/functions/fineTemplate/update.ts +7 -24
  164. package/src/functions/index.ts +0 -1
  165. package/src/functions/invitation/getInvitation.ts +83 -109
  166. package/src/functions/invitation/invite.ts +2 -25
  167. package/src/functions/invitation/register.ts +9 -60
  168. package/src/functions/invitation/withdraw.ts +2 -16
  169. package/src/functions/notification/register.ts +7 -26
  170. package/src/functions/notification/subscribe.ts +8 -26
  171. package/src/functions/paypalMe/edit.ts +7 -25
  172. package/src/functions/person/add.ts +8 -24
  173. package/src/functions/person/delete.ts +6 -25
  174. package/src/functions/person/update.ts +8 -25
  175. package/src/functions/team/new.ts +12 -42
  176. package/src/functions/user/kickout.ts +8 -41
  177. package/src/functions/user/login.ts +2 -16
  178. package/src/functions/user/roleEdit.ts +8 -32
  179. package/src/index.ts +0 -5
  180. package/src/locales/de.ts +10 -1
  181. package/src/locales/en.ts +21 -2
  182. package/src/types/Configuration.ts +33 -23
  183. package/src/types/Currency.ts +24 -0
  184. package/src/types/Fine.ts +41 -0
  185. package/src/types/FineAmount.ts +162 -11
  186. package/src/types/FineTemplate.ts +41 -0
  187. package/src/types/FineTemplateRepetition.ts +75 -17
  188. package/src/types/Invitation.ts +48 -0
  189. package/src/types/Locale.ts +20 -0
  190. package/src/types/Localization.ts +96 -41
  191. package/src/types/MoneyAmount.ts +67 -1
  192. package/src/types/NotificationProperties.ts +67 -9
  193. package/src/types/PayedState.ts +25 -30
  194. package/src/types/Person.ts +45 -0
  195. package/src/types/PersonPrivateProperties.ts +28 -1
  196. package/src/types/PersonSignInProperties.ts +30 -0
  197. package/src/types/Pluralization.ts +46 -0
  198. package/src/types/Team.ts +38 -0
  199. package/src/types/User.ts +70 -4
  200. package/src/types/UserRole.ts +32 -16
  201. package/src/types/index.ts +2 -0
  202. package/lib/src/Firestore.d.ts +0 -24
  203. package/lib/src/Firestore.js +0 -62
  204. package/lib/src/checkAuthentication.d.ts +0 -6
  205. package/lib/src/firebaseFunctionsContext.d.ts +0 -39
  206. package/lib/src/firebaseFunctionsContext.js +0 -43
  207. package/lib/src/pushNotification.d.ts +0 -3
  208. package/lib/src/pushNotification.js +0 -35
  209. package/lib/test/localization-utils.d.ts +0 -1
  210. package/lib/test/localization-utils.js +0 -24
  211. package/lib/test/localization.de.test.js +0 -151
  212. package/lib/test/localization.en.test.js +0 -145
  213. package/src/Firestore.ts +0 -75
  214. package/src/firebaseFunctionsContext.ts +0 -48
  215. package/src/pushNotification.ts +0 -37
  216. /package/lib/src/{FirestoreScheme.js → firebase/FirestoreScheme.js} +0 -0
  217. /package/lib/test/{localization.de.test.d.ts → firebase/FirebaseConfiguration.test.d.ts} +0 -0
  218. /package/lib/test/{localization.en.test.d.ts → firebase/Firestore.test.d.ts} +0 -0
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hasSameKeys = hasSameKeys;
4
- const core_1 = require("@assertive-ts/core");
5
- const typescript_common_functionality_1 = require("@stevenkellner/typescript-common-functionality");
6
- const src_1 = require("../src");
7
- function hasSameKeys(record1, record2) {
8
- (0, core_1.expect)((0, typescript_common_functionality_1.keys)(record1)).toHaveSameMembers((0, typescript_common_functionality_1.keys)(record2));
9
- for (const key of (0, typescript_common_functionality_1.keys)(record1)) {
10
- if (typeof record1[key] === 'object' && record1[key] !== null) {
11
- (0, core_1.expect)(record2[key]).not.toBeUndefined();
12
- (0, core_1.expect)(typeof record2[key]).toBeEqual('object');
13
- (0, core_1.expect)(record1[key]).not.toBeNull();
14
- if (record1[key] instanceof src_1.Pluralization)
15
- (0, core_1.expect)(record2[key]).toBeInstanceOf(src_1.Pluralization);
16
- else
17
- hasSameKeys(record1[key], record2[key]);
18
- }
19
- else {
20
- (0, core_1.expect)(typeof record1[key]).toBeEqual('string');
21
- (0, core_1.expect)(typeof record2[key]).toBeEqual('string');
22
- }
23
- }
24
- }
@@ -1,151 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@assertive-ts/core");
4
- const en_1 = require("../src/locales/en");
5
- const de_1 = require("../src/locales/de");
6
- const types_1 = require("../src/types");
7
- const localization_utils_1 = require("./localization-utils");
8
- describe('Localization for de', () => {
9
- before(() => {
10
- types_1.Localization.locale = 'de';
11
- });
12
- it('should have the same keys as en', () => {
13
- (0, localization_utils_1.hasSameKeys)(de_1.localizationDE, en_1.localizationEN);
14
- });
15
- describe('notification.fine should be tested', () => {
16
- it('notification.fine.new should be tested', () => {
17
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.new.title.value({ reason: 'fine-reason' })).toBeEqual('fine-reason');
18
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.new.body.value({ amount: '10,50 €' })).toBeEqual('Du hast eine neue Strafe von 10,50 €. Bitte so schnell wie möglich zahlen.');
19
- });
20
- it('notification.fine.reminder should be tested', () => {
21
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.reminder.title.value()).toBeEqual('Du hast noch offene Strafen');
22
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.reminder.body.value({ amount: '10,50 €' })).toBeEqual('Bei dir sind noch 10,50 € offen. Bitte so schnell wie möglich zahlen.');
23
- });
24
- it('notification.fine.stateChange should be tested', () => {
25
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.stateChange.title.value()).toBeEqual('Eine deiner Strafen hat sich geändert');
26
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.stateChange.bodyPayed.value({ amount: '10,50 €', reason: 'fine-reason' })).toBeEqual('Du hast eine Strafe von 10,50 € bezahlt (fine-reason).');
27
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.stateChange.bodyUnpayed.value({ amount: '10,50 €', reason: 'fine-reason' })).toBeEqual('fine-reason, 10,50 € ist noch offen.');
28
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.stateChange.bodyDeleted.value({ amount: '10,50 €', reason: 'fine-reason' })).toBeEqual('fine-reason, 10,50 € wurde gelöscht.');
29
- });
30
- });
31
- describe('fineAmount should be tested', () => {
32
- it('fineAmount.item.type.crateOfBeer should be tested', () => {
33
- (0, core_1.expect)(types_1.Localization.shared.fineAmount.item.type.crateOfBeer.name.value()).toBeEqual('Kasten Bier');
34
- (0, core_1.expect)(types_1.Localization.shared.fineAmount.item.type.crateOfBeer.withCount.value(1)).toBeEqual('Ein Kasten Bier');
35
- (0, core_1.expect)(types_1.Localization.shared.fineAmount.item.type.crateOfBeer.withCount.value(4)).toBeEqual('4 Kästen Bier');
36
- (0, core_1.expect)(types_1.Localization.shared.fineAmount.item.type.crateOfBeer.withoutCount.value(1)).toBeEqual('Kasten Bier');
37
- (0, core_1.expect)(types_1.Localization.shared.fineAmount.item.type.crateOfBeer.withoutCount.value(4)).toBeEqual('Kästen Bier');
38
- });
39
- it('fineAmount.item.type.crateOfBeer should be formatted correctly', () => {
40
- (0, core_1.expect)(types_1.FineAmount.Item.Type.formatted('crateOfBeer')).toBeEqual('Kasten Bier');
41
- (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 1).formatted()).toBeEqual('Ein Kasten Bier');
42
- (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 4).formatted()).toBeEqual('4 Kästen Bier');
43
- (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 1).formattedWithoutCount()).toBeEqual('Kasten Bier');
44
- (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 4).formattedWithoutCount()).toBeEqual('Kästen Bier');
45
- });
46
- });
47
- describe('fineTemplateRepetition should be tested', () => {
48
- it('fineTemplateRepetition.item.minute should be tested', () => {
49
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.minute.name.value()).toBeEqual('Minute');
50
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.minute.withCount.value(1)).toBeEqual('1 Minute');
51
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.minute.withCount.value(4)).toBeEqual('4 Minuten');
52
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.minute.withoutCount.value(1)).toBeEqual('Minute');
53
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.minute.withoutCount.value(4)).toBeEqual('Minuten');
54
- });
55
- it('fineTemplateRepetition.item.minute should be formatted correctly', () => {
56
- (0, core_1.expect)(types_1.FineTemplateRepetition.Item.formatted('minute')).toBeEqual('Minute');
57
- (0, core_1.expect)(new types_1.FineTemplateRepetition('minute', null).formatted(1)).toBeEqual('1 Minute');
58
- (0, core_1.expect)(new types_1.FineTemplateRepetition('minute', null).formatted(4)).toBeEqual('4 Minuten');
59
- (0, core_1.expect)(new types_1.FineTemplateRepetition('minute', null).formattedWithoutCount(1)).toBeEqual('Minute');
60
- (0, core_1.expect)(new types_1.FineTemplateRepetition('minute', null).formattedWithoutCount(4)).toBeEqual('Minuten');
61
- });
62
- it('fineTemplateRepetition.item.day should be tested', () => {
63
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.day.name.value()).toBeEqual('Tag');
64
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.day.withCount.value(1)).toBeEqual('1 Tag');
65
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.day.withCount.value(4)).toBeEqual('4 Tage');
66
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.day.withoutCount.value(1)).toBeEqual('Tag');
67
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.day.withoutCount.value(4)).toBeEqual('Tage');
68
- });
69
- it('fineTemplateRepetition.item.day should be formatted correctly', () => {
70
- (0, core_1.expect)(types_1.FineTemplateRepetition.Item.formatted('day')).toBeEqual('Tag');
71
- (0, core_1.expect)(new types_1.FineTemplateRepetition('day', null).formatted(1)).toBeEqual('1 Tag');
72
- (0, core_1.expect)(new types_1.FineTemplateRepetition('day', null).formatted(4)).toBeEqual('4 Tage');
73
- (0, core_1.expect)(new types_1.FineTemplateRepetition('day', null).formattedWithoutCount(1)).toBeEqual('Tag');
74
- (0, core_1.expect)(new types_1.FineTemplateRepetition('day', null).formattedWithoutCount(4)).toBeEqual('Tage');
75
- });
76
- it('fineTemplateRepetition.item.item should be tested', () => {
77
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.item.name.value()).toBeEqual('Teil');
78
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.item.withCount.value(1)).toBeEqual('1 Teil');
79
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.item.withCount.value(4)).toBeEqual('4 Teile');
80
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.item.withoutCount.value(1)).toBeEqual('Teil');
81
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.item.withoutCount.value(4)).toBeEqual('Teile');
82
- });
83
- it('fineTemplateRepetition.item.item should be formatted correctly', () => {
84
- (0, core_1.expect)(types_1.FineTemplateRepetition.Item.formatted('item')).toBeEqual('Teil');
85
- (0, core_1.expect)(new types_1.FineTemplateRepetition('item', null).formatted(1)).toBeEqual('1 Teil');
86
- (0, core_1.expect)(new types_1.FineTemplateRepetition('item', null).formatted(4)).toBeEqual('4 Teile');
87
- (0, core_1.expect)(new types_1.FineTemplateRepetition('item', null).formattedWithoutCount(1)).toBeEqual('Teil');
88
- (0, core_1.expect)(new types_1.FineTemplateRepetition('item', null).formattedWithoutCount(4)).toBeEqual('Teile');
89
- });
90
- it('fineTemplateRepetition.item.count should be tested', () => {
91
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.count.name.value()).toBeEqual('Anzahl');
92
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.count.withCount.value(1)).toBeEqual('1 mal');
93
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.count.withCount.value(4)).toBeEqual('4 mal');
94
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.count.withoutCount.value(1)).toBeEqual('mal');
95
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.count.withoutCount.value(4)).toBeEqual('mal');
96
- });
97
- it('fineTemplateRepetition.item.count should be formatted correctly', () => {
98
- (0, core_1.expect)(types_1.FineTemplateRepetition.Item.formatted('count')).toBeEqual('Anzahl');
99
- (0, core_1.expect)(new types_1.FineTemplateRepetition('count', null).formatted(1)).toBeEqual('1 mal');
100
- (0, core_1.expect)(new types_1.FineTemplateRepetition('count', null).formatted(4)).toBeEqual('4 mal');
101
- (0, core_1.expect)(new types_1.FineTemplateRepetition('count', null).formattedWithoutCount(1)).toBeEqual('mal');
102
- (0, core_1.expect)(new types_1.FineTemplateRepetition('count', null).formattedWithoutCount(4)).toBeEqual('mal');
103
- });
104
- });
105
- describe('payedState should be tested', () => {
106
- it('payedState.payed should be tested', () => {
107
- (0, core_1.expect)(types_1.Localization.shared.payedState.payed.value()).toBeEqual('Bezahlt');
108
- });
109
- it('payedState.payed should be formatted correctly', () => {
110
- (0, core_1.expect)(types_1.PayedState.formatted('payed')).toBeEqual('Bezahlt');
111
- });
112
- it('payedState.notPayed should be tested', () => {
113
- (0, core_1.expect)(types_1.Localization.shared.payedState.notPayed.value()).toBeEqual('Offen');
114
- });
115
- it('payedState.notPayed should be formatted correctly', () => {
116
- (0, core_1.expect)(types_1.PayedState.formatted('notPayed')).toBeEqual('Offen');
117
- });
118
- });
119
- describe('userRole should be tested', () => {
120
- it('userRole.personManager should be tested', () => {
121
- (0, core_1.expect)(types_1.Localization.shared.userRole.personManager.value()).toBeEqual('Personenmanager');
122
- });
123
- it('userRole.personManager should be formatted correctly', () => {
124
- (0, core_1.expect)(types_1.UserRole.formatted('person-manager')).toBeEqual('Personenmanager');
125
- });
126
- it('userRole.fineTemplateManager should be tested', () => {
127
- (0, core_1.expect)(types_1.Localization.shared.userRole.fineTemplateManager.value()).toBeEqual('Strafvorlagenmanager');
128
- });
129
- it('userRole.fineTemplateManager should be formatted correctly', () => {
130
- (0, core_1.expect)(types_1.UserRole.formatted('fineTemplate-manager')).toBeEqual('Strafvorlagenmanager');
131
- });
132
- it('userRole.fineManager should be tested', () => {
133
- (0, core_1.expect)(types_1.Localization.shared.userRole.fineManager.value()).toBeEqual('Strafenmanager');
134
- });
135
- it('userRole.fineManager should be formatted correctly', () => {
136
- (0, core_1.expect)(types_1.UserRole.formatted('fine-manager')).toBeEqual('Strafenmanager');
137
- });
138
- it('userRole.fineCanAdd should be tested', () => {
139
- (0, core_1.expect)(types_1.Localization.shared.userRole.fineCanAdd.value()).toBeEqual('Kann Strafen hinzufügen');
140
- });
141
- it('userRole.fineCanAdd should be formatted correctly', () => {
142
- (0, core_1.expect)(types_1.UserRole.formatted('fine-can-add')).toBeEqual('Kann Strafen hinzufügen');
143
- });
144
- it('userRole.teamManager should be tested', () => {
145
- (0, core_1.expect)(types_1.Localization.shared.userRole.teamManager.value()).toBeEqual('Teammanager');
146
- });
147
- it('userRole.teamManager should be formatted correctly', () => {
148
- (0, core_1.expect)(types_1.UserRole.formatted('team-manager')).toBeEqual('Teammanager');
149
- });
150
- });
151
- });
@@ -1,145 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const core_1 = require("@assertive-ts/core");
4
- const types_1 = require("../src/types");
5
- describe('Localization for en', () => {
6
- before(() => {
7
- types_1.Localization.locale = 'en';
8
- });
9
- describe('notification.fine should be tested', () => {
10
- it('notification.fine.new should be tested', () => {
11
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.new.title.value({ reason: 'fine-reason' })).toBeEqual('fine-reason');
12
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.new.body.value({ amount: '10.50 €' })).toBeEqual('You have a new fine of 10.50 €. Please pay it as soon as possible.');
13
- });
14
- it('notification.fine.reminder should be tested', () => {
15
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.reminder.title.value()).toBeEqual('You still have outstanding fines');
16
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.reminder.body.value({ amount: '10.50 €' })).toBeEqual('You still have 10.50 € outstanding. Please pay as soon as possible.');
17
- });
18
- it('notification.fine.stateChange should be tested', () => {
19
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.stateChange.title.value()).toBeEqual('One of your fines has changed');
20
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.stateChange.bodyPayed.value({ amount: '10.50 €', reason: 'fine-reason' })).toBeEqual('You have paid a fine of 10.50 € (fine-reason).');
21
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.stateChange.bodyUnpayed.value({ amount: '10.50 €', reason: 'fine-reason' })).toBeEqual('fine-reason, 10.50 € is still outstanding.');
22
- (0, core_1.expect)(types_1.Localization.shared.notification.fine.stateChange.bodyDeleted.value({ amount: '10.50 €', reason: 'fine-reason' })).toBeEqual('fine-reason, 10.50 € has been deleted.');
23
- });
24
- });
25
- describe('fineAmount should be tested', () => {
26
- it('fineAmount.item.type.crateOfBeer should be tested', () => {
27
- (0, core_1.expect)(types_1.Localization.shared.fineAmount.item.type.crateOfBeer.name.value()).toBeEqual('Crate of Beer');
28
- (0, core_1.expect)(types_1.Localization.shared.fineAmount.item.type.crateOfBeer.withCount.value(1)).toBeEqual('a crate of beer');
29
- (0, core_1.expect)(types_1.Localization.shared.fineAmount.item.type.crateOfBeer.withCount.value(4)).toBeEqual('4 crates of beer');
30
- (0, core_1.expect)(types_1.Localization.shared.fineAmount.item.type.crateOfBeer.withoutCount.value(1)).toBeEqual('Crate of Beer');
31
- (0, core_1.expect)(types_1.Localization.shared.fineAmount.item.type.crateOfBeer.withoutCount.value(4)).toBeEqual('Crates of Beer');
32
- });
33
- it('fineAmount.item.type.crateOfBeer should be formatted correctly', () => {
34
- (0, core_1.expect)(types_1.FineAmount.Item.Type.formatted('crateOfBeer')).toBeEqual('Crate of Beer');
35
- (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 1).formatted()).toBeEqual('a crate of beer');
36
- (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 4).formatted()).toBeEqual('4 crates of beer');
37
- (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 1).formattedWithoutCount()).toBeEqual('Crate of Beer');
38
- (0, core_1.expect)(new types_1.FineAmount.Item('crateOfBeer', 4).formattedWithoutCount()).toBeEqual('Crates of Beer');
39
- });
40
- });
41
- describe('fineTemplateRepetition should be tested', () => {
42
- it('fineTemplateRepetition.item.minute should be tested', () => {
43
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.minute.name.value()).toBeEqual('Minute');
44
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.minute.withCount.value(1)).toBeEqual('1 minute');
45
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.minute.withCount.value(4)).toBeEqual('4 minutes');
46
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.minute.withoutCount.value(1)).toBeEqual('minute');
47
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.minute.withoutCount.value(4)).toBeEqual('minutes');
48
- });
49
- it('fineTemplateRepetition.item.minute should be formatted correctly', () => {
50
- (0, core_1.expect)(types_1.FineTemplateRepetition.Item.formatted('minute')).toBeEqual('Minute');
51
- (0, core_1.expect)(new types_1.FineTemplateRepetition('minute', null).formatted(1)).toBeEqual('1 minute');
52
- (0, core_1.expect)(new types_1.FineTemplateRepetition('minute', null).formatted(4)).toBeEqual('4 minutes');
53
- (0, core_1.expect)(new types_1.FineTemplateRepetition('minute', null).formattedWithoutCount(1)).toBeEqual('minute');
54
- (0, core_1.expect)(new types_1.FineTemplateRepetition('minute', null).formattedWithoutCount(4)).toBeEqual('minutes');
55
- });
56
- it('fineTemplateRepetition.item.day should be tested', () => {
57
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.day.name.value()).toBeEqual('Day');
58
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.day.withCount.value(1)).toBeEqual('1 day');
59
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.day.withCount.value(4)).toBeEqual('4 days');
60
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.day.withoutCount.value(1)).toBeEqual('day');
61
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.day.withoutCount.value(4)).toBeEqual('days');
62
- });
63
- it('fineTemplateRepetition.item.day should be formatted correctly', () => {
64
- (0, core_1.expect)(types_1.FineTemplateRepetition.Item.formatted('day')).toBeEqual('Day');
65
- (0, core_1.expect)(new types_1.FineTemplateRepetition('day', null).formatted(1)).toBeEqual('1 day');
66
- (0, core_1.expect)(new types_1.FineTemplateRepetition('day', null).formatted(4)).toBeEqual('4 days');
67
- (0, core_1.expect)(new types_1.FineTemplateRepetition('day', null).formattedWithoutCount(1)).toBeEqual('day');
68
- (0, core_1.expect)(new types_1.FineTemplateRepetition('day', null).formattedWithoutCount(4)).toBeEqual('days');
69
- });
70
- it('fineTemplateRepetition.item.item should be tested', () => {
71
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.item.name.value()).toBeEqual('Item');
72
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.item.withCount.value(1)).toBeEqual('1 item');
73
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.item.withCount.value(4)).toBeEqual('4 items');
74
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.item.withoutCount.value(1)).toBeEqual('item');
75
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.item.withoutCount.value(4)).toBeEqual('items');
76
- });
77
- it('fineTemplateRepetition.item.item should be formatted correctly', () => {
78
- (0, core_1.expect)(types_1.FineTemplateRepetition.Item.formatted('item')).toBeEqual('Item');
79
- (0, core_1.expect)(new types_1.FineTemplateRepetition('item', null).formatted(1)).toBeEqual('1 item');
80
- (0, core_1.expect)(new types_1.FineTemplateRepetition('item', null).formatted(4)).toBeEqual('4 items');
81
- (0, core_1.expect)(new types_1.FineTemplateRepetition('item', null).formattedWithoutCount(1)).toBeEqual('item');
82
- (0, core_1.expect)(new types_1.FineTemplateRepetition('item', null).formattedWithoutCount(4)).toBeEqual('items');
83
- });
84
- it('fineTemplateRepetition.item.count should be tested', () => {
85
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.count.name.value()).toBeEqual('Count');
86
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.count.withCount.value(1)).toBeEqual('1 time');
87
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.count.withCount.value(4)).toBeEqual('4 times');
88
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.count.withoutCount.value(1)).toBeEqual('time');
89
- (0, core_1.expect)(types_1.Localization.shared.fineTemplateRepetition.item.count.withoutCount.value(4)).toBeEqual('times');
90
- });
91
- it('fineTemplateRepetition.item.count should be formatted correctly', () => {
92
- (0, core_1.expect)(types_1.FineTemplateRepetition.Item.formatted('count')).toBeEqual('Count');
93
- (0, core_1.expect)(new types_1.FineTemplateRepetition('count', null).formatted(1)).toBeEqual('1 time');
94
- (0, core_1.expect)(new types_1.FineTemplateRepetition('count', null).formatted(4)).toBeEqual('4 times');
95
- (0, core_1.expect)(new types_1.FineTemplateRepetition('count', null).formattedWithoutCount(1)).toBeEqual('time');
96
- (0, core_1.expect)(new types_1.FineTemplateRepetition('count', null).formattedWithoutCount(4)).toBeEqual('times');
97
- });
98
- });
99
- describe('payedState should be tested', () => {
100
- it('payedState.payed should be tested', () => {
101
- (0, core_1.expect)(types_1.Localization.shared.payedState.payed.value()).toBeEqual('Paid');
102
- });
103
- it('payedState.payed should be formatted correctly', () => {
104
- (0, core_1.expect)(types_1.PayedState.formatted('payed')).toBeEqual('Paid');
105
- });
106
- it('payedState.notPayed should be tested', () => {
107
- (0, core_1.expect)(types_1.Localization.shared.payedState.notPayed.value()).toBeEqual('Outstanding');
108
- });
109
- it('payedState.notPayed should be formatted correctly', () => {
110
- (0, core_1.expect)(types_1.PayedState.formatted('notPayed')).toBeEqual('Outstanding');
111
- });
112
- });
113
- describe('userRole should be tested', () => {
114
- it('userRole.personManager should be tested', () => {
115
- (0, core_1.expect)(types_1.Localization.shared.userRole.personManager.value()).toBeEqual('Person Manager');
116
- });
117
- it('userRole.personManager should be formatted correctly', () => {
118
- (0, core_1.expect)(types_1.UserRole.formatted('person-manager')).toBeEqual('Person Manager');
119
- });
120
- it('userRole.fineTemplateManager should be tested', () => {
121
- (0, core_1.expect)(types_1.Localization.shared.userRole.fineTemplateManager.value()).toBeEqual('Fine Template Manager');
122
- });
123
- it('userRole.fineTemplateManager should be formatted correctly', () => {
124
- (0, core_1.expect)(types_1.UserRole.formatted('fineTemplate-manager')).toBeEqual('Fine Template Manager');
125
- });
126
- it('userRole.fineManager should be tested', () => {
127
- (0, core_1.expect)(types_1.Localization.shared.userRole.fineManager.value()).toBeEqual('Fine Manager');
128
- });
129
- it('userRole.fineManager should be formatted correctly', () => {
130
- (0, core_1.expect)(types_1.UserRole.formatted('fine-manager')).toBeEqual('Fine Manager');
131
- });
132
- it('userRole.fineCanAdd should be tested', () => {
133
- (0, core_1.expect)(types_1.Localization.shared.userRole.fineCanAdd.value()).toBeEqual('Can add fines');
134
- });
135
- it('userRole.fineCanAdd should be formatted correctly', () => {
136
- (0, core_1.expect)(types_1.UserRole.formatted('fine-can-add')).toBeEqual('Can add fines');
137
- });
138
- it('userRole.teamManager should be tested', () => {
139
- (0, core_1.expect)(types_1.Localization.shared.userRole.teamManager.value()).toBeEqual('Team Manager');
140
- });
141
- it('userRole.teamManager should be formatted correctly', () => {
142
- (0, core_1.expect)(types_1.UserRole.formatted('team-manager')).toBeEqual('Team Manager');
143
- });
144
- });
145
- });
package/src/Firestore.ts DELETED
@@ -1,75 +0,0 @@
1
- import { FirestoreCollection, FirestoreDocument } from '@stevenkellner/firebase-function';
2
- import { FirestoreScheme } from './FirestoreScheme';
3
- import { Fine, FineTemplate, Invitation, Person, User, Team } from './types';
4
- import { FirebaseConfiguration } from './firebase';
5
-
6
- export class Firestore {
7
-
8
- protected base: FirestoreScheme;
9
-
10
- protected constructor() {
11
- this.base = FirebaseConfiguration.shared.baseFirestoreDocument;
12
- }
13
-
14
- private static sharedInstance: Firestore | null = null;
15
-
16
- public static get shared(): Firestore {
17
- if (!Firestore.sharedInstance)
18
- Firestore.sharedInstance = new Firestore();
19
- return Firestore.sharedInstance;
20
- }
21
-
22
- public team(id: Team.Id): FirestoreDocument<Team> {
23
- return this.base
24
- .collection('teams')
25
- .document(id.guidString) as FirestoreDocument<Team>;
26
- }
27
-
28
- public user(id: User.Id): FirestoreDocument<User> {
29
- return this.base
30
- .collection('users')
31
- .document(id.value);
32
- }
33
-
34
- public invitation(id: Invitation.Id): FirestoreDocument<Invitation> {
35
- return this.base
36
- .collection('invitations')
37
- .document(id.value);
38
- }
39
-
40
- public persons(teamId: Team.Id): FirestoreCollection<{ [x: string]: FirestoreDocument<Person, never>; }> {
41
- return this.base
42
- .collection('teams')
43
- .document(teamId.guidString)
44
- .collection('persons');
45
- }
46
-
47
- public person(teamId: Team.Id, id: Person.Id): FirestoreDocument<Person> {
48
- return this.persons(teamId)
49
- .document(id.guidString);
50
- }
51
-
52
- public fineTemplates(teamId: Team.Id): FirestoreCollection<{ [x: string]: FirestoreDocument<FineTemplate, never>; }> {
53
- return this.base
54
- .collection('teams')
55
- .document(teamId.guidString)
56
- .collection('fineTemplates');
57
- }
58
-
59
- public fineTemplate(teamId: Team.Id, id: FineTemplate.Id): FirestoreDocument<FineTemplate> {
60
- return this.fineTemplates(teamId)
61
- .document(id.guidString);
62
- }
63
-
64
- public fines(teamId: Team.Id): FirestoreCollection<{ [x: string]: FirestoreDocument<Fine, never>; }> {
65
- return this.base
66
- .collection('teams')
67
- .document(teamId.guidString)
68
- .collection('fines');
69
- }
70
-
71
- public fine(teamId: Team.Id, id: Fine.Id): FirestoreDocument<Fine> {
72
- return this.fines(teamId)
73
- .document(id.guidString);
74
- }
75
- }
@@ -1,48 +0,0 @@
1
- import { FirebaseFunctionsContext } from '@stevenkellner/firebase-function';
2
- import { TeamNewFunction,
3
- UserKickoutFunction, UserLoginFunction, UserRoleEditFunction,
4
- PaypalMeEditFunction, NotificationRegisterFunction, NotificationSubscribeFunction,
5
- InvitationInviteFunction, InvitationWithdrawFunction, InvitationGetInvitationFunction, InvitationRegisterFunction,
6
- PersonAddFunction, PersonDeleteFunction, PersonUpdateFunction,
7
- FineTemplateAddFunction, FineTemplateDeleteFunction, FineTemplateUpdateFunction,
8
- FineAddFunction, FineDeleteFunction, FineUpdateFunction
9
- } from './functions';
10
-
11
- export const firebaseFunctionsContext = FirebaseFunctionsContext.build(builder => ({
12
- team: {
13
- new: builder.function(TeamNewFunction)
14
- },
15
- user: {
16
- kickout: builder.function(UserKickoutFunction),
17
- login: builder.function(UserLoginFunction),
18
- roleEdit: builder.function(UserRoleEditFunction)
19
- },
20
- paypalMe: {
21
- edit: builder.function(PaypalMeEditFunction)
22
- },
23
- notification: {
24
- register: builder.function(NotificationRegisterFunction),
25
- subscribe: builder.function(NotificationSubscribeFunction)
26
- },
27
- invitation: {
28
- invite: builder.function(InvitationInviteFunction),
29
- withdraw: builder.function(InvitationWithdrawFunction),
30
- getInvitation: builder.function(InvitationGetInvitationFunction),
31
- register: builder.function(InvitationRegisterFunction)
32
- },
33
- person: {
34
- add: builder.function(PersonAddFunction),
35
- update: builder.function(PersonUpdateFunction),
36
- delete: builder.function(PersonDeleteFunction)
37
- },
38
- fineTemplate: {
39
- add: builder.function(FineTemplateAddFunction),
40
- update: builder.function(FineTemplateUpdateFunction),
41
- delete: builder.function(FineTemplateDeleteFunction)
42
- },
43
- fine: {
44
- add: builder.function(FineAddFunction),
45
- update: builder.function(FineUpdateFunction),
46
- delete: builder.function(FineDeleteFunction)
47
- }
48
- }));
@@ -1,37 +0,0 @@
1
- import { Dictionary } from '@stevenkellner/typescript-common-functionality';
2
- import { Firestore } from './Firestore';
3
- import { NotificationProperties, Person, Team } from './types';
4
- import { FirebaseConfiguration, BatchResponse, Notification } from './firebase';
5
-
6
- function successfulTokens(response: BatchResponse, tokens: string[]): Dictionary<NotificationProperties.TokenId, string> {
7
- const successfulTokens = response.responses
8
- .map((response, index) => ({
9
- failed: response.error?.code ==='messaging/invalid-registration-token' || response.error?.code === 'messaging/registration-token-not-registered',
10
- token: tokens[index]
11
- }))
12
- .filter(response => !response.failed)
13
- .map(response => response.token);
14
- const tokenDict = new Dictionary<NotificationProperties.TokenId, string>(NotificationProperties.TokenId.builder);
15
- for (const token of successfulTokens)
16
- tokenDict.set(NotificationProperties.TokenId.create(token), token);
17
- return tokenDict;
18
- }
19
-
20
- export async function pushNotification(teamId: Team.Id, personId: Person.Id, topic: NotificationProperties.Subscription, notification: Notification): Promise<void> {
21
-
22
- const personSnapshot = await Firestore.shared.person(teamId, personId).snapshot();
23
- if (!personSnapshot.exists)
24
- return;
25
- const person = Person.builder.build(personSnapshot.data);
26
-
27
- if (person.signInProperties === null || !person.signInProperties.notificationProperties.subscriptions.includes(topic))
28
- return;
29
-
30
- const tokens = person.signInProperties.notificationProperties.tokens.values;
31
- const response = await FirebaseConfiguration.shared.messaging.sendEachForMulticast({
32
- tokens: tokens,
33
- notification: notification
34
- });
35
- person.signInProperties.notificationProperties.tokens = successfulTokens(response, tokens);
36
- await Firestore.shared.person(teamId, personId).set(person);
37
- }