@fluxbase/sdk 0.0.1-rc.6 → 0.0.1-rc.7

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
@@ -997,7 +997,9 @@ var SystemSettingsManager = class {
997
997
  * ```
998
998
  */
999
999
  async list() {
1000
- const settings = await this.fetch.get("/api/v1/admin/system/settings");
1000
+ const settings = await this.fetch.get(
1001
+ "/api/v1/admin/system/settings"
1002
+ );
1001
1003
  return { settings: Array.isArray(settings) ? settings : [] };
1002
1004
  }
1003
1005
  /**
@@ -1013,7 +1015,9 @@ var SystemSettingsManager = class {
1013
1015
  * ```
1014
1016
  */
1015
1017
  async get(key) {
1016
- return await this.fetch.get(`/api/v1/admin/system/settings/${key}`);
1018
+ return await this.fetch.get(
1019
+ `/api/v1/admin/system/settings/${key}`
1020
+ );
1017
1021
  }
1018
1022
  /**
1019
1023
  * Update or create a system setting
@@ -1031,7 +1035,10 @@ var SystemSettingsManager = class {
1031
1035
  * ```
1032
1036
  */
1033
1037
  async update(key, request) {
1034
- return await this.fetch.put(`/api/v1/admin/system/settings/${key}`, request);
1038
+ return await this.fetch.put(
1039
+ `/api/v1/admin/system/settings/${key}`,
1040
+ request
1041
+ );
1035
1042
  }
1036
1043
  /**
1037
1044
  * Delete a system setting
@@ -1098,7 +1105,10 @@ var AppSettingsManager = class {
1098
1105
  * ```
1099
1106
  */
1100
1107
  async update(request) {
1101
- return await this.fetch.put("/api/v1/admin/app/settings", request);
1108
+ return await this.fetch.put(
1109
+ "/api/v1/admin/app/settings",
1110
+ request
1111
+ );
1102
1112
  }
1103
1113
  /**
1104
1114
  * Reset all application settings to defaults
@@ -1114,7 +1124,10 @@ var AppSettingsManager = class {
1114
1124
  * ```
1115
1125
  */
1116
1126
  async reset() {
1117
- return await this.fetch.post("/api/v1/admin/app/settings/reset", {});
1127
+ return await this.fetch.post(
1128
+ "/api/v1/admin/app/settings/reset",
1129
+ {}
1130
+ );
1118
1131
  }
1119
1132
  /**
1120
1133
  * Enable user signup
@@ -1165,7 +1178,9 @@ var AppSettingsManager = class {
1165
1178
  */
1166
1179
  async setPasswordMinLength(length) {
1167
1180
  if (length < 8 || length > 128) {
1168
- throw new Error("Password minimum length must be between 8 and 128 characters");
1181
+ throw new Error(
1182
+ "Password minimum length must be between 8 and 128 characters"
1183
+ );
1169
1184
  }
1170
1185
  return await this.update({
1171
1186
  authentication: { password_min_length: length }
@@ -1470,7 +1485,10 @@ var CustomSettingsManager = class {
1470
1485
  * ```
1471
1486
  */
1472
1487
  async create(request) {
1473
- return await this.fetch.post("/api/v1/admin/settings/custom", request);
1488
+ return await this.fetch.post(
1489
+ "/api/v1/admin/settings/custom",
1490
+ request
1491
+ );
1474
1492
  }
1475
1493
  /**
1476
1494
  * List all custom settings
@@ -1484,7 +1502,9 @@ var CustomSettingsManager = class {
1484
1502
  * ```
1485
1503
  */
1486
1504
  async list() {
1487
- const settings = await this.fetch.get("/api/v1/admin/settings/custom");
1505
+ const settings = await this.fetch.get(
1506
+ "/api/v1/admin/settings/custom"
1507
+ );
1488
1508
  return { settings: Array.isArray(settings) ? settings : [] };
1489
1509
  }
1490
1510
  /**
@@ -1500,7 +1520,9 @@ var CustomSettingsManager = class {
1500
1520
  * ```
1501
1521
  */
1502
1522
  async get(key) {
1503
- return await this.fetch.get(`/api/v1/admin/settings/custom/${key}`);
1523
+ return await this.fetch.get(
1524
+ `/api/v1/admin/settings/custom/${key}`
1525
+ );
1504
1526
  }
1505
1527
  /**
1506
1528
  * Update an existing custom setting
@@ -1518,7 +1540,10 @@ var CustomSettingsManager = class {
1518
1540
  * ```
1519
1541
  */
1520
1542
  async update(key, request) {
1521
- return await this.fetch.put(`/api/v1/admin/settings/custom/${key}`, request);
1543
+ return await this.fetch.put(
1544
+ `/api/v1/admin/settings/custom/${key}`,
1545
+ request
1546
+ );
1522
1547
  }
1523
1548
  /**
1524
1549
  * Delete a custom setting
@@ -1551,7 +1576,9 @@ var EmailTemplateManager = class {
1551
1576
  * ```
1552
1577
  */
1553
1578
  async list() {
1554
- const templates = await this.fetch.get("/api/v1/admin/email/templates");
1579
+ const templates = await this.fetch.get(
1580
+ "/api/v1/admin/email/templates"
1581
+ );
1555
1582
  return { templates: Array.isArray(templates) ? templates : [] };
1556
1583
  }
1557
1584
  /**
@@ -1568,16 +1595,18 @@ var EmailTemplateManager = class {
1568
1595
  * ```
1569
1596
  */
1570
1597
  async get(type) {
1571
- return await this.fetch.get(`/api/v1/admin/email/templates/${type}`);
1598
+ return await this.fetch.get(
1599
+ `/api/v1/admin/email/templates/${type}`
1600
+ );
1572
1601
  }
1573
1602
  /**
1574
1603
  * Update an email template
1575
1604
  *
1576
1605
  * Available template variables:
1577
- * - magic_link: {{.MagicLink}}, {{.AppName}}, {{.ExpiryMinutes}}
1578
- * - verify_email: {{.VerificationLink}}, {{.AppName}}
1579
- * - reset_password: {{.ResetLink}}, {{.AppName}}, {{.ExpiryMinutes}}
1580
- * - invite_user: {{.InviteLink}}, {{.AppName}}, {{.InviterName}}
1606
+ * - magic_link: `{{.MagicLink}}`, `{{.AppName}}`, `{{.ExpiryMinutes}}`
1607
+ * - verify_email: `{{.VerificationLink}}`, `{{.AppName}}`
1608
+ * - reset_password: `{{.ResetLink}}`, `{{.AppName}}`, `{{.ExpiryMinutes}}`
1609
+ * - invite_user: `{{.InviteLink}}`, `{{.AppName}}`, `{{.InviterName}}`
1581
1610
  *
1582
1611
  * @param type - Template type to update
1583
1612
  * @param request - Update request with subject, html_body, and optional text_body
@@ -1586,14 +1615,17 @@ var EmailTemplateManager = class {
1586
1615
  * @example
1587
1616
  * ```typescript
1588
1617
  * const updated = await client.admin.emailTemplates.update('magic_link', {
1589
- * subject: 'Your Magic Link - Sign in to {{.AppName}}',
1590
- * html_body: '<html><body><h1>Welcome!</h1><a href="{{.MagicLink}}">Sign In</a></body></html>',
1591
- * text_body: 'Click here to sign in: {{.MagicLink}}'
1618
+ * subject: 'Your Magic Link - Sign in to ' + '{{.AppName}}',
1619
+ * html_body: '<html><body><h1>Welcome!</h1><a href="' + '{{.MagicLink}}' + '">Sign In</a></body></html>',
1620
+ * text_body: 'Click here to sign in: ' + '{{.MagicLink}}'
1592
1621
  * })
1593
1622
  * ```
1594
1623
  */
1595
1624
  async update(type, request) {
1596
- return await this.fetch.put(`/api/v1/admin/email/templates/${type}`, request);
1625
+ return await this.fetch.put(
1626
+ `/api/v1/admin/email/templates/${type}`,
1627
+ request
1628
+ );
1597
1629
  }
1598
1630
  /**
1599
1631
  * Reset an email template to default
@@ -1609,7 +1641,10 @@ var EmailTemplateManager = class {
1609
1641
  * ```
1610
1642
  */
1611
1643
  async reset(type) {
1612
- return await this.fetch.post(`/api/v1/admin/email/templates/${type}/reset`, {});
1644
+ return await this.fetch.post(
1645
+ `/api/v1/admin/email/templates/${type}/reset`,
1646
+ {}
1647
+ );
1613
1648
  }
1614
1649
  /**
1615
1650
  * Send a test email using the template