mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
AAE-29442 moving to node 20.18.1 (#10500)
* AAE-0000 - moving to node 20.18.1 * AAE-29442 Adjusted to the new eslint rule
This commit is contained in:
@@ -24,7 +24,6 @@ import { BaseApi } from './base.api';
|
||||
export class ClassesApi extends BaseApi {
|
||||
/**
|
||||
* Gets the class information for the specified className.
|
||||
*
|
||||
* @param className The identifier of the class.
|
||||
* @returns a Promise, with data of type ClassDescription
|
||||
*/
|
||||
|
@@ -18,125 +18,159 @@
|
||||
import { BaseApi } from './base.api';
|
||||
|
||||
export class ContentApi extends BaseApi {
|
||||
|
||||
/**
|
||||
* Get thumbnail URL for the given nodeId
|
||||
*
|
||||
* @param nodeId The ID of the document node
|
||||
* @param [attachment=false] Retrieve content as an attachment for download
|
||||
* @param [attachment] Retrieve content as an attachment for download
|
||||
* @param [ticket] Custom ticket to use for authentication
|
||||
* @returns The URL address pointing to the content.
|
||||
*/
|
||||
getDocumentThumbnailUrl(nodeId: string, attachment?: boolean, ticket?: string): string {
|
||||
return this.apiClient.basePath + '/nodes/' + nodeId +
|
||||
return (
|
||||
this.apiClient.basePath +
|
||||
'/nodes/' +
|
||||
nodeId +
|
||||
'/renditions/doclib/content' +
|
||||
'?attachment=' + (attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket);
|
||||
'?attachment=' +
|
||||
(attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get preview URL for the given nodeId
|
||||
*
|
||||
* @param nodeId The ID of the document node
|
||||
* @param [attachment=false] Retrieve content as an attachment for download
|
||||
* @param [attachment] Retrieve content as an attachment for download
|
||||
* @param [ticket] Custom ticket to use for authentication
|
||||
* @returns The URL address pointing to the content.
|
||||
*/
|
||||
getDocumentPreviewUrl(nodeId: string, attachment?: boolean, ticket?: string): string {
|
||||
return this.apiClient.basePath + '/nodes/' + nodeId +
|
||||
return (
|
||||
this.apiClient.basePath +
|
||||
'/nodes/' +
|
||||
nodeId +
|
||||
'/renditions/imgpreview/content' +
|
||||
'?attachment=' + (attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket);
|
||||
'?attachment=' +
|
||||
(attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get content URL for the given nodeId
|
||||
*
|
||||
* @param nodeId The ID of the document node
|
||||
* @param [attachment=false] Retrieve content as an attachment for download
|
||||
* @param [attachment] Retrieve content as an attachment for download
|
||||
* @param [ticket] Custom ticket to use for authentication
|
||||
* @returns The URL address pointing to the content.
|
||||
*/
|
||||
getContentUrl(nodeId: string, attachment?: boolean, ticket?: string): string {
|
||||
return this.apiClient.basePath + '/nodes/' + nodeId +
|
||||
return (
|
||||
this.apiClient.basePath +
|
||||
'/nodes/' +
|
||||
nodeId +
|
||||
'/content' +
|
||||
'?attachment=' + (attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket);
|
||||
'?attachment=' +
|
||||
(attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get rendition URL for the given nodeId
|
||||
*
|
||||
* @param nodeId The ID of the document node
|
||||
* @param encoding of the document
|
||||
* @param [attachment=false] retrieve content as an attachment for download
|
||||
* @param [attachment] retrieve content as an attachment for download
|
||||
* @param [ticket] Custom ticket to use for authentication
|
||||
* @returns The URL address pointing to the content.
|
||||
*/
|
||||
getRenditionUrl(nodeId: string, encoding: string, attachment?: boolean, ticket?: string): string {
|
||||
return this.apiClient.basePath + '/nodes/' + nodeId +
|
||||
'/renditions/' + encoding + '/content' +
|
||||
'?attachment=' + (attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket);
|
||||
return (
|
||||
this.apiClient.basePath +
|
||||
'/nodes/' +
|
||||
nodeId +
|
||||
'/renditions/' +
|
||||
encoding +
|
||||
'/content' +
|
||||
'?attachment=' +
|
||||
(attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get version's rendition URL for the given nodeId
|
||||
*
|
||||
* @param nodeId The ID of the document node
|
||||
* @param versionId The ID of the version
|
||||
* @param encoding of the document
|
||||
* @param [attachment=false] retrieve content as an attachment for download
|
||||
* @param [attachment] retrieve content as an attachment for download
|
||||
* @param [ticket] Custom ticket to use for authentication
|
||||
* @returns The URL address pointing to the content.
|
||||
*/
|
||||
getVersionRenditionUrl(nodeId: string, versionId: string, encoding: string, attachment?: boolean, ticket?: string): string {
|
||||
return this.apiClient.basePath + '/nodes/' + nodeId + '/versions/' + versionId +
|
||||
'/renditions/' + encoding + '/content' +
|
||||
'?attachment=' + (attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket);
|
||||
return (
|
||||
this.apiClient.basePath +
|
||||
'/nodes/' +
|
||||
nodeId +
|
||||
'/versions/' +
|
||||
versionId +
|
||||
'/renditions/' +
|
||||
encoding +
|
||||
'/content' +
|
||||
'?attachment=' +
|
||||
(attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get content URL for the given nodeId and versionId
|
||||
*
|
||||
* @param nodeId The ID of the document node
|
||||
* @param versionId The ID of the version
|
||||
* @param [attachment=false] Retrieve content as an attachment for download
|
||||
* @param [attachment] Retrieve content as an attachment for download
|
||||
* @param [ticket] Custom ticket to use for authentication
|
||||
* @returns The URL address pointing to the content.
|
||||
*/
|
||||
getVersionContentUrl(nodeId: string, versionId: string, attachment?: boolean, ticket?: string): string {
|
||||
return this.apiClient.basePath + '/nodes/' + nodeId +
|
||||
'/versions/' + versionId + '/content' +
|
||||
'?attachment=' + (attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket);
|
||||
return (
|
||||
this.apiClient.basePath +
|
||||
'/nodes/' +
|
||||
nodeId +
|
||||
'/versions/' +
|
||||
versionId +
|
||||
'/content' +
|
||||
'?attachment=' +
|
||||
(attachment ? 'true' : 'false') +
|
||||
this.apiClient.getAlfTicket(ticket)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get content url for the given shared link id
|
||||
*
|
||||
* @param linkId - The ID of the shared link
|
||||
* @param [attachment=false] Retrieve content as an attachment for download
|
||||
* @param [attachment] Retrieve content as an attachment for download
|
||||
* @returns The URL address pointing to the content.
|
||||
*/
|
||||
getSharedLinkContentUrl(linkId: string, attachment?: boolean): string {
|
||||
return this.apiClient.basePath + '/shared-links/' + linkId +
|
||||
'/content' +
|
||||
'?attachment=' + (attachment ? 'true' : 'false');
|
||||
return this.apiClient.basePath + '/shared-links/' + linkId + '/content' + '?attachment=' + (attachment ? 'true' : 'false');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the rendition content for file with shared link identifier sharedId.
|
||||
*
|
||||
* @param sharedId - The identifier of a shared link to a file.
|
||||
* @param renditionId - The name of a thumbnail rendition, for example doclib, or pdf.
|
||||
* @param [attachment=false] Retrieve content as an attachment for download
|
||||
* @param [attachment] Retrieve content as an attachment for download
|
||||
* @returns The URL address pointing to the content.
|
||||
*/
|
||||
getSharedLinkRenditionUrl(sharedId: string, renditionId: string, attachment?: boolean): string {
|
||||
return this.apiClient.basePath + '/shared-links/' + sharedId +
|
||||
'/renditions/' + renditionId + '/content' +
|
||||
'?attachment=' + (attachment ? 'true' : 'false');
|
||||
return (
|
||||
this.apiClient.basePath +
|
||||
'/shared-links/' +
|
||||
sharedId +
|
||||
'/renditions/' +
|
||||
renditionId +
|
||||
'/content' +
|
||||
'?attachment=' +
|
||||
(attachment ? 'true' : 'false')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,6 @@ export class WebscriptApi extends BaseApi {
|
||||
* Call a get on a Web Scripts see https://wiki.alfresco.com/wiki/Web_Scripts for more details about Web Scripts
|
||||
* Url syntax definition : http[s]://<host>:<port>/[<contextPath>/]/<servicePath>[/<scriptPath>][?<scriptArgs>]
|
||||
* example: http://localhost:8081/share/service/mytasks?priority=1
|
||||
*
|
||||
* @param httpMethod GET, POST, PUT and DELETE
|
||||
* @param scriptPath script path
|
||||
* @param scriptArgs script arguments
|
||||
|
@@ -18,7 +18,6 @@
|
||||
export class DateAlfresco extends Date {
|
||||
/**
|
||||
* Parses an ISO-8601 string representation of a date value.
|
||||
*
|
||||
* @param dateToConvert The date value as a string.
|
||||
* @returns The parsed date object.
|
||||
*/
|
||||
@@ -41,7 +40,6 @@ export class DateAlfresco extends Date {
|
||||
|
||||
/**
|
||||
* Parses the date component of a ISO-8601 string representation of a date value.
|
||||
*
|
||||
* @param dateToConvert The date value as a string.
|
||||
* @returns The parsed date object.
|
||||
*/
|
||||
@@ -50,7 +48,7 @@ export class DateAlfresco extends Date {
|
||||
// return new Date(str.replace(/T/i, ' '));
|
||||
|
||||
// Compatible with Safari 9.1.2
|
||||
const dateParts = dateToConvert.split(/[^0-9]/).map(function(s) {
|
||||
const dateParts = dateToConvert.split(/[^0-9]/).map(function (s) {
|
||||
return parseInt(s, 10);
|
||||
});
|
||||
return new Date(
|
||||
@@ -68,7 +66,6 @@ export class DateAlfresco extends Date {
|
||||
|
||||
/**
|
||||
* Parses the timezone component of a ISO-8601 string representation of a date value.
|
||||
*
|
||||
* @param dateToConvert The timezone offset as a string, e.g. '+0000', '+2000' or '-0500'.
|
||||
* @returns The number of minutes offset from UTC.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user