@stamhoofd/backend 2.77.5 → 2.78.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/.env.ci.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"environment": "test",
|
|
3
|
+
"domains": {
|
|
4
|
+
"dashboard": "dashboard.stamhoofd.dev",
|
|
5
|
+
"registration": {
|
|
6
|
+
"": "stamhoofd.dev",
|
|
7
|
+
"BE": "dev.stamhoofd.be",
|
|
8
|
+
"NL": "dev.stamhoofd.nl"
|
|
9
|
+
},
|
|
10
|
+
"webshop": "shop.stamhoofd.dev",
|
|
11
|
+
"api": "api.stamhoofd.dev"
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
"PORT": 9091,
|
|
15
|
+
"DB_HOST": "127.0.0.1",
|
|
16
|
+
"DB_USER": "root",
|
|
17
|
+
"DB_PASS": "root",
|
|
18
|
+
"DB_DATABASE": "stamhoofd",
|
|
19
|
+
|
|
20
|
+
"SMTP_HOST": "email-smtp.eu-west-1.amazonaws.com",
|
|
21
|
+
"SMTP_USERNAME": "test",
|
|
22
|
+
"SMTP_PASSWORD": "test",
|
|
23
|
+
"SMTP_PORT": 587,
|
|
24
|
+
|
|
25
|
+
"AWS_ACCESS_KEY_ID": "",
|
|
26
|
+
"AWS_SECRET_ACCESS_KEY": "",
|
|
27
|
+
"AWS_REGION": "",
|
|
28
|
+
|
|
29
|
+
"SPACES_ENDPOINT": "ams3.digitaloceanspaces.com",
|
|
30
|
+
"SPACES_BUCKET": "stamhoofd",
|
|
31
|
+
"SPACES_KEY": "",
|
|
32
|
+
"SPACES_SECRET": "",
|
|
33
|
+
|
|
34
|
+
"INTERNAL_SECRET_KEY": "test",
|
|
35
|
+
|
|
36
|
+
"STRIPE_SECRET_KEY": "test",
|
|
37
|
+
"STRIPE_ENDPOINT_SECRET": "test",
|
|
38
|
+
"translationNamespace": "digit",
|
|
39
|
+
"platformName": "ravot",
|
|
40
|
+
"userMode": "organization",
|
|
41
|
+
"WHITELISTED_EMAIL_DESTINATIONS": []
|
|
42
|
+
}
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stamhoofd/backend",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.78.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"@simonbackx/simple-encoding": "2.20.0",
|
|
38
38
|
"@simonbackx/simple-endpoints": "1.19.1",
|
|
39
39
|
"@simonbackx/simple-logging": "^1.0.1",
|
|
40
|
-
"@stamhoofd/backend-i18n": "2.
|
|
41
|
-
"@stamhoofd/backend-middleware": "2.
|
|
42
|
-
"@stamhoofd/email": "2.
|
|
43
|
-
"@stamhoofd/models": "2.
|
|
44
|
-
"@stamhoofd/queues": "2.
|
|
45
|
-
"@stamhoofd/sql": "2.
|
|
46
|
-
"@stamhoofd/structures": "2.
|
|
47
|
-
"@stamhoofd/utility": "2.
|
|
40
|
+
"@stamhoofd/backend-i18n": "2.78.0",
|
|
41
|
+
"@stamhoofd/backend-middleware": "2.78.0",
|
|
42
|
+
"@stamhoofd/email": "2.78.0",
|
|
43
|
+
"@stamhoofd/models": "2.78.0",
|
|
44
|
+
"@stamhoofd/queues": "2.78.0",
|
|
45
|
+
"@stamhoofd/sql": "2.78.0",
|
|
46
|
+
"@stamhoofd/structures": "2.78.0",
|
|
47
|
+
"@stamhoofd/utility": "2.78.0",
|
|
48
48
|
"archiver": "^7.0.1",
|
|
49
49
|
"aws-sdk": "^2.885.0",
|
|
50
50
|
"axios": "1.6.8",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "7dedb2d33af820a18f9a246d2ab44016ea4fcff5"
|
|
68
68
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DecodedRequest, Endpoint, Request, Response } from '@simonbackx/simple-endpoints';
|
|
2
|
-
import { CachedBalance,
|
|
3
|
-
import {
|
|
2
|
+
import { CachedBalance, Organization } from '@stamhoofd/models';
|
|
3
|
+
import { PayableBalance, PayableBalanceCollection } from '@stamhoofd/structures';
|
|
4
4
|
|
|
5
5
|
import { Formatter } from '@stamhoofd/utility';
|
|
6
6
|
import { AuthenticatedStructures } from '../../../helpers/AuthenticatedStructures';
|
|
@@ -31,9 +31,7 @@ export class GetUserPayableBalanceEndpoint extends Endpoint<Params, Query, Body,
|
|
|
31
31
|
const organization = await Context.setUserOrganizationScope();
|
|
32
32
|
const { user } = await Context.authenticate();
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return new Response(await GetUserPayableBalanceEndpoint.getBillingStatusForObjects([user.id, ...memberIds], organization));
|
|
34
|
+
return new Response(await GetUserPayableBalanceEndpoint.getBillingStatusForObjects([user.id], organization));
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
static async getBillingStatusForObjects(objectIds: string[], organization?: Organization | null) {
|