@replicated/portal-components 0.0.23 → 0.0.25

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 (61) hide show
  1. package/components/metadata/registry.json +2 -2
  2. package/components/metadata/registry.md +2 -2
  3. package/dist/actions/branding-actions.d.mts +7 -0
  4. package/dist/actions/branding-actions.d.ts +7 -0
  5. package/dist/actions/branding-actions.js +394 -0
  6. package/dist/actions/branding-actions.js.map +1 -0
  7. package/dist/actions/index.js +0 -3
  8. package/dist/actions/index.js.map +1 -1
  9. package/dist/actions/invite-actions.d.mts +13 -0
  10. package/dist/actions/invite-actions.d.ts +13 -0
  11. package/dist/actions/invite-actions.js +527 -0
  12. package/dist/actions/invite-actions.js.map +1 -0
  13. package/dist/actions/magic-link-actions.d.mts +8 -0
  14. package/dist/actions/magic-link-actions.d.ts +8 -0
  15. package/dist/actions/magic-link-actions.js +478 -0
  16. package/dist/actions/magic-link-actions.js.map +1 -0
  17. package/dist/actions/trial-signup-actions.d.mts +7 -0
  18. package/dist/actions/trial-signup-actions.d.ts +7 -0
  19. package/dist/actions/trial-signup-actions.js +546 -0
  20. package/dist/actions/trial-signup-actions.js.map +1 -0
  21. package/dist/esm/actions/branding-actions.js +392 -0
  22. package/dist/esm/actions/branding-actions.js.map +1 -0
  23. package/dist/esm/actions/index.js +0 -3
  24. package/dist/esm/actions/index.js.map +1 -1
  25. package/dist/esm/actions/invite-actions.js +524 -0
  26. package/dist/esm/actions/invite-actions.js.map +1 -0
  27. package/dist/esm/actions/magic-link-actions.js +476 -0
  28. package/dist/esm/actions/magic-link-actions.js.map +1 -0
  29. package/dist/esm/actions/trial-signup-actions.js +544 -0
  30. package/dist/esm/actions/trial-signup-actions.js.map +1 -0
  31. package/dist/esm/index.js +2 -7
  32. package/dist/esm/index.js.map +1 -1
  33. package/dist/esm/logout-action.js +2 -3
  34. package/dist/esm/logout-action.js.map +1 -1
  35. package/dist/esm/logout-button.js +10 -7
  36. package/dist/esm/logout-button.js.map +1 -1
  37. package/dist/esm/use-verify-magic-link.js +74 -0
  38. package/dist/esm/use-verify-magic-link.js.map +1 -0
  39. package/dist/esm/utils/index.js +1 -6
  40. package/dist/esm/utils/index.js.map +1 -1
  41. package/dist/index.d.mts +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +1 -7
  44. package/dist/index.js.map +1 -1
  45. package/dist/logout-action.d.mts +5 -2
  46. package/dist/logout-action.d.ts +5 -2
  47. package/dist/logout-action.js +2 -3
  48. package/dist/logout-action.js.map +1 -1
  49. package/dist/logout-button.d.mts +4 -1
  50. package/dist/logout-button.d.ts +4 -1
  51. package/dist/logout-button.js +10 -7
  52. package/dist/logout-button.js.map +1 -1
  53. package/dist/use-verify-magic-link.d.mts +34 -0
  54. package/dist/use-verify-magic-link.d.ts +34 -0
  55. package/dist/use-verify-magic-link.js +76 -0
  56. package/dist/use-verify-magic-link.js.map +1 -0
  57. package/dist/utils/index.d.mts +1 -16
  58. package/dist/utils/index.d.ts +1 -16
  59. package/dist/utils/index.js +0 -6
  60. package/dist/utils/index.js.map +1 -1
  61. package/package.json +32 -2
@@ -0,0 +1,13 @@
1
+ interface AcceptInviteActionResult {
2
+ success: boolean;
3
+ message?: string;
4
+ isExpired?: boolean;
5
+ }
6
+ interface RefreshInviteActionResult {
7
+ success: boolean;
8
+ message?: string;
9
+ }
10
+ declare const acceptInviteWithCookie: (code: string) => Promise<AcceptInviteActionResult>;
11
+ declare const refreshInviteAction: (code: string) => Promise<RefreshInviteActionResult>;
12
+
13
+ export { type AcceptInviteActionResult, type RefreshInviteActionResult, acceptInviteWithCookie, refreshInviteAction };
@@ -0,0 +1,13 @@
1
+ interface AcceptInviteActionResult {
2
+ success: boolean;
3
+ message?: string;
4
+ isExpired?: boolean;
5
+ }
6
+ interface RefreshInviteActionResult {
7
+ success: boolean;
8
+ message?: string;
9
+ }
10
+ declare const acceptInviteWithCookie: (code: string) => Promise<AcceptInviteActionResult>;
11
+ declare const refreshInviteAction: (code: string) => Promise<RefreshInviteActionResult>;
12
+
13
+ export { type AcceptInviteActionResult, type RefreshInviteActionResult, acceptInviteWithCookie, refreshInviteAction };
@@ -0,0 +1,527 @@
1
+ "use server";
2
+ 'use strict';
3
+
4
+ var headers = require('next/headers');
5
+ var buffer = require('buffer');
6
+ var react = require('react');
7
+
8
+ /**
9
+ * Enterprise Portal Components
10
+ * This file is generated by tsup. Do not edit manually.
11
+ */
12
+ var __defProp = Object.defineProperty;
13
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
14
+ var __getOwnPropNames = Object.getOwnPropertyNames;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
17
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
18
+ }) : x)(function(x) {
19
+ if (typeof require !== "undefined") return require.apply(this, arguments);
20
+ throw Error('Dynamic require of "' + x + '" is not supported');
21
+ });
22
+ var __esm = (fn, res) => function __init() {
23
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
24
+ };
25
+ var __export = (target, all) => {
26
+ for (var name in all)
27
+ __defProp(target, name, { get: all[name], enumerable: true });
28
+ };
29
+ var __copyProps = (to, from, except, desc) => {
30
+ if (from && typeof from === "object" || typeof from === "function") {
31
+ for (let key of __getOwnPropNames(from))
32
+ if (!__hasOwnProp.call(to, key) && key !== except)
33
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
34
+ }
35
+ return to;
36
+ };
37
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
+
39
+ // datadog/tracer.ts
40
+ var tracer_exports = {};
41
+ __export(tracer_exports, {
42
+ default: () => tracer_default
43
+ });
44
+ var rawFlag, isEnabled, tracer, getRoutePattern, tracer_default;
45
+ var init_tracer = __esm({
46
+ "datadog/tracer.ts"() {
47
+ rawFlag = String(process.env.USE_DATADOG_APM || "").toLowerCase();
48
+ isEnabled = rawFlag === "true";
49
+ process.env.DD_TRACE_ENABLED = isEnabled ? "1" : "0";
50
+ tracer = null;
51
+ if (isEnabled) {
52
+ const serviceName = process.env.DD_SERVICE || "enterprise-portal";
53
+ const environment = process.env.DD_ENV || process.env.NODE_ENV || "development";
54
+ const version = process.env.DD_VERSION || process.env.NEXT_PUBLIC_VERSION || "0.0.0-dev";
55
+ const agentHost = process.env.DD_AGENT_HOST || process.env.DATADOG_AGENT_HOST || "127.0.0.1";
56
+ const agentPort = process.env.DD_TRACE_AGENT_PORT || "8126";
57
+ process.env.DD_SERVICE = serviceName;
58
+ process.env.DD_ENV = environment;
59
+ {
60
+ process.env.DD_VERSION = version;
61
+ }
62
+ process.env.DD_AGENT_HOST = agentHost;
63
+ process.env.DD_TRACE_AGENT_PORT = agentPort;
64
+ const dbmPropagationMode = process.env.DD_DBM_PROPAGATION_MODE || "full";
65
+ process.env.DD_DBM_PROPAGATION_MODE = dbmPropagationMode;
66
+ try {
67
+ const ddTrace = __require("dd-trace");
68
+ tracer = ddTrace.init({
69
+ service: serviceName,
70
+ env: environment,
71
+ version,
72
+ logInjection: true,
73
+ runtimeMetrics: true,
74
+ appsec: false,
75
+ profiling: false,
76
+ startupLogs: true
77
+ // Enable for debugging
78
+ });
79
+ console.log(`[datadog] Tracer initialized: service=${serviceName}, env=${environment}, version=${version}, agent=${agentHost}:${agentPort}`);
80
+ tracer.use("dns", false);
81
+ tracer.use("net", false);
82
+ tracer.use("http", {
83
+ server: {
84
+ hooks: {
85
+ request: (span, req) => {
86
+ if (!span) return;
87
+ const url = req?.url || "";
88
+ const method = req?.method || "GET";
89
+ const path = url.split("?")[0];
90
+ if (path.startsWith("/_next/")) {
91
+ span.context()._trace.isRecording = false;
92
+ return;
93
+ }
94
+ const routePattern = getRoutePattern(path);
95
+ span.setTag("resource.name", `${method} ${routePattern}`);
96
+ span.setTag("http.route", routePattern);
97
+ }
98
+ }
99
+ }
100
+ });
101
+ } catch (err) {
102
+ console.error("[datadog] failed to initialize tracing", err);
103
+ tracer = null;
104
+ }
105
+ }
106
+ getRoutePattern = (path) => {
107
+ const routePatterns = [
108
+ // Update instance routes - normalize dynamic segments (capture suffix to preserve sub-routes)
109
+ { pattern: /^\/update\/instance\/[^/]+(.*)$/, replacement: "/update/instance/[instanceId]$1" }
110
+ ];
111
+ for (const { pattern, replacement } of routePatterns) {
112
+ if (pattern.test(path)) {
113
+ return path.replace(pattern, replacement);
114
+ }
115
+ }
116
+ return path;
117
+ };
118
+ tracer_default = tracer;
119
+ }
120
+ });
121
+
122
+ // src/utils/observability/tracing.ts
123
+ var tracerCache = void 0;
124
+ function getTracer() {
125
+ if (tracerCache !== void 0) {
126
+ return tracerCache;
127
+ }
128
+ const rawFlag2 = String(process.env.USE_DATADOG_APM || "").toLowerCase();
129
+ const isEnabled2 = rawFlag2 === "true";
130
+ if (!isEnabled2) {
131
+ tracerCache = null;
132
+ return null;
133
+ }
134
+ try {
135
+ const tracerModule = (init_tracer(), __toCommonJS(tracer_exports));
136
+ const tracer2 = tracerModule.default || tracerModule;
137
+ if (tracer2 && typeof tracer2.trace === "function") {
138
+ tracerCache = tracer2;
139
+ return tracerCache;
140
+ }
141
+ } catch (err) {
142
+ console.warn("Failed to load tracer:", err);
143
+ }
144
+ tracerCache = null;
145
+ return null;
146
+ }
147
+ async function withTrace(name, fn) {
148
+ const activeTracer = getTracer();
149
+ if (!activeTracer) {
150
+ return fn(void 0);
151
+ }
152
+ return activeTracer.trace(name, async (span) => {
153
+ if (span) {
154
+ span.setTag("component", "application");
155
+ }
156
+ try {
157
+ const result = await fn(span);
158
+ return result;
159
+ } catch (error) {
160
+ if (span) {
161
+ span.setTag("error", error);
162
+ }
163
+ throw error;
164
+ }
165
+ });
166
+ }
167
+ function traceServerAction(name, fn) {
168
+ const spanName = name.startsWith("server.action.") ? name : `server.action.${name}`;
169
+ const traced = async (...args) => {
170
+ return withTrace(spanName, async (span) => {
171
+ if (span) {
172
+ span.setTag("component", "server-action");
173
+ }
174
+ const result = await fn(...args);
175
+ return result;
176
+ });
177
+ };
178
+ return traced;
179
+ }
180
+
181
+ // src/utils/api-client.ts
182
+ async function authenticatedFetch(url, options = {}) {
183
+ const { token, ...fetchOptions } = options;
184
+ const headers = new Headers(fetchOptions.headers);
185
+ if (token) {
186
+ headers.set("authorization", `Bearer ${token}`);
187
+ }
188
+ const response = await fetch(url, {
189
+ ...fetchOptions,
190
+ headers
191
+ });
192
+ if (response.status === 401) {
193
+ await handle401();
194
+ }
195
+ if (response.status === 502 || response.status === 503 || response.status === 504) {
196
+ await handleServerError(response.status);
197
+ }
198
+ return response;
199
+ }
200
+ async function handle401() {
201
+ const { redirect } = await import('next/navigation');
202
+ return redirect("/?expired=1");
203
+ }
204
+ function isErrorPage(url) {
205
+ try {
206
+ const urlObj = new URL(url);
207
+ return urlObj.pathname === "/error";
208
+ } catch {
209
+ return url === "/error" || url.startsWith("/error?");
210
+ }
211
+ }
212
+ async function handleServerError(statusCode) {
213
+ const { redirect } = await import('next/navigation');
214
+ const { cookies: cookies2 } = await import('next/headers');
215
+ let sourceUrl;
216
+ try {
217
+ const { headers } = await import('next/headers');
218
+ const headersList = await headers();
219
+ const referer = headersList.get("referer");
220
+ const host = headersList.get("host");
221
+ const pathname = headersList.get("x-invoke-path") || headersList.get("x-forwarded-path");
222
+ if (referer && !isErrorPage(referer)) {
223
+ sourceUrl = referer;
224
+ } else if (host && pathname) {
225
+ const protocol = headersList.get("x-forwarded-proto") || "https";
226
+ sourceUrl = `${protocol}://${host}${pathname}`;
227
+ }
228
+ if (!sourceUrl || isErrorPage(sourceUrl)) {
229
+ const cookieStore = await cookies2();
230
+ const preservedSource = cookieStore.get("portal_error_source");
231
+ if (preservedSource?.value) {
232
+ sourceUrl = decodeURIComponent(preservedSource.value);
233
+ cookieStore.delete("portal_error_source");
234
+ }
235
+ }
236
+ } catch (error) {
237
+ console.debug("[portal-components] Could not determine source URL", error);
238
+ }
239
+ const params = new URLSearchParams({ code: String(statusCode) });
240
+ if (sourceUrl) {
241
+ params.set("source", sourceUrl);
242
+ }
243
+ return redirect(`/error?${params.toString()}`);
244
+ }
245
+
246
+ // src/utils/constants.ts
247
+ var isHttpApiOrigin = () => {
248
+ return process.env.REPLICATED_APP_ORIGIN?.startsWith("http://") || false;
249
+ };
250
+
251
+ // src/actions/index.ts
252
+ var getApiOrigin = () => {
253
+ return (process.env.REPLICATED_APP_ORIGIN || "https://replicated.app").replace(/\/+$/, "");
254
+ };
255
+ var defineServerAction = (definition) => definition;
256
+ var fetchCustomBrandingImpl = async () => {
257
+ const appSlug = process.env.PORTAL_APP_SLUG;
258
+ if (!appSlug) {
259
+ throw new Error("PORTAL_APP_SLUG is not configured");
260
+ }
261
+ const url = `${getApiOrigin()}/enterprise-portal/public/branding?app_slug=${encodeURIComponent(
262
+ appSlug
263
+ )}`;
264
+ if (process.env.NODE_ENV !== "production") {
265
+ console.debug(
266
+ "[portal-components] fetching custom branding via %s (Enterprise Portal API)",
267
+ url
268
+ );
269
+ }
270
+ const response = await fetch(url, {
271
+ headers: {
272
+ accept: "application/json"
273
+ }
274
+ });
275
+ if (!response.ok) {
276
+ throw new Error(
277
+ `Custom branding request failed (${response.status} ${response.statusText})`
278
+ );
279
+ }
280
+ const payload = await response.json();
281
+ const brandingObject = {
282
+ logo: payload.logoUrl,
283
+ title: payload.title,
284
+ primaryColor: payload.primaryColor,
285
+ secondaryColor: payload.secondaryColor,
286
+ favicon: payload.faviconUrl,
287
+ supportPortalLink: payload.supportPortalLink || "",
288
+ background: payload.background,
289
+ backgroundImage: payload.backgroundImage,
290
+ customColor1: payload.customColor1,
291
+ customColor2: payload.customColor2
292
+ };
293
+ const brandingData = buffer.Buffer.from(JSON.stringify(brandingObject)).toString("base64");
294
+ return {
295
+ brandingData,
296
+ documentation: null
297
+ // Documentation not included in new API's public endpoint
298
+ };
299
+ };
300
+ react.cache(fetchCustomBrandingImpl);
301
+ async function listReleasesImpl() {
302
+ const { cookies: cookies2 } = await import('next/headers');
303
+ const sessionStore = await cookies2();
304
+ const session = sessionStore.get("portal_session");
305
+ const token = session?.value;
306
+ if (!token) {
307
+ throw new Error("List releases requires a session token");
308
+ }
309
+ const endpoint = `${getApiOrigin()}/enterprise-portal/releases`;
310
+ if (process.env.NODE_ENV !== "production") {
311
+ console.debug("[portal-components] fetching releases via %s (Enterprise Portal API)", endpoint);
312
+ }
313
+ const response = await authenticatedFetch(endpoint, {
314
+ method: "GET",
315
+ token,
316
+ headers: {
317
+ accept: "application/json"
318
+ }
319
+ });
320
+ if (!response.ok) {
321
+ throw new Error(
322
+ `List releases request failed (${response.status} ${response.statusText})`
323
+ );
324
+ }
325
+ const envelope = await response.json();
326
+ const data = envelope.data;
327
+ return {
328
+ releases: Array.isArray(data?.releases) ? data.releases : [],
329
+ totalCount: data?.totalCount || 0
330
+ };
331
+ }
332
+ traceServerAction("listReleases", listReleasesImpl);
333
+ var acceptInvite = defineServerAction({
334
+ id: "auth/accept-invite",
335
+ description: "Accepts a team invitation and returns a session token",
336
+ visibility: "customer",
337
+ tags: ["auth", "invite", "join"],
338
+ async run({ code }) {
339
+ if (!code || typeof code !== "string") {
340
+ const error = {
341
+ code: "invalid_code",
342
+ message: "Invite code is required"
343
+ };
344
+ throw error;
345
+ }
346
+ const endpoint = `${getApiOrigin()}/enterprise-portal/auth/invite/accept`;
347
+ if (process.env.NODE_ENV !== "production") {
348
+ console.debug("[portal-components] accepting invite via %s (Enterprise Portal API)", endpoint);
349
+ }
350
+ const response = await fetch(endpoint, {
351
+ method: "POST",
352
+ headers: {
353
+ "content-type": "application/json",
354
+ accept: "application/json"
355
+ },
356
+ body: JSON.stringify({ code })
357
+ });
358
+ if (!response.ok) {
359
+ if (response.status === 404) {
360
+ const error2 = {
361
+ code: "invalid_code",
362
+ message: "Invalid or expired invite code. Please check your code and try again."
363
+ };
364
+ throw error2;
365
+ }
366
+ let errorMessage = "Failed to accept invitation";
367
+ try {
368
+ const data = await response.json();
369
+ errorMessage = data.message || data.error || errorMessage;
370
+ } catch {
371
+ }
372
+ const error = {
373
+ code: "unknown",
374
+ message: errorMessage
375
+ };
376
+ throw error;
377
+ }
378
+ const payload = await response.json();
379
+ const token = payload?.jwt ?? payload?.token;
380
+ if (typeof token !== "string") {
381
+ throw new Error("Invite accepted but no token returned");
382
+ }
383
+ return { token };
384
+ }
385
+ });
386
+ var refreshInvite = defineServerAction({
387
+ id: "auth/refresh-invite",
388
+ description: "Refreshes an expired invite and resends the invitation email",
389
+ visibility: "customer",
390
+ tags: ["auth", "invite", "refresh"],
391
+ async run({ code }) {
392
+ if (!code || typeof code !== "string") {
393
+ throw new Error("Invite code is required");
394
+ }
395
+ const endpoint = `${getApiOrigin()}/enterprise-portal/auth/invite/refresh`;
396
+ if (process.env.NODE_ENV !== "production") {
397
+ console.debug("[portal-components] refreshing invite via %s (Enterprise Portal API)", endpoint);
398
+ }
399
+ const response = await fetch(endpoint, {
400
+ method: "POST",
401
+ headers: {
402
+ "content-type": "application/json",
403
+ accept: "application/json"
404
+ },
405
+ body: JSON.stringify({ code })
406
+ });
407
+ if (!response.ok) {
408
+ let errorMessage = "Failed to refresh invitation";
409
+ try {
410
+ const data = await response.json();
411
+ errorMessage = data.message || data.error || errorMessage;
412
+ } catch {
413
+ }
414
+ throw new Error(errorMessage);
415
+ }
416
+ return { success: true };
417
+ }
418
+ });
419
+ var fetchDocumentationImpl = async () => {
420
+ const { cookies: cookies2 } = await import('next/headers');
421
+ const sessionStore = await cookies2();
422
+ const session = sessionStore.get("portal_session");
423
+ const token = session?.value;
424
+ if (!token) {
425
+ throw new Error("Authentication required");
426
+ }
427
+ const url = `${getApiOrigin()}/enterprise-portal/documentation`;
428
+ if (process.env.NODE_ENV !== "production") {
429
+ console.debug(
430
+ "[portal-components] fetching documentation via %s (Enterprise Portal API)",
431
+ url
432
+ );
433
+ }
434
+ const response = await authenticatedFetch(url, {
435
+ method: "GET",
436
+ token,
437
+ headers: {
438
+ accept: "application/json"
439
+ }
440
+ });
441
+ if (!response.ok) {
442
+ throw new Error(
443
+ `Documentation request failed (${response.status} ${response.statusText})`
444
+ );
445
+ }
446
+ const data = await response.json();
447
+ return {
448
+ helmPreInstall: data.helmPreInstall || "",
449
+ helmPostInstall: data.helmPostInstall || "",
450
+ embeddedClusterPreInstall: data.embeddedClusterPreInstall || "",
451
+ embeddedClusterPostInstall: data.embeddedClusterPostInstall || "",
452
+ helmInstallUrl: data.helmInstallUrl || "",
453
+ embeddedClusterInstallUrl: data.embeddedClusterInstallUrl || "",
454
+ valuesOverrideUrl: data.valuesOverrideUrl || ""
455
+ };
456
+ };
457
+ react.cache(fetchDocumentationImpl);
458
+
459
+ // src/actions/invite-actions.ts
460
+ async function acceptInviteWithCookieImpl(code) {
461
+ try {
462
+ const result = await acceptInvite.run({ code });
463
+ const cookieStore = await headers.cookies();
464
+ const secure = true;
465
+ const sameSiteValue = isHttpApiOrigin() ? "none" : "lax";
466
+ cookieStore.set("portal_session", result.token, {
467
+ httpOnly: true,
468
+ secure,
469
+ sameSite: sameSiteValue,
470
+ path: "/"
471
+ });
472
+ return { success: true };
473
+ } catch (error) {
474
+ console.error("[invite-actions] acceptInvite error:", error);
475
+ if (typeof error === "object" && error !== null && "code" in error) {
476
+ const typedError = error;
477
+ if (typedError.code === "expired") {
478
+ return {
479
+ success: false,
480
+ message: typedError.message || "Invite has expired",
481
+ isExpired: true
482
+ };
483
+ }
484
+ if (typedError.code === "invalid_code") {
485
+ return {
486
+ success: false,
487
+ message: typedError.message || "Invalid or expired code"
488
+ };
489
+ }
490
+ }
491
+ if (typeof error === "object" && error !== null && "message" in error && typeof error.message === "string") {
492
+ return {
493
+ success: false,
494
+ message: error.message
495
+ };
496
+ }
497
+ return {
498
+ success: false,
499
+ message: "Failed to accept invite. Please try again."
500
+ };
501
+ }
502
+ }
503
+ async function refreshInviteActionImpl(code) {
504
+ try {
505
+ await refreshInvite.run({ code });
506
+ return { success: true };
507
+ } catch (error) {
508
+ console.error("[invite-actions] refreshInvite error:", error);
509
+ if (typeof error === "object" && error !== null && "message" in error && typeof error.message === "string") {
510
+ return {
511
+ success: false,
512
+ message: error.message
513
+ };
514
+ }
515
+ return {
516
+ success: false,
517
+ message: "Failed to refresh invite. Please try again."
518
+ };
519
+ }
520
+ }
521
+ var acceptInviteWithCookie = traceServerAction("acceptInviteWithCookie", acceptInviteWithCookieImpl);
522
+ var refreshInviteAction = traceServerAction("refreshInviteAction", refreshInviteActionImpl);
523
+
524
+ exports.acceptInviteWithCookie = acceptInviteWithCookie;
525
+ exports.refreshInviteAction = refreshInviteAction;
526
+ //# sourceMappingURL=invite-actions.js.map
527
+ //# sourceMappingURL=invite-actions.js.map