@webdock/sdk 1.0.5964 → 1.0.5966

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.mjs CHANGED
@@ -1827,7 +1827,7 @@ const {
1827
1827
  formToJSON: co,
1828
1828
  getAdapter: uo,
1829
1829
  mergeConfig: lo
1830
- } = D, ss = "1.0.5964";
1830
+ } = D, ss = "1.0.5966";
1831
1831
  async function P(r) {
1832
1832
  var e, t, n;
1833
1833
  try {
@@ -1879,6 +1879,46 @@ class os {
1879
1879
  method: "GET"
1880
1880
  });
1881
1881
  }
1882
+ async listAccountScripts() {
1883
+ return await P({
1884
+ token: this.parent.string_token,
1885
+ endpoint: "/account/scripts",
1886
+ headers: [],
1887
+ method: "GET"
1888
+ });
1889
+ }
1890
+ getAccountScriptById({ scriptId: e }) {
1891
+ return P(
1892
+ {
1893
+ token: this.parent.string_token,
1894
+ endpoint: `/account/scripts/${e}`,
1895
+ method: "GET"
1896
+ }
1897
+ );
1898
+ }
1899
+ createAccountScript({ content: e, filename: t, name: n }) {
1900
+ return P(
1901
+ {
1902
+ token: this.parent.string_token,
1903
+ endpoint: "/account/scripts",
1904
+ method: "POST",
1905
+ body: {
1906
+ content: e,
1907
+ filename: t,
1908
+ name: n
1909
+ }
1910
+ }
1911
+ );
1912
+ }
1913
+ deleteAccountScript({ id: e }) {
1914
+ return P(
1915
+ {
1916
+ token: this.parent.string_token,
1917
+ endpoint: `/account/scripts/${e}`,
1918
+ method: "DELETE"
1919
+ }
1920
+ );
1921
+ }
1882
1922
  }
1883
1923
  class is {
1884
1924
  constructor(e) {
@@ -2011,20 +2051,6 @@ class ds {
2011
2051
  constructor(e) {
2012
2052
  this.parent = e;
2013
2053
  }
2014
- create({ content: e, filename: t, name: n }) {
2015
- return P(
2016
- {
2017
- token: this.parent.string_token,
2018
- endpoint: "/account/scripts",
2019
- method: "POST",
2020
- body: {
2021
- content: e,
2022
- filename: t,
2023
- name: n
2024
- }
2025
- }
2026
- );
2027
- }
2028
2054
  createOnServer({
2029
2055
  scriptId: e,
2030
2056
  path: t,
@@ -2047,15 +2073,6 @@ class ds {
2047
2073
  }
2048
2074
  );
2049
2075
  }
2050
- delete({ id: e }) {
2051
- return P(
2052
- {
2053
- token: this.parent.string_token,
2054
- endpoint: `/account/scripts/${e}`,
2055
- method: "DELETE"
2056
- }
2057
- );
2058
- }
2059
2076
  deleteScriptFromServer({ serverSlug: e, scriptId: t }) {
2060
2077
  return P(
2061
2078
  {
@@ -2075,31 +2092,23 @@ class ds {
2075
2092
  }
2076
2093
  );
2077
2094
  }
2078
- getById({ scriptId: e }) {
2095
+ listOnServer({ serverSlug: e }) {
2079
2096
  return P(
2080
2097
  {
2081
2098
  token: this.parent.string_token,
2082
- endpoint: `/account/scripts/${e}`,
2099
+ endpoint: `/servers/${e}/scripts`,
2083
2100
  method: "GET"
2084
2101
  }
2085
2102
  );
2086
2103
  }
2087
- list(e) {
2088
- return P({
2104
+ async list() {
2105
+ return await P({
2089
2106
  token: this.parent.string_token,
2090
- endpoint: "/account/scripts",
2107
+ endpoint: "/scripts",
2108
+ headers: [],
2091
2109
  method: "GET"
2092
2110
  });
2093
2111
  }
2094
- listOnServer({ serverSlug: e }) {
2095
- return P(
2096
- {
2097
- token: this.parent.string_token,
2098
- endpoint: `/servers/${e}/scripts`,
2099
- method: "GET"
2100
- }
2101
- );
2102
- }
2103
2112
  update({
2104
2113
  id: e,
2105
2114
  name: t,