@beam3_dev/api_module 0.0.3 → 0.0.4
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/wb3Api.js +2000 -0
- package/dist/wb3Api.umd.cjs +78 -0
- package/package.json +8 -5
- package/index.html +0 -13
- package/src/index.js +0 -164
- package/src/lib/add/index.js +0 -12
- package/src/lib/api/index.js +0 -9
- package/src/lib/gouv/colors.js +0 -31
- package/src/lib/gouv/gouv_api.js +0 -139
- package/src/lib/plateform/Compass/index.js +0 -51
- package/src/lib/plateform/Swym/3dswym_api.js +0 -141
- package/src/lib/plateform/Swym/communaute/index.js +0 -443
- package/src/lib/plateform/Swym/idea/index.js +0 -333
- package/src/lib/plateform/Swym/media/index.js +0 -0
- package/src/lib/plateform/Swym/post/index.js +0 -0
- package/src/lib/plateform/Swym/question/index.js +0 -0
- package/src/lib/plateform/Swym/user/index.js +0 -87
- package/src/lib/plateform/Swym/wiki/index.js +0 -0
- package/src/lib/plateform/Tag/index.js +0 -384
- package/src/lib/plateform/Usersgroup/index.js +0 -449
- package/src/lib/plateform/main/3dcompass_api.js +0 -78
- package/src/lib/plateform/main/3dexperience_api.js +0 -143
- package/src/lib/plateform/main/3dspace_api.js +0 -1310
- package/src/lib/plateform/main/getActiveServices.js +0 -92
- package/src/lib/plateform/main/getCSRFToken.js +0 -30
- package/src/lib/plateform/main/getCTX.js +0 -46
- package/src/lib/plateform/main/getDataFrom3DSpace.js +0 -47
- package/src/lib/plateform/main/getDownloadDocument.js +0 -40
- package/src/lib/plateform/main/loadDatas.js +0 -189
- package/src/lib/plateform/main/pushDataIn3DSpace.js +0 -61
- package/src/lib/utils/updateEvent.js +0 -27
- package/vite.config.js +0 -23
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { _httpCallAuthenticated } from "../main/3dexperience_api";
|
|
2
|
-
import { _3DSpace_get_docInfo } from "../main/3dspace_api";
|
|
3
|
-
import { UUID } from "../../api/index";
|
|
4
|
-
|
|
5
|
-
// LINK - https://media.3ds.com/support/documentation/developer/Cloud/en/English/CAA3DSpaceREST/CAA6WRestServicePrinciples.htm
|
|
6
|
-
// Doc de test sur tenant BEAM3 PROD
|
|
7
|
-
const objIDTEST = "B70C12CDAE0415006579A93200061A14";
|
|
8
|
-
// Doc de test sur tenant Pivetau TEST
|
|
9
|
-
const objIDTEST2 = "FA35FB9B177A28006580190400193C20";
|
|
10
|
-
const objIDTEST3 = "FA35FB9B177A280065800EA0000F599C";
|
|
11
|
-
|
|
12
|
-
const sourcesSearching = [
|
|
13
|
-
"swym",
|
|
14
|
-
"3dspace",
|
|
15
|
-
"drive",
|
|
16
|
-
"usersgroup",
|
|
17
|
-
"3dplan",
|
|
18
|
-
"dashboard",
|
|
19
|
-
];
|
|
20
|
-
|
|
21
|
-
const listPredicates = {
|
|
22
|
-
how: "ds6w:how",
|
|
23
|
-
what: "ds6w:what",
|
|
24
|
-
when: "ds6w:when",
|
|
25
|
-
where: "ds6w:where",
|
|
26
|
-
who: "ds6w:who",
|
|
27
|
-
why: "ds6w:why",
|
|
28
|
-
};
|
|
29
|
-
const objToTag = {
|
|
30
|
-
objId: objIDTEST3,
|
|
31
|
-
pred: "who",
|
|
32
|
-
order_by: "desc",
|
|
33
|
-
tag: "testTag",
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @description La fonction `addTagToDoc` est utilisée pour ajouter une balise à un document dans un espace 3D en
|
|
38
|
-
* utilisant les informations d'identification et les informations sur l'objet fournies.
|
|
39
|
-
* @param {Object} credentials - Un objet contenant les informations d'identification requises pour authentifier
|
|
40
|
-
* la demande. Il inclut généralement des propriétés telles que « token », « space », « tenant » et « ctx ».
|
|
41
|
-
* @param {String} credentials.space - L'URL du serveur sur lequel l'API est déployée.(ex: 3DSpace =>(https://r1132100968447-eu1-space.3dexperience.3ds.com/enovia), 3DSwym, 3DCompass...)
|
|
42
|
-
* @param {Object} credentials.currentUser.username - Le paramètre `currentUser` est un qui contient les informations de l'utilisateur qui envoie le message(appeler depuis la fonction `_3DSwym_get_currentuser`).
|
|
43
|
-
* @param {String} credentials.tenant - L'identifiant du tenant sur lequel l'API est déployée.(ex: 1132100968447)
|
|
44
|
-
* @param {Object} [obj] - Le paramètre `obj` est un objet qui contient les propriétés suivantes :
|
|
45
|
-
* @param {String} obj.info.name - L'identifiant de l'objet que vous souhaitez marquer. (ex: B70C12CDAE0415006579A93200061A14)
|
|
46
|
-
* @param {String} obj.pred - La propriété de l'objet que vous souhaitez marquer. (ex: how, what, when, where, who, why)
|
|
47
|
-
* @param {String} obj.tag - Le tag que vous souhaitez ajouter à l'objet.
|
|
48
|
-
* @param {String} obj.order_by - L'ordre de la balise que vous souhaitez ajouter à l'objet. (ex: asc, desc)
|
|
49
|
-
* @param {Function} [onDone] - Le paramètre `onDone` est une fonction de rappel qui sera appelée lorsque
|
|
50
|
-
* l'opération de marquage sera terminée avec succès. La réponse du serveur lui sera transmise en
|
|
51
|
-
* argument.
|
|
52
|
-
* @param {Function} [onError] - Le paramètre `onError` est une fonction de rappel qui sera appelée s'il y a une
|
|
53
|
-
* erreur lors de l'exécution de la fonction `addTagToDoc`. Il vous permet de gérer et de traiter
|
|
54
|
-
* l'erreur de manière personnalisée.
|
|
55
|
-
*/
|
|
56
|
-
export function addTagToDoc(
|
|
57
|
-
credentials,
|
|
58
|
-
obj = objToTag,
|
|
59
|
-
onDone = undefined,
|
|
60
|
-
onError = undefined,
|
|
61
|
-
) {
|
|
62
|
-
// getInfoDoc();
|
|
63
|
-
|
|
64
|
-
const { space, tenant } = credentials;
|
|
65
|
-
const { objId, pred, tag } = obj;
|
|
66
|
-
|
|
67
|
-
const URL = {
|
|
68
|
-
uri: "/resources/6w/tags",
|
|
69
|
-
otpCTX: "SecurityContext=preferred",
|
|
70
|
-
optTenant: `tenant=${tenant}`,
|
|
71
|
-
};
|
|
72
|
-
const url = `${space}${URL.uri}?${URL.otpCTX}&${URL.optTenant}`;
|
|
73
|
-
const dataTest = {
|
|
74
|
-
tag: [
|
|
75
|
-
{
|
|
76
|
-
subject: [
|
|
77
|
-
{
|
|
78
|
-
uri: `pid://${objId}`,
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
predicate: listPredicates[pred],
|
|
82
|
-
object: {
|
|
83
|
-
literal: tag,
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
_httpCallAuthenticated(url, {
|
|
90
|
-
method: "PUT",
|
|
91
|
-
headers: {
|
|
92
|
-
"Content-Type": "application/json",
|
|
93
|
-
Accept: "application/json",
|
|
94
|
-
},
|
|
95
|
-
data: JSON.stringify(dataTest),
|
|
96
|
-
onComplete(response) {
|
|
97
|
-
const resp = JSON.parse(response);
|
|
98
|
-
const info = {};
|
|
99
|
-
setTimeout(() => {
|
|
100
|
-
_3DSpace_get_docInfo(
|
|
101
|
-
credentials,
|
|
102
|
-
objId,
|
|
103
|
-
(rep) => {
|
|
104
|
-
const docName = rep.data[0].dataelements.title;
|
|
105
|
-
const docExt =
|
|
106
|
-
rep.data[0].dataelements.fileExtension !== undefined
|
|
107
|
-
? rep.data[0].dataelements.fileExtension
|
|
108
|
-
: "";
|
|
109
|
-
const createBy =
|
|
110
|
-
rep.data[0].relateddata.ownerInfo[0].dataelements.name;
|
|
111
|
-
info["name"] = docName;
|
|
112
|
-
info["ext"] = docExt;
|
|
113
|
-
info["createBy"] = createBy;
|
|
114
|
-
obj.info = { ...info };
|
|
115
|
-
getActualTagsOnDoc(
|
|
116
|
-
credentials,
|
|
117
|
-
obj,
|
|
118
|
-
(rep) => {
|
|
119
|
-
if (onDone) onDone(rep);
|
|
120
|
-
},
|
|
121
|
-
(err) => {
|
|
122
|
-
if (onError) onError(err);
|
|
123
|
-
},
|
|
124
|
-
);
|
|
125
|
-
},
|
|
126
|
-
(response, headers) => {
|
|
127
|
-
const info = response;
|
|
128
|
-
info["msg"] = headers.errormsg;
|
|
129
|
-
info["errCode"] = headers.errorcode;
|
|
130
|
-
console.log("❌ sendDirectMessage => ", info);
|
|
131
|
-
if (onError) onError(info);
|
|
132
|
-
},
|
|
133
|
-
);
|
|
134
|
-
}, 2000);
|
|
135
|
-
},
|
|
136
|
-
onFailure(response, headers) {
|
|
137
|
-
const info = response;
|
|
138
|
-
info["msg"] = headers.errormsg;
|
|
139
|
-
info["errCode"] = headers.errorcode;
|
|
140
|
-
console.log("❌ sendDirectMessage => ", info);
|
|
141
|
-
if (onError) onError(info);
|
|
142
|
-
},
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* @description La fonction `getActualTagsOnDoc` récupère les balises réelles d'un document en utilisant les
|
|
147
|
-
* informations d'identification et les informations sur l'objet fournies. Appeler depuis `addTagToDoc()`
|
|
148
|
-
* @param {Object} credentials - Un objet contenant les informations d'identification requises pour authentifier
|
|
149
|
-
* la demande. Il inclut généralement des propriétés telles que « token », « space », « tenant » et « ctx ».
|
|
150
|
-
* @param {String} credentials.space - L'URL du serveur sur lequel l'API est déployée.(ex: 3DSpace =>(https://r1132100968447-eu1-space.3dexperience.3ds.com/enovia), 3DSwym, 3DCompass...)
|
|
151
|
-
* @param {String} credentials.tenant - L'identifiant du tenant sur lequel l'API est déployée.(ex: 1132100968447)
|
|
152
|
-
* @param {Object} credentials.currentUser.username - Le paramètre `currentUser` est un qui contient les informations de l'utilisateur qui envoie le message(appeler depuis la fonction `_3DSwym_get_currentuser`).
|
|
153
|
-
* @param {Object} credentials.ctx - L'ID du contexte de travail.
|
|
154
|
-
* @param obj - Le paramètre `obj` est un objet qui contient des informations sur le document. Il
|
|
155
|
-
* possède les propriétés suivantes :
|
|
156
|
-
* @param {String} obj.info.name - Le nom du document.
|
|
157
|
-
* @param {Function} [onDone] - Le paramètre `onDone` est une fonction de rappel qui sera appelée lorsque
|
|
158
|
-
* l'opération de marquage sera terminée avec succès. La réponse du serveur lui sera transmise en
|
|
159
|
-
* argument.
|
|
160
|
-
* @param {Function} [onError] - Le paramètre `onError` est une fonction de rappel qui sera appelée s'il y a une
|
|
161
|
-
* erreur lors de l'exécution de la fonction `addTagToDoc`. Il vous permet de gérer et de traiter
|
|
162
|
-
* l'erreur de manière personnalisée.
|
|
163
|
-
*/
|
|
164
|
-
export function getActualTagsOnDoc(
|
|
165
|
-
credentials,
|
|
166
|
-
obj,
|
|
167
|
-
onDone = undefined,
|
|
168
|
-
onError = undefined,
|
|
169
|
-
) {
|
|
170
|
-
// const nomFichier = "beam_cube_TEST_BDD";
|
|
171
|
-
console.log("obj ", obj);
|
|
172
|
-
const nomFichier = obj.info.name;
|
|
173
|
-
const URL = {
|
|
174
|
-
baseUrl: `https://${credentials.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
|
|
175
|
-
uri: "/federated/search",
|
|
176
|
-
};
|
|
177
|
-
const url = `${URL.baseUrl}${URL.uri}`;
|
|
178
|
-
const headers = {
|
|
179
|
-
"Content-Type": "application/json",
|
|
180
|
-
Accept: "application/json,text/javascript,*/*",
|
|
181
|
-
};
|
|
182
|
-
const uuid = UUID();
|
|
183
|
-
const dataPattern = {
|
|
184
|
-
with_indexing_date: true,
|
|
185
|
-
with_synthesis: true,
|
|
186
|
-
with_nls: false,
|
|
187
|
-
label: `3DSearch-${credentials.currentUser.username}-AjoutDeTagBeam-${uuid}`,
|
|
188
|
-
locale: "fr",
|
|
189
|
-
select_predicate: [
|
|
190
|
-
"ds6w:label",
|
|
191
|
-
"ds6w:type",
|
|
192
|
-
"ds6w:description",
|
|
193
|
-
"ds6w:identifier",
|
|
194
|
-
"ds6w:modified",
|
|
195
|
-
"ds6w:created",
|
|
196
|
-
"ds6wg:revision",
|
|
197
|
-
"ds6w:status",
|
|
198
|
-
"ds6w:responsible",
|
|
199
|
-
"owner",
|
|
200
|
-
"ds6w:responsibleUid",
|
|
201
|
-
"ds6wg:filesize",
|
|
202
|
-
"ds6w:project",
|
|
203
|
-
"ds6w:dataSource",
|
|
204
|
-
"ds6w:community",
|
|
205
|
-
"ds6w:originator",
|
|
206
|
-
"dsgeo:referential",
|
|
207
|
-
"ds6w:lastModifiedBy",
|
|
208
|
-
"ds6w:repository",
|
|
209
|
-
"dcterms:title",
|
|
210
|
-
"dcterms:description",
|
|
211
|
-
"ds6w:containerUid",
|
|
212
|
-
],
|
|
213
|
-
with_synthesis_hierarchical: true,
|
|
214
|
-
select_file: ["icon", "thumbnail_2d"],
|
|
215
|
-
query: nomFichier,
|
|
216
|
-
specific_source_parameter: {
|
|
217
|
-
"3dspace": {
|
|
218
|
-
additional_query:
|
|
219
|
-
' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)',
|
|
220
|
-
},
|
|
221
|
-
drive: {
|
|
222
|
-
additional_query:
|
|
223
|
-
' AND NOT ([flattenedtaxonomies]:"types/DriveNode" AND ( [current]:"Trashed" OR [policy]:"Drive File Iteration") )',
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
|
|
227
|
-
order_by: objToTag.order_by,
|
|
228
|
-
order_field: "relevance",
|
|
229
|
-
select_snippets: [
|
|
230
|
-
"ds6w:snippet",
|
|
231
|
-
"ds6w:label:snippet",
|
|
232
|
-
"ds6w:responsible:snippet",
|
|
233
|
-
"ds6w:community:snippet",
|
|
234
|
-
"swym:message_text:snippet",
|
|
235
|
-
],
|
|
236
|
-
nresults: 40,
|
|
237
|
-
start: "0",
|
|
238
|
-
source: sourcesSearching,
|
|
239
|
-
tenant: credentials.tenant,
|
|
240
|
-
login: {
|
|
241
|
-
"3dspace": {
|
|
242
|
-
SecurityContext: credentials.ctx,
|
|
243
|
-
},
|
|
244
|
-
},
|
|
245
|
-
};
|
|
246
|
-
console.log("dataPattern => ", dataPattern);
|
|
247
|
-
_httpCallAuthenticated(url, {
|
|
248
|
-
method: "POST",
|
|
249
|
-
headers: headers,
|
|
250
|
-
data: JSON.stringify(dataPattern),
|
|
251
|
-
onComplete(response) {
|
|
252
|
-
const info = JSON.parse(response);
|
|
253
|
-
onDone(info);
|
|
254
|
-
},
|
|
255
|
-
onFailure(err, headers) {
|
|
256
|
-
const info = err;
|
|
257
|
-
info["msg"] = headers.errormsg;
|
|
258
|
-
info["errCode"] = headers.errorcode;
|
|
259
|
-
console.log("❌ sendDirectMessage => ", info);
|
|
260
|
-
if (onError) onError(info);
|
|
261
|
-
console.log("Erreur de recuperation d'id du doc et des tags", err);
|
|
262
|
-
},
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* @description La fonction `removeTagToDoc` est utilisée pour supprimer une balise spécifique d'un document en
|
|
268
|
-
* utilisant les informations d'identification et les informations sur l'objet fournies.
|
|
269
|
-
* @param {Object} credentials - Un objet contenant les informations d'identification requises pour authentifier
|
|
270
|
-
* la demande. Il inclut généralement des propriétés telles que « token », « space », « tenant » et « ctx ».
|
|
271
|
-
* @param {String} credentials.space - L'URL du serveur sur lequel l'API est déployée.(ex: 3DSpace =>(https://r1132100968447-eu1-space.3dexperience.3ds.com/enovia), 3DSwym, 3DCompass...)
|
|
272
|
-
* @param {String} credentials.tenant - L'identifiant du tenant sur lequel l'API est déployée.(ex: 1132100968447)
|
|
273
|
-
*
|
|
274
|
-
* @param {Object} obj - Le paramètre `obj` est un objet qui contient les propriétés suivantes :
|
|
275
|
-
* @param {String} obj.objId - L'identifiant unique de l'objet pour lequel vous souhaitez supprimer la balise.
|
|
276
|
-
* @param {String} obj.pred - L'identifiant de la relation entre l'objet et la balise. (ex: how, what, when, where, who, why).
|
|
277
|
-
* @param {String} obj.tag - Le nom du tag à supprimer.
|
|
278
|
-
* @param {Function} [onDone] - Le paramètre `onDone` est une fonction de rappel qui sera appelée lorsque la
|
|
279
|
-
* suppression de la balise du document sera terminée avec succès. Il faut un argument, qui est la
|
|
280
|
-
* réponse du serveur.
|
|
281
|
-
* @param {Function} [onError] - Le paramètre `onError` est une fonction de rappel qui sera appelée s'il y a une
|
|
282
|
-
* erreur lors de l'exécution de la fonction `removeTagToDoc`. Il vous permet de gérer et de traiter
|
|
283
|
-
* l'erreur de manière personnalisée.
|
|
284
|
-
*/
|
|
285
|
-
export function removeTagToDoc(
|
|
286
|
-
credentials,
|
|
287
|
-
obj,
|
|
288
|
-
onDone = undefined,
|
|
289
|
-
onError = undefined,
|
|
290
|
-
) {
|
|
291
|
-
const { objId, pred, tag } = obj;
|
|
292
|
-
|
|
293
|
-
const URL = {
|
|
294
|
-
uri: "/resources/6w/tags",
|
|
295
|
-
otpCTX: "SecurityContext=preferred",
|
|
296
|
-
optTenant: `tenant=${credentials.tenant}`,
|
|
297
|
-
};
|
|
298
|
-
const url = `${credentials.space}${URL.uri}?${URL.otpCTX}&${URL.optTenant}`;
|
|
299
|
-
const dataTest = {
|
|
300
|
-
tag: [
|
|
301
|
-
{
|
|
302
|
-
subject: [
|
|
303
|
-
{
|
|
304
|
-
uri: `pid://${objId}`,
|
|
305
|
-
},
|
|
306
|
-
],
|
|
307
|
-
predicate: listPredicates[pred],
|
|
308
|
-
object: {
|
|
309
|
-
literal: tag,
|
|
310
|
-
},
|
|
311
|
-
},
|
|
312
|
-
],
|
|
313
|
-
};
|
|
314
|
-
_httpCallAuthenticated(url, {
|
|
315
|
-
method: "DELETE",
|
|
316
|
-
data: JSON.stringify(dataTest),
|
|
317
|
-
headers: {
|
|
318
|
-
"Content-Type": "application/json",
|
|
319
|
-
Accept: "application/json,text/javascript,*/*",
|
|
320
|
-
},
|
|
321
|
-
onComplete(response) {
|
|
322
|
-
if (onDone) onDone(response);
|
|
323
|
-
},
|
|
324
|
-
onFailure(err, headers) {
|
|
325
|
-
const info = err;
|
|
326
|
-
info["msg"] = headers.errormsg;
|
|
327
|
-
info["errCode"] = headers.errorcode;
|
|
328
|
-
console.log("❌ sendDirectMessage => ", info);
|
|
329
|
-
if (onError) onError(info);
|
|
330
|
-
},
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* @description La fonction « getInfoDocTags » effectue un appel HTTP pour récupérer des informations sur les
|
|
336
|
-
* documents en fonction des informations d'identification et des identifiants de document fournis.
|
|
337
|
-
* @param {Object} credentials - Un objet contenant les informations d'identification requises pour authentifier
|
|
338
|
-
* la demande. Il inclut généralement des propriétés telles que « token », « space », « tenant » et « ctx ».
|
|
339
|
-
* @param {String} credentials.space - L'URL du serveur sur lequel l'API est déployée.(ex: 3DSpace =>(https://r1132100968447-eu1-space.3dexperience.3ds.com/enovia), 3DSwym, 3DCompass...)
|
|
340
|
-
* @param {String} [str] - Le paramètre `str` est une chaîne qui représente l'ID du documents pour lesquels
|
|
341
|
-
* vous souhaitez récupérer des informations.
|
|
342
|
-
* @param {Function} [onDone] - Le paramètre `onDone` est une fonction de rappel qui sera appelée lorsque la
|
|
343
|
-
* requête HTTP sera terminée avec succès. Il prend un argument, qui correspond aux données de réponse
|
|
344
|
-
* de la requête.
|
|
345
|
-
* @param {Function} [onError] - Le paramètre `onError` est une fonction de rappel qui sera appelée s'il y a une
|
|
346
|
-
* erreur lors de l'exécution de la fonction `getInfoDocTags`. Il vous permet de gérer et de traiter
|
|
347
|
-
* les informations d'erreur.
|
|
348
|
-
* @returns La fonction ne renvoie explicitement rien.
|
|
349
|
-
*/
|
|
350
|
-
export function getInfoDocTags(
|
|
351
|
-
credentials,
|
|
352
|
-
str = "",
|
|
353
|
-
onDone = undefined,
|
|
354
|
-
onError = undefined,
|
|
355
|
-
) {
|
|
356
|
-
const { space } = credentials;
|
|
357
|
-
if (str === "") return;
|
|
358
|
-
|
|
359
|
-
const URL = {
|
|
360
|
-
uri: "/enovia/resources/v1/modeler/documents",
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
const headers = {
|
|
364
|
-
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
|
365
|
-
Accept: "application/json,text/javascript,*/*",
|
|
366
|
-
};
|
|
367
|
-
const url = `${space}${URL.uri}`;
|
|
368
|
-
|
|
369
|
-
const dataTest = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${str}`;
|
|
370
|
-
|
|
371
|
-
_httpCallAuthenticated(url, {
|
|
372
|
-
method: "POST",
|
|
373
|
-
headers: headers,
|
|
374
|
-
data: dataTest,
|
|
375
|
-
onComplete(response) {
|
|
376
|
-
if (onDone) onDone(JSON.parse(response));
|
|
377
|
-
},
|
|
378
|
-
onFailure(err, header) {
|
|
379
|
-
const info = err;
|
|
380
|
-
info["msg"] = header.error;
|
|
381
|
-
if (onError) onError(info);
|
|
382
|
-
},
|
|
383
|
-
});
|
|
384
|
-
}
|