@stevenkellner/team-conduct-api 1.0.1 → 1.0.3
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/index.ts +1 -0
- package/lib/index.js +1 -1
- package/package.json +6 -33
- package/src/Firestore.ts +2 -2
- package/src/firebase/FirebaseConfiguration.ts +39 -0
- package/src/firebase/Messaging.ts +29 -0
- package/src/firebase/index.ts +2 -0
- package/src/functions/fine/update.ts +1 -1
- package/src/functions/notification/register.ts +1 -1
- package/src/pushNotification.ts +3 -4
- package/src/types/MoneyAmount.ts +4 -0
- package/tsconfig.json +110 -14
- package/.mocharc.js +0 -22
- package/.vscode/launch.json +0 -14
- package/LICENSE +0 -21
- package/src/index.ts +0 -24
- package/test/FirebaseApp.ts +0 -64
- package/test/FirebaseAuth.ts +0 -26
- package/test/FirebaseFirestore.ts +0 -20
- package/test/FirebaseFunctions.ts +0 -17
- package/test/RandomData.ts +0 -120
- package/test/createTestTeam.ts +0 -43
- package/test/firebase-rules.test.ts +0 -125
- package/test/functions/fine/add.test.ts +0 -52
- package/test/functions/fine/delete.test.ts +0 -50
- package/test/functions/fine/update.test.ts +0 -39
- package/test/functions/fineTemplate/add.test.ts +0 -35
- package/test/functions/fineTemplate/delete.test.ts +0 -33
- package/test/functions/fineTemplate/update.test.ts +0 -35
- package/test/functions/invitation/invite.test.ts +0 -48
- package/test/functions/invitation/register.test.ts +0 -137
- package/test/functions/invitation/withdraw.test.ts +0 -33
- package/test/functions/notifcation/register.test.ts +0 -47
- package/test/functions/notifcation/subscribe.test.ts +0 -46
- package/test/functions/paypalMe/edit.test.ts +0 -42
- package/test/functions/person/add.test.ts +0 -39
- package/test/functions/person/delete.test.ts +0 -41
- package/test/functions/person/update.test.ts +0 -39
- package/test/functions/team/new.test.ts +0 -139
- package/test/functions/user/login.test.ts +0 -37
- package/test/functions/user/roleEdit.test.ts +0 -47
- package/test/testTeams/testTeam1.ts +0 -63
- package/test/waitForEmulator.ts +0 -11
- package/tsconfig.dev.json +0 -5
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Tagged, UtcDate } from '@stevenkellner/typescript-common-functionality';
|
|
2
|
-
import { MoneyAmount, Fine, FineAmount, Person, PersonPrivateProperties, FineTemplate, FineTemplateRepetition } from '../../src/types';
|
|
3
|
-
import { TestTeam } from '../createTestTeam';
|
|
4
|
-
|
|
5
|
-
const fineIds: [Fine.Id, Fine.Id, Fine.Id] = [
|
|
6
|
-
Tagged.generate('fine'),
|
|
7
|
-
Tagged.generate('fine'),
|
|
8
|
-
Tagged.generate('fine')
|
|
9
|
-
];
|
|
10
|
-
|
|
11
|
-
export const testTeam1: TestTeam = {
|
|
12
|
-
id: Tagged.generate('team'),
|
|
13
|
-
name: 'Test Team 1',
|
|
14
|
-
persons: [
|
|
15
|
-
new Person(
|
|
16
|
-
Tagged.generate('person'),
|
|
17
|
-
new PersonPrivateProperties('John', 'Doe'),
|
|
18
|
-
[fineIds[0], fineIds[1]]
|
|
19
|
-
),
|
|
20
|
-
new Person(
|
|
21
|
-
Tagged.generate('person'),
|
|
22
|
-
new PersonPrivateProperties('Max', 'Mustermann'),
|
|
23
|
-
[fineIds[2]]
|
|
24
|
-
)
|
|
25
|
-
],
|
|
26
|
-
fineTemplates: [
|
|
27
|
-
new FineTemplate(
|
|
28
|
-
Tagged.generate('fineTemplate'),
|
|
29
|
-
'Fine Template 1',
|
|
30
|
-
FineAmount.money(new MoneyAmount(10, 50)),
|
|
31
|
-
null
|
|
32
|
-
),
|
|
33
|
-
new FineTemplate(
|
|
34
|
-
Tagged.generate('fineTemplate'),
|
|
35
|
-
'Fine Template 2',
|
|
36
|
-
FineAmount.item('crateOfBeer', 1),
|
|
37
|
-
new FineTemplateRepetition('day', 3)
|
|
38
|
-
)
|
|
39
|
-
],
|
|
40
|
-
fines: [
|
|
41
|
-
new Fine(
|
|
42
|
-
fineIds[0],
|
|
43
|
-
'notPayed',
|
|
44
|
-
UtcDate.now,
|
|
45
|
-
'Fine 1',
|
|
46
|
-
FineAmount.money(new MoneyAmount(10, 50))
|
|
47
|
-
),
|
|
48
|
-
new Fine(
|
|
49
|
-
fineIds[1],
|
|
50
|
-
'payed',
|
|
51
|
-
UtcDate.now,
|
|
52
|
-
'Fine 2',
|
|
53
|
-
FineAmount.item('crateOfBeer', 2)
|
|
54
|
-
),
|
|
55
|
-
new Fine(
|
|
56
|
-
fineIds[2],
|
|
57
|
-
'notPayed',
|
|
58
|
-
UtcDate.now,
|
|
59
|
-
'Fine 3',
|
|
60
|
-
FineAmount.money(new MoneyAmount(5, 0))
|
|
61
|
-
)
|
|
62
|
-
]
|
|
63
|
-
};
|
package/test/waitForEmulator.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { waitUntilUsed } from 'tcp-port-used';
|
|
2
|
-
|
|
3
|
-
async function waitForEmulators(): Promise<void> {
|
|
4
|
-
await waitUntilUsed(5001, 500, 60000);
|
|
5
|
-
await waitUntilUsed(8080, 500, 60000);
|
|
6
|
-
await new Promise(resolve => {
|
|
7
|
-
setTimeout(resolve, 5000);
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
void waitForEmulators();
|