<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: nuxeo js client for RESTClient by Angular 7[SOLVED] in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-js-client-for-restclient-by-angular-7-solved/m-p/313912#M913</link>
    <description>&lt;P&gt;This question is solved here &lt;A href="https://github.com/nuxeo/nuxeo-js-client/issues/85" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-js-client/issues/85&lt;/A&gt; with a new release &lt;A href="https://github.com/nuxeo/nuxeo-js-client/releases/tag/v3.12.0" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-js-client/releases/tag/v3.12.0&lt;/A&gt;
Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2019 14:14:20 GMT</pubDate>
    <dc:creator>freemann_</dc:creator>
    <dc:date>2019-03-26T14:14:20Z</dc:date>
    <item>
      <title>nuxeo js client for RESTClient by Angular 7[SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-js-client-for-restclient-by-angular-7-solved/m-p/313911#M912</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;
&lt;P&gt;I want to use nuxeo js client o consume its REST api in my Angular 7 client, but i can't use it because this is a javascript package and it don't have any types definition for typescript.
However i tried to include this library in my project using this import statement in my custuom service:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;import {Injectable} from '@angular/core';
import {ConfigService} from '@app/technique/@system/config/config.service';
import {Observable} from 'rxjs';
const Nuxeo = require('nuxeo');

@Injectable()
export class NuxeoSocleService {
// XXX Declared here to prevent from mixin style compilation error when using the service.
login: any;
operation: any;
request: any;
repository: any;
batchUpload: any;
users: any;
groups: any;
irectory: any;
workflows: any;
requestAuthenticationToken: any;
// --- 

private nuxeoClient: any;

// Path API, URL et chemin du Workspace Nuxeo
private nuxeoApi = '/api/v1';
private nuxeoPath = this.config.variables.nuxeoPATH;
private nuxeoUri = this.config.variables.nuxeoURI;
private pdfDir = this.config.variables.pdfDIR;
private pdfUri = this.config.variables.pdfURI;

// Ici no définit le header d'appel de l'API 
private defaultHeader = {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'PUT,DELETE,POST,GET,OPTIONS',
'Repository': 'default',
'enrichers.document': 'thumbnail,preview',
'properties': '*',
};

constructor(private config: ConfigService) {

this.nuxeoClient = new Nuxeo({
baseURL: this.nuxeoUri,
 apiPath: this.nuxeoApi,
// Activation du CORS
headers: this.defaultHeader,
});

// Mixin Nuxeo JS Client prototype with NuxeoService to use it the same way.
Object.getOwnPropertyNames(Nuxeo.prototype).forEach(name =&amp;gt; {
if (/^_|constructor/.test(name)) {
return;
}
NuxeoSocleService.prototype[name] = function (...args: any[]) {
return this.instance[name].apply(this.instance, args);
};
});
}
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The problem is that, when i run this angular app this error occurred:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;index.js:1 Uncaught ReferenceError: process is not defined
    at Object../node_modules/promise-queue/index.js (index.js:1)
    at __webpack_require__ (bootstrap:76)
    at Object../node_modules/nuxeo/lib/upload/batch.js (batch.js:5)
    at __webpack_require__ (bootstrap:76)
    at Object../node_modules/nuxeo/lib/operation.js (operation.js:7)
    at __webpack_require__ (bootstrap:76)
    at Object../node_modules/nuxeo/lib/nuxeo.js (nuxeo.js:4)
    at __webpack_require__ (bootstrap:76)
    at Object../node_modules/nuxeo/lib/index.js (index.js:1)
    at __webpack_require__ (bootstrap:76)
./node_modules/promise-queue/index.js   @   index.js:1
__webpack_require__ @   bootstrap:76
./node_modules/nuxeo/lib/upload/batch.js    @   batch.js:5
__webpack_require__ @   bootstrap:76
./node_modules/nuxeo/lib/operation.js   @   operation.js:7
__webpack_require__ @   bootstrap:76
./node_modules/nuxeo/lib/nuxeo.js   @   nuxeo.js:4
__webpack_require__ @   bootstrap:76
./node_modules/nuxeo/lib/index.js   @   index.js:1
__webpack_require__ @   bootstrap:76
./src/app/nuxeo.service.ts  @   DynamicFlatNode.ts:8
__webpack_require__ @   bootstrap:76
./src/app/app.module.ts @   app.component.ts:176
__webpack_require__ @   bootstrap:76
./src/main.ts   @   environment.ts:15
__webpack_require__ @   bootstrap:76
0   @   main.ts:12
__webpack_require__ @   bootstrap:76
checkDeferredModules    @   bootstrap:43
webpackJsonpCallback    @   bootstrap:30
(anonymous) @   main.js:1
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have been doing the import procedure wrong, so any idea to going this problem solve?&lt;/P&gt;
&lt;P&gt;update 1 : When we look in detail, it seems that bootstrap looking for Nuxeo module but there is nothing.&lt;/P&gt;
&lt;P&gt;Thanks for help&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 09:28:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-js-client-for-restclient-by-angular-7-solved/m-p/313911#M912</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2019-02-04T09:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: nuxeo js client for RESTClient by Angular 7[SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-js-client-for-restclient-by-angular-7-solved/m-p/313912#M913</link>
      <description>&lt;P&gt;This question is solved here &lt;A href="https://github.com/nuxeo/nuxeo-js-client/issues/85" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-js-client/issues/85&lt;/A&gt; with a new release &lt;A href="https://github.com/nuxeo/nuxeo-js-client/releases/tag/v3.12.0" target="test_blank"&gt;https://github.com/nuxeo/nuxeo-js-client/releases/tag/v3.12.0&lt;/A&gt;
Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 14:14:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-js-client-for-restclient-by-angular-7-solved/m-p/313912#M913</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2019-03-26T14:14:20Z</dc:date>
    </item>
  </channel>
</rss>

