@antelopejs/dms-saas 0.0.1 → 0.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
CHANGED
|
@@ -137,9 +137,10 @@ provider registered before dms-saas is constructed is held and replayed on
|
|
|
137
137
|
attach, replayed again when dms-saas is reloaded, and dropped when the
|
|
138
138
|
registering module is unloaded.
|
|
139
139
|
|
|
140
|
-
The interface package must be released before dms-saas
|
|
141
|
-
|
|
142
|
-
the
|
|
140
|
+
The interface package must be released before dms-saas, which depends on it
|
|
141
|
+
through `>=<interface version> <1.0.0`; during workspace development pnpm
|
|
142
|
+
resolves that range to the sibling package. Release the interface package first,
|
|
143
|
+
then
|
|
143
144
|
release dms-saas, and update consumers to the published interface version.
|
|
144
145
|
|
|
145
146
|
### Public screens
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-saas",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@antelopejs/interface-database": ">=0.1.7 <1.0.0",
|
|
37
37
|
"@antelopejs/interface-database-decorators": ">=0.1.6 <1.0.0",
|
|
38
38
|
"@antelopejs/interface-dms": ">=0.0.1 <1.0.0",
|
|
39
|
+
"@antelopejs/interface-dms-saas": ">=0.0.2 <1.0.0",
|
|
39
40
|
"@antelopejs/interface-file-storage": ">=0.1.3 <1.0.0",
|
|
40
41
|
"node-cron": "^4.2.1",
|
|
41
42
|
"stripe": "^17.5.0",
|
|
42
|
-
"zod": "^3.24.4"
|
|
43
|
-
"@antelopejs/interface-dms-saas": "0.0.1"
|
|
43
|
+
"zod": "^3.24.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@antelopejs/core": "^1.4.11",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"verify:interface": "node scripts/verify-interface-package.cjs",
|
|
85
85
|
"test": "pnpm run build && pnpm --filter @antelopejs/interface-dms-saas run check:package-contract && pnpm run check:package-contract && pnpm run test:unit",
|
|
86
86
|
"test:unit": "vitest run",
|
|
87
|
-
"release": "pnpm --dir frontend-vue install --frozen-lockfile && pnpm run verify:interface && release-it",
|
|
87
|
+
"release": "pnpm --filter @antelopejs/interface-dms-saas build && pnpm --dir frontend-vue install --frozen-lockfile && pnpm run verify:interface && release-it",
|
|
88
88
|
"knip": "knip --dependencies",
|
|
89
89
|
"knip:all": "knip"
|
|
90
90
|
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
interface FinalizeBody {
|
|
2
|
-
tenant_assignment_token: string;
|
|
3
|
-
workspaceName: string;
|
|
4
|
-
planId: string;
|
|
5
|
-
customerType: "individual" | "business";
|
|
6
|
-
companyName?: string;
|
|
7
|
-
vatNumber?: string;
|
|
8
|
-
address?: {
|
|
9
|
-
line1?: string;
|
|
10
|
-
line2?: string;
|
|
11
|
-
postalCode?: string;
|
|
12
|
-
city?: string;
|
|
13
|
-
state?: string;
|
|
14
|
-
country?: string;
|
|
15
|
-
};
|
|
16
|
-
paymentMethodId: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface FinalizeResponse {
|
|
20
|
-
token_type: string;
|
|
21
|
-
access_token: string;
|
|
22
|
-
expires_in: number;
|
|
23
|
-
refresh_token: string;
|
|
24
|
-
user: {
|
|
25
|
-
_id: string;
|
|
26
|
-
email: string;
|
|
27
|
-
name: string;
|
|
28
|
-
language: string;
|
|
29
|
-
isValidated: boolean;
|
|
30
|
-
createdAt: Date;
|
|
31
|
-
updatedAt: Date;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export default defineEventHandler(async (event) => {
|
|
36
|
-
const config = useRuntimeConfig();
|
|
37
|
-
const baseURL = config.public.dms.baseURL;
|
|
38
|
-
const body = (await readBody(event)) as FinalizeBody;
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
const response = await $fetch<FinalizeResponse>(
|
|
42
|
-
`/api/saas/register/finalize`,
|
|
43
|
-
{
|
|
44
|
-
baseURL,
|
|
45
|
-
method: "POST",
|
|
46
|
-
body,
|
|
47
|
-
},
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
await replaceUserSession(event, {
|
|
51
|
-
user: response.user,
|
|
52
|
-
accessToken: response.access_token,
|
|
53
|
-
refreshToken: response.refresh_token,
|
|
54
|
-
activeTenantId: decodeJwtTenantId(response.access_token),
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
return response.user;
|
|
58
|
-
} catch (error: unknown) {
|
|
59
|
-
throwApiError(error);
|
|
60
|
-
}
|
|
61
|
-
});
|