@hostlink/light 1.0.2 → 1.1.0

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/file.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ export declare const file: (s?: string) => {
2
+ getContent: () => string;
3
+ getURL: (mime?: string) => string;
4
+ download: (filename: string) => void;
5
+ open: (mime: string) => void;
6
+ };
7
+ export declare const File: {
8
+ fromBase85: (a: string) => {
9
+ getContent: () => string;
10
+ getURL: (mime?: string) => string;
11
+ download: (filename: string) => void;
12
+ open: (mime: string) => void;
13
+ };
14
+ fromBase64: (a: string) => {
15
+ getContent: () => string;
16
+ getURL: (mime?: string) => string;
17
+ download: (filename: string) => void;
18
+ open: (mime: string) => void;
19
+ };
20
+ fromString: (a: string) => {
21
+ getContent: () => string;
22
+ getURL: (mime?: string) => string;
23
+ download: (filename: string) => void;
24
+ open: (mime: string) => void;
25
+ };
26
+ };
package/dist/fs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type File = {
1
+ export type FSFile = {
2
2
  name: string;
3
3
  path: string;
4
4
  size: number;
@@ -6,12 +6,12 @@ export type File = {
6
6
  canPreview: boolean;
7
7
  imagePath: string;
8
8
  };
9
- export type Folder = {
9
+ export type FSFolder = {
10
10
  name: String;
11
11
  path: String;
12
12
  };
13
13
  export declare const fsListFiles: (path: string) => Promise<Array<File>>;
14
- export declare const fsListFolders: (path: string) => Promise<Array<Folder>>;
14
+ export declare const fsListFolders: (path: string) => Promise<Array<FSFolder>>;
15
15
  export declare const fsReadFile: (path: string) => Promise<string>;
16
16
  export declare const fsWriteFile: (path: string, content: string) => Promise<boolean>;
17
17
  export declare const fsDeleteFile: (path: string) => Promise<boolean>;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export * from './auth';
2
2
  export * from './axios';
3
3
  export * from './granted';
4
4
  export * from './model';
5
+ export * from './file';
5
6
  import query from './query';
6
7
  import mutation from './mutation';
7
8
  import toQuery from './toQuery';
package/dist/light.js CHANGED
@@ -1,101 +1,101 @@
1
- import D from "axios";
2
- import { VariableType as A, jsonToGraphQLQuery as v } from "json-to-graphql-query";
3
- const I = (e, t, r = "") => c("login", {
1
+ import U from "axios";
2
+ import { VariableType as R, jsonToGraphQLQuery as v } from "json-to-graphql-query";
3
+ const X = (e, t, r = "") => u("login", {
4
4
  username: e,
5
5
  password: t,
6
6
  code: r
7
- }), z = () => c("logout"), $ = (e, t) => c("updatePassword", {
7
+ }), Y = () => u("logout"), Z = (e, t) => u("updatePassword", {
8
8
  old_password: e,
9
9
  new_password: t
10
- }), H = (e, t, r) => c("resetPassword", {
10
+ }), k = (e, t, r) => u("resetPassword", {
11
11
  email: e,
12
12
  password: t,
13
13
  code: r
14
- }), X = (e) => c("forgetPassword", {
14
+ }), ee = (e) => u("forgetPassword", {
15
15
  email: e
16
16
  });
17
- let b;
18
- const Y = (e) => {
19
- b = e;
20
- }, h = () => (b || (b = D.create({
17
+ let h;
18
+ const te = (e) => {
19
+ h = e;
20
+ }, b = () => (h || (h = U.create({
21
21
  withCredentials: !0
22
- })), b), Z = async (e) => (await d({
22
+ })), h), re = async (e) => (await p({
23
23
  granted: {
24
24
  __args: {
25
25
  rights: e
26
26
  }
27
27
  }
28
- })).granted, m = {}, k = (e, t) => {
28
+ })).granted, m = {}, ne = (e, t) => {
29
29
  m[e] = {};
30
30
  for (const r of Object.entries(t)) {
31
- const [n, s] = r;
32
- m[e][n] = () => ({
33
- name: s.name ? s.name : n,
34
- raw: s,
35
- getName: () => s.name ? s.name : n,
36
- getGQLField: () => s.gqlField !== void 0 ? s.gqlField : s.name || n,
31
+ const [s, n] = r;
32
+ m[e][s] = () => ({
33
+ name: n.name ? n.name : s,
34
+ raw: n,
35
+ getName: () => n.name ? n.name : s,
36
+ getGQLField: () => n.gqlField !== void 0 ? n.gqlField : n.name || s,
37
37
  getRaw() {
38
- return s;
38
+ return n;
39
39
  },
40
- getValue(i) {
41
- return s.field && typeof s.field == "function" ? s.field(i) : s.field && typeof s.field == "string" ? i[s.field] : i[this.getName()];
40
+ getValue(a) {
41
+ return n.field && typeof n.field == "function" ? n.field(a) : n.field && typeof n.field == "string" ? a[n.field] : a[this.getName()];
42
42
  },
43
- getFormattedValue(i) {
44
- const u = this.getValue(i);
45
- return s.format ? s.format(u) : u;
43
+ getFormattedValue(a) {
44
+ const c = this.getValue(a);
45
+ return n.format ? n.format(c) : c;
46
46
  }
47
47
  });
48
48
  }
49
- }, C = (e, t) => !m[e] || !m[e][t] ? null : m[e][t](), ee = (e, t) => {
49
+ }, q = (e, t) => !m[e] || !m[e][t] ? null : m[e][t](), se = (e, t) => {
50
50
  const r = [];
51
- for (const n of t)
52
- if (typeof n == "string") {
53
- const s = C(e, n);
54
- s && r.push(s.getGQLField());
51
+ for (const s of t)
52
+ if (typeof s == "string") {
53
+ const n = q(e, s);
54
+ n && r.push(n.getGQLField());
55
55
  } else
56
- typeof n == "object" && r.push(n);
56
+ typeof s == "object" && r.push(s);
57
57
  return r;
58
58
  }, S = (e) => {
59
- const t = new FormData(), r = {}, n = {}, s = {};
60
- let i = 0, u = !1;
61
- return Object.entries(e).forEach(([p, w]) => {
62
- w instanceof File ? (u = !0, n[p] = "Upload!", s[p] = new A(p), t.append(i.toString(), w), r[i] = ["variables." + p], i++) : s[p] = w;
63
- }), u ? (t.append("map", JSON.stringify(r)), {
64
- data: s,
59
+ const t = new FormData(), r = {}, s = {}, n = {};
60
+ let a = 0, c = !1;
61
+ return Object.entries(e).forEach(([d, g]) => {
62
+ g instanceof File ? (c = !0, s[d] = "Upload!", n[d] = new R(d), t.append(a.toString(), g), r[a] = ["variables." + d], a++) : n[d] = g;
63
+ }), c ? (t.append("map", JSON.stringify(r)), {
64
+ data: n,
65
65
  formData: t,
66
66
  mutation: {
67
- __variables: n
67
+ __variables: s
68
68
  }
69
69
  }) : {
70
- data: s,
70
+ data: n,
71
71
  formData: null,
72
72
  mutation: {}
73
73
  };
74
- }, te = (e) => {
74
+ }, ae = (e) => {
75
75
  const t = e;
76
76
  return {
77
77
  name: t,
78
- async update(r, n) {
79
- const s = S(n);
80
- return await c("update" + t, { id: r, data: s.data }, [], s.mutation, s.formData);
78
+ async update(r, s) {
79
+ const n = S(s);
80
+ return await u("update" + t, { id: r, data: n.data }, [], n.mutation, n.formData);
81
81
  },
82
82
  async delete(r) {
83
- return await c("delete" + t, { id: r });
83
+ return await u("delete" + t, { id: r });
84
84
  },
85
85
  async add(r) {
86
- const n = S(r);
87
- return await c("add" + t, { data: n.data }, [], n.mutation, n.formData);
86
+ const s = S(r);
87
+ return await u("add" + t, { data: s.data }, [], s.mutation, s.formData);
88
88
  },
89
89
  fields(r) {
90
- let n = [];
91
- for (let s of r) {
92
- const i = C(t, s);
93
- i && n.push(i);
90
+ let s = [];
91
+ for (let n of r) {
92
+ const a = q(t, n);
93
+ a && s.push(a);
94
94
  }
95
- return n;
95
+ return s;
96
96
  },
97
- async get(r, n) {
98
- return (await d({
97
+ async get(r, s) {
98
+ return (await p({
99
99
  ["list" + t]: {
100
100
  __args: {
101
101
  filters: r
@@ -104,75 +104,109 @@ const Y = (e) => {
104
104
  __args: {
105
105
  limit: 1
106
106
  },
107
- ...y(n)
107
+ ...y(s)
108
108
  }
109
109
  }
110
110
  }))["list" + t].data[0];
111
111
  },
112
- async list(r, n) {
113
- return (await d({
112
+ async list(r, s) {
113
+ return (await p({
114
114
  ["list" + t]: {
115
115
  __args: {
116
116
  filters: r
117
117
  },
118
118
  data: {
119
- ...y(n)
119
+ ...y(s)
120
120
  }
121
121
  }
122
122
  }))["list" + t].data;
123
123
  }
124
124
  };
125
- }, F = (e) => {
125
+ };
126
+ function P(e) {
127
+ e = "<~" + e + "~>";
128
+ var t, r, s, n, a, c = String, d = 255;
129
+ for (e.slice(0, 2) === "<~" && e.slice(-2), e = e.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), t = "uuuuu".slice(e.length % 5 || 5), e += t, s = [], n = 0, a = e.length; a > n; n += 5)
130
+ r = 52200625 * (e.charCodeAt(n) - 33) + 614125 * (e.charCodeAt(n + 1) - 33) + 7225 * (e.charCodeAt(n + 2) - 33) + 85 * (e.charCodeAt(n + 3) - 33) + (e.charCodeAt(n + 4) - 33), s.push(d & r >> 24, d & r >> 16, d & r >> 8, d & r);
131
+ return function(g, L) {
132
+ for (var O = L; O > 0; O--)
133
+ g.pop();
134
+ }(s, t.length), c.fromCharCode.apply(c, s);
135
+ }
136
+ const F = (e = "") => {
137
+ const t = e, r = (s = "application/octet-stream") => {
138
+ const n = new Uint8Array(t.length);
139
+ for (let d = 0; d < t.length; d++)
140
+ n[d] = t.charCodeAt(d);
141
+ const a = new Blob([n], { type: s });
142
+ return URL.createObjectURL(a);
143
+ };
144
+ return {
145
+ getContent: () => t,
146
+ getURL: r,
147
+ download: (s) => {
148
+ const n = document.createElement("a");
149
+ n.download = s, n.href = r(), document.body.appendChild(n), n.click(), document.body.removeChild(n);
150
+ },
151
+ open: (s) => {
152
+ window.open(r(s), "_blank");
153
+ }
154
+ };
155
+ }, oe = {
156
+ fromBase85: (e) => F(P(e)),
157
+ fromBase64: (e) => F(atob(e)),
158
+ fromString: (e) => F(e)
159
+ }, C = (e) => {
126
160
  let t = {};
127
161
  return typeof e == "string" ? (t[e] = !0, t) : e instanceof Array ? (e.forEach((r) => {
128
- Object.entries(F(r)).forEach(([n, s]) => {
129
- t[n] = s;
162
+ Object.entries(C(r)).forEach(([s, n]) => {
163
+ t[s] = n;
130
164
  });
131
- }), t) : (Object.entries(e).forEach(([r, n]) => {
165
+ }), t) : (Object.entries(e).forEach(([r, s]) => {
132
166
  if (r == "__args" || r == "__aliasFor" || r == "__variables" || r == "__directives" || r == "__all_on" || r == "__name") {
133
- t[r] = n;
167
+ t[r] = s;
134
168
  return;
135
169
  }
136
- if (typeof n == "boolean") {
137
- t[r] = n;
170
+ if (typeof s == "boolean") {
171
+ t[r] = s;
138
172
  return;
139
173
  }
140
- t[r] = F(n);
174
+ t[r] = C(s);
141
175
  }), t);
142
- }, y = (e) => F(e), d = async (e) => {
176
+ }, y = (e) => C(e), p = async (e) => {
143
177
  let t = v(y(e));
144
- const r = await h().post(_(), {
178
+ const r = await b().post(_(), {
145
179
  query: `{ ${t} }`
146
180
  });
147
181
  if (r.data.errors)
148
182
  throw new Error(r.data.errors[0].message);
149
183
  return r.data.data;
150
- }, c = async (e, t = null, r = [], n = {}, s = null) => {
151
- n[e] = !0, r instanceof Array && r.length != 0 && (n[e] = {}), t && (n[e] = {}, n[e].__args = t), Object.entries(y(r)).forEach(([p, w]) => {
152
- n[e][p] = w;
184
+ }, u = async (e, t = null, r = [], s = {}, n = null) => {
185
+ s[e] = !0, r instanceof Array && r.length != 0 && (s[e] = {}), t && (s[e] = {}, s[e].__args = t), Object.entries(y(r)).forEach(([d, g]) => {
186
+ s[e][d] = g;
153
187
  });
154
- let i = null;
155
- const u = v({ mutation: n });
156
- if (s ? (s.append("operations", JSON.stringify({
157
- query: u
158
- })), i = await h().post(_(), s)) : i = await h().post(_(), {
159
- query: u
160
- }), i.data.errors)
161
- throw new Error(i.data.errors[0].message);
162
- return i.data.data[e];
188
+ let a = null;
189
+ const c = v({ mutation: s });
190
+ if (n ? (n.append("operations", JSON.stringify({
191
+ query: c
192
+ })), a = await b().post(_(), n)) : a = await b().post(_(), {
193
+ query: c
194
+ }), a.data.errors)
195
+ throw new Error(a.data.errors[0].message);
196
+ return a.data.data[e];
163
197
  };
164
- let R = "/api/";
165
- const re = (e) => {
166
- R = e;
167
- }, _ = () => R;
168
- async function ne(e) {
198
+ let E = "/api/";
199
+ const ie = (e) => {
200
+ E = e;
201
+ }, _ = () => E;
202
+ async function le(e) {
169
203
  const t = {
170
204
  __variables: {
171
205
  file: "Upload!"
172
206
  },
173
207
  fsUploadTempFile: {
174
208
  __args: {
175
- file: new A("file")
209
+ file: new R("file")
176
210
  },
177
211
  name: !0,
178
212
  path: !0,
@@ -183,79 +217,79 @@ async function ne(e) {
183
217
  r.append("operations", JSON.stringify({
184
218
  query: v({ mutation: t })
185
219
  })), r.append("map", JSON.stringify({ 0: ["variables.file"] })), r.append("0", e);
186
- const n = await h().post(_(), r);
187
- if (n.data.errors)
188
- throw new Error(n.data.errors[0].message);
189
- return n.data.data.fsUploadTempFile;
220
+ const s = await b().post(_(), r);
221
+ if (s.data.errors)
222
+ throw new Error(s.data.errors[0].message);
223
+ return s.data.data.fsUploadTempFile;
190
224
  }
191
- const se = (e, t, r) => c("sendMail", {
225
+ const ce = (e, t, r) => u("sendMail", {
192
226
  email: e,
193
227
  subject: t,
194
228
  message: r
195
- }), ae = async (e) => (await d({
229
+ }), ue = async (e) => (await p({
196
230
  config: {
197
231
  __args: {
198
232
  name: e
199
233
  }
200
234
  }
201
235
  })).config;
202
- function q(e) {
203
- const t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, n = atob(r), s = new ArrayBuffer(n.length), i = new Uint8Array(s);
204
- for (let u = 0; u < n.length; u++)
205
- i[u] = n.charCodeAt(u);
206
- return s;
236
+ function N(e) {
237
+ const t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, s = atob(r), n = new ArrayBuffer(s.length), a = new Uint8Array(n);
238
+ for (let c = 0; c < s.length; c++)
239
+ a[c] = s.charCodeAt(c);
240
+ return n;
207
241
  }
208
- function E(e) {
242
+ function x(e) {
209
243
  const t = new Uint8Array(e);
210
244
  let r = "";
211
- for (const i of t)
212
- r += String.fromCharCode(i);
245
+ for (const a of t)
246
+ r += String.fromCharCode(a);
213
247
  return btoa(r).replace(/\+/g, "-").replace(
214
248
  /\//g,
215
249
  "_"
216
250
  ).replace(/=/g, "");
217
251
  }
218
- var a = "copy", f = "convert";
219
- function g(e, t, r) {
220
- if (t === a)
252
+ var o = "copy", f = "convert";
253
+ function w(e, t, r) {
254
+ if (t === o)
221
255
  return r;
222
256
  if (t === f)
223
257
  return e(r);
224
258
  if (t instanceof Array)
225
- return r.map((n) => g(e, t[0], n));
259
+ return r.map((s) => w(e, t[0], s));
226
260
  if (t instanceof Object) {
227
- const n = {};
228
- for (const [s, i] of Object.entries(t)) {
229
- if (i.derive) {
230
- const u = i.derive(r);
231
- u !== void 0 && (r[s] = u);
261
+ const s = {};
262
+ for (const [n, a] of Object.entries(t)) {
263
+ if (a.derive) {
264
+ const c = a.derive(r);
265
+ c !== void 0 && (r[n] = c);
232
266
  }
233
- if (!(s in r)) {
234
- if (i.required)
235
- throw new Error(`Missing key: ${s}`);
267
+ if (!(n in r)) {
268
+ if (a.required)
269
+ throw new Error(`Missing key: ${n}`);
236
270
  continue;
237
271
  }
238
- if (r[s] == null) {
239
- n[s] = null;
272
+ if (r[n] == null) {
273
+ s[n] = null;
240
274
  continue;
241
275
  }
242
- n[s] = g(
276
+ s[n] = w(
243
277
  e,
244
- i.schema,
245
- r[s]
278
+ a.schema,
279
+ r[n]
246
280
  );
247
281
  }
248
- return n;
282
+ return s;
249
283
  }
250
284
  }
251
- function O(e, t) {
285
+ function A(e, t) {
252
286
  return {
253
287
  required: !0,
254
288
  schema: e,
255
289
  derive: t
256
290
  };
257
291
  }
258
- function o(e) {
292
+ function i(e) {
259
293
  return {
260
294
  required: !0,
261
295
  schema: e
@@ -267,138 +301,138 @@ function l(e) {
267
301
  schema: e
268
302
  };
269
303
  }
270
- var N = {
271
- type: o(a),
272
- id: o(f),
273
- transports: l(a)
274
- }, x = {
275
- appid: l(a),
276
- appidExclude: l(a),
277
- credProps: l(a)
278
- }, J = {
279
- appid: l(a),
280
- appidExclude: l(a),
281
- credProps: l(a)
304
+ var J = {
305
+ type: i(o),
306
+ id: i(f),
307
+ transports: l(o)
282
308
  }, j = {
283
- publicKey: o({
284
- rp: o(a),
285
- user: o({
286
- id: o(f),
287
- name: o(a),
288
- displayName: o(a)
309
+ appid: l(o),
310
+ appidExclude: l(o),
311
+ credProps: l(o)
312
+ }, D = {
313
+ appid: l(o),
314
+ appidExclude: l(o),
315
+ credProps: l(o)
316
+ }, T = {
317
+ publicKey: i({
318
+ rp: i(o),
319
+ user: i({
320
+ id: i(f),
321
+ name: i(o),
322
+ displayName: i(o)
289
323
  }),
290
- challenge: o(f),
291
- pubKeyCredParams: o(a),
292
- timeout: l(a),
293
- excludeCredentials: l([N]),
294
- authenticatorSelection: l(a),
295
- attestation: l(a),
296
- extensions: l(x)
324
+ challenge: i(f),
325
+ pubKeyCredParams: i(o),
326
+ timeout: l(o),
327
+ excludeCredentials: l([J]),
328
+ authenticatorSelection: l(o),
329
+ attestation: l(o),
330
+ extensions: l(j)
297
331
  }),
298
- signal: l(a)
299
- }, L = {
300
- type: o(a),
301
- id: o(a),
302
- rawId: o(f),
303
- authenticatorAttachment: l(a),
304
- response: o({
305
- clientDataJSON: o(f),
306
- attestationObject: o(f),
307
- transports: O(
308
- a,
332
+ signal: l(o)
333
+ }, V = {
334
+ type: i(o),
335
+ id: i(o),
336
+ rawId: i(f),
337
+ authenticatorAttachment: l(o),
338
+ response: i({
339
+ clientDataJSON: i(f),
340
+ attestationObject: i(f),
341
+ transports: A(
342
+ o,
309
343
  (e) => {
310
344
  var t;
311
345
  return ((t = e.getTransports) == null ? void 0 : t.call(e)) || [];
312
346
  }
313
347
  )
314
348
  }),
315
- clientExtensionResults: O(
316
- J,
349
+ clientExtensionResults: A(
350
+ D,
317
351
  (e) => e.getClientExtensionResults()
318
352
  )
319
- }, P = {
320
- mediation: l(a),
321
- publicKey: o({
322
- challenge: o(f),
323
- timeout: l(a),
324
- rpId: l(a),
325
- allowCredentials: l([N]),
326
- userVerification: l(a),
327
- extensions: l(x)
353
+ }, K = {
354
+ mediation: l(o),
355
+ publicKey: i({
356
+ challenge: i(f),
357
+ timeout: l(o),
358
+ rpId: l(o),
359
+ allowCredentials: l([J]),
360
+ userVerification: l(o),
361
+ extensions: l(j)
328
362
  }),
329
- signal: l(a)
330
- }, T = {
331
- type: o(a),
332
- id: o(a),
333
- rawId: o(f),
334
- authenticatorAttachment: l(a),
335
- response: o({
336
- clientDataJSON: o(f),
337
- authenticatorData: o(f),
338
- signature: o(f),
339
- userHandle: o(f)
363
+ signal: l(o)
364
+ }, M = {
365
+ type: i(o),
366
+ id: i(o),
367
+ rawId: i(f),
368
+ authenticatorAttachment: l(o),
369
+ response: i({
370
+ clientDataJSON: i(f),
371
+ authenticatorData: i(f),
372
+ signature: i(f),
373
+ userHandle: i(f)
340
374
  }),
341
- clientExtensionResults: O(
342
- J,
375
+ clientExtensionResults: A(
376
+ D,
343
377
  (e) => e.getClientExtensionResults()
344
378
  )
345
379
  };
346
- function V(e) {
347
- return g(q, j, e);
380
+ function B(e) {
381
+ return w(N, T, e);
348
382
  }
349
- function K(e) {
350
- return g(
351
- E,
352
- L,
383
+ function Q(e) {
384
+ return w(
385
+ x,
386
+ V,
353
387
  e
354
388
  );
355
389
  }
356
- function U(e) {
357
- return g(q, P, e);
390
+ function G(e) {
391
+ return w(N, K, e);
358
392
  }
359
- function M(e) {
360
- return g(
361
- E,
362
- T,
393
+ function W(e) {
394
+ return w(
395
+ x,
396
+ M,
363
397
  e
364
398
  );
365
399
  }
366
- async function Q(e) {
400
+ async function z(e) {
367
401
  const t = await navigator.credentials.create(
368
402
  e
369
403
  );
370
- return t.toJSON = () => K(t), t;
404
+ return t.toJSON = () => Q(t), t;
371
405
  }
372
- async function G(e) {
406
+ async function I(e) {
373
407
  const t = await navigator.credentials.get(
374
408
  e
375
409
  );
376
- return t.toJSON = () => M(t), t;
410
+ return t.toJSON = () => W(t), t;
377
411
  }
378
- async function ie(e) {
379
- const r = (await d({
412
+ async function de(e) {
413
+ const r = (await p({
380
414
  webAuthnRequestOptions: {
381
415
  __args: {
382
416
  username: e
383
417
  }
384
418
  }
385
- })).webAuthnRequestOptions, n = U({
419
+ })).webAuthnRequestOptions, s = G({
386
420
  publicKey: r
387
- }), s = await G(n);
388
- await c("webAuthnAssertion", {
421
+ }), n = await I(s);
422
+ await u("webAuthnAssertion", {
389
423
  username: e,
390
- assertion: s.toJSON()
424
+ assertion: n.toJSON()
391
425
  });
392
426
  }
393
- async function oe() {
394
- const e = await d({ webAuthnCreationOptions: !0 }), t = V({
427
+ async function fe() {
428
+ const e = await p({ webAuthnCreationOptions: !0 }), t = B({
395
429
  publicKey: e.webAuthnCreationOptions
396
- }), r = await Q(t);
397
- await c("webAuthnRegister", {
430
+ }), r = await z(t);
431
+ await u("webAuthnRegister", {
398
432
  registration: r.toJSON()
399
433
  });
400
434
  }
401
- const le = async (e) => (await d({
435
+ const pe = async (e) => (await p({
402
436
  fsListFiles: {
403
437
  __args: {
404
438
  path: e
@@ -410,7 +444,7 @@ const le = async (e) => (await d({
410
444
  canPreview: !0,
411
445
  imagePath: !0
412
446
  }
413
- })).fsListFiles, ce = async (e) => (await d({
447
+ })).fsListFiles, ge = async (e) => (await p({
414
448
  fsListFolders: {
415
449
  __args: {
416
450
  path: e
@@ -418,8 +452,8 @@ const le = async (e) => (await d({
418
452
  name: !0,
419
453
  path: !0
420
454
  }
421
- })).fsListFolders, ue = async (e) => {
422
- let t = await d({
455
+ })).fsListFolders, we = async (e) => {
456
+ let t = await p({
423
457
  fsFile: {
424
458
  __args: {
425
459
  path: e
@@ -428,57 +462,59 @@ const le = async (e) => (await d({
428
462
  }
429
463
  });
430
464
  return window.atob(t.fsFile.base64Content);
431
- }, fe = (e, t) => c("fsWriteFile", {
465
+ }, me = (e, t) => u("fsWriteFile", {
432
466
  path: e,
433
467
  content: t
434
- }), de = (e) => c("fsDeleteFile", {
468
+ }), he = (e) => u("fsDeleteFile", {
435
469
  path: e
436
- }), pe = (e) => c("fsCreateFolder", {
470
+ }), be = (e) => u("fsCreateFolder", {
437
471
  path: e
438
- }), ge = (e) => c("fsDeleteFolder", {
472
+ }), ye = (e) => u("fsDeleteFolder", {
439
473
  path: e
440
- }), we = (e, t) => c("fsRenameFile", {
474
+ }), _e = (e, t) => u("fsRenameFile", {
441
475
  path: e,
442
476
  name: t
443
- }), me = (e, t) => c("fsRenameFolder", {
477
+ }), Fe = (e, t) => u("fsRenameFolder", {
444
478
  path: e,
445
479
  name: t
446
- }), be = (e, t) => c("fsMoveFile", {
480
+ }), Ce = (e, t) => u("fsMoveFile", {
447
481
  source: e,
448
482
  target: t
449
483
  });
450
484
  export {
485
+ oe as File,
451
486
  S as convertData,
452
- k as defineModel,
453
- X as forgetPassword,
454
- pe as fsCreateFolder,
455
- de as fsDeleteFile,
456
- ge as fsDeleteFolder,
457
- le as fsListFiles,
458
- ce as fsListFolders,
459
- be as fsMoveFile,
460
- ue as fsReadFile,
461
- we as fsRenameFile,
462
- me as fsRenameFolder,
463
- fe as fsWriteFile,
487
+ ne as defineModel,
488
+ F as file,
489
+ ee as forgetPassword,
490
+ be as fsCreateFolder,
491
+ he as fsDeleteFile,
492
+ ye as fsDeleteFolder,
493
+ pe as fsListFiles,
494
+ ge as fsListFolders,
495
+ Ce as fsMoveFile,
496
+ we as fsReadFile,
497
+ _e as fsRenameFile,
498
+ Fe as fsRenameFolder,
499
+ me as fsWriteFile,
464
500
  _ as getApiUrl,
465
- h as getAxios,
466
- ae as getConfig,
467
- ee as getGQLFields,
468
- C as getModelField,
469
- Z as granted,
470
- I as login,
471
- z as logout,
472
- te as model,
473
- c as mutation,
474
- d as query,
475
- H as resetPassword,
476
- se as sendMail,
477
- re as setApiUrl,
478
- Y as setAxios,
501
+ b as getAxios,
502
+ ue as getConfig,
503
+ se as getGQLFields,
504
+ q as getModelField,
505
+ re as granted,
506
+ X as login,
507
+ Y as logout,
508
+ ae as model,
509
+ u as mutation,
510
+ p as query,
511
+ k as resetPassword,
512
+ ce as sendMail,
513
+ ie as setApiUrl,
514
+ te as setAxios,
479
515
  y as toQuery,
480
- $ as updatePassword,
481
- ne as uploadFile,
482
- ie as webauthnLogin,
483
- oe as webauthnRegister
516
+ Z as updatePassword,
517
+ le as uploadFile,
518
+ de as webauthnLogin,
519
+ fe as webauthnRegister
484
520
  };
@@ -1 +1 @@
1
- (function(s,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("axios"),require("json-to-graphql-query")):typeof define=="function"&&define.amd?define(["exports","axios","json-to-graphql-query"],m):(s=typeof globalThis<"u"?globalThis:s||self,m(s.light={},s.axios,s.jsonToGraphqlQuery))})(this,function(s,m,y){"use strict";const J=(e,t,r="")=>c("login",{username:e,password:t,code:r}),P=()=>c("logout"),M=(e,t)=>c("updatePassword",{old_password:e,new_password:t}),T=(e,t,r)=>c("resetPassword",{email:e,password:t,code:r}),U=e=>c("forgetPassword",{email:e});let O;const V=e=>{O=e},h=()=>(O||(O=m.create({withCredentials:!0})),O),Q=async e=>(await g({granted:{__args:{rights:e}}})).granted,F={},K=(e,t)=>{F[e]={};for(const r of Object.entries(t)){const[n,a]=r;F[e][n]=()=>({name:a.name?a.name:n,raw:a,getName:()=>a.name?a.name:n,getGQLField:()=>a.gqlField!==void 0?a.gqlField:a.name||n,getRaw(){return a},getValue(o){return a.field&&typeof a.field=="function"?a.field(o):a.field&&typeof a.field=="string"?o[a.field]:o[this.getName()]},getFormattedValue(o){const d=this.getValue(o);return a.format?a.format(d):d}})}},A=(e,t)=>!F[e]||!F[e][t]?null:F[e][t](),W=(e,t)=>{const r=[];for(const n of t)if(typeof n=="string"){const a=A(e,n);a&&r.push(a.getGQLField())}else typeof n=="object"&&r.push(n);return r},S=e=>{const t=new FormData,r={},n={},a={};let o=0,d=!1;return Object.entries(e).forEach(([p,v])=>{v instanceof File?(d=!0,n[p]="Upload!",a[p]=new y.VariableType(p),t.append(o.toString(),v),r[o]=["variables."+p],o++):a[p]=v}),d?(t.append("map",JSON.stringify(r)),{data:a,formData:t,mutation:{__variables:n}}):{data:a,formData:null,mutation:{}}},G=e=>{const t=e;return{name:t,async update(r,n){const a=S(n);return await c("update"+t,{id:r,data:a.data},[],a.mutation,a.formData)},async delete(r){return await c("delete"+t,{id:r})},async add(r){const n=S(r);return await c("add"+t,{data:n.data},[],n.mutation,n.formData)},fields(r){let n=[];for(let a of r){const o=A(t,a);o&&n.push(o)}return n},async get(r,n){return(await g({["list"+t]:{__args:{filters:r},data:{__args:{limit:1},...b(n)}}}))["list"+t].data[0]},async list(r,n){return(await g({["list"+t]:{__args:{filters:r},data:{...b(n)}}}))["list"+t].data}}},C=e=>{let t={};return typeof e=="string"?(t[e]=!0,t):e instanceof Array?(e.forEach(r=>{Object.entries(C(r)).forEach(([n,a])=>{t[n]=a})}),t):(Object.entries(e).forEach(([r,n])=>{if(r=="__args"||r=="__aliasFor"||r=="__variables"||r=="__directives"||r=="__all_on"||r=="__name"){t[r]=n;return}if(typeof n=="boolean"){t[r]=n;return}t[r]=C(n)}),t)},b=e=>C(e),g=async e=>{let t=y.jsonToGraphQLQuery(b(e));const r=await h().post(_(),{query:`{ ${t} }`});if(r.data.errors)throw new Error(r.data.errors[0].message);return r.data.data},c=async(e,t=null,r=[],n={},a=null)=>{n[e]=!0,r instanceof Array&&r.length!=0&&(n[e]={}),t&&(n[e]={},n[e].__args=t),Object.entries(b(r)).forEach(([p,v])=>{n[e][p]=v});let o=null;const d=y.jsonToGraphQLQuery({mutation:n});if(a?(a.append("operations",JSON.stringify({query:d})),o=await h().post(_(),a)):o=await h().post(_(),{query:d}),o.data.errors)throw new Error(o.data.errors[0].message);return o.data.data[e]};let q="/api/";const B=e=>{q=e},_=()=>q;async function I(e){const t={__variables:{file:"Upload!"},fsUploadTempFile:{__args:{file:new y.VariableType("file")},name:!0,path:!0,size:!0,mime:!0}},r=new FormData;r.append("operations",JSON.stringify({query:y.jsonToGraphQLQuery({mutation:t})})),r.append("map",JSON.stringify({0:["variables.file"]})),r.append("0",e);const n=await h().post(_(),r);if(n.data.errors)throw new Error(n.data.errors[0].message);return n.data.data.fsUploadTempFile}const z=(e,t,r)=>c("sendMail",{email:e,subject:t,message:r}),$=async e=>(await g({config:{__args:{name:e}}})).config;function D(e){const t="==".slice(0,(4-e.length%4)%4),r=e.replace(/-/g,"+").replace(/_/g,"/")+t,n=atob(r),a=new ArrayBuffer(n.length),o=new Uint8Array(a);for(let d=0;d<n.length;d++)o[d]=n.charCodeAt(d);return a}function E(e){const t=new Uint8Array(e);let r="";for(const o of t)r+=String.fromCharCode(o);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var i="copy",f="convert";function w(e,t,r){if(t===i)return r;if(t===f)return e(r);if(t instanceof Array)return r.map(n=>w(e,t[0],n));if(t instanceof Object){const n={};for(const[a,o]of Object.entries(t)){if(o.derive){const d=o.derive(r);d!==void 0&&(r[a]=d)}if(!(a in r)){if(o.required)throw new Error(`Missing key: ${a}`);continue}if(r[a]==null){n[a]=null;continue}n[a]=w(e,o.schema,r[a])}return n}}function R(e,t){return{required:!0,schema:e,derive:t}}function l(e){return{required:!0,schema:e}}function u(e){return{required:!1,schema:e}}var L={type:l(i),id:l(f),transports:u(i)},N={appid:u(i),appidExclude:u(i),credProps:u(i)},j={appid:u(i),appidExclude:u(i),credProps:u(i)},H={publicKey:l({rp:l(i),user:l({id:l(f),name:l(i),displayName:l(i)}),challenge:l(f),pubKeyCredParams:l(i),timeout:u(i),excludeCredentials:u([L]),authenticatorSelection:u(i),attestation:u(i),extensions:u(N)}),signal:u(i)},X={type:l(i),id:l(i),rawId:l(f),authenticatorAttachment:u(i),response:l({clientDataJSON:l(f),attestationObject:l(f),transports:R(i,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:R(j,e=>e.getClientExtensionResults())},Y={mediation:u(i),publicKey:l({challenge:l(f),timeout:u(i),rpId:u(i),allowCredentials:u([L]),userVerification:u(i),extensions:u(N)}),signal:u(i)},Z={type:l(i),id:l(i),rawId:l(f),authenticatorAttachment:u(i),response:l({clientDataJSON:l(f),authenticatorData:l(f),signature:l(f),userHandle:l(f)}),clientExtensionResults:R(j,e=>e.getClientExtensionResults())};function k(e){return w(D,H,e)}function x(e){return w(E,X,e)}function ee(e){return w(D,Y,e)}function te(e){return w(E,Z,e)}async function re(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>x(t),t}async function ne(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>te(t),t}async function ae(e){const r=(await g({webAuthnRequestOptions:{__args:{username:e}}})).webAuthnRequestOptions,n=ee({publicKey:r}),a=await ne(n);await c("webAuthnAssertion",{username:e,assertion:a.toJSON()})}async function se(){const e=await g({webAuthnCreationOptions:!0}),t=k({publicKey:e.webAuthnCreationOptions}),r=await re(t);await c("webAuthnRegister",{registration:r.toJSON()})}const ie=async e=>(await g({fsListFiles:{__args:{path:e},name:!0,path:!0,size:!0,mime:!0,canPreview:!0,imagePath:!0}})).fsListFiles,oe=async e=>(await g({fsListFolders:{__args:{path:e},name:!0,path:!0}})).fsListFolders,le=async e=>{let t=await g({fsFile:{__args:{path:e},base64Content:!0}});return window.atob(t.fsFile.base64Content)},ue=(e,t)=>c("fsWriteFile",{path:e,content:t}),ce=e=>c("fsDeleteFile",{path:e}),de=e=>c("fsCreateFolder",{path:e}),fe=e=>c("fsDeleteFolder",{path:e}),ge=(e,t)=>c("fsRenameFile",{path:e,name:t}),pe=(e,t)=>c("fsRenameFolder",{path:e,name:t}),we=(e,t)=>c("fsMoveFile",{source:e,target:t});s.convertData=S,s.defineModel=K,s.forgetPassword=U,s.fsCreateFolder=de,s.fsDeleteFile=ce,s.fsDeleteFolder=fe,s.fsListFiles=ie,s.fsListFolders=oe,s.fsMoveFile=we,s.fsReadFile=le,s.fsRenameFile=ge,s.fsRenameFolder=pe,s.fsWriteFile=ue,s.getApiUrl=_,s.getAxios=h,s.getConfig=$,s.getGQLFields=W,s.getModelField=A,s.granted=Q,s.login=J,s.logout=P,s.model=G,s.mutation=c,s.query=g,s.resetPassword=T,s.sendMail=z,s.setApiUrl=B,s.setAxios=V,s.toQuery=b,s.updatePassword=M,s.uploadFile=I,s.webauthnLogin=ae,s.webauthnRegister=se,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
1
+ (function(s,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("axios"),require("json-to-graphql-query")):typeof define=="function"&&define.amd?define(["exports","axios","json-to-graphql-query"],m):(s=typeof globalThis<"u"?globalThis:s||self,m(s.light={},s.axios,s.jsonToGraphqlQuery))})(this,function(s,m,y){"use strict";const U=(e,t,r="")=>d("login",{username:e,password:t,code:r}),M=()=>d("logout"),T=(e,t)=>d("updatePassword",{old_password:e,new_password:t}),V=(e,t,r)=>d("resetPassword",{email:e,password:t,code:r}),Q=e=>d("forgetPassword",{email:e});let C;const K=e=>{C=e},b=()=>(C||(C=m.create({withCredentials:!0})),C),B=async e=>(await p({granted:{__args:{rights:e}}})).granted,F={},W=(e,t)=>{F[e]={};for(const r of Object.entries(t)){const[a,n]=r;F[e][a]=()=>({name:n.name?n.name:a,raw:n,getName:()=>n.name?n.name:a,getGQLField:()=>n.gqlField!==void 0?n.gqlField:n.name||a,getRaw(){return n},getValue(i){return n.field&&typeof n.field=="function"?n.field(i):n.field&&typeof n.field=="string"?i[n.field]:i[this.getName()]},getFormattedValue(i){const u=this.getValue(i);return n.format?n.format(u):u}})}},O=(e,t)=>!F[e]||!F[e][t]?null:F[e][t](),G=(e,t)=>{const r=[];for(const a of t)if(typeof a=="string"){const n=O(e,a);n&&r.push(n.getGQLField())}else typeof a=="object"&&r.push(a);return r},S=e=>{const t=new FormData,r={},a={},n={};let i=0,u=!1;return Object.entries(e).forEach(([f,w])=>{w instanceof File?(u=!0,a[f]="Upload!",n[f]=new y.VariableType(f),t.append(i.toString(),w),r[i]=["variables."+f],i++):n[f]=w}),u?(t.append("map",JSON.stringify(r)),{data:n,formData:t,mutation:{__variables:a}}):{data:n,formData:null,mutation:{}}},z=e=>{const t=e;return{name:t,async update(r,a){const n=S(a);return await d("update"+t,{id:r,data:n.data},[],n.mutation,n.formData)},async delete(r){return await d("delete"+t,{id:r})},async add(r){const a=S(r);return await d("add"+t,{data:a.data},[],a.mutation,a.formData)},fields(r){let a=[];for(let n of r){const i=O(t,n);i&&a.push(i)}return a},async get(r,a){return(await p({["list"+t]:{__args:{filters:r},data:{__args:{limit:1},..._(a)}}}))["list"+t].data[0]},async list(r,a){return(await p({["list"+t]:{__args:{filters:r},data:{..._(a)}}}))["list"+t].data}}};function I(e){e="<~"+e+"~>";var t,r,a,n,i,u=String,f=255;for(e.slice(0,2)==="<~"&&e.slice(-2),e=e.slice(2,-2).replace(/\s/g,"").replace("z","!!!!!"),t="uuuuu".slice(e.length%5||5),e+=t,a=[],n=0,i=e.length;i>n;n+=5)r=52200625*(e.charCodeAt(n)-33)+614125*(e.charCodeAt(n+1)-33)+7225*(e.charCodeAt(n+2)-33)+85*(e.charCodeAt(n+3)-33)+(e.charCodeAt(n+4)-33),a.push(f&r>>24,f&r>>16,f&r>>8,f&r);return function(w,Fe){for(var P=Fe;P>0;P--)w.pop()}(a,t.length),u.fromCharCode.apply(u,a)}const v=(e="")=>{const t=e,r=(a="application/octet-stream")=>{const n=new Uint8Array(t.length);for(let f=0;f<t.length;f++)n[f]=t.charCodeAt(f);const i=new Blob([n],{type:a});return URL.createObjectURL(i)};return{getContent:()=>t,getURL:r,download:a=>{const n=document.createElement("a");n.download=a,n.href=r(),document.body.appendChild(n),n.click(),document.body.removeChild(n)},open:a=>{window.open(r(a),"_blank")}}},$={fromBase85:e=>v(I(e)),fromBase64:e=>v(atob(e)),fromString:e=>v(e)},R=e=>{let t={};return typeof e=="string"?(t[e]=!0,t):e instanceof Array?(e.forEach(r=>{Object.entries(R(r)).forEach(([a,n])=>{t[a]=n})}),t):(Object.entries(e).forEach(([r,a])=>{if(r=="__args"||r=="__aliasFor"||r=="__variables"||r=="__directives"||r=="__all_on"||r=="__name"){t[r]=a;return}if(typeof a=="boolean"){t[r]=a;return}t[r]=R(a)}),t)},_=e=>R(e),p=async e=>{let t=y.jsonToGraphQLQuery(_(e));const r=await b().post(A(),{query:`{ ${t} }`});if(r.data.errors)throw new Error(r.data.errors[0].message);return r.data.data},d=async(e,t=null,r=[],a={},n=null)=>{a[e]=!0,r instanceof Array&&r.length!=0&&(a[e]={}),t&&(a[e]={},a[e].__args=t),Object.entries(_(r)).forEach(([f,w])=>{a[e][f]=w});let i=null;const u=y.jsonToGraphQLQuery({mutation:a});if(n?(n.append("operations",JSON.stringify({query:u})),i=await b().post(A(),n)):i=await b().post(A(),{query:u}),i.data.errors)throw new Error(i.data.errors[0].message);return i.data.data[e]};let L="/api/";const H=e=>{L=e},A=()=>L;async function X(e){const t={__variables:{file:"Upload!"},fsUploadTempFile:{__args:{file:new y.VariableType("file")},name:!0,path:!0,size:!0,mime:!0}},r=new FormData;r.append("operations",JSON.stringify({query:y.jsonToGraphQLQuery({mutation:t})})),r.append("map",JSON.stringify({0:["variables.file"]})),r.append("0",e);const a=await b().post(A(),r);if(a.data.errors)throw new Error(a.data.errors[0].message);return a.data.data.fsUploadTempFile}const Y=(e,t,r)=>d("sendMail",{email:e,subject:t,message:r}),Z=async e=>(await p({config:{__args:{name:e}}})).config;function E(e){const t="==".slice(0,(4-e.length%4)%4),r=e.replace(/-/g,"+").replace(/_/g,"/")+t,a=atob(r),n=new ArrayBuffer(a.length),i=new Uint8Array(n);for(let u=0;u<a.length;u++)i[u]=a.charCodeAt(u);return n}function j(e){const t=new Uint8Array(e);let r="";for(const i of t)r+=String.fromCharCode(i);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}var o="copy",g="convert";function h(e,t,r){if(t===o)return r;if(t===g)return e(r);if(t instanceof Array)return r.map(a=>h(e,t[0],a));if(t instanceof Object){const a={};for(const[n,i]of Object.entries(t)){if(i.derive){const u=i.derive(r);u!==void 0&&(r[n]=u)}if(!(n in r)){if(i.required)throw new Error(`Missing key: ${n}`);continue}if(r[n]==null){a[n]=null;continue}a[n]=h(e,i.schema,r[n])}return a}}function q(e,t){return{required:!0,schema:e,derive:t}}function l(e){return{required:!0,schema:e}}function c(e){return{required:!1,schema:e}}var D={type:l(o),id:l(g),transports:c(o)},N={appid:c(o),appidExclude:c(o),credProps:c(o)},J={appid:c(o),appidExclude:c(o),credProps:c(o)},k={publicKey:l({rp:l(o),user:l({id:l(g),name:l(o),displayName:l(o)}),challenge:l(g),pubKeyCredParams:l(o),timeout:c(o),excludeCredentials:c([D]),authenticatorSelection:c(o),attestation:c(o),extensions:c(N)}),signal:c(o)},x={type:l(o),id:l(o),rawId:l(g),authenticatorAttachment:c(o),response:l({clientDataJSON:l(g),attestationObject:l(g),transports:q(o,e=>{var t;return((t=e.getTransports)==null?void 0:t.call(e))||[]})}),clientExtensionResults:q(J,e=>e.getClientExtensionResults())},ee={mediation:c(o),publicKey:l({challenge:l(g),timeout:c(o),rpId:c(o),allowCredentials:c([D]),userVerification:c(o),extensions:c(N)}),signal:c(o)},te={type:l(o),id:l(o),rawId:l(g),authenticatorAttachment:c(o),response:l({clientDataJSON:l(g),authenticatorData:l(g),signature:l(g),userHandle:l(g)}),clientExtensionResults:q(J,e=>e.getClientExtensionResults())};function re(e){return h(E,k,e)}function ne(e){return h(j,x,e)}function ae(e){return h(E,ee,e)}function se(e){return h(j,te,e)}async function ie(e){const t=await navigator.credentials.create(e);return t.toJSON=()=>ne(t),t}async function oe(e){const t=await navigator.credentials.get(e);return t.toJSON=()=>se(t),t}async function le(e){const r=(await p({webAuthnRequestOptions:{__args:{username:e}}})).webAuthnRequestOptions,a=ae({publicKey:r}),n=await oe(a);await d("webAuthnAssertion",{username:e,assertion:n.toJSON()})}async function ce(){const e=await p({webAuthnCreationOptions:!0}),t=re({publicKey:e.webAuthnCreationOptions}),r=await ie(t);await d("webAuthnRegister",{registration:r.toJSON()})}const ue=async e=>(await p({fsListFiles:{__args:{path:e},name:!0,path:!0,size:!0,mime:!0,canPreview:!0,imagePath:!0}})).fsListFiles,de=async e=>(await p({fsListFolders:{__args:{path:e},name:!0,path:!0}})).fsListFolders,fe=async e=>{let t=await p({fsFile:{__args:{path:e},base64Content:!0}});return window.atob(t.fsFile.base64Content)},ge=(e,t)=>d("fsWriteFile",{path:e,content:t}),pe=e=>d("fsDeleteFile",{path:e}),we=e=>d("fsCreateFolder",{path:e}),he=e=>d("fsDeleteFolder",{path:e}),me=(e,t)=>d("fsRenameFile",{path:e,name:t}),ye=(e,t)=>d("fsRenameFolder",{path:e,name:t}),be=(e,t)=>d("fsMoveFile",{source:e,target:t});s.File=$,s.convertData=S,s.defineModel=W,s.file=v,s.forgetPassword=Q,s.fsCreateFolder=we,s.fsDeleteFile=pe,s.fsDeleteFolder=he,s.fsListFiles=ue,s.fsListFolders=de,s.fsMoveFile=be,s.fsReadFile=fe,s.fsRenameFile=me,s.fsRenameFolder=ye,s.fsWriteFile=ge,s.getApiUrl=A,s.getAxios=b,s.getConfig=Z,s.getGQLFields=G,s.getModelField=O,s.granted=B,s.login=U,s.logout=M,s.model=z,s.mutation=d,s.query=p,s.resetPassword=V,s.sendMail=Y,s.setApiUrl=H,s.setAxios=K,s.toQuery=_,s.updatePassword=T,s.uploadFile=X,s.webauthnLogin=le,s.webauthnRegister=ce,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/light",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"