@pelican.ts/sdk 0.5.0 → 0.5.2-next.1

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.js CHANGED
@@ -733,6 +733,7 @@ var CreateSchema = import_zod8.default.object({
733
733
  language: languagesSchema,
734
734
  timezone: timezonesSchema
735
735
  });
736
+ var UpdateSchema = CreateSchema.partial();
736
737
 
737
738
  // src/api/base/request.ts
738
739
  var import_axios = __toESM(require("axios"));
@@ -795,9 +796,10 @@ var Account = class {
795
796
  newEmail = import_zod10.default.email().parse(newEmail);
796
797
  await this.r.put("/account/email", { email: newEmail, password });
797
798
  };
798
- updatePassword = async (newPassword) => {
799
+ updatePassword = async (currentPassword, newPassword) => {
799
800
  newPassword = import_zod10.default.string().min(8).parse(newPassword);
800
801
  await this.r.put("/account/password", {
802
+ current_password: currentPassword,
801
803
  password: newPassword,
802
804
  password_confirmation: newPassword
803
805
  });
@@ -1763,7 +1765,7 @@ var Account2 = class {
1763
1765
  await this.client.account.updateEmail(newEmail, password);
1764
1766
  this.$email = newEmail;
1765
1767
  };
1766
- updatePassword = async (newPassword) => this.client.account.updatePassword(newPassword);
1768
+ updatePassword = async (currentPassword, newPassword) => this.client.account.updatePassword(currentPassword, newPassword);
1767
1769
  listApiKeys = async () => this.client.account.apiKeys.list();
1768
1770
  createApiKey = async (description, allowed_ips) => this.client.account.apiKeys.create(description, allowed_ips);
1769
1771
  deleteApiKey = async (identifier) => this.client.account.apiKeys.delete(identifier);
package/dist/index.mjs CHANGED
@@ -688,6 +688,7 @@ var CreateSchema = z8.object({
688
688
  language: languagesSchema,
689
689
  timezone: timezonesSchema
690
690
  });
691
+ var UpdateSchema = CreateSchema.partial();
691
692
 
692
693
  // src/api/base/request.ts
693
694
  import axios from "axios";
@@ -750,9 +751,10 @@ var Account = class {
750
751
  newEmail = z10.email().parse(newEmail);
751
752
  await this.r.put("/account/email", { email: newEmail, password });
752
753
  };
753
- updatePassword = async (newPassword) => {
754
+ updatePassword = async (currentPassword, newPassword) => {
754
755
  newPassword = z10.string().min(8).parse(newPassword);
755
756
  await this.r.put("/account/password", {
757
+ current_password: currentPassword,
756
758
  password: newPassword,
757
759
  password_confirmation: newPassword
758
760
  });
@@ -1718,7 +1720,7 @@ var Account2 = class {
1718
1720
  await this.client.account.updateEmail(newEmail, password);
1719
1721
  this.$email = newEmail;
1720
1722
  };
1721
- updatePassword = async (newPassword) => this.client.account.updatePassword(newPassword);
1723
+ updatePassword = async (currentPassword, newPassword) => this.client.account.updatePassword(currentPassword, newPassword);
1722
1724
  listApiKeys = async () => this.client.account.apiKeys.list();
1723
1725
  createApiKey = async (description, allowed_ips) => this.client.account.apiKeys.create(description, allowed_ips);
1724
1726
  deleteApiKey = async (identifier) => this.client.account.apiKeys.delete(identifier);