@inneropen/marvin-sdk 1.10.2 → 1.10.4

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/dist/index.cjs CHANGED
@@ -1170,21 +1170,22 @@ var AuthClient = class extends HttpClient {
1170
1170
  }
1171
1171
  /**
1172
1172
  * Register a new user
1173
+ * Returns the created user object
1173
1174
  */
1174
1175
  async register(data) {
1175
- return this.post("/api/users/register", data);
1176
+ return this.post("/users/register", data);
1176
1177
  }
1177
1178
  /**
1178
1179
  * Request password reset (sends email with token)
1179
1180
  */
1180
1181
  async forgotPassword(data) {
1181
- return this.post("/api/users/forgot-password", data);
1182
+ return this.post("/users/forgot-password", data);
1182
1183
  }
1183
1184
  /**
1184
1185
  * Reset password with token from email
1185
1186
  */
1186
1187
  async resetPassword(data) {
1187
- return this.post("/api/users/reset-password", data);
1188
+ return this.post("/users/reset-password", data);
1188
1189
  }
1189
1190
  /**
1190
1191
  * Login with username and password
package/dist/index.d.cts CHANGED
@@ -517,8 +517,14 @@ declare class MarvinClient {
517
517
  interface UserRegistration {
518
518
  username: string;
519
519
  email: string;
520
+ full_name: string;
520
521
  password: string;
521
- fullName?: string;
522
+ password_confirm: string;
523
+ group_token?: string | null;
524
+ group?: string | null;
525
+ advanced?: boolean;
526
+ private?: boolean;
527
+ seed_data?: boolean;
522
528
  }
523
529
  interface ForgotPasswordRequest {
524
530
  email: string;
@@ -539,11 +545,9 @@ declare class AuthClient extends HttpClient {
539
545
  constructor(apiUrl: string);
540
546
  /**
541
547
  * Register a new user
548
+ * Returns the created user object
542
549
  */
543
- register(data: UserRegistration): Promise<{
544
- message: string;
545
- userId: string;
546
- }>;
550
+ register(data: UserRegistration): Promise<any>;
547
551
  /**
548
552
  * Request password reset (sends email with token)
549
553
  */
package/dist/index.d.ts CHANGED
@@ -517,8 +517,14 @@ declare class MarvinClient {
517
517
  interface UserRegistration {
518
518
  username: string;
519
519
  email: string;
520
+ full_name: string;
520
521
  password: string;
521
- fullName?: string;
522
+ password_confirm: string;
523
+ group_token?: string | null;
524
+ group?: string | null;
525
+ advanced?: boolean;
526
+ private?: boolean;
527
+ seed_data?: boolean;
522
528
  }
523
529
  interface ForgotPasswordRequest {
524
530
  email: string;
@@ -539,11 +545,9 @@ declare class AuthClient extends HttpClient {
539
545
  constructor(apiUrl: string);
540
546
  /**
541
547
  * Register a new user
548
+ * Returns the created user object
542
549
  */
543
- register(data: UserRegistration): Promise<{
544
- message: string;
545
- userId: string;
546
- }>;
550
+ register(data: UserRegistration): Promise<any>;
547
551
  /**
548
552
  * Request password reset (sends email with token)
549
553
  */
package/dist/index.js CHANGED
@@ -788,21 +788,22 @@ var AuthClient = class extends HttpClient {
788
788
  }
789
789
  /**
790
790
  * Register a new user
791
+ * Returns the created user object
791
792
  */
792
793
  async register(data) {
793
- return this.post("/api/users/register", data);
794
+ return this.post("/users/register", data);
794
795
  }
795
796
  /**
796
797
  * Request password reset (sends email with token)
797
798
  */
798
799
  async forgotPassword(data) {
799
- return this.post("/api/users/forgot-password", data);
800
+ return this.post("/users/forgot-password", data);
800
801
  }
801
802
  /**
802
803
  * Reset password with token from email
803
804
  */
804
805
  async resetPassword(data) {
805
- return this.post("/api/users/reset-password", data);
806
+ return this.post("/users/reset-password", data);
806
807
  }
807
808
  /**
808
809
  * Login with username and password
package/dist/platform.cjs CHANGED
@@ -668,9 +668,26 @@ var InvitesModule = class {
668
668
  }
669
669
  /**
670
670
  * Generate invitation URL from a token
671
+ * Uses MARVIN_FRONTEND_URL for the base URL, falls back to MARVIN_API_URL with common port mappings
671
672
  */
672
673
  getInvitationUrl(token, baseUrl) {
673
- const base = baseUrl || process.env.MARVIN_API_URL || "http://localhost:8080";
674
+ let base = baseUrl;
675
+ if (!base) {
676
+ base = process.env.MARVIN_FRONTEND_URL;
677
+ if (!base && process.env.MARVIN_API_URL) {
678
+ const apiUrl = process.env.MARVIN_API_URL;
679
+ if (apiUrl.includes(":8080")) {
680
+ base = apiUrl.replace(":8080", ":4321");
681
+ } else if (apiUrl.includes(":3000")) {
682
+ base = apiUrl.replace(":3000", ":4321");
683
+ } else {
684
+ base = apiUrl;
685
+ }
686
+ }
687
+ if (!base) {
688
+ base = "http://localhost:4321";
689
+ }
690
+ }
674
691
  return `${base}/register?token=${token}`;
675
692
  }
676
693
  };
@@ -2894,6 +2894,7 @@ declare class InvitesModule {
2894
2894
  delete(tokenId: string): Promise<void>;
2895
2895
  /**
2896
2896
  * Generate invitation URL from a token
2897
+ * Uses MARVIN_FRONTEND_URL for the base URL, falls back to MARVIN_API_URL with common port mappings
2897
2898
  */
2898
2899
  getInvitationUrl(token: string, baseUrl?: string): string;
2899
2900
  }
@@ -2894,6 +2894,7 @@ declare class InvitesModule {
2894
2894
  delete(tokenId: string): Promise<void>;
2895
2895
  /**
2896
2896
  * Generate invitation URL from a token
2897
+ * Uses MARVIN_FRONTEND_URL for the base URL, falls back to MARVIN_API_URL with common port mappings
2897
2898
  */
2898
2899
  getInvitationUrl(token: string, baseUrl?: string): string;
2899
2900
  }
package/dist/platform.js CHANGED
@@ -448,9 +448,26 @@ var InvitesModule = class {
448
448
  }
449
449
  /**
450
450
  * Generate invitation URL from a token
451
+ * Uses MARVIN_FRONTEND_URL for the base URL, falls back to MARVIN_API_URL with common port mappings
451
452
  */
452
453
  getInvitationUrl(token, baseUrl) {
453
- const base = baseUrl || process.env.MARVIN_API_URL || "http://localhost:8080";
454
+ let base = baseUrl;
455
+ if (!base) {
456
+ base = process.env.MARVIN_FRONTEND_URL;
457
+ if (!base && process.env.MARVIN_API_URL) {
458
+ const apiUrl = process.env.MARVIN_API_URL;
459
+ if (apiUrl.includes(":8080")) {
460
+ base = apiUrl.replace(":8080", ":4321");
461
+ } else if (apiUrl.includes(":3000")) {
462
+ base = apiUrl.replace(":3000", ":4321");
463
+ } else {
464
+ base = apiUrl;
465
+ }
466
+ }
467
+ if (!base) {
468
+ base = "http://localhost:4321";
469
+ }
470
+ }
454
471
  return `${base}/register?token=${token}`;
455
472
  }
456
473
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inneropen/marvin-sdk",
3
- "version": "1.10.2",
3
+ "version": "1.10.4",
4
4
  "description": "Official TypeScript SDK for Marvin CMS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",