@alfresco/js-api 9.1.0-15469386840 → 9.1.0-15484232623
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/package.json +2 -3
- package/esm2015/src/alfrescoApi.js.map +1 -1
- package/esm2015/src/api/gs-core-rest-api/api/filePlans.api.js +0 -15
- package/esm2015/src/api/gs-core-rest-api/api/filePlans.api.js.map +1 -1
- package/esm2015/src/api/gs-core-rest-api/model/index.js +0 -8
- package/esm2015/src/api/gs-core-rest-api/model/index.js.map +1 -1
- package/esm2015/src/superagentHttpClient.js.map +1 -1
- package/esm5/package.json +2 -3
- package/esm5/src/alfrescoApi.js.map +1 -1
- package/esm5/src/api/gs-core-rest-api/api/filePlans.api.js +0 -15
- package/esm5/src/api/gs-core-rest-api/api/filePlans.api.js.map +1 -1
- package/esm5/src/api/gs-core-rest-api/model/index.js +0 -8
- package/esm5/src/api/gs-core-rest-api/model/index.js.map +1 -1
- package/esm5/src/superagentHttpClient.js.map +1 -1
- package/package.json +1 -2
- package/src/alfrescoApi.js.map +1 -1
- package/src/api/gs-core-rest-api/api/filePlans.api.js +0 -15
- package/src/api/gs-core-rest-api/api/filePlans.api.js.map +1 -1
- package/src/api/gs-core-rest-api/model/index.js +0 -8
- package/src/api/gs-core-rest-api/model/index.js.map +1 -1
- package/src/superagentHttpClient.js.map +1 -1
- package/typings/package.json +2 -3
- package/typings/src/api/gs-core-rest-api/api/filePlans.api.d.ts +0 -8
- package/typings/src/api/gs-core-rest-api/model/index.d.ts +0 -8
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRole.js +0 -27
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRole.js.map +0 -1
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRoleCapability.js +0 -26
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRoleCapability.js.map +0 -1
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRoleCapabilityGroup.js +0 -24
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRoleCapabilityGroup.js.map +0 -1
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRoleEntry.js +0 -26
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRoleEntry.js.map +0 -1
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRolePaging.js +0 -26
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRolePaging.js.map +0 -1
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRolePagingList.js +0 -28
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRolePagingList.js.map +0 -1
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRoleParameters.js +0 -18
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRoleParameters.js.map +0 -1
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRoleParametersWhere.js +0 -18
- package/esm2015/src/api/gs-core-rest-api/model/filePlanRoleParametersWhere.js.map +0 -1
- package/esm5/src/api/gs-core-rest-api/model/filePlanRole.js +0 -27
- package/esm5/src/api/gs-core-rest-api/model/filePlanRole.js.map +0 -1
- package/esm5/src/api/gs-core-rest-api/model/filePlanRoleCapability.js +0 -26
- package/esm5/src/api/gs-core-rest-api/model/filePlanRoleCapability.js.map +0 -1
- package/esm5/src/api/gs-core-rest-api/model/filePlanRoleCapabilityGroup.js +0 -24
- package/esm5/src/api/gs-core-rest-api/model/filePlanRoleCapabilityGroup.js.map +0 -1
- package/esm5/src/api/gs-core-rest-api/model/filePlanRoleEntry.js +0 -26
- package/esm5/src/api/gs-core-rest-api/model/filePlanRoleEntry.js.map +0 -1
- package/esm5/src/api/gs-core-rest-api/model/filePlanRolePaging.js +0 -26
- package/esm5/src/api/gs-core-rest-api/model/filePlanRolePaging.js.map +0 -1
- package/esm5/src/api/gs-core-rest-api/model/filePlanRolePagingList.js +0 -28
- package/esm5/src/api/gs-core-rest-api/model/filePlanRolePagingList.js.map +0 -1
- package/esm5/src/api/gs-core-rest-api/model/filePlanRoleParameters.js +0 -18
- package/esm5/src/api/gs-core-rest-api/model/filePlanRoleParameters.js.map +0 -1
- package/esm5/src/api/gs-core-rest-api/model/filePlanRoleParametersWhere.js +0 -18
- package/esm5/src/api/gs-core-rest-api/model/filePlanRoleParametersWhere.js.map +0 -1
- package/src/api/gs-core-rest-api/model/filePlanRole.js +0 -31
- package/src/api/gs-core-rest-api/model/filePlanRole.js.map +0 -1
- package/src/api/gs-core-rest-api/model/filePlanRoleCapability.js +0 -30
- package/src/api/gs-core-rest-api/model/filePlanRoleCapability.js.map +0 -1
- package/src/api/gs-core-rest-api/model/filePlanRoleCapabilityGroup.js +0 -28
- package/src/api/gs-core-rest-api/model/filePlanRoleCapabilityGroup.js.map +0 -1
- package/src/api/gs-core-rest-api/model/filePlanRoleEntry.js +0 -30
- package/src/api/gs-core-rest-api/model/filePlanRoleEntry.js.map +0 -1
- package/src/api/gs-core-rest-api/model/filePlanRolePaging.js +0 -30
- package/src/api/gs-core-rest-api/model/filePlanRolePaging.js.map +0 -1
- package/src/api/gs-core-rest-api/model/filePlanRolePagingList.js +0 -32
- package/src/api/gs-core-rest-api/model/filePlanRolePagingList.js.map +0 -1
- package/src/api/gs-core-rest-api/model/filePlanRoleParameters.js +0 -19
- package/src/api/gs-core-rest-api/model/filePlanRoleParameters.js.map +0 -1
- package/src/api/gs-core-rest-api/model/filePlanRoleParametersWhere.js +0 -19
- package/src/api/gs-core-rest-api/model/filePlanRoleParametersWhere.js.map +0 -1
- package/typings/src/api/gs-core-rest-api/model/filePlanRole.d.ts +0 -25
- package/typings/src/api/gs-core-rest-api/model/filePlanRoleCapability.d.ts +0 -24
- package/typings/src/api/gs-core-rest-api/model/filePlanRoleCapabilityGroup.d.ts +0 -21
- package/typings/src/api/gs-core-rest-api/model/filePlanRoleEntry.d.ts +0 -21
- package/typings/src/api/gs-core-rest-api/model/filePlanRolePaging.d.ts +0 -21
- package/typings/src/api/gs-core-rest-api/model/filePlanRolePagingList.d.ts +0 -23
- package/typings/src/api/gs-core-rest-api/model/filePlanRoleParameters.d.ts +0 -20
- package/typings/src/api/gs-core-rest-api/model/filePlanRoleParametersWhere.d.ts +0 -19
package/esm2015/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfresco/js-api",
|
|
3
|
-
"version": "9.1.0-
|
|
3
|
+
"version": "9.1.0-15484232623",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "JavaScript client library for the Alfresco REST API",
|
|
6
6
|
"author": "Hyland Software, Inc. and its affiliates",
|
|
@@ -20,9 +20,8 @@
|
|
|
20
20
|
"tslib": "^2.6.1"
|
|
21
21
|
},
|
|
22
22
|
"typings": "./typings/index.d.ts",
|
|
23
|
-
"module": "./
|
|
23
|
+
"module": "./src/index.js",
|
|
24
24
|
"es2015": "./esm2015/index.js",
|
|
25
|
-
"types": "./src/index.d.ts",
|
|
26
25
|
"type": "module",
|
|
27
26
|
"main": "./src/index.js"
|
|
28
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alfrescoApi.js","sourceRoot":"","sources":["alfrescoApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAA8B,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKxD,MAAM,OAAO,WAAW;IA0BpB,YAAY,MAA0B,EAAS,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;QAzBtE,WAAM,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E,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;QACzC,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,qBAAqB;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;IAChF,CAAC;IAEO,UAAU,CAAC,KAAa,EAAE,QAAc;QAC5C,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,KAAa,EAAE,QAAc;QAC/B,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAExC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;QAC7D,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC7B,CAAC;IACL,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2025 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 ee, { EmitterMethod, Emitter } from 'event-emitter';\nimport { ContentAuth } from './authentication/contentAuth';\nimport { ProcessAuth } from './authentication/processAuth';\nimport { Oauth2Auth } from './authentication/oauth2Auth';\nimport { ContentClient } from './contentClient';\nimport { ProcessClient } from './processClient';\nimport { Storage } from './storage';\nimport { AlfrescoApiConfig } from './alfrescoApiConfig';\nimport { Authentication } from './authentication/authentication';\nimport { AlfrescoApiType } from './to-deprecate/alfresco-api-type';\nimport { HttpClient } from './api-clients/http-client.interface';\n\nexport class AlfrescoApi implements Emitter, AlfrescoApiType {\n __type = 'legacy-client';\n storage: Storage;\n config: AlfrescoApiConfig;\n contentClient: ContentClient;\n contentPrivateClient: ContentClient;\n processClient: ProcessClient;\n searchClient: ContentClient;\n discoveryClient: ContentClient;\n gsClient: ContentClient;\n authClient: ContentClient;\n hxiConnectorClient: ContentClient;\n oauth2Auth: Oauth2Auth;\n processAuth: ProcessAuth;\n contentAuth: ContentAuth;\n\n on: EmitterMethod;\n off: EmitterMethod;\n once: EmitterMethod;\n\n bufferEvents: string[] = [];\n\n emit: (type: string, ...args: any[]) => void;\n\n username: string;\n\n constructor(config?: AlfrescoApiConfig, public httpClient?: HttpClient) {\n ee(this);\n\n if (config) {\n this.setConfig(config);\n }\n }\n\n setConfig(config: AlfrescoApiConfig) {\n if (!config) {\n config = {};\n }\n\n this.storage = Storage.getInstance();\n this.storage.setDomainPrefix(config.domainPrefix);\n\n this.initConfig(config);\n this.validateTicket(config);\n }\n\n private initConfig(config: AlfrescoApiConfig) {\n this.config = new AlfrescoApiConfig(config);\n\n this.clientsFactory();\n\n this.errorListeners();\n this.ticketMismatchListeners();\n if (this.config.oauthInit) {\n this.initAuth(config);\n\n if (this.isLoggedIn()) {\n this.emitBuffer('logged-in');\n }\n }\n }\n\n private validateTicket(config: AlfrescoApiConfig) {\n if (config.ticketEcm && !this.isOauthConfiguration()) {\n if (!this.contentAuth) {\n this.contentAuth = new ContentAuth(this.config, this, this.httpClient);\n }\n this.contentAuth\n .validateTicket()\n .then((ticket) => {\n config.ticketEcm = ticket;\n })\n .catch((error) => {\n if (error.status === 401) {\n config.ticketEcm = null;\n this.initConfig(config);\n this.emitBuffer('ticket_invalidated');\n }\n });\n }\n }\n\n private initAuth(config: AlfrescoApiConfig): void {\n if (this.isOauthConfiguration()) {\n if (!this.oauth2Auth) {\n this.oauth2Auth = new Oauth2Auth(this.config, this, this.httpClient);\n } else {\n this.oauth2Auth.setConfig(this.config, this);\n }\n\n this.oauth2Auth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n this.setAuthenticationClientECMBPM(this.oauth2Auth.getAuthentication(), this.oauth2Auth.getAuthentication());\n } else {\n if (!this.processAuth) {\n this.processAuth = new ProcessAuth(this.config, this.httpClient);\n } else {\n this.processAuth.setConfig(this.config);\n }\n\n this.processAuth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n this.processAuth?.on('ticket_mismatch', (error: any) => {\n this.ticketMismatchHandler(error);\n });\n\n if (!this.contentAuth) {\n this.contentAuth = new ContentAuth(this.config, this, this.httpClient);\n } else {\n this.contentAuth.setConfig(config);\n }\n\n this.contentAuth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n this.contentAuth?.on('ticket_mismatch', (error: any) => {\n this.ticketMismatchHandler(error);\n });\n\n this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), this.processAuth.getAuthentication());\n }\n }\n\n private clientsFactory() {\n if (!this.contentPrivateClient) {\n this.contentPrivateClient = new ContentClient(this.config, `/api/${this.config.tenant}/private/alfresco/versions/1`, this.httpClient);\n } else {\n this.contentPrivateClient.setConfig(this.config, `/api/${this.config.tenant}/private/alfresco/versions/1`);\n }\n\n if (!this.contentClient) {\n this.contentClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/alfresco/versions/1`, this.httpClient);\n } else {\n this.contentClient.setConfig(this.config, `/api/${this.config.tenant}/public/alfresco/versions/1`);\n }\n\n if (!this.authClient) {\n this.authClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/authentication/versions/1`, this.httpClient);\n } else {\n this.authClient.setConfig(this.config, `/api/${this.config.tenant}/public/authentication/versions/1`);\n }\n\n if (!this.searchClient) {\n this.searchClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/search/versions/1`, this.httpClient);\n } else {\n this.searchClient.setConfig(this.config, `/api/${this.config.tenant}/public/search/versions/1`);\n }\n\n if (!this.discoveryClient) {\n this.discoveryClient = new ContentClient(this.config, `/api`, this.httpClient);\n } else {\n this.discoveryClient.setConfig(this.config, `/api`);\n }\n\n if (!this.gsClient) {\n this.gsClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/gs/versions/1`, this.httpClient);\n } else {\n this.gsClient.setConfig(this.config, `/api/${this.config.tenant}/public/gs/versions/1`);\n }\n\n if (!this.processClient) {\n this.processClient = new ProcessClient(this.config, this.httpClient);\n } else {\n this.processClient.setConfig(this.config);\n }\n\n if (!this.hxiConnectorClient) {\n this.hxiConnectorClient = new ContentClient(this.config, `/api/${this.config.tenant}/private/hxi/versions/1`, this.httpClient);\n } else {\n this.hxiConnectorClient.setConfig(this.config, `/api/${this.config.tenant}/private/hxi/versions/1`);\n }\n }\n\n /**@private? */\n errorListeners() {\n this.contentClient.off('error', () => {});\n this.authClient.off('error', () => {});\n this.contentPrivateClient.off('error', () => {});\n this.processClient.off('error', () => {});\n this.searchClient.off('error', () => {});\n this.discoveryClient.off('error', () => {});\n this.gsClient.off('error', () => {});\n this.hxiConnectorClient.off('error', () => {});\n\n this.contentClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.authClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.contentPrivateClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.processClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.searchClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.discoveryClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.gsClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.hxiConnectorClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n }\n\n ticketMismatchListeners() {\n this.contentClient?.off('ticket_mismatch', () => {});\n this.processClient?.off('ticket_mismatch', () => {});\n\n this.contentClient?.on('ticket_mismatch', (error: any) => {\n this.ticketMismatchHandler(error);\n });\n\n this.processClient?.on('ticket_mismatch', (error: any) => {\n this.ticketMismatchHandler(error);\n });\n }\n\n /**@private? */\n errorHandler(error: { status?: number }) {\n if (this.config.oauthInit && error.status === 401) {\n this.invalidateSession();\n }\n\n this.emitBuffer('error', error);\n }\n\n ticketMismatchHandler(error: { newTicket?: string }) {\n if (error.newTicket) {\n this.config.ticketEcm = error.newTicket;\n this.initConfig(this.config);\n }\n\n this.emitBuffer('ticket_mismatch', error);\n }\n\n changeWithCredentialsConfig(withCredentials: boolean) {\n this.config.withCredentials = withCredentials;\n }\n\n changeCsrfConfig(disableCsrf: boolean) {\n this.config.disableCsrf = disableCsrf;\n this.processAuth.changeCsrfConfig(disableCsrf);\n }\n\n changeEcmHost(hostEcm: string) {\n this.config.hostEcm = hostEcm;\n this.contentAuth.changeHost();\n this.contentClient.changeHost();\n this.authClient.changeHost();\n }\n\n changeBpmHost(hostBpm: string) {\n this.config.hostBpm = hostBpm;\n this.processAuth.changeHost();\n this.processClient.changeHost();\n }\n\n /**\n * login Alfresco API\n * @param username Username to login\n * @param password Password to login\n * @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected.\n */\n login(username: string, password: string): Promise<any> {\n if (!this.isCredentialValid(username) || !this.isCredentialValid(password)) {\n return Promise.reject(new Error('missing username or password'));\n }\n\n if (username) {\n username = username.trim();\n }\n\n this.username = username;\n\n if (this.isOauthConfiguration()) {\n const promise = this.oauth2Auth.login(username, password);\n promise.then((accessToken) => {\n this.config.accessToken = accessToken;\n });\n return promise;\n } else {\n if (this.isBpmConfiguration()) {\n const promise = this.processAuth.login(username, password);\n promise.then((ticketBpm) => {\n this.config.ticketBpm = ticketBpm;\n });\n return promise;\n } else if (this.isEcmConfiguration()) {\n const promise = this.contentAuth.login(username, password);\n promise.then((ticketEcm) => {\n this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), null);\n this.config.ticketEcm = ticketEcm;\n });\n return promise;\n } else if (this.isEcmBpmConfiguration()) {\n const contentProcessPromise = this.loginBPMECM(username, password);\n\n contentProcessPromise.then((data) => {\n this.config.ticketEcm = data[0];\n this.config.ticketBpm = data[1];\n });\n\n return contentProcessPromise;\n } else {\n return Promise.reject(new Error('Unknown configuration'));\n }\n }\n }\n\n isCredentialValid(credential: string): boolean {\n return credential !== undefined && credential !== null && credential !== '';\n }\n\n implicitLogin(): Promise<any> {\n if (!this.isOauthConfiguration()) {\n return Promise.reject(new Error('Missing the required oauth2 configuration'));\n }\n\n return new Promise(() => {\n this.oauth2Auth.implicitLogin();\n });\n }\n\n setAuthenticationClientECMBPM(authECM: Authentication, authBPM: Authentication) {\n this.contentClient.setAuthentications(authECM);\n this.authClient.setAuthentications(authECM);\n this.searchClient.setAuthentications(authECM);\n this.contentPrivateClient.setAuthentications(authECM);\n this.processClient.setAuthentications(authBPM);\n this.searchClient.setAuthentications(authECM);\n this.discoveryClient.setAuthentications(authECM);\n this.gsClient.setAuthentications(authECM);\n this.hxiConnectorClient.setAuthentications(authECM);\n }\n\n /**\n * login Tickets\n * @param ticketEcm alfresco ticket\n * @param ticketBpm alfresco ticket\n */\n loginTicket(ticketEcm: string, ticketBpm: string): Promise<string> {\n this.config.ticketEcm = ticketEcm;\n this.config.ticketBpm = ticketBpm;\n\n return this.contentAuth.validateTicket();\n }\n\n private loginBPMECM(username: string, password: string): Promise<[string, string]> {\n const contentPromise = this.contentAuth.login(username, password);\n const processPromise = this.processAuth.login(username, password);\n\n const promise: any = new Promise<[string, string]>((resolve, reject) => {\n Promise.all([contentPromise, processPromise]).then(\n (data) => {\n promise.emit('success');\n resolve(data);\n },\n (error) => {\n this.contentAuth.invalidateSession();\n this.processAuth.invalidateSession();\n\n if (error.status === 401) {\n promise.emit('unauthorized');\n }\n promise.emit('error');\n reject(error);\n }\n );\n });\n\n ee(promise); // jshint ignore:line\n return promise;\n }\n\n /**\n * logout Alfresco API\n */\n logout(): Promise<void> {\n this.username = null;\n\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.logOut();\n }\n\n if (this.isBpmConfiguration()) {\n return this.processAuth.logout();\n }\n\n if (this.isEcmConfiguration()) {\n const contentPromise = this.contentAuth.logout();\n contentPromise.then(\n (): void => (this.config.ticket = undefined),\n () => {}\n );\n return contentPromise;\n }\n\n if (this.isEcmBpmConfiguration()) {\n return this._logoutBPMECM();\n }\n\n return Promise.resolve();\n }\n\n private _logoutBPMECM(): Promise<void> {\n const contentPromise = this.contentAuth.logout();\n const processPromise = this.processAuth.logout();\n\n const promise: any = new Promise<void>((resolve, reject) => {\n Promise.all([contentPromise, processPromise]).then(\n () => {\n this.config.ticket = undefined;\n promise.emit('logout');\n resolve();\n },\n (error) => {\n if (error.status === 401) {\n promise.emit('unauthorized');\n }\n promise.emit('error');\n reject(error);\n }\n );\n });\n\n ee(promise); // jshint ignore:line\n return promise;\n }\n\n /**\n * If the client is logged in return true\n */\n isLoggedIn(): boolean {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n }\n\n if (this.isBpmConfiguration()) {\n return this.processAuth.isLoggedIn();\n }\n\n if (this.isEcmConfiguration()) {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn();\n }\n\n if (this.isEcmBpmConfiguration()) {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn() && this.processAuth.isLoggedIn();\n }\n\n return false;\n }\n\n isBpmLoggedIn(): boolean {\n if (this.isBpmConfiguration() || this.isEcmBpmConfiguration()) {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n } else {\n return this.processAuth.isLoggedIn();\n }\n }\n return false;\n }\n\n isEcmLoggedIn(): boolean {\n if (this.isEcmConfiguration() || this.isEcmBpmConfiguration()) {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n } else {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn();\n }\n }\n return false;\n }\n\n getBpmUsername(): string {\n if (this.isOauthConfiguration()) {\n return this.username || this.oauth2Auth.storage.getItem('USERNAME');\n } else {\n return this.username || this.processAuth.storage.getItem('APS_USERNAME');\n }\n }\n\n getEcmUsername(): string {\n if (this.isOauthConfiguration()) {\n return this.username || this.oauth2Auth.storage.getItem('USERNAME');\n } else {\n return this.username || this.contentAuth.storage.getItem('ACS_USERNAME');\n }\n }\n\n /**\n * refresh token\n */\n refreshToken(): Promise<any> {\n if (!this.isOauthConfiguration()) {\n return Promise.reject(new Error('Missing the required oauth2 configuration'));\n }\n\n if (this.config.oauth2.implicitFlow) {\n return Promise.reject(new Error('Manual refresh token not possible in implicit flow'));\n }\n\n return this.oauth2Auth.refreshToken();\n }\n\n getTicketAuth(): string {\n return this.oauth2Auth?.getToken();\n }\n\n /**\n * Set the current Ticket\n * @param ticketEcm ecm ticket\n * @param ticketBpm bpm ticket\n */\n setTicket(ticketEcm: string, ticketBpm: string) {\n if (this.contentAuth) {\n this.contentAuth.setTicket(ticketEcm);\n }\n if (this.processAuth) {\n this.processAuth.setTicket(ticketBpm);\n }\n }\n\n /**\n * invalidate the current session\n */\n invalidateSession() {\n if (this.oauth2Auth) {\n this.oauth2Auth.invalidateSession();\n } else {\n this.contentAuth.invalidateSession();\n this.processAuth.invalidateSession();\n }\n }\n\n /**\n * Get the current Ticket for the Bpm\n */\n getTicketBpm(): string {\n return this.processAuth?.getTicket();\n }\n\n /**\n * Get the current Ticket for the Ecm\n */\n getTicketEcm(): string {\n return this.contentAuth?.getTicket();\n }\n\n /**\n * Get the current Ticket for the Ecm and BPM\n */\n getTicket(): [string, string] {\n return [this.contentAuth.getTicket(), this.processAuth.getTicket()];\n }\n\n isBpmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'BPM';\n }\n\n isEcmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'ECM';\n }\n\n isOauthConfiguration(): boolean {\n return this.config.authType === 'OAUTH';\n }\n\n isPublicUrl(): boolean {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isPublicUrl();\n }\n return false;\n }\n\n isEcmBpmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'ALL';\n }\n\n private emitBuffer(event: string, callback?: any): void {\n this.emit(event, callback);\n this.bufferEvents.push(event);\n }\n\n reply(event: string, callback?: any): void {\n if (this.bufferEvents.indexOf(event) >= 0) {\n // eslint-disable-next-line prefer-rest-params\n Function.prototype.apply.call(callback, this, arguments);\n } else {\n this.on(event, callback);\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"alfrescoApi.js","sourceRoot":"","sources":["alfrescoApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAA8B,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKxD,MAAM,OAAO,WAAW;IA0BpB,YAAY,MAA0B,EAAS,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;QAzBtE,WAAM,GAAG,eAAe,CAAC;QAmBzB,iBAAY,GAAa,EAAE,CAAC;QAOxB,EAAE,CAAC,IAAI,CAAC,CAAC;QAET,IAAI,MAAM,EAAE,CAAC;YACT,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;IACL,CAAC;IAED,SAAS,CAAC,MAAyB;QAC/B,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,MAAM,GAAG,EAAE,CAAC;QAChB,CAAC;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c;QAC5C,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC3B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,KAAK,CAAC,KAAa,EAAE,QAAc;QAC/B,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAExC,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;QAC7D,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC7B,CAAC;IACL,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2025 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 ee, { EmitterMethod, Emitter } from 'event-emitter';\nimport { ContentAuth } from './authentication/contentAuth';\nimport { ProcessAuth } from './authentication/processAuth';\nimport { Oauth2Auth } from './authentication/oauth2Auth';\nimport { ContentClient } from './contentClient';\nimport { ProcessClient } from './processClient';\nimport { Storage } from './storage';\nimport { AlfrescoApiConfig } from './alfrescoApiConfig';\nimport { Authentication } from './authentication/authentication';\nimport { AlfrescoApiType } from './to-deprecate/alfresco-api-type';\nimport { HttpClient } from './api-clients/http-client.interface';\n\nexport class AlfrescoApi implements Emitter, AlfrescoApiType {\n __type = 'legacy-client';\n storage: Storage;\n config: AlfrescoApiConfig;\n contentClient: ContentClient;\n contentPrivateClient: ContentClient;\n processClient: ProcessClient;\n searchClient: ContentClient;\n discoveryClient: ContentClient;\n gsClient: ContentClient;\n authClient: ContentClient;\n hxiConnectorClient: ContentClient;\n oauth2Auth: Oauth2Auth;\n processAuth: ProcessAuth;\n contentAuth: ContentAuth;\n\n on: EmitterMethod;\n off: EmitterMethod;\n once: EmitterMethod;\n\n bufferEvents: string[] = [];\n\n emit: (type: string, ...args: any[]) => void;\n\n username: string;\n\n constructor(config?: AlfrescoApiConfig, public httpClient?: HttpClient) {\n ee(this);\n\n if (config) {\n this.setConfig(config);\n }\n }\n\n setConfig(config: AlfrescoApiConfig) {\n if (!config) {\n config = {};\n }\n\n this.storage = Storage.getInstance();\n this.storage.setDomainPrefix(config.domainPrefix);\n\n this.initConfig(config);\n this.validateTicket(config);\n }\n\n private initConfig(config: AlfrescoApiConfig) {\n this.config = new AlfrescoApiConfig(config);\n\n this.clientsFactory();\n\n this.errorListeners();\n this.ticketMismatchListeners();\n if (this.config.oauthInit) {\n this.initAuth(config);\n\n if (this.isLoggedIn()) {\n this.emitBuffer('logged-in');\n }\n }\n }\n\n private validateTicket(config: AlfrescoApiConfig) {\n if (config.ticketEcm && !this.isOauthConfiguration()) {\n if (!this.contentAuth) {\n this.contentAuth = new ContentAuth(this.config, this, this.httpClient);\n }\n this.contentAuth\n .validateTicket()\n .then((ticket) => {\n config.ticketEcm = ticket;\n })\n .catch((error) => {\n if (error.status === 401) {\n config.ticketEcm = null;\n this.initConfig(config);\n this.emitBuffer('ticket_invalidated');\n }\n });\n }\n }\n\n private initAuth(config: AlfrescoApiConfig): void {\n if (this.isOauthConfiguration()) {\n if (!this.oauth2Auth) {\n this.oauth2Auth = new Oauth2Auth(this.config, this, this.httpClient);\n } else {\n this.oauth2Auth.setConfig(this.config, this);\n }\n\n this.oauth2Auth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n this.setAuthenticationClientECMBPM(this.oauth2Auth.getAuthentication(), this.oauth2Auth.getAuthentication());\n } else {\n if (!this.processAuth) {\n this.processAuth = new ProcessAuth(this.config, this.httpClient);\n } else {\n this.processAuth.setConfig(this.config);\n }\n\n this.processAuth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n this.processAuth?.on('ticket_mismatch', (error: any) => {\n this.ticketMismatchHandler(error);\n });\n\n if (!this.contentAuth) {\n this.contentAuth = new ContentAuth(this.config, this, this.httpClient);\n } else {\n this.contentAuth.setConfig(config);\n }\n\n this.contentAuth?.on('logged-in', () => {\n this.emitBuffer('logged-in');\n });\n\n this.contentAuth?.on('ticket_mismatch', (error: any) => {\n this.ticketMismatchHandler(error);\n });\n\n this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), this.processAuth.getAuthentication());\n }\n }\n\n private clientsFactory() {\n if (!this.contentPrivateClient) {\n this.contentPrivateClient = new ContentClient(this.config, `/api/${this.config.tenant}/private/alfresco/versions/1`, this.httpClient);\n } else {\n this.contentPrivateClient.setConfig(this.config, `/api/${this.config.tenant}/private/alfresco/versions/1`);\n }\n\n if (!this.contentClient) {\n this.contentClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/alfresco/versions/1`, this.httpClient);\n } else {\n this.contentClient.setConfig(this.config, `/api/${this.config.tenant}/public/alfresco/versions/1`);\n }\n\n if (!this.authClient) {\n this.authClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/authentication/versions/1`, this.httpClient);\n } else {\n this.authClient.setConfig(this.config, `/api/${this.config.tenant}/public/authentication/versions/1`);\n }\n\n if (!this.searchClient) {\n this.searchClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/search/versions/1`, this.httpClient);\n } else {\n this.searchClient.setConfig(this.config, `/api/${this.config.tenant}/public/search/versions/1`);\n }\n\n if (!this.discoveryClient) {\n this.discoveryClient = new ContentClient(this.config, `/api`, this.httpClient);\n } else {\n this.discoveryClient.setConfig(this.config, `/api`);\n }\n\n if (!this.gsClient) {\n this.gsClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/gs/versions/1`, this.httpClient);\n } else {\n this.gsClient.setConfig(this.config, `/api/${this.config.tenant}/public/gs/versions/1`);\n }\n\n if (!this.processClient) {\n this.processClient = new ProcessClient(this.config, this.httpClient);\n } else {\n this.processClient.setConfig(this.config);\n }\n\n if (!this.hxiConnectorClient) {\n this.hxiConnectorClient = new ContentClient(this.config, `/api/${this.config.tenant}/private/hxi/versions/1`, this.httpClient);\n } else {\n this.hxiConnectorClient.setConfig(this.config, `/api/${this.config.tenant}/private/hxi/versions/1`);\n }\n }\n\n /**@private? */\n errorListeners() {\n this.contentClient.off('error', () => {});\n this.authClient.off('error', () => {});\n this.contentPrivateClient.off('error', () => {});\n this.processClient.off('error', () => {});\n this.searchClient.off('error', () => {});\n this.discoveryClient.off('error', () => {});\n this.gsClient.off('error', () => {});\n this.hxiConnectorClient.off('error', () => {});\n\n this.contentClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.authClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.contentPrivateClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.processClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.searchClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.discoveryClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.gsClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n\n this.hxiConnectorClient.on('error', (error: any) => {\n this.errorHandler(error);\n });\n }\n\n ticketMismatchListeners() {\n this.contentClient?.off('ticket_mismatch', () => {});\n this.processClient?.off('ticket_mismatch', () => {});\n\n this.contentClient?.on('ticket_mismatch', (error: any) => {\n this.ticketMismatchHandler(error);\n });\n\n this.processClient?.on('ticket_mismatch', (error: any) => {\n this.ticketMismatchHandler(error);\n });\n }\n\n /**@private? */\n errorHandler(error: { status?: number }) {\n if (this.config.oauthInit && error.status === 401) {\n this.invalidateSession();\n }\n\n this.emitBuffer('error', error);\n }\n\n ticketMismatchHandler(error: { newTicket?: string }) {\n if (error.newTicket) {\n this.config.ticketEcm = error.newTicket;\n this.initConfig(this.config);\n }\n\n this.emitBuffer('ticket_mismatch', error);\n }\n\n changeWithCredentialsConfig(withCredentials: boolean) {\n this.config.withCredentials = withCredentials;\n }\n\n changeCsrfConfig(disableCsrf: boolean) {\n this.config.disableCsrf = disableCsrf;\n this.processAuth.changeCsrfConfig(disableCsrf);\n }\n\n changeEcmHost(hostEcm: string) {\n this.config.hostEcm = hostEcm;\n this.contentAuth.changeHost();\n this.contentClient.changeHost();\n this.authClient.changeHost();\n }\n\n changeBpmHost(hostBpm: string) {\n this.config.hostBpm = hostBpm;\n this.processAuth.changeHost();\n this.processClient.changeHost();\n }\n\n /**\n * login Alfresco API\n * @param username Username to login\n * @param password Password to login\n * @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected.\n */\n login(username: string, password: string): Promise<any> {\n if (!this.isCredentialValid(username) || !this.isCredentialValid(password)) {\n return Promise.reject(new Error('missing username or password'));\n }\n\n if (username) {\n username = username.trim();\n }\n\n this.username = username;\n\n if (this.isOauthConfiguration()) {\n const promise = this.oauth2Auth.login(username, password);\n promise.then((accessToken) => {\n this.config.accessToken = accessToken;\n });\n return promise;\n } else {\n if (this.isBpmConfiguration()) {\n const promise = this.processAuth.login(username, password);\n promise.then((ticketBpm) => {\n this.config.ticketBpm = ticketBpm;\n });\n return promise;\n } else if (this.isEcmConfiguration()) {\n const promise = this.contentAuth.login(username, password);\n promise.then((ticketEcm) => {\n this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), null);\n this.config.ticketEcm = ticketEcm;\n });\n return promise;\n } else if (this.isEcmBpmConfiguration()) {\n const contentProcessPromise = this.loginBPMECM(username, password);\n\n contentProcessPromise.then((data) => {\n this.config.ticketEcm = data[0];\n this.config.ticketBpm = data[1];\n });\n\n return contentProcessPromise;\n } else {\n return Promise.reject(new Error('Unknown configuration'));\n }\n }\n }\n\n isCredentialValid(credential: string): boolean {\n return credential !== undefined && credential !== null && credential !== '';\n }\n\n implicitLogin(): Promise<any> {\n if (!this.isOauthConfiguration()) {\n return Promise.reject(new Error('Missing the required oauth2 configuration'));\n }\n\n return new Promise(() => {\n this.oauth2Auth.implicitLogin();\n });\n }\n\n setAuthenticationClientECMBPM(authECM: Authentication, authBPM: Authentication) {\n this.contentClient.setAuthentications(authECM);\n this.authClient.setAuthentications(authECM);\n this.searchClient.setAuthentications(authECM);\n this.contentPrivateClient.setAuthentications(authECM);\n this.processClient.setAuthentications(authBPM);\n this.searchClient.setAuthentications(authECM);\n this.discoveryClient.setAuthentications(authECM);\n this.gsClient.setAuthentications(authECM);\n this.hxiConnectorClient.setAuthentications(authECM);\n }\n\n /**\n * login Tickets\n * @param ticketEcm alfresco ticket\n * @param ticketBpm alfresco ticket\n */\n loginTicket(ticketEcm: string, ticketBpm: string): Promise<string> {\n this.config.ticketEcm = ticketEcm;\n this.config.ticketBpm = ticketBpm;\n\n return this.contentAuth.validateTicket();\n }\n\n private loginBPMECM(username: string, password: string): Promise<[string, string]> {\n const contentPromise = this.contentAuth.login(username, password);\n const processPromise = this.processAuth.login(username, password);\n\n const promise: any = new Promise<[string, string]>((resolve, reject) => {\n Promise.all([contentPromise, processPromise]).then(\n (data) => {\n promise.emit('success');\n resolve(data);\n },\n (error) => {\n this.contentAuth.invalidateSession();\n this.processAuth.invalidateSession();\n\n if (error.status === 401) {\n promise.emit('unauthorized');\n }\n promise.emit('error');\n reject(error);\n }\n );\n });\n\n ee(promise); // jshint ignore:line\n return promise;\n }\n\n /**\n * logout Alfresco API\n */\n logout(): Promise<void> {\n this.username = null;\n\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.logOut();\n }\n\n if (this.isBpmConfiguration()) {\n return this.processAuth.logout();\n }\n\n if (this.isEcmConfiguration()) {\n const contentPromise = this.contentAuth.logout();\n contentPromise.then(\n () => (this.config.ticket = undefined),\n () => {}\n );\n return contentPromise;\n }\n\n if (this.isEcmBpmConfiguration()) {\n return this._logoutBPMECM();\n }\n\n return Promise.resolve();\n }\n\n private _logoutBPMECM(): Promise<void> {\n const contentPromise = this.contentAuth.logout();\n const processPromise = this.processAuth.logout();\n\n const promise: any = new Promise<void>((resolve, reject) => {\n Promise.all([contentPromise, processPromise]).then(\n () => {\n this.config.ticket = undefined;\n promise.emit('logout');\n resolve();\n },\n (error) => {\n if (error.status === 401) {\n promise.emit('unauthorized');\n }\n promise.emit('error');\n reject(error);\n }\n );\n });\n\n ee(promise); // jshint ignore:line\n return promise;\n }\n\n /**\n * If the client is logged in return true\n */\n isLoggedIn(): boolean {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n }\n\n if (this.isBpmConfiguration()) {\n return this.processAuth.isLoggedIn();\n }\n\n if (this.isEcmConfiguration()) {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn();\n }\n\n if (this.isEcmBpmConfiguration()) {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn() && this.processAuth.isLoggedIn();\n }\n\n return false;\n }\n\n isBpmLoggedIn(): boolean {\n if (this.isBpmConfiguration() || this.isEcmBpmConfiguration()) {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n } else {\n return this.processAuth.isLoggedIn();\n }\n }\n return false;\n }\n\n isEcmLoggedIn(): boolean {\n if (this.isEcmConfiguration() || this.isEcmBpmConfiguration()) {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isLoggedIn();\n } else {\n return this.config.withCredentials ? true : this.contentAuth.isLoggedIn();\n }\n }\n return false;\n }\n\n getBpmUsername(): string {\n if (this.isOauthConfiguration()) {\n return this.username || this.oauth2Auth.storage.getItem('USERNAME');\n } else {\n return this.username || this.processAuth.storage.getItem('APS_USERNAME');\n }\n }\n\n getEcmUsername(): string {\n if (this.isOauthConfiguration()) {\n return this.username || this.oauth2Auth.storage.getItem('USERNAME');\n } else {\n return this.username || this.contentAuth.storage.getItem('ACS_USERNAME');\n }\n }\n\n /**\n * refresh token\n */\n refreshToken(): Promise<any> {\n if (!this.isOauthConfiguration()) {\n return Promise.reject(new Error('Missing the required oauth2 configuration'));\n }\n\n if (this.config.oauth2.implicitFlow) {\n return Promise.reject(new Error('Manual refresh token not possible in implicit flow'));\n }\n\n return this.oauth2Auth.refreshToken();\n }\n\n getTicketAuth(): string {\n return this.oauth2Auth?.getToken();\n }\n\n /**\n * Set the current Ticket\n * @param ticketEcm ecm ticket\n * @param ticketBpm bpm ticket\n */\n setTicket(ticketEcm: string, ticketBpm: string) {\n if (this.contentAuth) {\n this.contentAuth.setTicket(ticketEcm);\n }\n if (this.processAuth) {\n this.processAuth.setTicket(ticketBpm);\n }\n }\n\n /**\n * invalidate the current session\n */\n invalidateSession() {\n if (this.oauth2Auth) {\n this.oauth2Auth.invalidateSession();\n } else {\n this.contentAuth.invalidateSession();\n this.processAuth.invalidateSession();\n }\n }\n\n /**\n * Get the current Ticket for the Bpm\n */\n getTicketBpm(): string {\n return this.processAuth?.getTicket();\n }\n\n /**\n * Get the current Ticket for the Ecm\n */\n getTicketEcm(): string {\n return this.contentAuth?.getTicket();\n }\n\n /**\n * Get the current Ticket for the Ecm and BPM\n */\n getTicket(): [string, string] {\n return [this.contentAuth.getTicket(), this.processAuth.getTicket()];\n }\n\n isBpmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'BPM';\n }\n\n isEcmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'ECM';\n }\n\n isOauthConfiguration(): boolean {\n return this.config.authType === 'OAUTH';\n }\n\n isPublicUrl(): boolean {\n if (this.isOauthConfiguration()) {\n return this.oauth2Auth.isPublicUrl();\n }\n return false;\n }\n\n isEcmBpmConfiguration(): boolean {\n return this.config.provider && this.config.provider.toUpperCase() === 'ALL';\n }\n\n private emitBuffer(event: string, callback?: any): void {\n this.emit(event, callback);\n this.bufferEvents.push(event);\n }\n\n reply(event: string, callback?: any): void {\n if (this.bufferEvents.indexOf(event) >= 0) {\n // eslint-disable-next-line prefer-rest-params\n Function.prototype.apply.call(callback, this, arguments);\n } else {\n this.on(event, callback);\n }\n }\n}\n"]}
|
|
@@ -94,20 +94,5 @@ export class FilePlansApi extends BaseApi {
|
|
|
94
94
|
returnType: FilePlanEntry
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
|
-
getFilePlanRoles(filePlanId, parameters) {
|
|
98
|
-
var _a;
|
|
99
|
-
throwIfNotDefined(filePlanId, 'filePlanId');
|
|
100
|
-
return this.get({
|
|
101
|
-
path: '/file-plans/{filePlanId}/roles',
|
|
102
|
-
pathParams: {
|
|
103
|
-
filePlanId
|
|
104
|
-
},
|
|
105
|
-
queryParams: {
|
|
106
|
-
where: ((_a = parameters === null || parameters === void 0 ? void 0 : parameters.where) === null || _a === void 0 ? void 0 : _a.capabilityNames)
|
|
107
|
-
? `(capabilityName in (${parameters.where.capabilityNames.map((value) => "'" + value + "'").join(', ')}))`
|
|
108
|
-
: undefined
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
97
|
}
|
|
113
98
|
//# sourceMappingURL=../../../../../../../../lib/js-api/src/api/gs-core-rest-api/api/filePlans.api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filePlans.api.js","sourceRoot":"","sources":["filePlans.api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAOpD,MAAM,OAAO,YAAa,SAAQ,OAAO;IASrC,wBAAwB,CACpB,UAAkB,EAClB,cAAsC,EACtC,IAEuB;QAEvB,iBAAiB,CAAC,U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AAC,UAAkB,EAAE,UAAmC;;QACpE,iBAAiB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAE5C,OAAO,IAAI,CAAC,GAAG,CAAC;YACZ,IAAI,EAAE,gCAAgC;YACtC,UAAU,EAAE;gBACR,UAAU;aACb;YACD,WAAW,EAAE;gBACT,KAAK,EAAE,CAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,0CAAE,eAAe;oBACrC,CAAC,CAAC,uBAAuB,UAAU,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;oBAC1G,CAAC,CAAC,SAAS;aAClB;SACJ,CAAC,CAAC;IACP,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2025 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 { FilePlanBodyUpdate } from '../model/filePlanBodyUpdate';\nimport { FilePlanEntry } from '../model/filePlanEntry';\nimport { RecordCategoryEntry } from '../model/recordCategoryEntry';\nimport { RecordCategoryPaging } from '../model/recordCategoryPaging';\nimport { RootCategoryBodyCreate } from '../model/rootCategoryBodyCreate';\nimport { BaseApi } from './base.api';\nimport { buildCollectionParam } from '../../../alfrescoApiClient';\nimport { throwIfNotDefined } from '../../../assert';\nimport { RecordsIncludeQuery, RecordsPagingQuery, RecordsSourceQuery } from './types';\nimport { FilePlanRolePaging, FilePlanRoleParameters } from '../model';\n\n/**\n * FilePlansApi service.\n */\nexport class FilePlansApi extends BaseApi {\n /**\n * Create record categories for a file plan\n * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias.\n * @param nodeBodyCreate The node information to create.\n * @param opts Optional parameters\n * @param opts.autoRename If `true`, then a name clash will cause an attempt to auto rename by finding a unique name using an integer suffix.\n * @returns Promise<RecordCategoryEntry>\n */\n createFilePlanCategories(\n filePlanId: string,\n nodeBodyCreate: RootCategoryBodyCreate,\n opts?: {\n autoRename?: boolean;\n } & RecordsIncludeQuery\n ): Promise<RecordCategoryEntry> {\n throwIfNotDefined(filePlanId, 'filePlanId');\n throwIfNotDefined(nodeBodyCreate, 'nodeBodyCreate');\n\n const pathParams = {\n filePlanId\n };\n\n const queryParams = {\n autoRename: opts?.autoRename,\n include: buildCollectionParam(opts?.include, 'csv'),\n fields: buildCollectionParam(opts?.fields, 'csv')\n };\n\n return this.post({\n path: '/file-plans/{filePlanId}/categories',\n pathParams,\n queryParams,\n contentTypes: ['application/json', 'multipart/form-data'],\n bodyParam: nodeBodyCreate,\n returnType: RecordCategoryEntry\n });\n }\n\n /**\n * Get a file plan\n *\n * Mandatory fields and the file plan's aspects and properties are returned by default.\n * You can use the **include** parameter (include=allowableOperations) to return additional information.\n * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias.\n * @param opts Optional parameters\n * @returns Promise<FilePlanEntry>\n */\n getFilePlan(filePlanId: string, opts?: RecordsIncludeQuery): Promise<FilePlanEntry> {\n throwIfNotDefined(filePlanId, 'filePlanId');\n\n const pathParams = {\n filePlanId\n };\n\n const queryParams = {\n include: buildCollectionParam(opts?.include, 'csv'),\n fields: buildCollectionParam(opts?.fields, 'csv')\n };\n\n return this.get({\n path: '/file-plans/{filePlanId}',\n pathParams,\n queryParams,\n returnType: FilePlanEntry\n });\n }\n\n /**\n * List file plans's children\n *\n * Minimal information for each child is returned by default.\n * You can use the **include** parameter (include=allowableOperations) to return additional information.\n * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias.\n * @param opts Optional parameters\n * @returns Promise<RecordCategoryPaging>\n */\n getFilePlanCategories(filePlanId: string, opts?: RecordsIncludeQuery & RecordsPagingQuery & RecordsSourceQuery): Promise<RecordCategoryPaging> {\n throwIfNotDefined(filePlanId, 'filePlanId');\n\n const pathParams = {\n filePlanId\n };\n\n const queryParams = {\n skipCount: opts?.skipCount,\n maxItems: opts?.maxItems,\n include: buildCollectionParam(opts?.include, 'csv'),\n includeSource: opts?.includeSource,\n fields: buildCollectionParam(opts?.fields, 'csv')\n };\n\n return this.get({\n path: '/file-plans/{filePlanId}/categories',\n pathParams,\n queryParams,\n returnType: RecordCategoryPaging\n });\n }\n\n /**\n * Update a file plan\n *\n * **Note:** Currently there is no optimistic locking for updates, so they are applied in \\\"last one wins\\\" order.\n * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias.\n * @param filePlanBodyUpdate The file plan information to update.\n * @param opts Optional parameters\n * @returns Promise<FilePlanEntry>\n */\n updateFilePlan(filePlanId: string, filePlanBodyUpdate: FilePlanBodyUpdate, opts?: RecordsIncludeQuery): Promise<FilePlanEntry> {\n throwIfNotDefined(filePlanId, 'filePlanId');\n throwIfNotDefined(filePlanBodyUpdate, 'filePlanBodyUpdate');\n\n const pathParams = {\n filePlanId\n };\n\n const queryParams = {\n include: buildCollectionParam(opts?.include, 'csv'),\n fields: buildCollectionParam(opts?.fields, 'csv')\n };\n\n return this.put({\n path: '/file-plans/{filePlanId}',\n pathParams,\n queryParams,\n bodyParam: filePlanBodyUpdate,\n returnType: FilePlanEntry\n });\n }\n\n /**\n * Gets a list of roles for the specified file plan.\n * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias.\n * @param parameters Optional parameters\n * @returns Promise<FilePlanEntry>\n */\n getFilePlanRoles(filePlanId: string, parameters?: FilePlanRoleParameters): Promise<FilePlanRolePaging> {\n throwIfNotDefined(filePlanId, 'filePlanId');\n\n return this.get({\n path: '/file-plans/{filePlanId}/roles',\n pathParams: {\n filePlanId\n },\n queryParams: {\n where: parameters?.where?.capabilityNames\n ? `(capabilityName in (${parameters.where.capabilityNames.map((value) => \"'\" + value + \"'\").join(', ')}))`\n : undefined\n }\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"filePlans.api.js","sourceRoot":"","sources":["filePlans.api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAMpD,MAAM,OAAO,YAAa,SAAQ,OAAO;IASrC,wBAAwB,CACpB,UAAkB,EAClB,cAAsC,EACtC,IAEuB;QAEvB,iBAAiB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAC5C,iBAAiB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;QAEpD,MAAM,UAAU,GAAG;YACf,UAAU;SACb,CAAC;QAEF,MAAM,WAAW,GAAG;YAChB,UAAU,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU;YAC5B,OAAO,EAAE,oBAAoB,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,EAAE,KAAK,CAAC;YACnD,MAAM,EAAE,oBAAoB,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,EAAE,KAAK,CAAC;SACpD,CAAC;QAEF,OAAO,IAAI,CAAC,IAAI,CAAC;YACb,IAAI,EAAE,qCAAqC;YAC3C,UAAU;YACV,WAAW;YACX,YAAY,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,CAAC;YACzD,SAAS,EAAE,c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AAoB;SACnC,CAAC,CAAC;IACP,CAAC;IAWD,cAAc,CAAC,UAAkB,EAAE,kBAAsC,EAAE,IAA0B;QACjG,iBAAiB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAC5C,iBAAiB,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC;QAE5D,MAAM,UAAU,GAAG;YACf,UAAU;SACb,CAAC;QAEF,MAAM,WAAW,GAAG;YAChB,OAAO,EAAE,oBAAoB,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,EAAE,KAAK,CAAC;YACnD,MAAM,EAAE,oBAAoB,CAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,EAAE,KAAK,CAAC;SACpD,CAAC;QAEF,OAAO,IAAI,CAAC,GAAG,CAAC;YACZ,IAAI,EAAE,0BAA0B;YAChC,UAAU;YACV,WAAW;YACX,SAAS,EAAE,kBAAkB;YAC7B,UAAU,EAAE,aAAa;SAC5B,CAAC,CAAC;IACP,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2025 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 { FilePlanBodyUpdate } from '../model/filePlanBodyUpdate';\nimport { FilePlanEntry } from '../model/filePlanEntry';\nimport { RecordCategoryEntry } from '../model/recordCategoryEntry';\nimport { RecordCategoryPaging } from '../model/recordCategoryPaging';\nimport { RootCategoryBodyCreate } from '../model/rootCategoryBodyCreate';\nimport { BaseApi } from './base.api';\nimport { buildCollectionParam } from '../../../alfrescoApiClient';\nimport { throwIfNotDefined } from '../../../assert';\nimport { RecordsIncludeQuery, RecordsPagingQuery, RecordsSourceQuery } from './types';\n\n/**\n * FilePlansApi service.\n */\nexport class FilePlansApi extends BaseApi {\n /**\n * Create record categories for a file plan\n * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias.\n * @param nodeBodyCreate The node information to create.\n * @param opts Optional parameters\n * @param opts.autoRename If `true`, then a name clash will cause an attempt to auto rename by finding a unique name using an integer suffix.\n * @returns Promise<RecordCategoryEntry>\n */\n createFilePlanCategories(\n filePlanId: string,\n nodeBodyCreate: RootCategoryBodyCreate,\n opts?: {\n autoRename?: boolean;\n } & RecordsIncludeQuery\n ): Promise<RecordCategoryEntry> {\n throwIfNotDefined(filePlanId, 'filePlanId');\n throwIfNotDefined(nodeBodyCreate, 'nodeBodyCreate');\n\n const pathParams = {\n filePlanId\n };\n\n const queryParams = {\n autoRename: opts?.autoRename,\n include: buildCollectionParam(opts?.include, 'csv'),\n fields: buildCollectionParam(opts?.fields, 'csv')\n };\n\n return this.post({\n path: '/file-plans/{filePlanId}/categories',\n pathParams,\n queryParams,\n contentTypes: ['application/json', 'multipart/form-data'],\n bodyParam: nodeBodyCreate,\n returnType: RecordCategoryEntry\n });\n }\n\n /**\n * Get a file plan\n *\n * Mandatory fields and the file plan's aspects and properties are returned by default.\n * You can use the **include** parameter (include=allowableOperations) to return additional information.\n * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias.\n * @param opts Optional parameters\n * @returns Promise<FilePlanEntry>\n */\n getFilePlan(filePlanId: string, opts?: RecordsIncludeQuery): Promise<FilePlanEntry> {\n throwIfNotDefined(filePlanId, 'filePlanId');\n\n const pathParams = {\n filePlanId\n };\n\n const queryParams = {\n include: buildCollectionParam(opts?.include, 'csv'),\n fields: buildCollectionParam(opts?.fields, 'csv')\n };\n\n return this.get({\n path: '/file-plans/{filePlanId}',\n pathParams,\n queryParams,\n returnType: FilePlanEntry\n });\n }\n\n /**\n * List file plans's children\n *\n * Minimal information for each child is returned by default.\n * You can use the **include** parameter (include=allowableOperations) to return additional information.\n * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias.\n * @param opts Optional parameters\n * @returns Promise<RecordCategoryPaging>\n */\n getFilePlanCategories(filePlanId: string, opts?: RecordsIncludeQuery & RecordsPagingQuery & RecordsSourceQuery): Promise<RecordCategoryPaging> {\n throwIfNotDefined(filePlanId, 'filePlanId');\n\n const pathParams = {\n filePlanId\n };\n\n const queryParams = {\n skipCount: opts?.skipCount,\n maxItems: opts?.maxItems,\n include: buildCollectionParam(opts?.include, 'csv'),\n includeSource: opts?.includeSource,\n fields: buildCollectionParam(opts?.fields, 'csv')\n };\n\n return this.get({\n path: '/file-plans/{filePlanId}/categories',\n pathParams,\n queryParams,\n returnType: RecordCategoryPaging\n });\n }\n\n /**\n * Update a file plan\n *\n * **Note:** Currently there is no optimistic locking for updates, so they are applied in \\\"last one wins\\\" order.\n * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias.\n * @param filePlanBodyUpdate The file plan information to update.\n * @param opts Optional parameters\n * @returns Promise<FilePlanEntry>\n */\n updateFilePlan(filePlanId: string, filePlanBodyUpdate: FilePlanBodyUpdate, opts?: RecordsIncludeQuery): Promise<FilePlanEntry> {\n throwIfNotDefined(filePlanId, 'filePlanId');\n throwIfNotDefined(filePlanBodyUpdate, 'filePlanBodyUpdate');\n\n const pathParams = {\n filePlanId\n };\n\n const queryParams = {\n include: buildCollectionParam(opts?.include, 'csv'),\n fields: buildCollectionParam(opts?.fields, 'csv')\n };\n\n return this.put({\n path: '/file-plans/{filePlanId}',\n pathParams,\n queryParams,\n bodyParam: filePlanBodyUpdate,\n returnType: FilePlanEntry\n });\n }\n}\n"]}
|
|
@@ -18,14 +18,6 @@ export * from './filePlan';
|
|
|
18
18
|
export * from './filePlanBodyUpdate';
|
|
19
19
|
export * from './filePlanComponentBodyUpdate';
|
|
20
20
|
export * from './filePlanEntry';
|
|
21
|
-
export * from './filePlanRole';
|
|
22
|
-
export * from './filePlanRoleCapability';
|
|
23
|
-
export * from './filePlanRoleCapabilityGroup';
|
|
24
|
-
export * from './filePlanRoleEntry';
|
|
25
|
-
export * from './filePlanRolePaging';
|
|
26
|
-
export * from './filePlanRolePagingList';
|
|
27
|
-
export * from './filePlanRoleParameters';
|
|
28
|
-
export * from './filePlanRoleParametersWhere';
|
|
29
21
|
export * from './rMNodeBodyCreate';
|
|
30
22
|
export * from './rMNodeBodyCreateWithRelativePath';
|
|
31
23
|
export * from './rMSite';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,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,cAAc,+BAA+B,CAAC","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2025 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\nexport * from './filePlan';\nexport * from './filePlanBodyUpdate';\nexport * from './filePlanComponentBodyUpdate';\nexport * from './filePlanEntry';\nexport * from './rMNodeBodyCreate';\nexport * from './rMNodeBodyCreateWithRelativePath';\nexport * from './rMSite';\nexport * from './rMSiteBodyCreate';\nexport * from './rMSiteBodyUpdate';\nexport * from './rMSiteEntry';\nexport * from './record';\nexport * from './recordCategory';\nexport * from './recordCategoryChild';\nexport * from './recordCategoryChildEntry';\nexport * from './recordCategoryChildPaging';\nexport * from './recordCategoryChildPagingList';\nexport * from './recordCategoryEntry';\nexport * from './recordCategoryPaging';\nexport * from './recordCategoryPagingList';\nexport * from './recordEntry';\nexport * from './recordFolder';\nexport * from './recordFolderAssociationPaging';\nexport * from './recordFolderAssociationPagingList';\nexport * from './recordFolderChildAssociationEntry';\nexport * from './recordFolderEntry';\nexport * from './requestBodyFile';\nexport * from './rootCategoryBodyCreate';\nexport * from './transfer';\nexport * from './transferAssociationPaging';\nexport * from './transferAssociationPagingList';\nexport * from './transferChild';\nexport * from './transferChildAssociationEntry';\nexport * from './transferContainer';\nexport * from './transferContainerAssociationPaging';\nexport * from './transferContainerAssociationPagingList';\nexport * from './transferContainerBodyUpdate';\nexport * from './transferContainerChild';\nexport * from './transferContainerChildAssociationEntry';\nexport * from './transferContainerEntry';\nexport * from './transferEntry';\nexport * from './unfiledContainer';\nexport * from './unfiledContainerAssociationPaging';\nexport * from './unfiledContainerAssociationPagingList';\nexport * from './unfiledContainerChild';\nexport * from './unfiledContainerChildAssociationEntry';\nexport * from './unfiledContainerEntry';\nexport * from './unfiledRecordContainerBodyUpdate';\nexport * from './unfiledRecordFolder';\nexport * from './unfiledRecordFolderAssociationPaging';\nexport * from './unfiledRecordFolderAssociationPagingList';\nexport * from './unfiledRecordFolderBodyUpdate';\nexport * from './unfiledRecordFolderChild';\nexport * from './unfiledRecordFolderChildAssociationEntry';\nexport * from './unfiledRecordFolderEntry';\nexport * from './recordFolderChildAssociation';\nexport * from './transferChildAssociation';\nexport * from './transferContainerChildAssociation';\nexport * from './unfiledContainerChildAssociation';\nexport * from './unfiledRecordFolderChildAssociation';\nexport * from './hold';\nexport * from './holdBody';\nexport * from './holdBulkOperation';\nexport * from './holdBulkStatus';\nexport * from './holdBulkStatusEntry';\nexport * from './holdEntry';\nexport * from './holdPaging';\nexport * from './holdPagingList';\nexport * from './nodeAssignedHold';\nexport * from './bulkAssignHoldResponse';\nexport * from './bulkAssignHoldResponseEntry';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"superagentHttpClient.js","sourceRoot":"","sources":["superagentHttpClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,UAA2C,MAAM,YAAY,CAAC;AAKrE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAKnD,MAAM,eAAe,GAAG,CAAC,KAA8B,EAA0B,EAAE,CAAE,KAAuB,aAAvB,KAAK,uBAAL,KAAK,CAAoB,gBAAgB,CAAC;AAE/H,MAAM,OAAO,oBAAoB;IAAjC;QAII,YAAO,GAAsD,SAAS,CAAC;IAqV3E,CAAC;IAnVG,IAAI,CAAU,GAAW,EAAE,OAAuB,EAAE,eAAgC,EAAE,QAAkB;QACpG,OAAO,IAAI,CAAC,OAAO,CAAI,GAAG,kCAAO,OAAO,KAAE,UAAU,EAAE,MAAM,KAAI,eAAe,EAAE,Q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MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC1B,IAAI,oBAAoB,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;oBAClE,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;gBAC3B,CAAC;qBAAM,CAAC;oBACJ,SAAS,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;gBAC1C,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAOO,MAAM,CAAC,WAAW,CAAC,KAAU;QAEjC,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,KAAK,YAAY,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1E,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,UAAU,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;YACtD,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,UAAU,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;YACtD,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2025 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 ee, { Emitter } from 'event-emitter';\nimport superagent, { Response, SuperAgentRequest } from 'superagent';\nimport { Authentication } from './authentication/authentication';\nimport { RequestOptions, HttpClient, SecurityOptions, Emitters } from './api-clients/http-client.interface';\nimport { Oauth2 } from './authentication/oauth2';\nimport { BasicAuth } from './authentication/basicAuth';\nimport { isBrowser, paramToString } from './utils';\n\ndeclare const Blob: any;\ndeclare const Buffer: any;\n\nconst isProgressEvent = (event: ProgressEvent | unknown): event is ProgressEvent => (event as ProgressEvent)?.lengthComputable;\n\nexport class SuperagentHttpClient implements HttpClient {\n /**\n * The default HTTP timeout for all API calls.\n */\n timeout: number | { deadline?: number; response?: number } = undefined;\n\n post<T = any>(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise<T> {\n return this.request<T>(url, { ...options, httpMethod: 'POST' }, securityOptions, emitters);\n }\n\n put<T = any>(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise<T> {\n return this.request<T>(url, { ...options, httpMethod: 'PUT' }, securityOptions, emitters);\n }\n\n get<T = any>(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise<T> {\n return this.request<T>(url, { ...options, httpMethod: 'GET' }, securityOptions, emitters);\n }\n\n delete<T = void>(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise<T> {\n return this.request<T>(url, { ...options, httpMethod: 'DELETE' }, securityOptions, emitters);\n }\n\n request<T = any>(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise<T> {\n const { httpMethod, queryParams, headerParams, formParams, bodyParam, contentType, accept, responseType, returnType } = options;\n const { eventEmitter, apiClientEmitter } = emitters;\n\n let request = this.buildRequest(\n httpMethod,\n url,\n queryParams,\n headerParams,\n formParams,\n bodyParam,\n contentType,\n accept,\n responseType,\n eventEmitter,\n returnType,\n securityOptions\n );\n\n if (returnType === 'Binary') {\n request = request.buffer(true).parse(superagent.parse['application/octet-stream']);\n }\n\n const promise: any = new Promise((resolve, reject) => {\n request.on('abort', () => {\n eventEmitter.emit('abort');\n });\n request.end((error: any, response: Response) => {\n if (error) {\n apiClientEmitter.emit('error', error);\n eventEmitter.emit('error', error);\n\n if (error.status === 401) {\n apiClientEmitter.emit('unauthorized');\n eventEmitter.emit('unauthorized');\n }\n\n if (response?.text) {\n error = error || {};\n reject(Object.assign(error, { message: response.text }));\n } else {\n // eslint-disable-next-line prefer-promise-reject-errors\n reject({ error });\n }\n } else {\n if (securityOptions.isBpmRequest) {\n const hasSetCookie = Object.prototype.hasOwnProperty.call(response.header, 'set-cookie');\n if (response.header && hasSetCookie) {\n // mutate the passed value from AlfrescoApiClient class for backward compatibility\n securityOptions.authentications.cookie = response.header['set-cookie'][0];\n }\n }\n let data = {};\n if (response.type === 'text/html') {\n data = SuperagentHttpClient.deserialize(response);\n } else {\n data = SuperagentHttpClient.deserialize(response, returnType);\n }\n\n eventEmitter.emit('success', data);\n resolve(data);\n }\n });\n });\n\n promise.abort = function () {\n request.abort();\n return this;\n };\n\n return promise;\n }\n\n private buildRequest(\n httpMethod: string,\n url: string,\n queryParams: { [key: string]: any },\n headerParams: { [key: string]: any },\n formParams: { [key: string]: any },\n bodyParam: string | object,\n contentType: string,\n accept: string,\n responseType: string,\n eventEmitter: ee.Emitter,\n returnType: string,\n securityOptions: SecurityOptions\n ) {\n const request = superagent(httpMethod, url);\n\n const { isBpmRequest, authentications, defaultHeaders = {}, enableCsrf, withCredentials = false } = securityOptions;\n\n // apply authentications\n this.applyAuthToRequest(request, authentications);\n\n // set query parameters\n request.query(SuperagentHttpClient.normalizeParams(queryParams));\n\n // set header parameters\n request.set(defaultHeaders).set(SuperagentHttpClient.normalizeParams(headerParams));\n\n if (isBpmRequest && enableCsrf) {\n this.setCsrfToken(request);\n }\n\n if (withCredentials) {\n request.withCredentials();\n }\n\n // add cookie for activiti\n if (isBpmRequest) {\n request.withCredentials();\n if (securityOptions.authentications.cookie) {\n if (!isBrowser()) {\n request.set('Cookie', securityOptions.authentications.cookie);\n }\n }\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n if (contentType && contentType !== 'multipart/form-data') {\n request.type(contentType);\n } else if (!(request as any).header['Content-Type'] && contentType !== 'multipart/form-data') {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(SuperagentHttpClient.normalizeParams(formParams)).on('progress', (event: any) => {\n this.progress(event, eventEmitter);\n });\n } else if (contentType === 'multipart/form-data') {\n const _formParams = SuperagentHttpClient.normalizeParams(formParams);\n for (const key in _formParams) {\n if (Object.prototype.hasOwnProperty.call(_formParams, key)) {\n if (SuperagentHttpClient.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]).on('progress', (event: ProgressEvent) => {\n // jshint ignore:line\n this.progress(event, eventEmitter);\n });\n } else {\n request.field(key, _formParams[key]).on('progress', (event: ProgressEvent) => {\n // jshint ignore:line\n this.progress(event, eventEmitter);\n });\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam).on('progress', (event: any) => {\n this.progress(event, eventEmitter);\n });\n }\n\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'blob' || returnType === 'Blob' || responseType === 'blob' || responseType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n return request;\n }\n\n setCsrfToken(request: SuperAgentRequest): void {\n const token = SuperagentHttpClient.createCSRFToken();\n request.set('X-CSRF-TOKEN', token);\n\n if (!isBrowser()) {\n request.set('Cookie', 'CSRF-TOKEN=' + token + ';path=/');\n }\n\n try {\n document.cookie = 'CSRF-TOKEN=' + token + ';path=/';\n } catch (err) {\n /* continue regardless of error */\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param request The request object created by a <code>superagent()</code> call.\n * @param authentications authentications\n */\n private applyAuthToRequest(request: SuperAgentRequest, authentications: Authentication) {\n if (authentications) {\n switch (authentications.type) {\n case 'basic': {\n const basicAuth: BasicAuth = authentications.basicAuth;\n if (basicAuth.username || basicAuth.password) {\n request.auth(basicAuth.username || '', basicAuth.password || '');\n }\n break;\n }\n case 'activiti': {\n if (authentications.basicAuth.ticket) {\n request.set({ Authorization: authentications.basicAuth.ticket });\n }\n break;\n }\n case 'oauth2': {\n const oauth2: Oauth2 = authentications.oauth2;\n if (oauth2.accessToken) {\n request.set({ Authorization: 'Bearer ' + oauth2.accessToken });\n }\n break;\n }\n default:\n throw new Error('Unknown authentication type: ' + authentications.type);\n }\n }\n }\n\n private progress(event: ProgressEvent | unknown, eventEmitter: Emitter): void {\n if (isProgressEvent(event)) {\n const percent = Math.round((event.loaded / event.total) * 100);\n\n const progress = {\n total: event.total,\n loaded: event.loaded,\n percent\n };\n\n eventEmitter.emit('progress', progress);\n }\n }\n\n private static createCSRFToken(a?: any): string {\n return a\n ? (a ^ ((Math.random() * 16) >> (a / 4))).toString(16)\n : ([1e16] + (1e16).toString()).replace(/[01]/g, SuperagentHttpClient.createCSRFToken);\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param response A SuperAgent response object.\n * @param returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on <code>data<code> will be converted to this type.\n * @returns A value of the specified type.\n */\n private static deserialize(response: Response, returnType?: any): any {\n if (response === null) {\n return null;\n }\n\n let data = response.body;\n\n if (data === null) {\n data = response.text;\n }\n\n if (returnType) {\n if (returnType === 'blob' && isBrowser()) {\n data = new Blob([data], { type: response.header['content-type'] });\n } else if (returnType === 'blob' && !isBrowser()) {\n data = new Buffer.from(data, 'binary');\n } else if (Array.isArray(data)) {\n data = data.map((element) => new returnType(element));\n } else {\n data = new returnType(data);\n }\n }\n\n return data;\n }\n\n /**\n * Normalizes parameter values:\n * <ul>\n * <li>remove nils</li>\n * <li>keep files and arrays</li>\n * <li>format to string with `paramToString` for other cases</li>\n * </ul>\n * @param params The parameters as object properties.\n * @returns normalized parameters.\n */\n private static normalizeParams(params: { [key: string]: any }): { [key: string]: any } {\n const newParams: { [key: string]: any } = {};\n\n for (const key in params) {\n if (Object.prototype.hasOwnProperty.call(params, key) && params[key] !== undefined && params[key] !== null) {\n const value = params[key];\n if (SuperagentHttpClient.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = paramToString(value);\n }\n }\n }\n return newParams;\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns <code>true</code> if <code>param</code> represents a file.\n */\n private static isFileParam(param: any): boolean {\n // Buffer in Node.js\n if (typeof Buffer === 'function' && (param instanceof Buffer || param.path)) {\n return true;\n }\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n // Safari fix\n if (typeof File === 'object' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"superagentHttpClient.js","sourceRoot":"","sources":["superagentHttpClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,UAA2C,MAAM,YAAY,CAAC;AAKrE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAKnD,MAAM,eAAe,GAAG,CAAC,KAA8B,EAA0B,EAAE,CAAE,KAAuB,aAAvB,KAAK,uBAAL,KAAK,CAAoB,gBAAgB,CAAC;AAE/H,MAAM,OAAO,oBAAoB;IAAjC;QAII,YAAO,GAAsD,SAAS,CAAC;IAsV3E,CAAC;IApVG,IAAI,CAAU,GAAW,EAAE,OAAuB,EAAE,eAAgC,EAAE,QAAkB;QACpG,OAAO,IAAI,CAAC,OAAO,CAAI,GAAG,kCAAO,OAAO,KAAE,UAAU,EAAE,MAAM,KAAI,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC/F,CAAC;IAED,GAAG,CAAU,GAAW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1B,IAAI,oBAAoB,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;oBAClE,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;gBAC3B,CAAC;qBAAM,CAAC;oBACJ,SAAS,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;gBAC1C,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;IAOO,MAAM,CAAC,WAAW,CAAC,KAAU;QAEjC,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,CAAC,KAAK,YAAY,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1E,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,UAAU,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;YACtD,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,UAAU,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;YACtD,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,YAAY,IAAI,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ","sourcesContent":["/*!\n * @license\n * Copyright © 2005-2025 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 ee, { Emitter } from 'event-emitter';\nimport superagent, { Response, SuperAgentRequest } from 'superagent';\nimport { Authentication } from './authentication/authentication';\nimport { RequestOptions, HttpClient, SecurityOptions, Emitters } from './api-clients/http-client.interface';\nimport { Oauth2 } from './authentication/oauth2';\nimport { BasicAuth } from './authentication/basicAuth';\nimport { isBrowser, paramToString } from './utils';\n\ndeclare const Blob: any;\ndeclare const Buffer: any;\n\nconst isProgressEvent = (event: ProgressEvent | unknown): event is ProgressEvent => (event as ProgressEvent)?.lengthComputable;\n\nexport class SuperagentHttpClient implements HttpClient {\n /**\n * The default HTTP timeout for all API calls.\n */\n timeout: number | { deadline?: number; response?: number } = undefined;\n\n post<T = any>(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise<T> {\n return this.request<T>(url, { ...options, httpMethod: 'POST' }, securityOptions, emitters);\n }\n\n put<T = any>(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise<T> {\n return this.request<T>(url, { ...options, httpMethod: 'PUT' }, securityOptions, emitters);\n }\n\n get<T = any>(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise<T> {\n return this.request<T>(url, { ...options, httpMethod: 'GET' }, securityOptions, emitters);\n }\n\n delete<T = void>(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise<T> {\n return this.request<T>(url, { ...options, httpMethod: 'DELETE' }, securityOptions, emitters);\n }\n\n request<T = any>(url: string, options: RequestOptions, securityOptions: SecurityOptions, emitters: Emitters): Promise<T> {\n const { httpMethod, queryParams, headerParams, formParams, bodyParam, contentType, accept, responseType, returnType } = options;\n const { eventEmitter, apiClientEmitter } = emitters;\n\n let request = this.buildRequest(\n httpMethod,\n url,\n queryParams,\n headerParams,\n formParams,\n bodyParam,\n contentType,\n accept,\n responseType,\n eventEmitter,\n returnType,\n securityOptions\n );\n\n if (returnType === 'Binary') {\n request = request.buffer(true).parse(superagent.parse['application/octet-stream']);\n }\n\n const promise: any = new Promise((resolve, reject) => {\n request.on('abort', () => {\n eventEmitter.emit('abort');\n });\n request.end((error: any, response: Response) => {\n if (error) {\n apiClientEmitter.emit('error', error);\n eventEmitter.emit('error', error);\n\n if (error.status === 401) {\n apiClientEmitter.emit('unauthorized');\n eventEmitter.emit('unauthorized');\n }\n\n if (response?.text) {\n error = error || {};\n reject(Object.assign(error, { message: response.text }));\n } else {\n // eslint-disable-next-line prefer-promise-reject-errors\n reject({ error });\n }\n } else {\n if (securityOptions.isBpmRequest) {\n const hasSetCookie = Object.prototype.hasOwnProperty.call(response.header, 'set-cookie');\n if (response.header && hasSetCookie) {\n // mutate the passed value from AlfrescoApiClient class for backward compatibility\n securityOptions.authentications.cookie = response.header['set-cookie'][0];\n }\n }\n let data = {};\n if (response.type === 'text/html') {\n data = SuperagentHttpClient.deserialize(response);\n } else {\n data = SuperagentHttpClient.deserialize(response, returnType);\n }\n\n eventEmitter.emit('success', data);\n resolve(data);\n }\n });\n });\n\n promise.abort = function () {\n request.abort();\n return this;\n };\n\n return promise;\n }\n\n private buildRequest(\n httpMethod: string,\n url: string,\n queryParams: { [key: string]: any },\n headerParams: { [key: string]: any },\n formParams: { [key: string]: any },\n // eslint-disable-next-line @typescript-eslint/ban-types\n bodyParam: string | Object,\n contentType: string,\n accept: string,\n responseType: string,\n eventEmitter: ee.Emitter,\n returnType: string,\n securityOptions: SecurityOptions\n ) {\n const request = superagent(httpMethod, url);\n\n const { isBpmRequest, authentications, defaultHeaders = {}, enableCsrf, withCredentials = false } = securityOptions;\n\n // apply authentications\n this.applyAuthToRequest(request, authentications);\n\n // set query parameters\n request.query(SuperagentHttpClient.normalizeParams(queryParams));\n\n // set header parameters\n request.set(defaultHeaders).set(SuperagentHttpClient.normalizeParams(headerParams));\n\n if (isBpmRequest && enableCsrf) {\n this.setCsrfToken(request);\n }\n\n if (withCredentials) {\n request.withCredentials();\n }\n\n // add cookie for activiti\n if (isBpmRequest) {\n request.withCredentials();\n if (securityOptions.authentications.cookie) {\n if (!isBrowser()) {\n request.set('Cookie', securityOptions.authentications.cookie);\n }\n }\n }\n\n // set request timeout\n request.timeout(this.timeout);\n\n if (contentType && contentType !== 'multipart/form-data') {\n request.type(contentType);\n } else if (!(request as any).header['Content-Type'] && contentType !== 'multipart/form-data') {\n request.type('application/json');\n }\n\n if (contentType === 'application/x-www-form-urlencoded') {\n request.send(SuperagentHttpClient.normalizeParams(formParams)).on('progress', (event: any) => {\n this.progress(event, eventEmitter);\n });\n } else if (contentType === 'multipart/form-data') {\n const _formParams = SuperagentHttpClient.normalizeParams(formParams);\n for (const key in _formParams) {\n if (Object.prototype.hasOwnProperty.call(_formParams, key)) {\n if (SuperagentHttpClient.isFileParam(_formParams[key])) {\n // file field\n request.attach(key, _formParams[key]).on('progress', (event: ProgressEvent) => {\n // jshint ignore:line\n this.progress(event, eventEmitter);\n });\n } else {\n request.field(key, _formParams[key]).on('progress', (event: ProgressEvent) => {\n // jshint ignore:line\n this.progress(event, eventEmitter);\n });\n }\n }\n }\n } else if (bodyParam) {\n request.send(bodyParam).on('progress', (event: any) => {\n this.progress(event, eventEmitter);\n });\n }\n\n if (accept) {\n request.accept(accept);\n }\n\n if (returnType === 'blob' || returnType === 'Blob' || responseType === 'blob' || responseType === 'Blob') {\n request.responseType('blob');\n } else if (returnType === 'String') {\n request.responseType('string');\n }\n\n return request;\n }\n\n setCsrfToken(request: SuperAgentRequest): void {\n const token = SuperagentHttpClient.createCSRFToken();\n request.set('X-CSRF-TOKEN', token);\n\n if (!isBrowser()) {\n request.set('Cookie', 'CSRF-TOKEN=' + token + ';path=/');\n }\n\n try {\n document.cookie = 'CSRF-TOKEN=' + token + ';path=/';\n } catch (err) {\n /* continue regardless of error */\n }\n }\n\n /**\n * Applies authentication headers to the request.\n * @param request The request object created by a <code>superagent()</code> call.\n * @param authentications authentications\n */\n private applyAuthToRequest(request: SuperAgentRequest, authentications: Authentication) {\n if (authentications) {\n switch (authentications.type) {\n case 'basic': {\n const basicAuth: BasicAuth = authentications.basicAuth;\n if (basicAuth.username || basicAuth.password) {\n request.auth(basicAuth.username || '', basicAuth.password || '');\n }\n break;\n }\n case 'activiti': {\n if (authentications.basicAuth.ticket) {\n request.set({ Authorization: authentications.basicAuth.ticket });\n }\n break;\n }\n case 'oauth2': {\n const oauth2: Oauth2 = authentications.oauth2;\n if (oauth2.accessToken) {\n request.set({ Authorization: 'Bearer ' + oauth2.accessToken });\n }\n break;\n }\n default:\n throw new Error('Unknown authentication type: ' + authentications.type);\n }\n }\n }\n\n private progress(event: ProgressEvent | unknown, eventEmitter: Emitter): void {\n if (isProgressEvent(event)) {\n const percent = Math.round((event.loaded / event.total) * 100);\n\n const progress = {\n total: event.total,\n loaded: event.loaded,\n percent\n };\n\n eventEmitter.emit('progress', progress);\n }\n }\n\n private static createCSRFToken(a?: any): string {\n return a\n ? (a ^ ((Math.random() * 16) >> (a / 4))).toString(16)\n : ([1e16] + (1e16).toString()).replace(/[01]/g, SuperagentHttpClient.createCSRFToken);\n }\n\n /**\n * Deserializes an HTTP response body into a value of the specified type.\n * @param response A SuperAgent response object.\n * @param returnType The type to return. Pass a string for simple types\n * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To\n * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type:\n * all properties on <code>data<code> will be converted to this type.\n * @returns A value of the specified type.\n */\n private static deserialize(response: Response, returnType?: any): any {\n if (response === null) {\n return null;\n }\n\n let data = response.body;\n\n if (data === null) {\n data = response.text;\n }\n\n if (returnType) {\n if (returnType === 'blob' && isBrowser()) {\n data = new Blob([data], { type: response.header['content-type'] });\n } else if (returnType === 'blob' && !isBrowser()) {\n data = new Buffer.from(data, 'binary');\n } else if (Array.isArray(data)) {\n data = data.map((element) => new returnType(element));\n } else {\n data = new returnType(data);\n }\n }\n\n return data;\n }\n\n /**\n * Normalizes parameter values:\n * <ul>\n * <li>remove nils</li>\n * <li>keep files and arrays</li>\n * <li>format to string with `paramToString` for other cases</li>\n * </ul>\n * @param params The parameters as object properties.\n * @returns normalized parameters.\n */\n private static normalizeParams(params: { [key: string]: any }): { [key: string]: any } {\n const newParams: { [key: string]: any } = {};\n\n for (const key in params) {\n if (Object.prototype.hasOwnProperty.call(params, key) && params[key] !== undefined && params[key] !== null) {\n const value = params[key];\n if (SuperagentHttpClient.isFileParam(value) || Array.isArray(value)) {\n newParams[key] = value;\n } else {\n newParams[key] = paramToString(value);\n }\n }\n }\n return newParams;\n }\n\n /**\n * Checks whether the given parameter value represents file-like content.\n * @param param The parameter to check.\n * @returns <code>true</code> if <code>param</code> represents a file.\n */\n private static isFileParam(param: any): boolean {\n // Buffer in Node.js\n if (typeof Buffer === 'function' && (param instanceof Buffer || param.path)) {\n return true;\n }\n // Blob in browser\n if (typeof Blob === 'function' && param instanceof Blob) {\n return true;\n }\n // File in browser (it seems File object is also instance of Blob, but keep this for safe)\n if (typeof File === 'function' && param instanceof File) {\n return true;\n }\n // Safari fix\n if (typeof File === 'object' && param instanceof File) {\n return true;\n }\n\n return false;\n }\n}\n"]}
|
package/esm5/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfresco/js-api",
|
|
3
|
-
"version": "9.1.0-
|
|
3
|
+
"version": "9.1.0-15484232623",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "JavaScript client library for the Alfresco REST API",
|
|
6
6
|
"author": "Hyland Software, Inc. and its affiliates",
|
|
@@ -20,9 +20,8 @@
|
|
|
20
20
|
"tslib": "^2.6.1"
|
|
21
21
|
},
|
|
22
22
|
"typings": "./typings/index.d.ts",
|
|
23
|
-
"module": "./
|
|
23
|
+
"module": "./src/index.js",
|
|
24
24
|
"es2015": "./esm2015/index.js",
|
|
25
|
-
"types": "./src/index.d.ts",
|
|
26
25
|
"type": "module",
|
|
27
26
|
"main": "./src/index.js"
|
|
28
27
|
}
|