@opencloud-eu/web-client 3.2.0 → 4.0.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/functions-DP8s29Wg.cjs +1 -0
- package/dist/functions-DnZZKUk0.js +1183 -0
- package/dist/index-BIL0cW_q.js +1755 -0
- package/dist/index-CcmRJ1qB.cjs +1 -0
- package/dist/index-CiqYiARd.js +688 -0
- package/dist/index-DAa_DzDf.cjs +6 -0
- package/dist/{index-C6VnMvgz.cjs → index-D_NPkUGY.cjs} +1 -1
- package/dist/{index-Pl8khka8.js → index-JHVTaNRI.js} +2 -2
- package/dist/index-YVg9jNP5.cjs +16 -0
- package/dist/{index-DxUgq3ag.js → index-bmR3iLuG.js} +1934 -1953
- package/dist/src/graph/driveItems/types.d.ts +6 -2
- package/dist/src/graph/generated/api.d.ts +120 -98
- package/dist/src/helpers/resource/types.d.ts +1 -0
- package/dist/src/helpers/share/constants.d.ts +0 -1
- package/dist/src/ocs/capabilities.d.ts +1 -0
- package/dist/src/webdav/constants/dav.d.ts +1 -0
- package/dist/toString-CgHWCW2N.cjs +1 -0
- package/dist/{toString-Cn0xCZ28.js → toString-XlfBosfh.js} +4 -4
- package/dist/web-client/graph/generated.cjs +1 -1
- package/dist/web-client/graph/generated.js +1984 -2066
- package/dist/web-client/graph.cjs +1 -1
- package/dist/web-client/graph.js +1 -1
- package/dist/web-client/ocs.cjs +12 -12
- package/dist/web-client/ocs.js +1889 -1857
- package/dist/web-client/sse.cjs +2 -2
- package/dist/web-client/sse.js +95 -105
- package/dist/web-client/webdav.cjs +1 -1
- package/dist/web-client/webdav.js +3 -3
- package/dist/web-client.cjs +1 -1
- package/dist/web-client.js +82 -82
- package/package.json +2 -2
- package/dist/functions-CYOnwClV.js +0 -1178
- package/dist/functions-DEaUzlbB.cjs +0 -1
- package/dist/index-B3tdq56F.cjs +0 -16
- package/dist/index-BTGj2rHD.js +0 -1705
- package/dist/index-C-U4KVPG.cjs +0 -6
- package/dist/index-D3QfKFAH.cjs +0 -1
- package/dist/index-oCdLZPEA.js +0 -699
- package/dist/toString-hHr716Th.cjs +0 -1
package/dist/web-client/sse.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
`+
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function A(t,e){const n=t.getReader();let r;for(;!(r=await n.read()).done;)e(r.value)}function _(t){let e,n,r,o=!1;return function(a){e===void 0?(e=a,n=0,r=-1):e=M(e,a);const i=e.length;let s=0;for(;n<i;){o&&(e[n]===10&&(s=++n),o=!1);let c=-1;for(;n<i&&c===-1;++n)switch(e[n]){case 58:r===-1&&(r=n-s);break;case 13:o=!0;case 10:c=n;break}if(c===-1)break;t(e.subarray(s,c),r),s=n,r=-1}s===i?e=void 0:s!==0&&(e=e.subarray(s),n-=s)}}function F(t,e,n){let r=D();const o=new TextDecoder;return function(a,i){if(a.length===0)n?.(r),r=D();else if(i>0){const s=o.decode(a.subarray(0,i)),c=i+(a[i+1]===32?2:1),l=o.decode(a.subarray(c));switch(s){case"data":r.data=r.data?r.data+`
|
|
2
|
+
`+l:l;break;case"event":r.event=l;break;case"id":t(r.id=l);break;case"retry":const u=parseInt(l,10);isNaN(u)||e(r.retry=u);break}}}}function M(t,e){const n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}function D(){return{data:"",event:"",id:"",retry:void 0}}var j=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n};const y="text/event-stream",U=1e3,E="last-event-id";function x(t,e){var{signal:n,headers:r,onopen:o,onmessage:h,onclose:a,onerror:i,openWhenHidden:s,fetch:c}=e,l=j(e,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((u,k)=>{const f=Object.assign({},r);f.accept||(f.accept=y);let v;function C(){v.abort(),document.hidden||g()}s||document.addEventListener("visibilitychange",C);let L=U,b=0;function O(){document.removeEventListener("visibilitychange",C),window.clearTimeout(b),v.abort()}n?.addEventListener("abort",()=>{O(),u()});const T=c??window.fetch,H=o??K;async function g(){var m;v=new AbortController;try{const p=await T(t,Object.assign(Object.assign({},l),{headers:f,signal:v.signal}));await H(p),await A(p.body,_(F(d=>{d?f[E]=d:delete f[E]},d=>{L=d},h))),a?.(),O(),u()}catch(p){if(!v.signal.aborted)try{const d=(m=i?.(p))!==null&&m!==void 0?m:L;window.clearTimeout(b),b=window.setTimeout(g,d)}catch(d){O(),k(d)}}}g()})}function K(t){const e=t.headers.get("content-type");if(!e?.startsWith(y))throw new Error(`Expected content-type to be ${y}, Actual: ${e}`)}var R=(t=>(t.NOTIFICATION="userlog-notification",t.POSTPROCESSING_FINISHED="postprocessing-finished",t.FILE_LOCKED="file-locked",t.FILE_UNLOCKED="file-unlocked",t.FILE_TOUCHED="file-touched",t.ITEM_RENAMED="item-renamed",t.ITEM_TRASHED="item-trashed",t.ITEM_RESTORED="item-restored",t.ITEM_MOVED="item-moved",t.FOLDER_CREATED="folder-created",t.SPACE_MEMBER_ADDED="space-member-added",t.SPACE_MEMBER_REMOVED="space-member-removed",t.SPACE_SHARE_UPDATED="space-share-updated",t.SHARE_CREATED="share-created",t.SHARE_REMOVED="share-removed",t.SHARE_UPDATED="share-updated",t.LINK_CREATED="link-created",t.LINK_REMOVED="link-removed",t.LINK_UPDATED="link-updated",t.BACKCHANNEL_LOGOUT="backchannel-logout",t))(R||{});class N extends Error{name="RetriableError"}const B=15e3;class I{url;fetchOptions;abortController;eventListenerMap;readyState;withCredentials;CONNECTING;OPEN;CLOSED;onerror;onmessage;onopen;constructor(e,n){this.url=e,this.fetchOptions=n,this.abortController=new AbortController,this.eventListenerMap={},this.readyState=this.CONNECTING,this.connect()}connect(){return x(this.url,{openWhenHidden:!0,signal:this.abortController.signal,fetch:this.fetchProvider.bind(this),onopen:async()=>{const e=new Event("open");this.onopen?.bind(this)(e),this.readyState=this.OPEN},onmessage:e=>{const n=new MessageEvent("message",{data:e.data});this.onmessage?.bind(this)(n);const r=e.event;this.eventListenerMap[r]?.forEach(h=>h(n))},onclose:()=>{throw this.readyState=this.CLOSED,new N},onerror:e=>{console.error(e);const n=new CustomEvent("error",{detail:e});return this.onerror?.bind(this)(n),3e4+Math.floor(Math.random()*B)}})}fetchProvider(...e){const[n,r]=e,o={...r,...this.fetchOptions};return window.fetch(n,o)}close(){this.abortController.abort("closed")}addEventListener(e,n){this.eventListenerMap[e]=this.eventListenerMap[e]||[],this.eventListenerMap[e].push(n)}removeEventListener(e,n){this.eventListenerMap[e]=this.eventListenerMap[e]?.filter(r=>r!==n)}dispatchEvent(){throw new Error("Method not implemented.")}updateAccessToken(e){this.fetchOptions.headers.Authorization=`Bearer ${e}`}updateLanguage(e){this.fetchOptions.headers["Accept-Language"]=e,this.close(),this.connect()}}let w=null;const V=(t,e)=>(w||(w=new I(new URL("ocs/v2.php/apps/notifications/api/v1/notifications/sse",t).href,e)),w);exports.MESSAGE_TYPE=R;exports.RetriableError=N;exports.SSEAdapter=I;exports.sse=V;
|
package/dist/web-client/sse.js
CHANGED
|
@@ -1,71 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
var T = (t, e, n) => e in t ? H(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
-
var i = (t, e, n) => T(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
async function A(t, e) {
|
|
1
|
+
async function k(t, e) {
|
|
5
2
|
const n = t.getReader();
|
|
6
3
|
let r;
|
|
7
4
|
for (; !(r = await n.read()).done; )
|
|
8
5
|
e(r.value);
|
|
9
6
|
}
|
|
10
|
-
function
|
|
7
|
+
function H(t) {
|
|
11
8
|
let e, n, r, o = !1;
|
|
12
|
-
return function(
|
|
13
|
-
e === void 0 ? (e =
|
|
14
|
-
const
|
|
15
|
-
let
|
|
16
|
-
for (; n <
|
|
17
|
-
o && (e[n] === 10 && (
|
|
18
|
-
let
|
|
19
|
-
for (; n <
|
|
9
|
+
return function(a) {
|
|
10
|
+
e === void 0 ? (e = a, n = 0, r = -1) : e = A(e, a);
|
|
11
|
+
const i = e.length;
|
|
12
|
+
let s = 0;
|
|
13
|
+
for (; n < i; ) {
|
|
14
|
+
o && (e[n] === 10 && (s = ++n), o = !1);
|
|
15
|
+
let c = -1;
|
|
16
|
+
for (; n < i && c === -1; ++n)
|
|
20
17
|
switch (e[n]) {
|
|
21
18
|
case 58:
|
|
22
|
-
r === -1 && (r = n -
|
|
19
|
+
r === -1 && (r = n - s);
|
|
23
20
|
break;
|
|
24
21
|
case 13:
|
|
25
22
|
o = !0;
|
|
26
23
|
case 10:
|
|
27
|
-
|
|
24
|
+
c = n;
|
|
28
25
|
break;
|
|
29
26
|
}
|
|
30
|
-
if (
|
|
27
|
+
if (c === -1)
|
|
31
28
|
break;
|
|
32
|
-
t(e.subarray(
|
|
29
|
+
t(e.subarray(s, c), r), s = n, r = -1;
|
|
33
30
|
}
|
|
34
|
-
|
|
31
|
+
s === i ? e = void 0 : s !== 0 && (e = e.subarray(s), n -= s);
|
|
35
32
|
};
|
|
36
33
|
}
|
|
37
|
-
function
|
|
38
|
-
let r =
|
|
34
|
+
function T(t, e, n) {
|
|
35
|
+
let r = D();
|
|
39
36
|
const o = new TextDecoder();
|
|
40
|
-
return function(
|
|
41
|
-
if (
|
|
42
|
-
n
|
|
43
|
-
else if (
|
|
44
|
-
const
|
|
45
|
-
switch (
|
|
37
|
+
return function(a, i) {
|
|
38
|
+
if (a.length === 0)
|
|
39
|
+
n?.(r), r = D();
|
|
40
|
+
else if (i > 0) {
|
|
41
|
+
const s = o.decode(a.subarray(0, i)), c = i + (a[i + 1] === 32 ? 2 : 1), l = o.decode(a.subarray(c));
|
|
42
|
+
switch (s) {
|
|
46
43
|
case "data":
|
|
47
44
|
r.data = r.data ? r.data + `
|
|
48
|
-
` +
|
|
45
|
+
` + l : l;
|
|
49
46
|
break;
|
|
50
47
|
case "event":
|
|
51
|
-
r.event =
|
|
48
|
+
r.event = l;
|
|
52
49
|
break;
|
|
53
50
|
case "id":
|
|
54
|
-
t(r.id =
|
|
51
|
+
t(r.id = l);
|
|
55
52
|
break;
|
|
56
53
|
case "retry":
|
|
57
|
-
const
|
|
58
|
-
isNaN(
|
|
54
|
+
const u = parseInt(l, 10);
|
|
55
|
+
isNaN(u) || e(r.retry = u);
|
|
59
56
|
break;
|
|
60
57
|
}
|
|
61
58
|
}
|
|
62
59
|
};
|
|
63
60
|
}
|
|
64
|
-
function
|
|
61
|
+
function A(t, e) {
|
|
65
62
|
const n = new Uint8Array(t.length + e.length);
|
|
66
63
|
return n.set(t), n.set(e, t.length), n;
|
|
67
64
|
}
|
|
68
|
-
function
|
|
65
|
+
function D() {
|
|
69
66
|
return {
|
|
70
67
|
data: "",
|
|
71
68
|
event: "",
|
|
@@ -73,7 +70,7 @@ function R() {
|
|
|
73
70
|
retry: void 0
|
|
74
71
|
};
|
|
75
72
|
}
|
|
76
|
-
var
|
|
73
|
+
var F = function(t, e) {
|
|
77
74
|
var n = {};
|
|
78
75
|
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
|
|
79
76
|
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -81,103 +78,97 @@ var j = function(t, e) {
|
|
|
81
78
|
e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
|
|
82
79
|
return n;
|
|
83
80
|
};
|
|
84
|
-
const
|
|
85
|
-
function
|
|
86
|
-
var { signal: n, headers: r, onopen: o, onmessage:
|
|
87
|
-
return new Promise((
|
|
88
|
-
const
|
|
89
|
-
|
|
81
|
+
const y = "text/event-stream", _ = 1e3, R = "last-event-id";
|
|
82
|
+
function U(t, e) {
|
|
83
|
+
var { signal: n, headers: r, onopen: o, onmessage: h, onclose: a, onerror: i, openWhenHidden: s, fetch: c } = e, l = F(e, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
|
84
|
+
return new Promise((u, N) => {
|
|
85
|
+
const f = Object.assign({}, r);
|
|
86
|
+
f.accept || (f.accept = y);
|
|
90
87
|
let v;
|
|
91
|
-
function
|
|
92
|
-
v.abort(), document.hidden ||
|
|
88
|
+
function C() {
|
|
89
|
+
v.abort(), document.hidden || g();
|
|
93
90
|
}
|
|
94
|
-
|
|
95
|
-
let
|
|
96
|
-
function
|
|
97
|
-
document.removeEventListener("visibilitychange",
|
|
91
|
+
s || document.addEventListener("visibilitychange", C);
|
|
92
|
+
let L = _, b = 0;
|
|
93
|
+
function O() {
|
|
94
|
+
document.removeEventListener("visibilitychange", C), window.clearTimeout(b), v.abort();
|
|
98
95
|
}
|
|
99
|
-
n
|
|
100
|
-
|
|
96
|
+
n?.addEventListener("abort", () => {
|
|
97
|
+
O(), u();
|
|
101
98
|
});
|
|
102
|
-
const
|
|
103
|
-
async function
|
|
104
|
-
var
|
|
99
|
+
const I = c ?? window.fetch, E = o ?? j;
|
|
100
|
+
async function g() {
|
|
101
|
+
var w;
|
|
105
102
|
v = new AbortController();
|
|
106
103
|
try {
|
|
107
|
-
const
|
|
108
|
-
await
|
|
109
|
-
|
|
110
|
-
}, (
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
} catch (
|
|
104
|
+
const p = await I(t, Object.assign(Object.assign({}, l), { headers: f, signal: v.signal }));
|
|
105
|
+
await E(p), await k(p.body, H(T((d) => {
|
|
106
|
+
d ? f[R] = d : delete f[R];
|
|
107
|
+
}, (d) => {
|
|
108
|
+
L = d;
|
|
109
|
+
}, h))), a?.(), O(), u();
|
|
110
|
+
} catch (p) {
|
|
114
111
|
if (!v.signal.aborted)
|
|
115
112
|
try {
|
|
116
|
-
const
|
|
117
|
-
window.clearTimeout(
|
|
118
|
-
} catch (
|
|
119
|
-
|
|
113
|
+
const d = (w = i?.(p)) !== null && w !== void 0 ? w : L;
|
|
114
|
+
window.clearTimeout(b), b = window.setTimeout(g, d);
|
|
115
|
+
} catch (d) {
|
|
116
|
+
O(), N(d);
|
|
120
117
|
}
|
|
121
118
|
}
|
|
122
119
|
}
|
|
123
|
-
|
|
120
|
+
g();
|
|
124
121
|
});
|
|
125
122
|
}
|
|
126
|
-
function
|
|
123
|
+
function j(t) {
|
|
127
124
|
const e = t.headers.get("content-type");
|
|
128
|
-
if (!
|
|
129
|
-
throw new Error(`Expected content-type to be ${
|
|
125
|
+
if (!e?.startsWith(y))
|
|
126
|
+
throw new Error(`Expected content-type to be ${y}, Actual: ${e}`);
|
|
130
127
|
}
|
|
131
|
-
var
|
|
132
|
-
class
|
|
133
|
-
|
|
134
|
-
super(...arguments);
|
|
135
|
-
i(this, "name", "RetriableError");
|
|
136
|
-
}
|
|
128
|
+
var x = /* @__PURE__ */ ((t) => (t.NOTIFICATION = "userlog-notification", t.POSTPROCESSING_FINISHED = "postprocessing-finished", t.FILE_LOCKED = "file-locked", t.FILE_UNLOCKED = "file-unlocked", t.FILE_TOUCHED = "file-touched", t.ITEM_RENAMED = "item-renamed", t.ITEM_TRASHED = "item-trashed", t.ITEM_RESTORED = "item-restored", t.ITEM_MOVED = "item-moved", t.FOLDER_CREATED = "folder-created", t.SPACE_MEMBER_ADDED = "space-member-added", t.SPACE_MEMBER_REMOVED = "space-member-removed", t.SPACE_SHARE_UPDATED = "space-share-updated", t.SHARE_CREATED = "share-created", t.SHARE_REMOVED = "share-removed", t.SHARE_UPDATED = "share-updated", t.LINK_CREATED = "link-created", t.LINK_REMOVED = "link-removed", t.LINK_UPDATED = "link-updated", t.BACKCHANNEL_LOGOUT = "backchannel-logout", t))(x || {});
|
|
129
|
+
class M extends Error {
|
|
130
|
+
name = "RetriableError";
|
|
137
131
|
}
|
|
138
|
-
const
|
|
139
|
-
class
|
|
132
|
+
const K = 15e3;
|
|
133
|
+
class B {
|
|
134
|
+
url;
|
|
135
|
+
fetchOptions;
|
|
136
|
+
abortController;
|
|
137
|
+
eventListenerMap;
|
|
138
|
+
readyState;
|
|
139
|
+
withCredentials;
|
|
140
|
+
CONNECTING;
|
|
141
|
+
OPEN;
|
|
142
|
+
CLOSED;
|
|
143
|
+
onerror;
|
|
144
|
+
onmessage;
|
|
145
|
+
onopen;
|
|
140
146
|
constructor(e, n) {
|
|
141
|
-
i(this, "url");
|
|
142
|
-
i(this, "fetchOptions");
|
|
143
|
-
i(this, "abortController");
|
|
144
|
-
i(this, "eventListenerMap");
|
|
145
|
-
i(this, "readyState");
|
|
146
|
-
i(this, "withCredentials");
|
|
147
|
-
i(this, "CONNECTING");
|
|
148
|
-
i(this, "OPEN");
|
|
149
|
-
i(this, "CLOSED");
|
|
150
|
-
i(this, "onerror");
|
|
151
|
-
i(this, "onmessage");
|
|
152
|
-
i(this, "onopen");
|
|
153
147
|
this.url = e, this.fetchOptions = n, this.abortController = new AbortController(), this.eventListenerMap = {}, this.readyState = this.CONNECTING, this.connect();
|
|
154
148
|
}
|
|
155
149
|
connect() {
|
|
156
|
-
return
|
|
150
|
+
return U(this.url, {
|
|
157
151
|
openWhenHidden: !0,
|
|
158
152
|
signal: this.abortController.signal,
|
|
159
153
|
fetch: this.fetchProvider.bind(this),
|
|
160
154
|
// eslint-disable-next-line require-await
|
|
161
155
|
onopen: async () => {
|
|
162
|
-
var n;
|
|
163
156
|
const e = new Event("open");
|
|
164
|
-
|
|
157
|
+
this.onopen?.bind(this)(e), this.readyState = this.OPEN;
|
|
165
158
|
},
|
|
166
159
|
onmessage: (e) => {
|
|
167
|
-
var u;
|
|
168
160
|
const n = new MessageEvent("message", { data: e.data });
|
|
169
|
-
|
|
170
|
-
const r = e.event
|
|
171
|
-
|
|
161
|
+
this.onmessage?.bind(this)(n);
|
|
162
|
+
const r = e.event;
|
|
163
|
+
this.eventListenerMap[r]?.forEach((h) => h(n));
|
|
172
164
|
},
|
|
173
165
|
onclose: () => {
|
|
174
|
-
throw this.readyState = this.CLOSED, new
|
|
166
|
+
throw this.readyState = this.CLOSED, new M();
|
|
175
167
|
},
|
|
176
168
|
onerror: (e) => {
|
|
177
|
-
var r;
|
|
178
169
|
console.error(e);
|
|
179
170
|
const n = new CustomEvent("error", { detail: e });
|
|
180
|
-
return
|
|
171
|
+
return this.onerror?.bind(this)(n), 3e4 + Math.floor(Math.random() * K);
|
|
181
172
|
}
|
|
182
173
|
});
|
|
183
174
|
}
|
|
@@ -192,8 +183,7 @@ class $ {
|
|
|
192
183
|
this.eventListenerMap[e] = this.eventListenerMap[e] || [], this.eventListenerMap[e].push(n);
|
|
193
184
|
}
|
|
194
185
|
removeEventListener(e, n) {
|
|
195
|
-
|
|
196
|
-
this.eventListenerMap[e] = (r = this.eventListenerMap[e]) == null ? void 0 : r.filter((o) => o !== n);
|
|
186
|
+
this.eventListenerMap[e] = this.eventListenerMap[e]?.filter((r) => r !== n);
|
|
197
187
|
}
|
|
198
188
|
dispatchEvent() {
|
|
199
189
|
throw new Error("Method not implemented.");
|
|
@@ -205,14 +195,14 @@ class $ {
|
|
|
205
195
|
this.fetchOptions.headers["Accept-Language"] = e, this.close(), this.connect();
|
|
206
196
|
}
|
|
207
197
|
}
|
|
208
|
-
let
|
|
209
|
-
const
|
|
198
|
+
let m = null;
|
|
199
|
+
const V = (t, e) => (m || (m = new B(
|
|
210
200
|
new URL("ocs/v2.php/apps/notifications/api/v1/notifications/sse", t).href,
|
|
211
201
|
e
|
|
212
|
-
)),
|
|
202
|
+
)), m);
|
|
213
203
|
export {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
204
|
+
x as MESSAGE_TYPE,
|
|
205
|
+
M as RetriableError,
|
|
206
|
+
B as SSEAdapter,
|
|
207
|
+
V as sse
|
|
218
208
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-DAa_DzDf.cjs");const r=require("../index-YVg9jNP5.cjs"),e=require("../functions-DP8s29Wg.cjs");exports.webdav=r.webdav;exports.DavMethod=e.DavMethod;exports.DavPermission=e.DavPermission;exports.DavProperties=e.DavProperties;exports.DavProperty=e.DavProperty;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../index-
|
|
2
|
-
import { w as e } from "../index-
|
|
3
|
-
import { J as t, K as p, H as v, I as i } from "../functions-
|
|
1
|
+
import "../index-BIL0cW_q.js";
|
|
2
|
+
import { w as e } from "../index-bmR3iLuG.js";
|
|
3
|
+
import { J as t, K as p, H as v, I as i } from "../functions-DnZZKUk0.js";
|
|
4
4
|
export {
|
|
5
5
|
t as DavMethod,
|
|
6
6
|
p as DavPermission,
|
package/dist/web-client.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CcmRJ1qB.cjs"),n=require("./web-client/ocs.cjs"),o=require("./index-YVg9jNP5.cjs"),e=require("./functions-DP8s29Wg.cjs"),S=require("./toString-CgHWCW2N.cjs"),l=function*(a){return yield a},h=({message:a,statusCode:t,xReqId:s})=>{const c=new Response(void 0,{headers:{"x-request-id":s},status:t});return new o.HttpError(a,c,t)};class d{static Read=1;static Update=2;static Create=4;static Delete=8;static Share=16}const b=({axiosClient:a,baseURI:t})=>{const s=()=>{const c=a.defaults?.headers?.Authorization,i=a.defaults?.headers?.["Accept-Language"],u=a.defaults?.headers?.["Initiator-ID"];return{...c&&{Authorization:c.toString()},...i&&{"Accept-Language":i.toString()},...u&&{"Initiator-ID":u.toString()}}};return{graph:r.graph(t,a),ocs:n.ocs(t,a),webdav:o.webdav(t,s)}};exports.buildCollaboratorShare=r.buildCollaboratorShare;exports.buildIncomingShareResource=r.buildIncomingShareResource;exports.buildLinkShare=r.buildLinkShare;exports.buildOutgoingShareResource=r.buildOutgoingShareResource;exports.getShareResourcePermissions=r.getShareResourcePermissions;exports.getShareResourceRoles=r.getShareResourceRoles;exports.graph=r.graph;exports.isCollaboratorShare=r.isCollaboratorShare;exports.isIncomingShareResource=r.isIncomingShareResource;exports.isLinkShare=r.isLinkShare;exports.isOutgoingShareResource=r.isOutgoingShareResource;exports.isShareResource=r.isShareResource;exports.ocs=n.ocs;exports.DavHttpError=o.DavHttpError;exports.HttpError=o.HttpError;exports.encodePath=o.encodePath;exports.webdav=o.webdav;exports.GraphSharePermission=e.GraphSharePermission;exports.OCM_PROVIDER_ID=e.OCM_PROVIDER_ID;exports.SHARE_JAIL_ID=e.SHARE_JAIL_ID;exports.ShareType=e.ShareType;exports.ShareTypes=e.ShareTypes;exports.buildDeletedResource=e.buildDeletedResource;exports.buildPublicSpaceResource=e.buildPublicSpaceResource;exports.buildResource=e.buildResource;exports.buildShareSpaceResource=e.buildShareSpaceResource;exports.buildSpace=e.buildSpace;exports.buildSpaceImageResource=e.buildSpaceImageResource;exports.buildWebDavOcmPath=e.buildWebDavOcmPath;exports.buildWebDavPublicPath=e.buildWebDavPublicPath;exports.buildWebDavSpacesPath=e.buildWebDavSpacesPath;exports.buildWebDavSpacesTrashPath=e.buildWebDavSpacesTrashPath;exports.extractDomSelector=e.extractDomSelector;exports.extractExtensionFromFile=e.extractExtensionFromFile;exports.extractNameWithoutExtension=e.extractNameWithoutExtension;exports.extractNodeId=e.extractNodeId;exports.extractParentFolderName=e.extractParentFolderName;exports.extractStorageId=e.extractStorageId;exports.getRelativeSpecialFolderSpacePath=e.getRelativeSpecialFolderSpacePath;exports.isManager=e.isManager;exports.isMountPointSpaceResource=e.isMountPointSpaceResource;exports.isPersonalSpaceResource=e.isPersonalSpaceResource;exports.isProjectSpaceResource=e.isProjectSpaceResource;exports.isPublicSpaceResource=e.isPublicSpaceResource;exports.isSearchResource=e.isSearchResource;exports.isShareRoot=e.isShareRoot;exports.isShareSpaceResource=e.isShareSpaceResource;exports.isSpaceResource=e.isSpaceResource;exports.isTrashResource=e.isTrashResource;exports.urlJoin=S.urlJoin;exports.SharePermissionBit=d;exports.call=l;exports.client=b;exports.createHttpError=h;
|
package/dist/web-client.js
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { G as V, O as C, w as K, S as Q, n as X, m as Y, s as Z, l as $, t as U, u as B, v as ee, a as ae, b as se, o as re, p as te, e as oe, h as ce, g as ue, f as ie, j as ne, d as de, q as le, r as pe, B as he, y as Se, z as be, C as Re, c as ge, k as me, A as De, x as fe, i as Ie } from "./functions-CYOnwClV.js";
|
|
10
|
-
import { u as xe } from "./toString-Cn0xCZ28.js";
|
|
11
|
-
const P = function* (e) {
|
|
1
|
+
import { g as c } from "./index-CiqYiARd.js";
|
|
2
|
+
import { k as P, h as D, l as f, j as I, f as v, e as x, c as H, b as w, d as A, a as E, i as O } from "./index-CiqYiARd.js";
|
|
3
|
+
import { ocs as i } from "./web-client/ocs.js";
|
|
4
|
+
import { H as u, w as n } from "./index-bmR3iLuG.js";
|
|
5
|
+
import { D as W, e as k } from "./index-bmR3iLuG.js";
|
|
6
|
+
import { G as F, O as T, w as _, S as j, n as z, m as M, s as N, l as q, t as B, u as G, v as J, a as V, b as C, o as K, p as Q, e as X, h as Y, g as Z, f as $, j as U, d as ee, q as ae, r as se, B as re, y as te, z as oe, C as ce, c as ie, k as ue, A as ne, x as de, i as he } from "./functions-DnZZKUk0.js";
|
|
7
|
+
import { u as le } from "./toString-XlfBosfh.js";
|
|
8
|
+
const l = function* (e) {
|
|
12
9
|
return yield e;
|
|
13
|
-
},
|
|
10
|
+
}, p = ({
|
|
14
11
|
message: e,
|
|
15
12
|
statusCode: a,
|
|
16
|
-
xReqId:
|
|
13
|
+
xReqId: r
|
|
17
14
|
}) => {
|
|
18
|
-
const
|
|
19
|
-
headers: { "x-request-id":
|
|
15
|
+
const s = new Response(void 0, {
|
|
16
|
+
headers: { "x-request-id": r },
|
|
20
17
|
status: a
|
|
21
18
|
});
|
|
22
|
-
return new
|
|
19
|
+
return new u(e, s, a);
|
|
23
20
|
};
|
|
24
|
-
class
|
|
21
|
+
class b {
|
|
22
|
+
static Read = 1;
|
|
23
|
+
static Update = 2;
|
|
24
|
+
static Create = 4;
|
|
25
|
+
static Delete = 8;
|
|
26
|
+
static Share = 16;
|
|
25
27
|
}
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
var i, n, d, l, p, h;
|
|
30
|
-
const o = (n = (i = e.defaults) == null ? void 0 : i.headers) == null ? void 0 : n.Authorization, c = (l = (d = e.defaults) == null ? void 0 : d.headers) == null ? void 0 : l["Accept-Language"], u = (h = (p = e.defaults) == null ? void 0 : p.headers) == null ? void 0 : h["Initiator-ID"];
|
|
28
|
+
const R = ({ axiosClient: e, baseURI: a }) => {
|
|
29
|
+
const r = () => {
|
|
30
|
+
const s = e.defaults?.headers?.Authorization, t = e.defaults?.headers?.["Accept-Language"], o = e.defaults?.headers?.["Initiator-ID"];
|
|
31
31
|
return {
|
|
32
|
-
...
|
|
33
|
-
...
|
|
34
|
-
...
|
|
32
|
+
...s && { Authorization: s.toString() },
|
|
33
|
+
...t && { "Accept-Language": t.toString() },
|
|
34
|
+
...o && { "Initiator-ID": o.toString() }
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
return {
|
|
38
|
-
graph:
|
|
39
|
-
ocs:
|
|
40
|
-
webdav:
|
|
38
|
+
graph: c(a, e),
|
|
39
|
+
ocs: i(a, e),
|
|
40
|
+
webdav: n(a, r)
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
44
|
+
W as DavHttpError,
|
|
45
|
+
F as GraphSharePermission,
|
|
46
|
+
u as HttpError,
|
|
47
|
+
T as OCM_PROVIDER_ID,
|
|
48
|
+
_ as SHARE_JAIL_ID,
|
|
49
|
+
b as SharePermissionBit,
|
|
50
|
+
j as ShareType,
|
|
51
|
+
z as ShareTypes,
|
|
52
|
+
P as buildCollaboratorShare,
|
|
53
|
+
M as buildDeletedResource,
|
|
54
|
+
D as buildIncomingShareResource,
|
|
55
|
+
f as buildLinkShare,
|
|
56
|
+
I as buildOutgoingShareResource,
|
|
57
|
+
N as buildPublicSpaceResource,
|
|
58
|
+
q as buildResource,
|
|
59
|
+
B as buildShareSpaceResource,
|
|
60
|
+
G as buildSpace,
|
|
61
|
+
J as buildSpaceImageResource,
|
|
62
|
+
V as buildWebDavOcmPath,
|
|
63
|
+
C as buildWebDavPublicPath,
|
|
64
|
+
K as buildWebDavSpacesPath,
|
|
65
|
+
Q as buildWebDavSpacesTrashPath,
|
|
66
|
+
l as call,
|
|
67
|
+
R as client,
|
|
68
|
+
p as createHttpError,
|
|
69
|
+
k as encodePath,
|
|
70
|
+
X as extractDomSelector,
|
|
71
|
+
Y as extractExtensionFromFile,
|
|
72
|
+
Z as extractNameWithoutExtension,
|
|
73
|
+
$ as extractNodeId,
|
|
74
|
+
U as extractParentFolderName,
|
|
75
|
+
ee as extractStorageId,
|
|
76
|
+
ae as getRelativeSpecialFolderSpacePath,
|
|
77
|
+
v as getShareResourcePermissions,
|
|
78
|
+
x as getShareResourceRoles,
|
|
79
|
+
c as graph,
|
|
80
|
+
H as isCollaboratorShare,
|
|
81
|
+
w as isIncomingShareResource,
|
|
82
|
+
A as isLinkShare,
|
|
83
|
+
se as isManager,
|
|
84
|
+
re as isMountPointSpaceResource,
|
|
85
|
+
E as isOutgoingShareResource,
|
|
86
|
+
te as isPersonalSpaceResource,
|
|
87
|
+
oe as isProjectSpaceResource,
|
|
88
|
+
ce as isPublicSpaceResource,
|
|
89
|
+
ie as isSearchResource,
|
|
90
|
+
O as isShareResource,
|
|
91
|
+
ue as isShareRoot,
|
|
92
|
+
ne as isShareSpaceResource,
|
|
93
|
+
de as isSpaceResource,
|
|
94
|
+
he as isTrashResource,
|
|
95
|
+
i as ocs,
|
|
96
|
+
le as urlJoin,
|
|
97
|
+
n as webdav
|
|
98
98
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opencloud-eu/web-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "OpenCloud web client",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"private": false,
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"fast-xml-parser": "^4.5.0",
|
|
59
59
|
"lodash-es": "^4.17.21",
|
|
60
60
|
"luxon": "^3.5.0",
|
|
61
|
-
"uuid": "^
|
|
61
|
+
"uuid": "^13.0.0",
|
|
62
62
|
"webdav": "^5.7.1",
|
|
63
63
|
"xml-js": "^1.6.11",
|
|
64
64
|
"zod": "^4.0.0"
|