Skip to content

Commit d9082d5

Browse files
Merge remote-tracking branch 'origin/main' into tool-3337
2 parents 19a0c14 + 636788b commit d9082d5

File tree

64 files changed

+58521
-675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+58521
-675
lines changed

.changeset/fruity-suits-relax.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/grumpy-carpets-sniff.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
uses: ./.github/composite-actions/install
8282

8383
- name: Set up foundry
84-
uses: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c # v1.3.1
84+
uses: foundry-rs/foundry-toolchain@82dee4ba654bd2146511f85f0d013af94670c4de # v1.4.0
8585
with:
8686
cache: false
8787
version: nightly-c4a984fbf2c48b793c8cd53af84f56009dd1070c

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646

4747
# Initializes the CodeQL tools for scanning.
4848
- name: Initialize CodeQL
49-
uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
49+
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
5050
with:
5151
languages: ${{ matrix.language }}
5252
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -59,7 +59,7 @@ jobs:
5959
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6060
# If this step fails, then you should remove it and run the build manually (see below)
6161
- name: Autobuild
62-
uses: github/codeql-action/autobuild@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
62+
uses: github/codeql-action/autobuild@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
6363

6464
# ℹ️ Command-line programs to run using the OS shell.
6565
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -72,4 +72,4 @@ jobs:
7272
# ./location_of_script_within_repo/buildscript.sh
7373

7474
- name: Perform CodeQL Analysis
75-
uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
75+
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16

apps/dashboard/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@
6161
"color": "5.0.0",
6262
"compare-versions": "^6.1.0",
6363
"date-fns": "4.1.0",
64-
"fast-xml-parser": "^5.2.0",
64+
"fast-xml-parser": "^5.2.1",
6565
"fetch-event-stream": "0.1.5",
6666
"flat": "^6.0.1",
67-
"framer-motion": "12.5.0",
67+
"framer-motion": "12.9.2",
6868
"fuse.js": "7.1.0",
6969
"idb-keyval": "^6.2.1",
7070
"input-otp": "^1.4.1",
@@ -131,7 +131,7 @@
131131
"@types/react-dom": "19.1.2",
132132
"@types/react-table": "^7.7.20",
133133
"@types/spdx-correct": "^3.1.3",
134-
"@types/swagger-ui-react": "^4.19.0",
134+
"@types/swagger-ui-react": "^5.18.0",
135135
"@typescript-eslint/eslint-plugin": "7.14.1",
136136
"@typescript-eslint/parser": "7.14.1",
137137
"autoprefixer": "^10.4.21",
Lines changed: 1 addition & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,7 @@
11
"use server";
2-
import "server-only";
32

4-
import { API_SERVER_URL } from "@/constants/env";
53
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
6-
import type { ProductSKU } from "../lib/billing";
7-
8-
export type GetBillingCheckoutUrlOptions = {
9-
teamSlug: string;
10-
sku: ProductSKU;
11-
redirectUrl: string;
12-
metadata?: Record<string, string>;
13-
};
14-
15-
export async function getBillingCheckoutUrl(
16-
options: GetBillingCheckoutUrlOptions,
17-
): Promise<{ status: number; url?: string }> {
18-
if (!options.teamSlug) {
19-
return {
20-
status: 400,
21-
};
22-
}
23-
const token = await getAuthToken();
24-
25-
if (!token) {
26-
return {
27-
status: 401,
28-
};
29-
}
30-
31-
const res = await fetch(
32-
`${API_SERVER_URL}/v1/teams/${options.teamSlug}/checkout/create-link`,
33-
{
34-
method: "POST",
35-
body: JSON.stringify({
36-
sku: options.sku,
37-
redirectTo: options.redirectUrl,
38-
metadata: options.metadata || {},
39-
}),
40-
headers: {
41-
"Content-Type": "application/json",
42-
Authorization: `Bearer ${token}`,
43-
},
44-
},
45-
);
46-
if (!res.ok) {
47-
return {
48-
status: res.status,
49-
};
50-
}
51-
52-
const json = await res.json();
53-
if (!json.result) {
54-
return {
55-
status: 500,
56-
};
57-
}
58-
59-
return {
60-
status: 200,
61-
url: json.result as string,
62-
};
63-
}
64-
65-
export type GetBillingCheckoutUrlAction = typeof getBillingCheckoutUrl;
66-
67-
export async function getPlanCancelUrl(options: {
68-
teamId: string;
69-
redirectUrl: string;
70-
}): Promise<{ status: number; url?: string }> {
71-
const token = await getAuthToken();
72-
if (!token) {
73-
return {
74-
status: 401,
75-
};
76-
}
77-
78-
const res = await fetch(
79-
`${API_SERVER_URL}/v1/teams/${options.teamId}/checkout/cancel-plan-link`,
80-
{
81-
method: "POST",
82-
headers: {
83-
"Content-Type": "application/json",
84-
Authorization: `Bearer ${token}`,
85-
},
86-
body: JSON.stringify({
87-
redirectTo: options.redirectUrl,
88-
}),
89-
},
90-
);
91-
92-
if (!res.ok) {
93-
return {
94-
status: res.status,
95-
};
96-
}
97-
98-
const json = await res.json();
99-
100-
if (!json.result) {
101-
return {
102-
status: 500,
103-
};
104-
}
105-
106-
return {
107-
status: 200,
108-
url: json.result as string,
109-
};
110-
}
4+
import { API_SERVER_URL } from "../constants/env";
1115

1126
export async function reSubscribePlan(options: {
1137
teamId: string;
@@ -141,58 +35,3 @@ export async function reSubscribePlan(options: {
14135
status: 200,
14236
};
14337
}
144-
export type GetBillingPortalUrlOptions = {
145-
teamSlug: string | undefined;
146-
redirectUrl: string;
147-
};
148-
149-
export async function getBillingPortalUrl(
150-
options: GetBillingPortalUrlOptions,
151-
): Promise<{ status: number; url?: string }> {
152-
if (!options.teamSlug) {
153-
return {
154-
status: 400,
155-
};
156-
}
157-
const token = await getAuthToken();
158-
if (!token) {
159-
return {
160-
status: 401,
161-
};
162-
}
163-
164-
const res = await fetch(
165-
`${API_SERVER_URL}/v1/teams/${options.teamSlug}/checkout/create-session-link`,
166-
{
167-
method: "POST",
168-
body: JSON.stringify({
169-
redirectTo: options.redirectUrl,
170-
}),
171-
headers: {
172-
"Content-Type": "application/json",
173-
Authorization: `Bearer ${token}`,
174-
},
175-
},
176-
);
177-
178-
if (!res.ok) {
179-
return {
180-
status: res.status,
181-
};
182-
}
183-
184-
const json = await res.json();
185-
186-
if (!json.result) {
187-
return {
188-
status: 500,
189-
};
190-
}
191-
192-
return {
193-
status: 200,
194-
url: json.result as string,
195-
};
196-
}
197-
198-
export type GetBillingPortalUrlAction = typeof getBillingPortalUrl;

0 commit comments

Comments
 (0)