@alfresco/js-api 7.6.0-7916631745 → 7.6.0-7919738133
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/esm2015/src/api/content-custom-api/api/upload.api.js +1 -1
- package/esm2015/src/api/content-custom-api/api/upload.api.js.map +1 -1
- package/esm5/src/api/content-custom-api/api/upload.api.js +1 -1
- package/esm5/src/api/content-custom-api/api/upload.api.js.map +1 -1
- package/package.json +1 -1
- package/src/api/content-custom-api/api/upload.api.js +1 -1
- package/src/api/content-custom-api/api/upload.api.js.map +1 -1
|
@@ -22,7 +22,7 @@ export class UploadApi extends NodesApi {
|
|
|
22
22
|
const nodeBodyRequired = {
|
|
23
23
|
name: fileDefinition.name,
|
|
24
24
|
nodeType: 'cm:content',
|
|
25
|
-
relativePath
|
|
25
|
+
relativePath: relativePath !== null && relativePath !== void 0 ? relativePath : null
|
|
26
26
|
};
|
|
27
27
|
nodeBody = Object.assign(nodeBodyRequired, nodeBody);
|
|
28
28
|
let formParam = Object.assign({}, nodeBody.properties || {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.api.js","sourceRoot":"","sources":["upload.api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAQhE,MAAM,OAAO,SAAU,SAAQ,QAAQ;IACnC,UAAU,CAAC,cAAmB,EAAE,YAAqB,EAAE,YAAqB,EAAE,QAAyB,EAAE,IAAqB;QAC1H,YAAY,GAAG,YAAY,IAAI,QAAQ,CAAC;QACxC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAElB,MAAM,gBAAgB,GAAG;YACrB,IAAI,EAAE,cAAc,CAAC,IAAI;YACzB,QAAQ,EAAE,YAAY;YACtB,YAAY;
|
|
1
|
+
{"version":3,"file":"upload.api.js","sourceRoot":"","sources":["upload.api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAQhE,MAAM,OAAO,SAAU,SAAQ,QAAQ;IACnC,UAAU,CAAC,cAAmB,EAAE,YAAqB,EAAE,YAAqB,EAAE,QAAyB,EAAE,IAAqB;QAC1H,YAAY,GAAG,YAAY,IAAI,QAAQ,CAAC;QACxC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAElB,MAAM,gBAAgB,GAAG;YACrB,IAAI,EAAE,cAAc,CAAC,IAAI;YACzB,QAAQ,EAAE,YAAY;YACtB,YAAY,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,IAAI;SACrC,CAAC;QAEF,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QAErD,IAAI,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAC7D,SAAS,CAAC,QAAQ,GAAG,cAAc,CAAC;QACpC,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC;QACtC,IAAI,IAAI,CAAC,IAAI,EAAE;YACX,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;SAC9B;QAED,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAE3C,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IACpE,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NodesApi } from '../../content-rest-api/api/nodes.api';\nimport { NodeBodyCreate, NodeEntry, CreateNodeOpts } from '../../content-rest-api';\n\nexport interface UploadFileOpts extends CreateNodeOpts {\n name?: string;\n renditions?: string;\n}\n\nexport class UploadApi extends NodesApi {\n uploadFile(fileDefinition: any, relativePath?: string, rootFolderId?: string, nodeBody?: NodeBodyCreate, opts?: UploadFileOpts): Promise<NodeEntry | any> {\n rootFolderId = rootFolderId || '-root-';\n opts = opts || {};\n\n const nodeBodyRequired = {\n name: fileDefinition.name,\n nodeType: 'cm:content',\n relativePath: relativePath ?? null\n };\n\n nodeBody = Object.assign(nodeBodyRequired, nodeBody);\n\n let formParam = Object.assign({}, nodeBody.properties || {});\n formParam.filedata = fileDefinition;\n formParam.relativePath = relativePath;\n if (opts.name) {\n formParam.name = opts.name;\n }\n\n formParam = Object.assign(formParam, opts);\n\n return this.createNode(rootFolderId, nodeBody, opts, formParam);\n }\n}\n"]}
|
|
@@ -22,7 +22,7 @@ export class UploadApi extends NodesApi {
|
|
|
22
22
|
const nodeBodyRequired = {
|
|
23
23
|
name: fileDefinition.name,
|
|
24
24
|
nodeType: 'cm:content',
|
|
25
|
-
relativePath
|
|
25
|
+
relativePath: relativePath !== null && relativePath !== void 0 ? relativePath : null
|
|
26
26
|
};
|
|
27
27
|
nodeBody = Object.assign(nodeBodyRequired, nodeBody);
|
|
28
28
|
let formParam = Object.assign({}, nodeBody.properties || {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.api.js","sourceRoot":"","sources":["upload.api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAQhE,MAAM,OAAO,SAAU,SAAQ,QAAQ;IACnC,UAAU,CAAC,cAAmB,EAAE,YAAqB,EAAE,YAA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E,IAAI,EAAE,SAAS,CAAC,CAAC;IACpE,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NodesApi } from '../../content-rest-api/api/nodes.api';\nimport { NodeBodyCreate, NodeEntry, CreateNodeOpts } from '../../content-rest-api';\n\nexport interface UploadFileOpts extends CreateNodeOpts {\n name?: string;\n renditions?: string;\n}\n\nexport class UploadApi extends NodesApi {\n uploadFile(fileDefinition: any, relativePath?: string, rootFolderId?: string, nodeBody?: NodeBodyCreate, opts?: UploadFileOpts): Promise<NodeEntry | any> {\n rootFolderId = rootFolderId || '-root-';\n opts = opts || {};\n\n const nodeBodyRequired = {\n name: fileDefinition.name,\n nodeType: 'cm:content',\n relativePath: relativePath ?? null\n };\n\n nodeBody = Object.assign(nodeBodyRequired, nodeBody);\n\n let formParam = Object.assign({}, nodeBody.properties || {});\n formParam.filedata = fileDefinition;\n formParam.relativePath = relativePath;\n if (opts.name) {\n formParam.name = opts.name;\n }\n\n formParam = Object.assign(formParam, opts);\n\n return this.createNode(rootFolderId, nodeBody, opts, formParam);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ class UploadApi extends nodes_api_1.NodesApi {
|
|
|
25
25
|
const nodeBodyRequired = {
|
|
26
26
|
name: fileDefinition.name,
|
|
27
27
|
nodeType: 'cm:content',
|
|
28
|
-
relativePath
|
|
28
|
+
relativePath: relativePath !== null && relativePath !== void 0 ? relativePath : null
|
|
29
29
|
};
|
|
30
30
|
nodeBody = Object.assign(nodeBodyRequired, nodeBody);
|
|
31
31
|
let formParam = Object.assign({}, nodeBody.properties || {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.api.js","sourceRoot":"","sources":["upload.api.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,oEAAgE;AAQhE,MAAa,SAAU,SAAQ,oBAAQ;IACnC,UAAU,CAAC,cAAmB,EAAE,YAAqB,EAAE,YAAqB,EAAE,QAAyB,EAAE,IAAqB;QAC1H,YAAY,GAAG,YAAY,IAAI,QAAQ,CAAC;QACxC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAElB,MAAM,gBAAgB,GAAG;YACrB,IAAI,EAAE,cAAc,CAAC,IAAI;YACzB,QAAQ,EAAE,YAAY;YACtB,YAAY;
|
|
1
|
+
{"version":3,"file":"upload.api.js","sourceRoot":"","sources":["upload.api.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,oEAAgE;AAQhE,MAAa,SAAU,SAAQ,oBAAQ;IACnC,UAAU,CAAC,cAAmB,EAAE,YAAqB,EAAE,YAAqB,EAAE,QAAyB,EAAE,IAAqB;QAC1H,YAAY,GAAG,YAAY,IAAI,QAAQ,CAAC;QACxC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAElB,MAAM,gBAAgB,GAAG;YACrB,IAAI,EAAE,cAAc,CAAC,IAAI;YACzB,QAAQ,EAAE,YAAY;YACtB,YAAY,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,IAAI;SACrC,CAAC;QAEF,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;QAErD,IAAI,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC;QAC7D,SAAS,CAAC,QAAQ,GAAG,cAAc,CAAC;QACpC,SAAS,CAAC,YAAY,GAAG,YAAY,CAAC;QACtC,IAAI,IAAI,CAAC,IAAI,EAAE;YACX,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;SAC9B;QAED,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAE3C,OAAO,IAAI,CAAC,UAAU,CAAC,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IACpE,CAAC;CACJ;AAxBD,8BAwBC","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { NodesApi } from '../../content-rest-api/api/nodes.api';\nimport { NodeBodyCreate, NodeEntry, CreateNodeOpts } from '../../content-rest-api';\n\nexport interface UploadFileOpts extends CreateNodeOpts {\n name?: string;\n renditions?: string;\n}\n\nexport class UploadApi extends NodesApi {\n uploadFile(fileDefinition: any, relativePath?: string, rootFolderId?: string, nodeBody?: NodeBodyCreate, opts?: UploadFileOpts): Promise<NodeEntry | any> {\n rootFolderId = rootFolderId || '-root-';\n opts = opts || {};\n\n const nodeBodyRequired = {\n name: fileDefinition.name,\n nodeType: 'cm:content',\n relativePath: relativePath ?? null\n };\n\n nodeBody = Object.assign(nodeBodyRequired, nodeBody);\n\n let formParam = Object.assign({}, nodeBody.properties || {});\n formParam.filedata = fileDefinition;\n formParam.relativePath = relativePath;\n if (opts.name) {\n formParam.name = opts.name;\n }\n\n formParam = Object.assign(formParam, opts);\n\n return this.createNode(rootFolderId, nodeBody, opts, formParam);\n }\n}\n"]}
|