@semantha/product-sdk 11.3.0 → 11.4.0

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.
Files changed (49) hide show
  1. package/dist/{chunk-PMYUIYR3.js → chunk-3FXI4XXG.js} +2 -2
  2. package/dist/{chunk-PMYUIYR3.js.map → chunk-3FXI4XXG.js.map} +1 -1
  3. package/dist/chunk-5PB4IBX4.mjs +2 -0
  4. package/dist/chunk-5PB4IBX4.mjs.map +1 -0
  5. package/dist/{chunk-KLBX4FVS.js → chunk-B3MSOEJM.js} +2 -2
  6. package/dist/{chunk-KLBX4FVS.js.map → chunk-B3MSOEJM.js.map} +1 -1
  7. package/dist/{chunk-THA6X4VS.mjs → chunk-CIAODZK3.mjs} +2 -2
  8. package/dist/{chunk-THA6X4VS.mjs.map → chunk-CIAODZK3.mjs.map} +1 -1
  9. package/dist/{chunk-LBYB72RT.mjs → chunk-FRZZWIQF.mjs} +2 -2
  10. package/dist/{chunk-LBYB72RT.mjs.map → chunk-FRZZWIQF.mjs.map} +1 -1
  11. package/dist/chunk-MUWVKP6I.js +2 -0
  12. package/dist/chunk-MUWVKP6I.js.map +1 -0
  13. package/dist/{chunk-XRW3IJJB.js → chunk-UTBTTDZX.js} +2 -2
  14. package/dist/{chunk-XRW3IJJB.js.map → chunk-UTBTTDZX.js.map} +1 -1
  15. package/dist/{chunk-23JGNEMY.mjs → chunk-YB4SU52R.mjs} +2 -2
  16. package/dist/{chunk-23JGNEMY.mjs.map → chunk-YB4SU52R.mjs.map} +1 -1
  17. package/dist/file-box/api/index.js +1 -1
  18. package/dist/file-box/api/index.mjs +1 -1
  19. package/dist/file-box/index.js +1 -1
  20. package/dist/file-box/index.mjs +1 -1
  21. package/dist/requirements/api/index.d.mts +23 -2
  22. package/dist/requirements/api/index.d.ts +23 -2
  23. package/dist/requirements/api/index.js +1 -1
  24. package/dist/requirements/api/index.js.map +1 -1
  25. package/dist/requirements/api/index.mjs +1 -1
  26. package/dist/requirements/api/index.mjs.map +1 -1
  27. package/dist/requirements/model/index.d.mts +25 -1
  28. package/dist/requirements/model/index.d.ts +25 -1
  29. package/dist/requirements/model/index.js +1 -1
  30. package/dist/requirements/model/index.mjs +1 -1
  31. package/dist/rest/index.d.mts +1 -1
  32. package/dist/rest/index.d.ts +1 -1
  33. package/dist/rest/index.js +1 -1
  34. package/dist/rest/index.mjs +1 -1
  35. package/dist/structure-navigator/api/index.js +1 -1
  36. package/dist/structure-navigator/api/index.mjs +1 -1
  37. package/dist/structure-navigator/index.js +1 -1
  38. package/dist/structure-navigator/index.mjs +1 -1
  39. package/dist/table-extractor/api/index.js +1 -1
  40. package/dist/table-extractor/api/index.mjs +1 -1
  41. package/dist/tracking/api/index.js +1 -1
  42. package/dist/tracking/api/index.mjs +1 -1
  43. package/dist/tracking/index.js +1 -1
  44. package/dist/tracking/index.mjs +1 -1
  45. package/package.json +3 -3
  46. package/dist/chunk-KHRCSPJC.js +0 -2
  47. package/dist/chunk-KHRCSPJC.js.map +0 -1
  48. package/dist/chunk-PU2IRAN7.mjs +0 -2
  49. package/dist/chunk-PU2IRAN7.mjs.map +0 -1
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkKHRCSPJC_js=require('./chunk-KHRCSPJC.js'),P=require('fs');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var P__namespace=/*#__PURE__*/_interopNamespace(P);var s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/binary";}ENDPOINT;async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async getAsDocx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),null,"blob")).toFile()}async getAsPdf(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/pdf"),null,"blob")).toFile()}};var a=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.configurationid=i;this.ENDPOINT=this.parentEndpoint+`/configurations/${this.configurationid}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/configurations";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var p=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/events";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/screenshots";}ENDPOINT;async getAsPng(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("image/png"),null,"blob")).toFile()}};var c=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.documentstructureid=i;this.ENDPOINT=this.parentEndpoint+`/documentstructures/${this.documentstructureid}`;}ENDPOINT;binary(){return new s(this.restClient,this.ENDPOINT)}events(){return new p(this.restClient,this.ENDPOINT)}screenshots(){return new u(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async getAsReqifz(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/reqifz"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentstructures";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var m=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;configurations(t){return t!=null?new a(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}documentstructures(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new d(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var g=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/structurenavigator";}ENDPOINT;domains(t){return t!=null?new m(this.restClient,this.ENDPOINT,t):new h(this.restClient,this.ENDPOINT)}};var E="/api",C=class r{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new r(new chunkKHRCSPJC_js.c(this.parseServerUrl(t),e),E)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new chunkKHRCSPJC_js.c(this.parseServerUrl(t)),E)}static loginWithCredentials(t,e,i,N){return t=this.parseServerUrl(t),new r(new chunkKHRCSPJC_js.c(t,void 0,e,i,N),E)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=P__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(f=>f.length!==0).map(f=>f.split("=")),N=this.getValueOfInPropertiesFile("serverUrl",i),D=this.getValueOfInPropertiesFile("clientId",i),O=this.getValueOfInPropertiesFile("clientSecret",i),v=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(N,D,O,v)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-server"),t}static getValueOfInPropertiesFile(t,e){for(let i of e)if(i[0]===t)return i[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}structurenavigator(){return new g(this.restClient,this.endpoint())}};exports.a=s;exports.b=a;exports.c=l;exports.d=p;exports.e=u;exports.f=c;exports.g=d;exports.h=m;exports.i=h;exports.j=g;exports.k=C;//# sourceMappingURL=chunk-PMYUIYR3.js.map
2
- //# sourceMappingURL=chunk-PMYUIYR3.js.map
1
+ 'use strict';var chunkMUWVKP6I_js=require('./chunk-MUWVKP6I.js'),P=require('fs');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var P__namespace=/*#__PURE__*/_interopNamespace(P);var s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/binary";}ENDPOINT;async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async getAsDocx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),null,"blob")).toFile()}async getAsPdf(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/pdf"),null,"blob")).toFile()}};var a=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.configurationid=i;this.ENDPOINT=this.parentEndpoint+`/configurations/${this.configurationid}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/configurations";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var p=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/events";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/screenshots";}ENDPOINT;async getAsPng(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("image/png"),null,"blob")).toFile()}};var c=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.documentstructureid=i;this.ENDPOINT=this.parentEndpoint+`/documentstructures/${this.documentstructureid}`;}ENDPOINT;binary(){return new s(this.restClient,this.ENDPOINT)}events(){return new p(this.restClient,this.ENDPOINT)}screenshots(){return new u(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async getAsReqifz(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/reqifz"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentstructures";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var m=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;configurations(t){return t!=null?new a(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}documentstructures(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new d(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var g=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/structurenavigator";}ENDPOINT;domains(t){return t!=null?new m(this.restClient,this.ENDPOINT,t):new h(this.restClient,this.ENDPOINT)}};var E="/api",C=class r{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new r(new chunkMUWVKP6I_js.c(this.parseServerUrl(t),e),E)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new chunkMUWVKP6I_js.c(this.parseServerUrl(t)),E)}static loginWithCredentials(t,e,i,N){return t=this.parseServerUrl(t),new r(new chunkMUWVKP6I_js.c(t,void 0,e,i,N),E)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=P__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(f=>f.length!==0).map(f=>f.split("=")),N=this.getValueOfInPropertiesFile("serverUrl",i),D=this.getValueOfInPropertiesFile("clientId",i),O=this.getValueOfInPropertiesFile("clientSecret",i),v=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(N,D,O,v)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-server"),t}static getValueOfInPropertiesFile(t,e){for(let i of e)if(i[0]===t)return i[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}structurenavigator(){return new g(this.restClient,this.endpoint())}};exports.a=s;exports.b=a;exports.c=l;exports.d=p;exports.e=u;exports.f=c;exports.g=d;exports.h=m;exports.i=h;exports.j=g;exports.k=C;//# sourceMappingURL=chunk-3FXI4XXG.js.map
2
+ //# sourceMappingURL=chunk-3FXI4XXG.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../semantha-product-sdk/structure-navigator/api/binary.ts","../semantha-product-sdk/structure-navigator/api/configuration.ts","../semantha-product-sdk/structure-navigator/api/configurations.ts","../semantha-product-sdk/structure-navigator/api/events.ts","../semantha-product-sdk/structure-navigator/api/screenshots.ts","../semantha-product-sdk/structure-navigator/api/documentstructure.ts","../semantha-product-sdk/structure-navigator/api/documentstructures.ts","../semantha-product-sdk/structure-navigator/api/domain.ts","../semantha-product-sdk/structure-navigator/api/domains.ts","../semantha-product-sdk/structure-navigator/api/structurenavigator.ts","../semantha-product-sdk/structure-navigator/api/structureNavigatorAPI.ts"],"names":["BinaryEndpoint","restClient","parentEndpoint","ConfigurationEndpoint","configurationid","body","ConfigurationsEndpoint","EventsEndpoint","params","ScreenshotsEndpoint","DocumentstructureEndpoint","documentstructureid","DocumentstructuresEndpoint","data","DomainEndpoint","domainname","DomainsEndpoint","StructurenavigatorEndpoint","PARENT_ENDPOINT","StructureNavigatorAPI","_StructureNavigatorAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","P","line","searchKey"],"mappings":"ubASO,IAAMA,CAAAA,CAAN,KAAqB,CAG1B,WAAA,CACmBC,CAAAA,CACAC,EACjB,CAFiB,IAAA,CAAA,UAAA,CAAAD,CAAAA,CACA,IAAA,CAAA,cAAA,CAAAC,CAAAA,CAEjB,IAAA,CAAK,SAAW,IAAA,CAAK,cAAA,CAAiB,UACxC,CAPiB,QAAA,CAYjB,MAAM,SAAA,EAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAA,CAAW,GAAA,CACpB,IAAA,CAAK,SACL,EAAC,CACD,IAAA,CAAK,UAAA,CAAW,QAAA,CAAA,mEAAuB,CAAA,CACvC,IAAA,CACA,MACF,CAAA,EACA,MAAA,EACJ,CAIA,MAAM,SAAA,EAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAA,CAAW,GAAA,CACpB,IAAA,CAAK,QAAA,CACL,EAAC,CACD,IAAA,CAAK,UAAA,CAAW,QAAA,CAAA,yEAAuB,CAAA,CACvC,IAAA,CACA,MACF,CAAA,EACA,MAAA,EACJ,CAIA,MAAM,QAAA,EAA0B,CAC9B,OAAA,CACE,MAAM,IAAA,CAAK,UAAA,CAAW,GAAA,CACpB,IAAA,CAAK,SACL,EAAC,CACD,IAAA,CAAK,UAAA,CAAW,QAAA,CAAA,iBAAsB,CAAA,CACtC,IAAA,CACA,MACF,CAAA,EACA,MAAA,EACJ,CACF,EClDO,IAAMC,EAAN,KAA4B,CAGjC,WAAA,CACmBF,CAAAA,CACAC,CAAAA,CACAE,CAAAA,CACjB,CAHiB,IAAA,CA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AO,IAAId,CAAAA,CAA2B,IAAA,CAAK,UAAA,CAAY,IAAA,CAAK,QAAA,EAAU,CACxE,CAEF","file":"chunk-PMYUIYR3.js","sourcesContent":["import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/binary\"\n * This is a generated file do not change manually!\n */\nexport class BinaryEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/binary\";\n }\n\n /**\n * Returns the input document.\n */\n async getAsXlsx(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.XLSX),\n null,\n \"blob\"\n )\n ).toFile();\n }\n /**\n * Returns the input document.\n */\n async getAsDocx(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.DOCX),\n null,\n \"blob\"\n )\n ).toFile();\n }\n /**\n * Returns the input document.\n */\n async getAsPdf(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.PDF),\n null,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { Configuration } from '../model';\nimport { ConfigurationUpdate } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/configurations/{configurationid}\"\n * This is a generated file do not change manually!\n */\nexport class ConfigurationEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly configurationid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/configurations\" + `/${this.configurationid}`;\n }\n\n /**\n * Returns the configuration for the given id.\n */\n async get(): Promise<Configuration> {\n return (\n await this.restClient.get<Configuration>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete a given configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Make changes to an existing configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n *\n * @param body ConfigurationUpdate - \n */\n async patch(\n body: ConfigurationUpdate,\n ): Promise<Configuration> {\n return (\n await this.restClient.patch<Configuration>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { Configuration } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/configurations\"\n * This is a generated file do not change manually!\n */\nexport class ConfigurationsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/configurations\";\n }\n\n /**\n * Returns all configurations.\n */\n async get(): Promise<Configuration[]> {\n return (\n await this.restClient.get<Configuration[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete all configurations. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Creates a new configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n *\n * @param body Configuration? - \n */\n async post(\n body?: Configuration,\n ): Promise<Configuration> {\n return (\n await this.restClient.post<Configuration>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { Event } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/events\"\n * This is a generated file do not change manually!\n */\nexport class EventsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/events\";\n }\n\n /**\n * Returns all events of given document structure\n */\n async get(): Promise<Event[]> {\n return (\n await this.restClient.get<Event[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Creates a new event for a document structure.\n *\n * @param body Event? - \n */\n async post(\n body: Event,\n params?: {\n lasteventid?: string,\n }): Promise<Event> {\n return (\n await this.restClient.post<Event>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/screenshots\"\n * This is a generated file do not change manually!\n */\nexport class ScreenshotsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/screenshots\";\n }\n\n /**\n * Returns a 'screenshot' of a page of the given document structure\n *\n * @param page number? - Number of the page to create a screenshot. Zero based\n * @param x number? - X position of the area to screenshot.\n * @param y number? - Y position of the area to screenshot.\n * @param width number? - Width of the area to screenshot.\n * @param height number? - Height of the area to screenshot.\n */\n async getAsPng(params?: {\n page?: number,\n x?: number,\n y?: number,\n width?: number,\n height?: number,\n }): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.PNG),\n null,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { BinaryEndpoint } from './binary';\nimport { DocumentStructure } from '../model';\nimport { DocumentStructureOverview } from '../model';\nimport { DocumentStructureReplaceSections } from '../model';\nimport { DocumentStructureUpdate } from '../model';\nimport { EventsEndpoint } from './events';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\nimport { ScreenshotsEndpoint } from './screenshots';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}\"\n * This is a generated file do not change manually!\n */\nexport class DocumentstructureEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly documentstructureid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documentstructures\" + `/${this.documentstructureid}`;\n }\n\n binary(): BinaryEndpoint {\n return new BinaryEndpoint(this.restClient, this.ENDPOINT);\n }\n\n events(): EventsEndpoint {\n return new EventsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n screenshots(): ScreenshotsEndpoint {\n return new ScreenshotsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n /**\n * Returns the document structure for the given id.\n */\n async get(): Promise<DocumentStructure> {\n return (\n await this.restClient.get<DocumentStructure>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n /**\n * Returns the document structure for the given id.\n */\n async getAsReqifz(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.REQIFZ),\n null,\n \"blob\"\n )\n ).toFile();\n }\n\n /**\n * Delete a given document structure.\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Make changes to an existing document structure.\n *\n * @param body DocumentStructureUpdate - \n */\n async patch(\n body: DocumentStructureUpdate,\n ): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.patch<DocumentStructureOverview>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n\n /**\n * Replace paragraphs of an existing document structure.\n *\n * @param body DocumentStructureReplaceSections - \n */\n async put(\n body: DocumentStructureReplaceSections,\n ): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.put<DocumentStructureOverview>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { DocumentStructureOverview } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures\"\n * This is a generated file do not change manually!\n */\nexport class DocumentstructuresEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documentstructures\";\n }\n\n /**\n * Returns an overview of all available document structures.\n *\n * @param customfield string? - \n * @param customfieldvalues string? - \n */\n async get(params?: {\n customfield?: string,\n customfieldvalues?: string,\n }): Promise<DocumentStructureOverview[]> {\n return (\n await this.restClient.get<DocumentStructureOverview[]>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete all document structures. Needs role: 'Domain Admin'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Creates a new document structure.\n *\n * @param file Blob? - \n * @param name string? - \n * @param publicaccess boolean? - \n * @param configurationid string? - \n */\n async post(data: {\n file?: Blob,\n name?: string,\n publicaccess?: boolean,\n configurationid?: string,\n }): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.post<DocumentStructureOverview>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n}\n","import { ConfigurationEndpoint } from './configuration';\nimport { ConfigurationsEndpoint } from './configurations';\nimport { DocumentstructureEndpoint } from './documentstructure';\nimport { DocumentstructuresEndpoint } from './documentstructures';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}\"\n * This is a generated file do not change manually!\n */\nexport class DomainEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly domainname: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\" + `/${this.domainname}`;\n }\n\n configurations(): ConfigurationsEndpoint;\n configurations(configurationid: string): ConfigurationEndpoint\n \n configurations(configurationid?: string): ConfigurationEndpoint | ConfigurationsEndpoint {\n if(configurationid !== undefined && configurationid !== null) {\n\t return new ConfigurationEndpoint(this.restClient, this.ENDPOINT, configurationid);\n } else {\n\t return new ConfigurationsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n documentstructures(): DocumentstructuresEndpoint;\n documentstructures(documentstructureid: string): DocumentstructureEndpoint\n \n documentstructures(documentstructureid?: string): DocumentstructureEndpoint | DocumentstructuresEndpoint {\n if(documentstructureid !== undefined && documentstructureid !== null) {\n\t return new DocumentstructureEndpoint(this.restClient, this.ENDPOINT, documentstructureid);\n } else {\n\t return new DocumentstructuresEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains\"\n * This is a generated file do not change manually!\n */\nexport class DomainsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\";\n }\n}\n","import { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator\"\n * This is a generated file do not change manually!\n */\nexport class StructurenavigatorEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/structurenavigator\";\n }\n\n domains(): DomainsEndpoint;\n domains(domainname: string): DomainEndpoint\n \n domains(domainname?: string): DomainEndpoint | DomainsEndpoint {\n if(domainname !== undefined && domainname !== null) {\n\t return new DomainEndpoint(this.restClient, this.ENDPOINT, domainname);\n } else {\n\t return new DomainsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import * as fs from 'fs';\n\nimport { StructurenavigatorEndpoint } from './structurenavigator';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the StructureNavigator API.\n *\n * @author semantha\n * Calls the /structurenavigator, endpoints.\n *\n * Note:\n * The constructor is not meant to be invoked directly\n * use `loginXXX()` with your credentials instead.\n *\n * this is a generated class do not change manually!\n */\nexport class StructureNavigatorAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the StructureNavigator API\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): StructureNavigatorAPI {\n if(!apiKey) {\n throw new Error('You need to supply an API key to login.');\n }\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new StructureNavigatorAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n\n /**\n * Access to the StructureNavigator API, when there is a auth proxy in place to handle the addition of the Authorization header\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithAuthProxy(\n serverUrl: string\n ): StructureNavigatorAPI {\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new StructureNavigatorAPI(new RestClient(this.parseServerUrl(serverUrl)), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the StructureNavigator API\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n * @param clientId: string - OAuth2 client id.\n * @param clientSecret: string - OAuth2 client secret.\n * @param tokenUrl: string OAuth2 url to get a valid access token\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): StructureNavigatorAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new StructureNavigatorAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the StructureNavigator API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : StructureNavigatorAPI {\n if (credentialsFilePath.endsWith('.properties') || credentialsFilePath.endsWith('.PROPERTIES')) {\n const rawData = fs.readFileSync(credentialsFilePath, 'utf8');\n const lines = rawData\n\t .split(/[\\n|\\r\\n]/)\n\t .filter(line => line.length !== 0)\n\t .map(line => line.split('='));\n\t const serverUrl = this.getValueOfInPropertiesFile('serverUrl', lines);\n\t const clientId = this.getValueOfInPropertiesFile('clientId', lines);\n\t const clientSecret = this.getValueOfInPropertiesFile('clientSecret', lines);\n\t const tokenUrl = this.getValueOfInPropertiesFile('tokenUrl', lines);\n\t return StructureNavigatorAPI.loginWithCredentials(serverUrl, clientId, clientSecret, tokenUrl);\n\t}\n throw new Error('Can not login, please supply a credentials properties file.');\n }\n\n private static parseServerUrl(serverUrl: string): string {\n if (serverUrl.endsWith('/')) {\n serverUrl = serverUrl.slice(0, -1);\n }\n if (serverUrl.endsWith('/tt-platform-ui/en/#')) {\n serverUrl = serverUrl.replace('/tt-platform-ui/en/#', '/tt-product-server');\n } else if (!serverUrl.endsWith('/tt-product-server')) {\n serverUrl += '/tt-product-server';\n }\n return serverUrl;\n }\n\n private static getValueOfInPropertiesFile(searchKey: string, lines: string[][]): string {\n for (const line of lines) {\n if (line[0] === searchKey) {\n return line[1].replace('\\\\:', ':');\n }\n }\n throw Error(`.properties files contains no ${searchKey}!`);\n }\n\n endpoint(): string {\n return this.parentEndpoint;\n }\n\n structurenavigator(): StructurenavigatorEndpoint {\n return new StructurenavigatorEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
1
+ {"version":3,"sources":["../semantha-product-sdk/structure-navigator/api/binary.ts","../semantha-product-sdk/structure-navigator/api/configuration.ts","../semantha-product-sdk/structure-navigator/api/configurations.ts","../semantha-product-sdk/structure-navigator/api/events.ts","../semantha-product-sdk/structure-navigator/api/screenshots.ts","../semantha-product-sdk/structure-navigator/api/documentstructure.ts","../semantha-product-sdk/structure-navigator/api/documentstructures.ts","../semantha-product-sdk/structure-navigator/api/domain.ts","../semantha-product-sdk/structure-navigator/api/domains.ts","../semantha-product-sdk/structure-navigator/api/structurenavigator.ts","../semantha-product-sdk/structure-navigator/api/structureNavigatorAPI.ts"],"names":["BinaryEndpoint","restClient","parentEndpoint","ConfigurationEndpoint","configurationid","body","ConfigurationsEndpoint","EventsEndpoint","params","ScreenshotsEndpoint","DocumentstructureEndpoint","documentstructureid","DocumentstructuresEndpoint","data","DomainEndpoint","domainname","DomainsEndpoint","StructurenavigatorEndpoint","PARENT_ENDPOINT","StructureNavigatorAPI","_StructureNavigatorAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","P","line","searchKey"],"mappings":"ubASO,IAAMA,CAAAA,CAAN,KAAqB,CAG1B,WAAA,CACmBC,CAAAA,CACAC,EACjB,CAFiB,IAAA,CAAA,UAAA,CAAAD,CAAAA,CACA,IAAA,CAAA,cAAA,CAAAC,CAAAA,CAEjB,IAAA,CAAK,SAAW,IAAA,CAAK,cAAA,CAAiB,UACxC,CAPiB,QAAA,CAYjB,MAAM,SAAA,EAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAA,CAAW,GAAA,CACpB,IAAA,CAAK,SACL,EAAC,CACD,IAAA,CAAK,UAAA,CAAW,QAAA,CAAA,mEAAuB,CAAA,CACvC,IAAA,CACA,MACF,CAAA,EACA,MAAA,EACJ,CAIA,MAAM,SAAA,EAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAA,CAAW,GAAA,CACpB,IAAA,CAAK,QAAA,CACL,EAAC,CAC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CAAAA,EAAa,oBAAA,CAAA,CAERA,CACT,CAEA,OAAe,0BAAA,CAA2BU,EAAmBH,CAAAA,CAA2B,CACtF,IAAA,IAAWE,CAAAA,IAAQF,CAAAA,CACjB,GAAIE,CAAAA,CAAK,CAAC,CAAA,GAAMC,CAAAA,CACd,OAAOD,CAAAA,CAAK,CAAC,CAAA,CAAE,QAAQ,KAAA,CAAO,GAAG,CAAA,CAGrC,MAAM,KAAA,CAAM,CAAA,8BAAA,EAAiCC,CAAS,CAAA,CAAA,CAAG,CAC3D,CAEA,QAAA,EAAmB,CACjB,OAAO,IAAA,CAAK,cACd,CAEA,kBAAA,EAAiD,CAC/C,OAAO,IAAId,CAAAA,CAA2B,IAAA,CAAK,UAAA,CAAY,IAAA,CAAK,QAAA,EAAU,CACxE,CAEF","file":"chunk-3FXI4XXG.js","sourcesContent":["import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/binary\"\n * This is a generated file do not change manually!\n */\nexport class BinaryEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/binary\";\n }\n\n /**\n * Returns the input document.\n */\n async getAsXlsx(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.XLSX),\n null,\n \"blob\"\n )\n ).toFile();\n }\n /**\n * Returns the input document.\n */\n async getAsDocx(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.DOCX),\n null,\n \"blob\"\n )\n ).toFile();\n }\n /**\n * Returns the input document.\n */\n async getAsPdf(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.PDF),\n null,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { Configuration } from '../model';\nimport { ConfigurationUpdate } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/configurations/{configurationid}\"\n * This is a generated file do not change manually!\n */\nexport class ConfigurationEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly configurationid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/configurations\" + `/${this.configurationid}`;\n }\n\n /**\n * Returns the configuration for the given id.\n */\n async get(): Promise<Configuration> {\n return (\n await this.restClient.get<Configuration>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete a given configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Make changes to an existing configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n *\n * @param body ConfigurationUpdate - \n */\n async patch(\n body: ConfigurationUpdate,\n ): Promise<Configuration> {\n return (\n await this.restClient.patch<Configuration>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { Configuration } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/configurations\"\n * This is a generated file do not change manually!\n */\nexport class ConfigurationsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/configurations\";\n }\n\n /**\n * Returns all configurations.\n */\n async get(): Promise<Configuration[]> {\n return (\n await this.restClient.get<Configuration[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete all configurations. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Creates a new configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n *\n * @param body Configuration? - \n */\n async post(\n body?: Configuration,\n ): Promise<Configuration> {\n return (\n await this.restClient.post<Configuration>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { Event } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/events\"\n * This is a generated file do not change manually!\n */\nexport class EventsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/events\";\n }\n\n /**\n * Returns all events of given document structure\n */\n async get(): Promise<Event[]> {\n return (\n await this.restClient.get<Event[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Creates a new event for a document structure.\n *\n * @param body Event? - \n */\n async post(\n body: Event,\n params?: {\n lasteventid?: string,\n }): Promise<Event> {\n return (\n await this.restClient.post<Event>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/screenshots\"\n * This is a generated file do not change manually!\n */\nexport class ScreenshotsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/screenshots\";\n }\n\n /**\n * Returns a 'screenshot' of a page of the given document structure\n *\n * @param page number? - Number of the page to create a screenshot. Zero based\n * @param x number? - X position of the area to screenshot.\n * @param y number? - Y position of the area to screenshot.\n * @param width number? - Width of the area to screenshot.\n * @param height number? - Height of the area to screenshot.\n */\n async getAsPng(params?: {\n page?: number,\n x?: number,\n y?: number,\n width?: number,\n height?: number,\n }): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.PNG),\n null,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { BinaryEndpoint } from './binary';\nimport { DocumentStructure } from '../model';\nimport { DocumentStructureOverview } from '../model';\nimport { DocumentStructureReplaceSections } from '../model';\nimport { DocumentStructureUpdate } from '../model';\nimport { EventsEndpoint } from './events';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\nimport { ScreenshotsEndpoint } from './screenshots';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}\"\n * This is a generated file do not change manually!\n */\nexport class DocumentstructureEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly documentstructureid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documentstructures\" + `/${this.documentstructureid}`;\n }\n\n binary(): BinaryEndpoint {\n return new BinaryEndpoint(this.restClient, this.ENDPOINT);\n }\n\n events(): EventsEndpoint {\n return new EventsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n screenshots(): ScreenshotsEndpoint {\n return new ScreenshotsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n /**\n * Returns the document structure for the given id.\n */\n async get(): Promise<DocumentStructure> {\n return (\n await this.restClient.get<DocumentStructure>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n /**\n * Returns the document structure for the given id.\n */\n async getAsReqifz(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.REQIFZ),\n null,\n \"blob\"\n )\n ).toFile();\n }\n\n /**\n * Delete a given document structure.\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Make changes to an existing document structure.\n *\n * @param body DocumentStructureUpdate - \n */\n async patch(\n body: DocumentStructureUpdate,\n ): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.patch<DocumentStructureOverview>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n\n /**\n * Replace paragraphs of an existing document structure.\n *\n * @param body DocumentStructureReplaceSections - \n */\n async put(\n body: DocumentStructureReplaceSections,\n ): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.put<DocumentStructureOverview>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { DocumentStructureOverview } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures\"\n * This is a generated file do not change manually!\n */\nexport class DocumentstructuresEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documentstructures\";\n }\n\n /**\n * Returns an overview of all available document structures.\n *\n * @param customfield string? - \n * @param customfieldvalues string? - \n */\n async get(params?: {\n customfield?: string,\n customfieldvalues?: string,\n }): Promise<DocumentStructureOverview[]> {\n return (\n await this.restClient.get<DocumentStructureOverview[]>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete all document structures. Needs role: 'Domain Admin'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Creates a new document structure.\n *\n * @param file Blob? - \n * @param name string? - \n * @param publicaccess boolean? - \n * @param configurationid string? - \n */\n async post(data: {\n file?: Blob,\n name?: string,\n publicaccess?: boolean,\n configurationid?: string,\n }): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.post<DocumentStructureOverview>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n}\n","import { ConfigurationEndpoint } from './configuration';\nimport { ConfigurationsEndpoint } from './configurations';\nimport { DocumentstructureEndpoint } from './documentstructure';\nimport { DocumentstructuresEndpoint } from './documentstructures';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}\"\n * This is a generated file do not change manually!\n */\nexport class DomainEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly domainname: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\" + `/${this.domainname}`;\n }\n\n configurations(): ConfigurationsEndpoint;\n configurations(configurationid: string): ConfigurationEndpoint\n \n configurations(configurationid?: string): ConfigurationEndpoint | ConfigurationsEndpoint {\n if(configurationid !== undefined && configurationid !== null) {\n\t return new ConfigurationEndpoint(this.restClient, this.ENDPOINT, configurationid);\n } else {\n\t return new ConfigurationsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n documentstructures(): DocumentstructuresEndpoint;\n documentstructures(documentstructureid: string): DocumentstructureEndpoint\n \n documentstructures(documentstructureid?: string): DocumentstructureEndpoint | DocumentstructuresEndpoint {\n if(documentstructureid !== undefined && documentstructureid !== null) {\n\t return new DocumentstructureEndpoint(this.restClient, this.ENDPOINT, documentstructureid);\n } else {\n\t return new DocumentstructuresEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains\"\n * This is a generated file do not change manually!\n */\nexport class DomainsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\";\n }\n}\n","import { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator\"\n * This is a generated file do not change manually!\n */\nexport class StructurenavigatorEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/structurenavigator\";\n }\n\n domains(): DomainsEndpoint;\n domains(domainname: string): DomainEndpoint\n \n domains(domainname?: string): DomainEndpoint | DomainsEndpoint {\n if(domainname !== undefined && domainname !== null) {\n\t return new DomainEndpoint(this.restClient, this.ENDPOINT, domainname);\n } else {\n\t return new DomainsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import * as fs from 'fs';\n\nimport { StructurenavigatorEndpoint } from './structurenavigator';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the StructureNavigator API.\n *\n * @author semantha\n * Calls the /structurenavigator, endpoints.\n *\n * Note:\n * The constructor is not meant to be invoked directly\n * use `loginXXX()` with your credentials instead.\n *\n * this is a generated class do not change manually!\n */\nexport class StructureNavigatorAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the StructureNavigator API\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): StructureNavigatorAPI {\n if(!apiKey) {\n throw new Error('You need to supply an API key to login.');\n }\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new StructureNavigatorAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n\n /**\n * Access to the StructureNavigator API, when there is a auth proxy in place to handle the addition of the Authorization header\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithAuthProxy(\n serverUrl: string\n ): StructureNavigatorAPI {\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new StructureNavigatorAPI(new RestClient(this.parseServerUrl(serverUrl)), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the StructureNavigator API\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n * @param clientId: string - OAuth2 client id.\n * @param clientSecret: string - OAuth2 client secret.\n * @param tokenUrl: string OAuth2 url to get a valid access token\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): StructureNavigatorAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new StructureNavigatorAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the StructureNavigator API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : StructureNavigatorAPI {\n if (credentialsFilePath.endsWith('.properties') || credentialsFilePath.endsWith('.PROPERTIES')) {\n const rawData = fs.readFileSync(credentialsFilePath, 'utf8');\n const lines = rawData\n\t .split(/[\\n|\\r\\n]/)\n\t .filter(line => line.length !== 0)\n\t .map(line => line.split('='));\n\t const serverUrl = this.getValueOfInPropertiesFile('serverUrl', lines);\n\t const clientId = this.getValueOfInPropertiesFile('clientId', lines);\n\t const clientSecret = this.getValueOfInPropertiesFile('clientSecret', lines);\n\t const tokenUrl = this.getValueOfInPropertiesFile('tokenUrl', lines);\n\t return StructureNavigatorAPI.loginWithCredentials(serverUrl, clientId, clientSecret, tokenUrl);\n\t}\n throw new Error('Can not login, please supply a credentials properties file.');\n }\n\n private static parseServerUrl(serverUrl: string): string {\n if (serverUrl.endsWith('/')) {\n serverUrl = serverUrl.slice(0, -1);\n }\n if (serverUrl.endsWith('/tt-platform-ui/en/#')) {\n serverUrl = serverUrl.replace('/tt-platform-ui/en/#', '/tt-product-server');\n } else if (!serverUrl.endsWith('/tt-product-server')) {\n serverUrl += '/tt-product-server';\n }\n return serverUrl;\n }\n\n private static getValueOfInPropertiesFile(searchKey: string, lines: string[][]): string {\n for (const line of lines) {\n if (line[0] === searchKey) {\n return line[1].replace('\\\\:', ':');\n }\n }\n throw Error(`.properties files contains no ${searchKey}!`);\n }\n\n endpoint(): string {\n return this.parentEndpoint;\n }\n\n structurenavigator(): StructurenavigatorEndpoint {\n return new StructurenavigatorEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
@@ -0,0 +1,2 @@
1
+ import o from'axios';var a=class{constructor(s){this.response=s;}async toModel(){return (await this.response).data}async toFile(){let s=await this.response,e=s?.headers["content-disposition"],t="file";if(e){let r=e.match(/filename="?([^"]+)"?/);r&&r[1]&&(t=r[1]);}return new File([s.data],t)}async getStatusCode(){return (await this.response).status}async getStatusText(){return (await this.response).statusText}};var d=(i=>(i.JSON="application/json",i.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",i.PDF="application/pdf",i.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",i.ZIP="application/zip",i.REQIFZ="application/reqifz",i.PNG="image/png",i.BINARY="application/octet-stream",i.TEXT_PLAIN="text/plain",i))(d||{}),c=class p{constructor(s,e,t,r,n){this.serverUrl=s;this.apiKey=e;this.clientId=t;this.client_secret=r;this.tokenUrl=n;this.expireTime=0,this.accessToken="",this.skipAuthHeader=!!s&&!(e||t||r||n);}static LEEWAY=30;expireTime;accessToken;skipAuthHeader;async buildHeadersForJsonRequest(){return this.skipAuthHeader?{Accept:"application/json"}:{Accept:"application/json",Authorization:`Bearer ${await this.getToken()}`}}async buildHeadersForRequest(){return this.skipAuthHeader?{}:{Authorization:`Bearer ${await this.getToken()}`}}async getToken(){if(this.apiKey)return this.apiKey;if(this.clientId&&this.client_secret&&this.tokenUrl&&(this.accessToken==""||this.expireTime<performance.now())){let s={grant_type:"client_credentials",client_id:this.clientId,client_secret:this.client_secret,scope:"openid"},e=await o.post(this.tokenUrl,s,{headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"}});if(e.status>=o.HttpStatusCode.BadRequest)return "";this.accessToken=e.data.id_token??e.data.access_token,this.expireTime=performance.now()+(e.data.expires_in-p.LEEWAY);}return this.accessToken}async request(s,e,t){if(!t.headers)t.headers=await this.buildHeadersForJsonRequest();else {let r=await this.buildHeadersForRequest();t.headers={...t.headers,...r};}return new a(o.request({method:s,url:this.serverUrl+e,headers:{...t.headers,"User-Agent":"semantha TypeScript SDK; "},data:t.data,params:t.params,responseType:t.responseType}))}async get(s,e,t,r,n="json"){return this.request("GET",s,{params:e,headers:t,data:r,responseType:n})}async post(s,e,t,r,n="json"){if(!t)t=await this.buildHeadersForJsonRequest();else {let u=await this.buildHeadersForRequest();t={...t,...u};}return new a(o.post(this.serverUrl+s,r,{params:e,headers:t,responseType:n}))}async delete(s,e,t){return this.request("DELETE",s,{data:e,params:t})}async patch(s,e){return this.request("PATCH",s,{data:e})}async put(s,e){return this.request("PUT",s,{data:e})}toHeader(s,e){return e?{Accept:s,"Content-Type":e}:{Accept:s}}};export{a,d as b,c};//# sourceMappingURL=chunk-5PB4IBX4.mjs.map
2
+ //# sourceMappingURL=chunk-5PB4IBX4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../semantha-product-sdk/rest/restResponse.ts","../semantha-product-sdk/rest/restClient.ts"],"names":["RestResponse","response","contentDisposition","filename","match","MediaType","RestClient","_RestClient","serverUrl","apiKey","clientId","client_secret","tokenUrl","data","axios","method","url","config","authHeader","params","headers","responseType","acceptMimeType","contentType"],"mappings":"qBAEO,IAAMA,CAAAA,CAAN,KAAsB,CAC3B,WAAA,CAA6BC,CAAAA,CAAqC,CAArC,IAAA,CAAA,QAAA,CAAAA,EAAsC,CAEnE,MAAM,OAAA,EAAsB,CAC1B,OAAA,CAAQ,MAAM,I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CAA2BC,CAAAA,CAAiD,CACnF,OAAIA,CAAAA,CACK,CAAE,MAAA,CAAQD,CAAAA,CAAgB,cAAA,CAAgBC,CAAY,CAAA,CAExD,CAAE,MAAA,CAAQD,CAAe,CAClC,CACF","file":"chunk-5PB4IBX4.mjs","sourcesContent":["import { AxiosResponse } from 'axios';\n\nexport class RestResponse<T> {\n constructor(private readonly response: Promise<AxiosResponse<T>>) {}\n\n async toModel(): Promise<T> {\n return (await this.response).data;\n }\n\n async toFile(): Promise<File> {\n const response: AxiosResponse = await this.response;\n const contentDisposition = response?.headers['content-disposition'];\n let filename = 'file';\n if (contentDisposition) {\n const match = contentDisposition.match(/filename=\"?([^\"]+)\"?/);\n if (match && match[1]) {\n filename = match[1];\n }\n }\n return new File([response.data], filename);\n }\n\n async getStatusCode(): Promise<number> {\n return (await this.response).status;\n }\n\n async getStatusText(): Promise<string> {\n return (await this.response).statusText;\n }\n}\n","import axios, { AxiosRequestConfig, AxiosResponse, ResponseType } from 'axios';\nimport { RestResponse } from './restResponse';\n\nexport enum MediaType {\n JSON = 'application/json',\n XLSX = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n PDF = 'application/pdf',\n DOCX = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n ZIP = 'application/zip',\n REQIFZ = 'application/reqifz',\n PNG = 'image/png',\n BINARY = 'application/octet-stream',\n TEXT_PLAIN = 'text/plain'\n}\n\nexport class RestClient {\n // in seconds\n private static readonly LEEWAY = 30;\n\n private expireTime: number;\n private accessToken: string;\n private skipAuthHeader: boolean;\n\n constructor(\n private readonly serverUrl: string,\n private readonly apiKey?: string,\n private readonly clientId?: string,\n private readonly client_secret?: string,\n private readonly tokenUrl?: string\n ) {\n this.expireTime = 0.0;\n this.accessToken = '';\n this.skipAuthHeader = !!serverUrl && !(apiKey || clientId || client_secret || tokenUrl);\n }\n\n async buildHeadersForJsonRequest(): Promise<{ [key: string]: string }> {\n if (this.skipAuthHeader) {\n return {\n Accept: 'application/json'\n };\n }\n return {\n Accept: 'application/json',\n Authorization: `Bearer ${await this.getToken()}`\n };\n }\n\n async buildHeadersForRequest(): Promise<{ [key: string]: string }> {\n if (this.skipAuthHeader) {\n return {};\n }\n return {\n Authorization: `Bearer ${await this.getToken()}`\n };\n }\n\n async getToken(): Promise<string> {\n if (this.apiKey) {\n return this.apiKey;\n }\n if (\n this.clientId &&\n this.client_secret &&\n this.tokenUrl &&\n (this.accessToken == '' || this.expireTime < performance.now())\n ) {\n const data = {\n grant_type: 'client_credentials',\n client_id: this.clientId,\n client_secret: this.client_secret,\n scope: 'openid'\n };\n const response = await axios.post(this.tokenUrl, data, {\n headers: { accept: 'application/json', 'content-type': 'application/x-www-form-urlencoded' }\n });\n if (response.status >= axios.HttpStatusCode.BadRequest) {\n // example for error response: {\"error\":\"invalid_client\",\"error_description\":\"Invalid client or Invalid client credentials\"}\n // we have no token -> this leads to a permission error\n return '';\n }\n this.accessToken = response.data['id_token'] ?? response.data['access_token'];\n this.expireTime = performance.now() + (response.data['expires_in'] - RestClient.LEEWAY);\n }\n return this.accessToken;\n }\n\n private async request<R>(\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',\n url: string,\n config: { params?: any; headers?: { [key: string]: string }; data?: any; responseType?: ResponseType }\n ): Promise<RestResponse<R>> {\n if (!config.headers) {\n config.headers = await this.buildHeadersForJsonRequest();\n } else {\n const authHeader = await this.buildHeadersForRequest();\n config.headers = { ...config.headers, ...authHeader };\n }\n return new RestResponse<R>(\n axios.request<R>({\n method: method,\n url: this.serverUrl + url,\n headers: { ...config.headers, 'User-Agent': 'semantha TypeScript SDK; ' },\n data: config.data,\n params: config.params,\n responseType: config.responseType\n })\n );\n }\n\n async get<R>(\n url: string,\n params?: any,\n headers?: { [key: string]: string },\n data?: any,\n responseType: ResponseType = 'json'\n ): Promise<RestResponse<R>> {\n return this.request<R>('GET', url, { params, headers, data, responseType });\n }\n\n async post<R>(\n url: string,\n params?: any,\n headers?: { [key: string]: string },\n data?: any,\n responseType: ResponseType = 'json'\n ): Promise<RestResponse<R>> {\n if (!headers) {\n headers = await this.buildHeadersForJsonRequest();\n } else {\n const authHeader = await this.buildHeadersForRequest();\n headers = { ...headers, ...authHeader };\n }\n return new RestResponse<R>(axios.post<R>(this.serverUrl + url, data, { params, headers, responseType }));\n }\n\n async delete(url: string, data?: any, params?: any): Promise<RestResponse<void>> {\n return this.request<void>('DELETE', url, { data, params });\n }\n\n async patch<R>(url: string, data?: any): Promise<RestResponse<R>> {\n return this.request<R>('PATCH', url, { data });\n }\n\n async put<R>(url: string, data: any): Promise<RestResponse<R>> {\n return this.request<R>('PUT', url, { data });\n }\n\n toHeader(acceptMimeType: MediaType, contentType?: string): { [key: string]: string } {\n if (contentType) {\n return { Accept: acceptMimeType, 'Content-Type': contentType };\n }\n return { Accept: acceptMimeType };\n }\n}\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkKHRCSPJC_js=require('./chunk-KHRCSPJC.js'),h=require('fs');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var h__namespace=/*#__PURE__*/_interopNamespace(h);var o=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.id=r;this.ENDPOINT=this.parentEndpoint+`/boxes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boxes";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var p=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.domainname=r;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;boxes(t){return t!=null?new o(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var a=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/filebox";}ENDPOINT;domains(t){return t!=null?new p(this.restClient,this.ENDPOINT,t):new a(this.restClient,this.ENDPOINT)}};var f="/api/v1",g=class i{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new i(new chunkKHRCSPJC_js.c(this.parseServerUrl(t),e),f)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new i(new chunkKHRCSPJC_js.c(this.parseServerUrl(t)),f)}static loginWithCredentials(t,e,r,d){return t=this.parseServerUrl(t),new i(new chunkKHRCSPJC_js.c(t,void 0,e,r,d),f)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let r=h__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(m=>m.length!==0).map(m=>m.split("=")),d=this.getValueOfInPropertiesFile("serverUrl",r),u=this.getValueOfInPropertiesFile("clientId",r),c=this.getValueOfInPropertiesFile("clientSecret",r),E=this.getValueOfInPropertiesFile("tokenUrl",r);return i.loginWithCredentials(d,u,c,E)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-server"),t}static getValueOfInPropertiesFile(t,e){for(let r of e)if(r[0]===t)return r[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}filebox(){return new l(this.restClient,this.endpoint())}};exports.a=o;exports.b=s;exports.c=p;exports.d=a;exports.e=l;exports.f=g;//# sourceMappingURL=chunk-KLBX4FVS.js.map
2
- //# sourceMappingURL=chunk-KLBX4FVS.js.map
1
+ 'use strict';var chunkMUWVKP6I_js=require('./chunk-MUWVKP6I.js'),h=require('fs');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var h__namespace=/*#__PURE__*/_interopNamespace(h);var o=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.id=r;this.ENDPOINT=this.parentEndpoint+`/boxes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boxes";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var p=class{constructor(t,e,r){this.restClient=t;this.parentEndpoint=e;this.domainname=r;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;boxes(t){return t!=null?new o(this.restClient,this.ENDPOINT,t):new s(this.restClient,this.ENDPOINT)}};var a=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/filebox";}ENDPOINT;domains(t){return t!=null?new p(this.restClient,this.ENDPOINT,t):new a(this.restClient,this.ENDPOINT)}};var f="/api/v1",g=class i{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new i(new chunkMUWVKP6I_js.c(this.parseServerUrl(t),e),f)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new i(new chunkMUWVKP6I_js.c(this.parseServerUrl(t)),f)}static loginWithCredentials(t,e,r,d){return t=this.parseServerUrl(t),new i(new chunkMUWVKP6I_js.c(t,void 0,e,r,d),f)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let r=h__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(m=>m.length!==0).map(m=>m.split("=")),d=this.getValueOfInPropertiesFile("serverUrl",r),u=this.getValueOfInPropertiesFile("clientId",r),c=this.getValueOfInPropertiesFile("clientSecret",r),E=this.getValueOfInPropertiesFile("tokenUrl",r);return i.loginWithCredentials(d,u,c,E)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-server"),t}static getValueOfInPropertiesFile(t,e){for(let r of e)if(r[0]===t)return r[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}filebox(){return new l(this.restClient,this.endpoint())}};exports.a=o;exports.b=s;exports.c=p;exports.d=a;exports.e=l;exports.f=g;//# sourceMappingURL=chunk-B3MSOEJM.js.map
2
+ //# sourceMappingURL=chunk-B3MSOEJM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../semantha-product-sdk/file-box/api/box.ts","../semantha-product-sdk/file-box/api/boxes.ts","../semantha-product-sdk/file-box/api/domain.ts","../semantha-product-sdk/file-box/api/domains.ts","../semantha-product-sdk/file-box/api/filebox.ts","../semantha-product-sdk/file-box/api/fileBoxAPI.ts"],"names":["BoxEndpoint","restClient","parentEndpoint","id","BoxesEndpoint","body","params","DomainEndpoint","domainname","DomainsEndpoint","FileboxEndpoint","PARENT_ENDPOINT","FileBoxAPI","_FileBoxAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","h","line","searchKey"],"mappings":"ubAUO,IAAMA,CAAAA,CAAN,KAAkB,CAGvB,WAAA,CACmBC,CAAAA,CACAC,EACAC,CAAAA,CACjB,CAHiB,IAAA,CAAA,UAAA,CAAAF,CAAAA,CACA,IAAA,CAAA,cAAA,CAAAC,CAAAA,CACA,QAAAC,CAAAA,CAEjB,IAAA,CAAK,QAAA,CAAW,IAAA,CAAK,cAAA,CAAiB,CAAA,OAAA,EAAe,KAAK,EAAE,CAAA,EAC9D,CARiB,QAAA,CAUjB,MAAM,GAAA,EAAoB,CACxB,OAAA,CACE,MAAM,IAAA,CAAK,UAAA,CAAW,GAAA,CACpB,IAAA,CAAK,SACL,EAAC,CACD,IAAA,CAAK,UAAA,CAAW,QAAA,CAAA,kBAAuB,CACzC,GACA,OAAA,EACJ,CACF,ECnBO,IAAMC,CAAAA,CAAN,KAAoB,CAGzB,WAAA,CACmBH,CAAAA,CACAC,CAAAA,CACjB,CAFiB,IAAA,CAAA,UAAA,CAAAD,CAAAA,CACA,oBAAAC,CAAAA,CAEjB,IAAA,CAAK,QAAA,CAAW,IAAA,CAAK,cAAA,CAAiB,SACxC,CAPiB,QAAA,CAYjB,MAAM,IAAA,CACJG,CAAAA,CACAC,CAAAA,CAEsB,CACtB,QACE,MAAM,IAAA,CAAK,UAAA,CAAW,IAAA,CACpB,IAAA,CAAK,QAAA,CACLA,EACA,IAAA,CAAK,UAAA,CAAW,QAAA,CAAA,kBAAuB,CAAA,CACvCD,CACF,CAAA,EACA,SACJ,CACF,EC5BO,IAAME,CAAAA,CAAN,KAAqB,CAG1B,WAAA,CACmBN,CAAAA,CACAC,CAAAA,CACAM,CAAAA,CACjB,CAHiB,IAAA,CAAA,UAAA,CAAAP,EACA,IAAA,CAAA,cAAA,CAAAC,CAAAA,CACA,IAAA,CAAA,UAAA,CAAAM,CAAAA,CAEjB,IAAA,CAAK,QAAA,CAAW,I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,0BAAA,CAA2B,UAAA,CAAYI,CAAK,EAC5DH,CAAAA,CAAe,IAAA,CAAK,0BAAA,CAA2B,cAAA,CAAgBG,CAAK,CAAA,CACpEF,EAAW,IAAA,CAAK,0BAAA,CAA2B,UAAA,CAAYE,CAAK,CAAA,CAClE,OAAOR,EAAW,oBAAA,CAAqBC,CAAAA,CAAWG,CAAAA,CAAUC,CAAAA,CAAcC,CAAQ,CACpF,CACG,MAAM,IAAI,KAAA,CAAM,6DAA6D,CAC/E,CAEA,OAAe,cAAA,CAAeL,CAAAA,CAA2B,CACvD,OAAIA,CAAAA,CAAU,QAAA,CAAS,GAAG,CAAA,GACxBA,CAAAA,CAAYA,CAAAA,CAAU,KAAA,CAAM,CAAA,CAAG,EAAE,CAAA,CAAA,CAE/BA,CAAAA,CAAU,QAAA,CAAS,sBAAsB,CAAA,CAC3CA,CAAAA,CAAYA,CAAAA,CAAU,OAAA,CAAQ,uBAAwB,oBAAoB,CAAA,CAChEA,CAAAA,CAAU,QAAA,CAAS,oBAAoB,CAAA,GACjDA,GAAa,oBAAA,CAAA,CAERA,CACT,CAEA,OAAe,0BAAA,CAA2BU,CAAAA,CAAmBH,EAA2B,CACtF,IAAA,IAAWE,CAAAA,IAAQF,CAAAA,CACjB,GAAIE,CAAAA,CAAK,CAAC,CAAA,GAAMC,CAAAA,CACd,OAAOD,CAAAA,CAAK,CAAC,CAAA,CAAE,OAAA,CAAQ,MAAO,GAAG,CAAA,CAGrC,MAAM,KAAA,CAAM,CAAA,8BAAA,EAAiCC,CAAS,GAAG,CAC3D,CAEA,QAAA,EAAmB,CACjB,OAAO,IAAA,CAAK,cACd,CAEA,OAAA,EAA2B,CACzB,OAAO,IAAId,CAAAA,CAAgB,IAAA,CAAK,UAAA,CAAY,IAAA,CAAK,QAAA,EAAU,CAC7D,CAEF","file":"chunk-KLBX4FVS.js","sourcesContent":["import { Box } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains/{domainname}/boxes/{id}\"\n * This is a generated file do not change manually!\n */\nexport class BoxEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly id: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/boxes\" + `/${this.id}`;\n }\n\n async get(): Promise<Box> {\n return (\n await this.restClient.get<Box>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Box } from '../model';\nimport { BoxCreated } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains/{domainname}/boxes\"\n * This is a generated file do not change manually!\n */\nexport class BoxesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/boxes\";\n }\n\n /**\n * @param body Box? - \n */\n async post(\n body: Box,\n params?: {\n uilanguage?: string,\n }): Promise<BoxCreated> {\n return (\n await this.restClient.post<BoxCreated>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { BoxEndpoint } from './box';\nimport { BoxesEndpoint } from './boxes';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains/{domainname}\"\n * This is a generated file do not change manually!\n */\nexport class DomainEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly domainname: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\" + `/${this.domainname}`;\n }\n\n boxes(): BoxesEndpoint;\n boxes(id: string): BoxEndpoint\n \n boxes(id?: string): BoxEndpoint | BoxesEndpoint {\n if(id !== undefined && id !== null) {\n\t return new BoxEndpoint(this.restClient, this.ENDPOINT, id);\n } else {\n\t return new BoxesEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains\"\n * This is a generated file do not change manually!\n */\nexport class DomainsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\";\n }\n}\n","import { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox\"\n * This is a generated file do not change manually!\n */\nexport class FileboxEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/filebox\";\n }\n\n domains(): DomainsEndpoint;\n domains(domainname: string): DomainEndpoint\n \n domains(domainname?: string): DomainEndpoint | DomainsEndpoint {\n if(domainname !== undefined && domainname !== null) {\n\t return new DomainEndpoint(this.restClient, this.ENDPOINT, domainname);\n } else {\n\t return new DomainsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import * as fs from 'fs';\n\nimport { FileboxEndpoint } from './filebox';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api/v1';\n\n/**\n * Entry point to the FileBox API.\n *\n * @author semantha\n * Calls the /filebox, endpoints.\n *\n * Note:\n * The constructor is not meant to be invoked directly\n * use `loginXXX()` with your credentials instead.\n *\n * this is a generated class do not change manually!\n */\nexport class FileBoxAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the FileBox API\n *\n * @param serverUrl: string - URL to the FileBox server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): FileBoxAPI {\n if(!apiKey) {\n throw new Error('You need to supply an API key to login.');\n }\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new FileBoxAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n\n /**\n * Access to the FileBox API, when there is a auth proxy in place to handle the addition of the Authorization header\n *\n * @param serverUrl: string - URL to the FileBox server.\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithAuthProxy(\n serverUrl: string\n ): FileBoxAPI {\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new FileBoxAPI(new RestClient(this.parseServerUrl(serverUrl)), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the FileBox API\n *\n * @param serverUrl: string - URL to the FileBox server.\n * @param clientId: string - OAuth2 client id.\n * @param clientSecret: string - OAuth2 client secret.\n * @param tokenUrl: string OAuth2 url to get a valid access token\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): FileBoxAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new FileBoxAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the FileBox API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : FileBoxAPI {\n if (credentialsFilePath.endsWith('.properties') || credentialsFilePath.endsWith('.PROPERTIES')) {\n const rawData = fs.readFileSync(credentialsFilePath, 'utf8');\n const lines = rawData\n\t .split(/[\\n|\\r\\n]/)\n\t .filter(line => line.length !== 0)\n\t .map(line => line.split('='));\n\t const serverUrl = this.getValueOfInPropertiesFile('serverUrl', lines);\n\t const clientId = this.getValueOfInPropertiesFile('clientId', lines);\n\t const clientSecret = this.getValueOfInPropertiesFile('clientSecret', lines);\n\t const tokenUrl = this.getValueOfInPropertiesFile('tokenUrl', lines);\n\t return FileBoxAPI.loginWithCredentials(serverUrl, clientId, clientSecret, tokenUrl);\n\t}\n throw new Error('Can not login, please supply a credentials properties file.');\n }\n\n private static parseServerUrl(serverUrl: string): string {\n if (serverUrl.endsWith('/')) {\n serverUrl = serverUrl.slice(0, -1);\n }\n if (serverUrl.endsWith('/tt-platform-ui/en/#')) {\n serverUrl = serverUrl.replace('/tt-platform-ui/en/#', '/tt-product-server');\n } else if (!serverUrl.endsWith('/tt-product-server')) {\n serverUrl += '/tt-product-server';\n }\n return serverUrl;\n }\n\n private static getValueOfInPropertiesFile(searchKey: string, lines: string[][]): string {\n for (const line of lines) {\n if (line[0] === searchKey) {\n return line[1].replace('\\\\:', ':');\n }\n }\n throw Error(`.properties files contains no ${searchKey}!`);\n }\n\n endpoint(): string {\n return this.parentEndpoint;\n }\n\n filebox(): FileboxEndpoint {\n return new FileboxEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
1
+ {"version":3,"sources":["../semantha-product-sdk/file-box/api/box.ts","../semantha-product-sdk/file-box/api/boxes.ts","../semantha-product-sdk/file-box/api/domain.ts","../semantha-product-sdk/file-box/api/domains.ts","../semantha-product-sdk/file-box/api/filebox.ts","../semantha-product-sdk/file-box/api/fileBoxAPI.ts"],"names":["BoxEndpoint","restClient","parentEndpoint","id","BoxesEndpoint","body","params","DomainEndpoint","domainname","DomainsEndpoint","FileboxEndpoint","PARENT_ENDPOINT","FileBoxAPI","_FileBoxAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","h","line","searchKey"],"mappings":"ubAUO,IAAMA,CAAAA,CAAN,KAAkB,CAGvB,WAAA,CACmBC,CAAAA,CACAC,EACAC,CAAAA,CACjB,CAHiB,IAAA,CAAA,UAAA,CAAAF,CAAAA,CACA,IAAA,CAAA,cAAA,CAAAC,CAAAA,CACA,QAAAC,CAAAA,CAEjB,IAAA,CAAK,QAAA,CAAW,IAAA,CAAK,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E,CAEA,OAAe,cAAA,CAAeL,CAAAA,CAA2B,CACvD,OAAIA,CAAAA,CAAU,QAAA,CAAS,GAAG,CAAA,GACxBA,CAAAA,CAAYA,CAAAA,CAAU,KAAA,CAAM,CAAA,CAAG,EAAE,CAAA,CAAA,CAE/BA,CAAAA,CAAU,QAAA,CAAS,sBAAsB,CAAA,CAC3CA,CAAAA,CAAYA,CAAAA,CAAU,OAAA,CAAQ,uBAAwB,oBAAoB,CAAA,CAChEA,CAAAA,CAAU,QAAA,CAAS,oBAAoB,CAAA,GACjDA,GAAa,oBAAA,CAAA,CAERA,CACT,CAEA,OAAe,0BAAA,CAA2BU,CAAAA,CAAmBH,EAA2B,CACtF,IAAA,IAAWE,CAAAA,IAAQF,CAAAA,CACjB,GAAIE,CAAAA,CAAK,CAAC,CAAA,GAAMC,CAAAA,CACd,OAAOD,CAAAA,CAAK,CAAC,CAAA,CAAE,OAAA,CAAQ,MAAO,GAAG,CAAA,CAGrC,MAAM,KAAA,CAAM,CAAA,8BAAA,EAAiCC,CAAS,GAAG,CAC3D,CAEA,QAAA,EAAmB,CACjB,OAAO,IAAA,CAAK,cACd,CAEA,OAAA,EAA2B,CACzB,OAAO,IAAId,CAAAA,CAAgB,IAAA,CAAK,UAAA,CAAY,IAAA,CAAK,QAAA,EAAU,CAC7D,CAEF","file":"chunk-B3MSOEJM.js","sourcesContent":["import { Box } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains/{domainname}/boxes/{id}\"\n * This is a generated file do not change manually!\n */\nexport class BoxEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly id: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/boxes\" + `/${this.id}`;\n }\n\n async get(): Promise<Box> {\n return (\n await this.restClient.get<Box>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Box } from '../model';\nimport { BoxCreated } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains/{domainname}/boxes\"\n * This is a generated file do not change manually!\n */\nexport class BoxesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/boxes\";\n }\n\n /**\n * @param body Box? - \n */\n async post(\n body: Box,\n params?: {\n uilanguage?: string,\n }): Promise<BoxCreated> {\n return (\n await this.restClient.post<BoxCreated>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { BoxEndpoint } from './box';\nimport { BoxesEndpoint } from './boxes';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains/{domainname}\"\n * This is a generated file do not change manually!\n */\nexport class DomainEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly domainname: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\" + `/${this.domainname}`;\n }\n\n boxes(): BoxesEndpoint;\n boxes(id: string): BoxEndpoint\n \n boxes(id?: string): BoxEndpoint | BoxesEndpoint {\n if(id !== undefined && id !== null) {\n\t return new BoxEndpoint(this.restClient, this.ENDPOINT, id);\n } else {\n\t return new BoxesEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains\"\n * This is a generated file do not change manually!\n */\nexport class DomainsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\";\n }\n}\n","import { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox\"\n * This is a generated file do not change manually!\n */\nexport class FileboxEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/filebox\";\n }\n\n domains(): DomainsEndpoint;\n domains(domainname: string): DomainEndpoint\n \n domains(domainname?: string): DomainEndpoint | DomainsEndpoint {\n if(domainname !== undefined && domainname !== null) {\n\t return new DomainEndpoint(this.restClient, this.ENDPOINT, domainname);\n } else {\n\t return new DomainsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import * as fs from 'fs';\n\nimport { FileboxEndpoint } from './filebox';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api/v1';\n\n/**\n * Entry point to the FileBox API.\n *\n * @author semantha\n * Calls the /filebox, endpoints.\n *\n * Note:\n * The constructor is not meant to be invoked directly\n * use `loginXXX()` with your credentials instead.\n *\n * this is a generated class do not change manually!\n */\nexport class FileBoxAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the FileBox API\n *\n * @param serverUrl: string - URL to the FileBox server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): FileBoxAPI {\n if(!apiKey) {\n throw new Error('You need to supply an API key to login.');\n }\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new FileBoxAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n\n /**\n * Access to the FileBox API, when there is a auth proxy in place to handle the addition of the Authorization header\n *\n * @param serverUrl: string - URL to the FileBox server.\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithAuthProxy(\n serverUrl: string\n ): FileBoxAPI {\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new FileBoxAPI(new RestClient(this.parseServerUrl(serverUrl)), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the FileBox API\n *\n * @param serverUrl: string - URL to the FileBox server.\n * @param clientId: string - OAuth2 client id.\n * @param clientSecret: string - OAuth2 client secret.\n * @param tokenUrl: string OAuth2 url to get a valid access token\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): FileBoxAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new FileBoxAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the FileBox API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : FileBoxAPI {\n if (credentialsFilePath.endsWith('.properties') || credentialsFilePath.endsWith('.PROPERTIES')) {\n const rawData = fs.readFileSync(credentialsFilePath, 'utf8');\n const lines = rawData\n\t .split(/[\\n|\\r\\n]/)\n\t .filter(line => line.length !== 0)\n\t .map(line => line.split('='));\n\t const serverUrl = this.getValueOfInPropertiesFile('serverUrl', lines);\n\t const clientId = this.getValueOfInPropertiesFile('clientId', lines);\n\t const clientSecret = this.getValueOfInPropertiesFile('clientSecret', lines);\n\t const tokenUrl = this.getValueOfInPropertiesFile('tokenUrl', lines);\n\t return FileBoxAPI.loginWithCredentials(serverUrl, clientId, clientSecret, tokenUrl);\n\t}\n throw new Error('Can not login, please supply a credentials properties file.');\n }\n\n private static parseServerUrl(serverUrl: string): string {\n if (serverUrl.endsWith('/')) {\n serverUrl = serverUrl.slice(0, -1);\n }\n if (serverUrl.endsWith('/tt-platform-ui/en/#')) {\n serverUrl = serverUrl.replace('/tt-platform-ui/en/#', '/tt-product-server');\n } else if (!serverUrl.endsWith('/tt-product-server')) {\n serverUrl += '/tt-product-server';\n }\n return serverUrl;\n }\n\n private static getValueOfInPropertiesFile(searchKey: string, lines: string[][]): string {\n for (const line of lines) {\n if (line[0] === searchKey) {\n return line[1].replace('\\\\:', ':');\n }\n }\n throw Error(`.properties files contains no ${searchKey}!`);\n }\n\n endpoint(): string {\n return this.parentEndpoint;\n }\n\n filebox(): FileboxEndpoint {\n return new FileboxEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
@@ -1,2 +1,2 @@
1
- import {c as c$1}from'./chunk-PU2IRAN7.mjs';import*as P from'fs';var s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/binary";}ENDPOINT;async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async getAsDocx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),null,"blob")).toFile()}async getAsPdf(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/pdf"),null,"blob")).toFile()}};var a=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.configurationid=i;this.ENDPOINT=this.parentEndpoint+`/configurations/${this.configurationid}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/configurations";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var p=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/events";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/screenshots";}ENDPOINT;async getAsPng(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("image/png"),null,"blob")).toFile()}};var c=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.documentstructureid=i;this.ENDPOINT=this.parentEndpoint+`/documentstructures/${this.documentstructureid}`;}ENDPOINT;binary(){return new s(this.restClient,this.ENDPOINT)}events(){return new p(this.restClient,this.ENDPOINT)}screenshots(){return new u(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async getAsReqifz(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/reqifz"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentstructures";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var m=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;configurations(t){return t!=null?new a(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}documentstructures(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new d(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var g=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/structurenavigator";}ENDPOINT;domains(t){return t!=null?new m(this.restClient,this.ENDPOINT,t):new h(this.restClient,this.ENDPOINT)}};var E="/api",C=class r{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new r(new c$1(this.parseServerUrl(t),e),E)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new c$1(this.parseServerUrl(t)),E)}static loginWithCredentials(t,e,i,N){return t=this.parseServerUrl(t),new r(new c$1(t,void 0,e,i,N),E)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=P.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(f=>f.length!==0).map(f=>f.split("=")),N=this.getValueOfInPropertiesFile("serverUrl",i),D=this.getValueOfInPropertiesFile("clientId",i),O=this.getValueOfInPropertiesFile("clientSecret",i),v=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(N,D,O,v)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-server"),t}static getValueOfInPropertiesFile(t,e){for(let i of e)if(i[0]===t)return i[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}structurenavigator(){return new g(this.restClient,this.endpoint())}};export{s as a,a as b,l as c,p as d,u as e,c as f,d as g,m as h,h as i,g as j,C as k};//# sourceMappingURL=chunk-THA6X4VS.mjs.map
2
- //# sourceMappingURL=chunk-THA6X4VS.mjs.map
1
+ import {c as c$1}from'./chunk-5PB4IBX4.mjs';import*as P from'fs';var s=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/binary";}ENDPOINT;async getAsXlsx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),null,"blob")).toFile()}async getAsDocx(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/vnd.openxmlformats-officedocument.wordprocessingml.document"),null,"blob")).toFile()}async getAsPdf(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/pdf"),null,"blob")).toFile()}};var a=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.configurationid=i;this.ENDPOINT=this.parentEndpoint+`/configurations/${this.configurationid}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var l=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/configurations";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var p=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/events";}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var u=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/screenshots";}ENDPOINT;async getAsPng(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("image/png"),null,"blob")).toFile()}};var c=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.documentstructureid=i;this.ENDPOINT=this.parentEndpoint+`/documentstructures/${this.documentstructureid}`;}ENDPOINT;binary(){return new s(this.restClient,this.ENDPOINT)}events(){return new p(this.restClient,this.ENDPOINT)}screenshots(){return new u(this.restClient,this.ENDPOINT)}async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}async getAsReqifz(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/reqifz"),null,"blob")).toFile()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}async put(t){return (await this.restClient.put(this.ENDPOINT,t)).toModel()}};var d=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/documentstructures";}ENDPOINT;async get(t){return (await this.restClient.get(this.ENDPOINT,t,this.restClient.toHeader("application/json"))).toModel()}async delete(){return await this.restClient.delete(this.ENDPOINT)}async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var m=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;configurations(t){return t!=null?new a(this.restClient,this.ENDPOINT,t):new l(this.restClient,this.ENDPOINT)}documentstructures(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new d(this.restClient,this.ENDPOINT)}};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var g=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/structurenavigator";}ENDPOINT;domains(t){return t!=null?new m(this.restClient,this.ENDPOINT,t):new h(this.restClient,this.ENDPOINT)}};var E="/api",C=class r{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new r(new c$1(this.parseServerUrl(t),e),E)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new r(new c$1(this.parseServerUrl(t)),E)}static loginWithCredentials(t,e,i,N){return t=this.parseServerUrl(t),new r(new c$1(t,void 0,e,i,N),E)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=P.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(f=>f.length!==0).map(f=>f.split("=")),N=this.getValueOfInPropertiesFile("serverUrl",i),D=this.getValueOfInPropertiesFile("clientId",i),O=this.getValueOfInPropertiesFile("clientSecret",i),v=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(N,D,O,v)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-server"),t}static getValueOfInPropertiesFile(t,e){for(let i of e)if(i[0]===t)return i[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}structurenavigator(){return new g(this.restClient,this.endpoint())}};export{s as a,a as b,l as c,p as d,u as e,c as f,d as g,m as h,h as i,g as j,C as k};//# sourceMappingURL=chunk-CIAODZK3.mjs.map
2
+ //# sourceMappingURL=chunk-CIAODZK3.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../semantha-product-sdk/structure-navigator/api/binary.ts","../semantha-product-sdk/structure-navigator/api/configuration.ts","../semantha-product-sdk/structure-navigator/api/configurations.ts","../semantha-product-sdk/structure-navigator/api/events.ts","../semantha-product-sdk/structure-navigator/api/screenshots.ts","../semantha-product-sdk/structure-navigator/api/documentstructure.ts","../semantha-product-sdk/structure-navigator/api/documentstructures.ts","../semantha-product-sdk/structure-navigator/api/domain.ts","../semantha-product-sdk/structure-navigator/api/domains.ts","../semantha-product-sdk/structure-navigator/api/structurenavigator.ts","../semantha-product-sdk/structure-navigator/api/structureNavigatorAPI.ts"],"names":["BinaryEndpoint","restClient","parentEndpoint","ConfigurationEndpoint","configurationid","body","ConfigurationsEndpoint","EventsEndpoint","params","ScreenshotsEndpoint","DocumentstructureEndpoint","documentstructureid","DocumentstructuresEndpoint","data","DomainEndpoint","domainname","DomainsEndpoint","StructurenavigatorEndpoint","PARENT_ENDPOINT","StructureNavigatorAPI","_StructureNavigatorAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","line","searchKey"],"mappings":"iEASO,IAAMA,CAAAA,CAAN,KAAqB,CAG1B,WAAA,CACmBC,CAAAA,CACAC,EACjB,CAFiB,IAAA,CAAA,UAAA,CAAAD,CAAAA,CACA,IAAA,CAAA,cAAA,CAAAC,CAAAA,CAEjB,IAAA,CAAK,SAAW,IAAA,CAAK,cAAA,CAAiB,UACxC,CAPiB,QAAA,CAYjB,MAAM,SAAA,EAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAA,CAAW,GAAA,CACpB,IAAA,CAAK,SACL,EAAC,CACD,IAAA,CAAK,UAAA,CAAW,QAAA,CAAA,mEAAuB,CAAA,CACvC,IAAA,CACA,MACF,CAAA,EACA,MAAA,EACJ,CAIA,MAAM,SAAA,EAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAA,CAAW,GAAA,CACpB,IAAA,CAAK,QAAA,CACL,EAAC,CACD,IAAA,CAAK,UAAA,CAAW,QAAA,CAAA,yEAAuB,CAAA,CACvC,IAAA,CACA,MACF,CAAA,EACA,MAAA,EACJ,CAIA,MAAM,QAAA,EAA0B,CAC9B,OAAA,CACE,MAAM,IAAA,CAAK,UAAA,CAAW,GAAA,CACpB,IAAA,CAAK,SACL,EAAC,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C,CAAA,CAAE,QAAQ,KAAA,CAAO,GAAG,CAAA,CAGrC,MAAM,KAAA,CAAM,CAAA,8BAAA,EAAiCC,CAAS,CAAA,CAAA,CAAG,CAC3D,CAEA,QAAA,EAAmB,CACjB,OAAO,IAAA,CAAK,cACd,CAEA,kBAAA,EAAiD,CAC/C,OAAO,IAAIb,CAAAA,CAA2B,IAAA,CAAK,UAAA,CAAY,IAAA,CAAK,QAAA,EAAU,CACxE,CAEF","file":"chunk-THA6X4VS.mjs","sourcesContent":["import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/binary\"\n * This is a generated file do not change manually!\n */\nexport class BinaryEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/binary\";\n }\n\n /**\n * Returns the input document.\n */\n async getAsXlsx(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.XLSX),\n null,\n \"blob\"\n )\n ).toFile();\n }\n /**\n * Returns the input document.\n */\n async getAsDocx(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.DOCX),\n null,\n \"blob\"\n )\n ).toFile();\n }\n /**\n * Returns the input document.\n */\n async getAsPdf(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.PDF),\n null,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { Configuration } from '../model';\nimport { ConfigurationUpdate } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/configurations/{configurationid}\"\n * This is a generated file do not change manually!\n */\nexport class ConfigurationEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly configurationid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/configurations\" + `/${this.configurationid}`;\n }\n\n /**\n * Returns the configuration for the given id.\n */\n async get(): Promise<Configuration> {\n return (\n await this.restClient.get<Configuration>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete a given configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Make changes to an existing configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n *\n * @param body ConfigurationUpdate - \n */\n async patch(\n body: ConfigurationUpdate,\n ): Promise<Configuration> {\n return (\n await this.restClient.patch<Configuration>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { Configuration } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/configurations\"\n * This is a generated file do not change manually!\n */\nexport class ConfigurationsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/configurations\";\n }\n\n /**\n * Returns all configurations.\n */\n async get(): Promise<Configuration[]> {\n return (\n await this.restClient.get<Configuration[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete all configurations. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Creates a new configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n *\n * @param body Configuration? - \n */\n async post(\n body?: Configuration,\n ): Promise<Configuration> {\n return (\n await this.restClient.post<Configuration>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { Event } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/events\"\n * This is a generated file do not change manually!\n */\nexport class EventsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/events\";\n }\n\n /**\n * Returns all events of given document structure\n */\n async get(): Promise<Event[]> {\n return (\n await this.restClient.get<Event[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Creates a new event for a document structure.\n *\n * @param body Event? - \n */\n async post(\n body: Event,\n params?: {\n lasteventid?: string,\n }): Promise<Event> {\n return (\n await this.restClient.post<Event>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/screenshots\"\n * This is a generated file do not change manually!\n */\nexport class ScreenshotsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/screenshots\";\n }\n\n /**\n * Returns a 'screenshot' of a page of the given document structure\n *\n * @param page number? - Number of the page to create a screenshot. Zero based\n * @param x number? - X position of the area to screenshot.\n * @param y number? - Y position of the area to screenshot.\n * @param width number? - Width of the area to screenshot.\n * @param height number? - Height of the area to screenshot.\n */\n async getAsPng(params?: {\n page?: number,\n x?: number,\n y?: number,\n width?: number,\n height?: number,\n }): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.PNG),\n null,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { BinaryEndpoint } from './binary';\nimport { DocumentStructure } from '../model';\nimport { DocumentStructureOverview } from '../model';\nimport { DocumentStructureReplaceSections } from '../model';\nimport { DocumentStructureUpdate } from '../model';\nimport { EventsEndpoint } from './events';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\nimport { ScreenshotsEndpoint } from './screenshots';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}\"\n * This is a generated file do not change manually!\n */\nexport class DocumentstructureEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly documentstructureid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documentstructures\" + `/${this.documentstructureid}`;\n }\n\n binary(): BinaryEndpoint {\n return new BinaryEndpoint(this.restClient, this.ENDPOINT);\n }\n\n events(): EventsEndpoint {\n return new EventsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n screenshots(): ScreenshotsEndpoint {\n return new ScreenshotsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n /**\n * Returns the document structure for the given id.\n */\n async get(): Promise<DocumentStructure> {\n return (\n await this.restClient.get<DocumentStructure>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n /**\n * Returns the document structure for the given id.\n */\n async getAsReqifz(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.REQIFZ),\n null,\n \"blob\"\n )\n ).toFile();\n }\n\n /**\n * Delete a given document structure.\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Make changes to an existing document structure.\n *\n * @param body DocumentStructureUpdate - \n */\n async patch(\n body: DocumentStructureUpdate,\n ): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.patch<DocumentStructureOverview>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n\n /**\n * Replace paragraphs of an existing document structure.\n *\n * @param body DocumentStructureReplaceSections - \n */\n async put(\n body: DocumentStructureReplaceSections,\n ): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.put<DocumentStructureOverview>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { DocumentStructureOverview } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures\"\n * This is a generated file do not change manually!\n */\nexport class DocumentstructuresEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documentstructures\";\n }\n\n /**\n * Returns an overview of all available document structures.\n *\n * @param customfield string? - \n * @param customfieldvalues string? - \n */\n async get(params?: {\n customfield?: string,\n customfieldvalues?: string,\n }): Promise<DocumentStructureOverview[]> {\n return (\n await this.restClient.get<DocumentStructureOverview[]>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete all document structures. Needs role: 'Domain Admin'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Creates a new document structure.\n *\n * @param file Blob? - \n * @param name string? - \n * @param publicaccess boolean? - \n * @param configurationid string? - \n */\n async post(data: {\n file?: Blob,\n name?: string,\n publicaccess?: boolean,\n configurationid?: string,\n }): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.post<DocumentStructureOverview>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n}\n","import { ConfigurationEndpoint } from './configuration';\nimport { ConfigurationsEndpoint } from './configurations';\nimport { DocumentstructureEndpoint } from './documentstructure';\nimport { DocumentstructuresEndpoint } from './documentstructures';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}\"\n * This is a generated file do not change manually!\n */\nexport class DomainEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly domainname: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\" + `/${this.domainname}`;\n }\n\n configurations(): ConfigurationsEndpoint;\n configurations(configurationid: string): ConfigurationEndpoint\n \n configurations(configurationid?: string): ConfigurationEndpoint | ConfigurationsEndpoint {\n if(configurationid !== undefined && configurationid !== null) {\n\t return new ConfigurationEndpoint(this.restClient, this.ENDPOINT, configurationid);\n } else {\n\t return new ConfigurationsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n documentstructures(): DocumentstructuresEndpoint;\n documentstructures(documentstructureid: string): DocumentstructureEndpoint\n \n documentstructures(documentstructureid?: string): DocumentstructureEndpoint | DocumentstructuresEndpoint {\n if(documentstructureid !== undefined && documentstructureid !== null) {\n\t return new DocumentstructureEndpoint(this.restClient, this.ENDPOINT, documentstructureid);\n } else {\n\t return new DocumentstructuresEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains\"\n * This is a generated file do not change manually!\n */\nexport class DomainsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\";\n }\n}\n","import { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator\"\n * This is a generated file do not change manually!\n */\nexport class StructurenavigatorEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/structurenavigator\";\n }\n\n domains(): DomainsEndpoint;\n domains(domainname: string): DomainEndpoint\n \n domains(domainname?: string): DomainEndpoint | DomainsEndpoint {\n if(domainname !== undefined && domainname !== null) {\n\t return new DomainEndpoint(this.restClient, this.ENDPOINT, domainname);\n } else {\n\t return new DomainsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import * as fs from 'fs';\n\nimport { StructurenavigatorEndpoint } from './structurenavigator';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the StructureNavigator API.\n *\n * @author semantha\n * Calls the /structurenavigator, endpoints.\n *\n * Note:\n * The constructor is not meant to be invoked directly\n * use `loginXXX()` with your credentials instead.\n *\n * this is a generated class do not change manually!\n */\nexport class StructureNavigatorAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the StructureNavigator API\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): StructureNavigatorAPI {\n if(!apiKey) {\n throw new Error('You need to supply an API key to login.');\n }\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new StructureNavigatorAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n\n /**\n * Access to the StructureNavigator API, when there is a auth proxy in place to handle the addition of the Authorization header\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithAuthProxy(\n serverUrl: string\n ): StructureNavigatorAPI {\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new StructureNavigatorAPI(new RestClient(this.parseServerUrl(serverUrl)), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the StructureNavigator API\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n * @param clientId: string - OAuth2 client id.\n * @param clientSecret: string - OAuth2 client secret.\n * @param tokenUrl: string OAuth2 url to get a valid access token\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): StructureNavigatorAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new StructureNavigatorAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the StructureNavigator API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : StructureNavigatorAPI {\n if (credentialsFilePath.endsWith('.properties') || credentialsFilePath.endsWith('.PROPERTIES')) {\n const rawData = fs.readFileSync(credentialsFilePath, 'utf8');\n const lines = rawData\n\t .split(/[\\n|\\r\\n]/)\n\t .filter(line => line.length !== 0)\n\t .map(line => line.split('='));\n\t const serverUrl = this.getValueOfInPropertiesFile('serverUrl', lines);\n\t const clientId = this.getValueOfInPropertiesFile('clientId', lines);\n\t const clientSecret = this.getValueOfInPropertiesFile('clientSecret', lines);\n\t const tokenUrl = this.getValueOfInPropertiesFile('tokenUrl', lines);\n\t return StructureNavigatorAPI.loginWithCredentials(serverUrl, clientId, clientSecret, tokenUrl);\n\t}\n throw new Error('Can not login, please supply a credentials properties file.');\n }\n\n private static parseServerUrl(serverUrl: string): string {\n if (serverUrl.endsWith('/')) {\n serverUrl = serverUrl.slice(0, -1);\n }\n if (serverUrl.endsWith('/tt-platform-ui/en/#')) {\n serverUrl = serverUrl.replace('/tt-platform-ui/en/#', '/tt-product-server');\n } else if (!serverUrl.endsWith('/tt-product-server')) {\n serverUrl += '/tt-product-server';\n }\n return serverUrl;\n }\n\n private static getValueOfInPropertiesFile(searchKey: string, lines: string[][]): string {\n for (const line of lines) {\n if (line[0] === searchKey) {\n return line[1].replace('\\\\:', ':');\n }\n }\n throw Error(`.properties files contains no ${searchKey}!`);\n }\n\n endpoint(): string {\n return this.parentEndpoint;\n }\n\n structurenavigator(): StructurenavigatorEndpoint {\n return new StructurenavigatorEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
1
+ {"version":3,"sources":["../semantha-product-sdk/structure-navigator/api/binary.ts","../semantha-product-sdk/structure-navigator/api/configuration.ts","../semantha-product-sdk/structure-navigator/api/configurations.ts","../semantha-product-sdk/structure-navigator/api/events.ts","../semantha-product-sdk/structure-navigator/api/screenshots.ts","../semantha-product-sdk/structure-navigator/api/documentstructure.ts","../semantha-product-sdk/structure-navigator/api/documentstructures.ts","../semantha-product-sdk/structure-navigator/api/domain.ts","../semantha-product-sdk/structure-navigator/api/domains.ts","../semantha-product-sdk/structure-navigator/api/structurenavigator.ts","../semantha-product-sdk/structure-navigator/api/structureNavigatorAPI.ts"],"names":["BinaryEndpoint","restClient","parentEndpoint","ConfigurationEndpoint","configurationid","body","ConfigurationsEndpoint","EventsEndpoint","params","ScreenshotsEndpoint","DocumentstructureEndpoint","documentstructureid","DocumentstructuresEndpoint","data","DomainEndpoint","domainname","DomainsEndpoint","StructurenavigatorEndpoint","PARENT_ENDPOINT","StructureNavigatorAPI","_StructureNavigatorAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","line","searchKey"],"mappings":"iEASO,IAAMA,CAAAA,CAAN,KAAqB,CAG1B,WAAA,CACmBC,CAAAA,CACAC,EACjB,CAFiB,IAAA,CAAA,UAAA,CAAAD,CAAAA,CACA,IAAA,CAAA,cAAA,CAAAC,CAAAA,CAEjB,IAAA,CAAK,SAAW,IAAA,CAAK,cAAA,CAAiB,UACxC,CAPiB,QAAA,CAYjB,MAAM,SAAA,EAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAA,CAAW,GAAA,CACpB,IAAA,CAAK,SACL,EAAC,CACD,IAAA,CAA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CAAG,EAAE,CAAA,CAAA,CAE/BA,CAAAA,CAAU,QAAA,CAAS,sBAAsB,CAAA,CAC3CA,CAAAA,CAAYA,EAAU,OAAA,CAAQ,sBAAA,CAAwB,oBAAoB,CAAA,CAChEA,CAAAA,CAAU,QAAA,CAAS,oBAAoB,CAAA,GACjDA,CAAAA,EAAa,oBAAA,CAAA,CAERA,CACT,CAEA,OAAe,0BAAA,CAA2BS,EAAmBF,CAAAA,CAA2B,CACtF,IAAA,IAAWC,CAAAA,IAAQD,CAAAA,CACjB,GAAIC,CAAAA,CAAK,CAAC,CAAA,GAAMC,CAAAA,CACd,OAAOD,CAAAA,CAAK,CAAC,CAAA,CAAE,QAAQ,KAAA,CAAO,GAAG,CAAA,CAGrC,MAAM,KAAA,CAAM,CAAA,8BAAA,EAAiCC,CAAS,CAAA,CAAA,CAAG,CAC3D,CAEA,QAAA,EAAmB,CACjB,OAAO,IAAA,CAAK,cACd,CAEA,kBAAA,EAAiD,CAC/C,OAAO,IAAIb,CAAAA,CAA2B,IAAA,CAAK,UAAA,CAAY,IAAA,CAAK,QAAA,EAAU,CACxE,CAEF","file":"chunk-CIAODZK3.mjs","sourcesContent":["import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/binary\"\n * This is a generated file do not change manually!\n */\nexport class BinaryEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/binary\";\n }\n\n /**\n * Returns the input document.\n */\n async getAsXlsx(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.XLSX),\n null,\n \"blob\"\n )\n ).toFile();\n }\n /**\n * Returns the input document.\n */\n async getAsDocx(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.DOCX),\n null,\n \"blob\"\n )\n ).toFile();\n }\n /**\n * Returns the input document.\n */\n async getAsPdf(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.PDF),\n null,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { Configuration } from '../model';\nimport { ConfigurationUpdate } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/configurations/{configurationid}\"\n * This is a generated file do not change manually!\n */\nexport class ConfigurationEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly configurationid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/configurations\" + `/${this.configurationid}`;\n }\n\n /**\n * Returns the configuration for the given id.\n */\n async get(): Promise<Configuration> {\n return (\n await this.restClient.get<Configuration>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete a given configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Make changes to an existing configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n *\n * @param body ConfigurationUpdate - \n */\n async patch(\n body: ConfigurationUpdate,\n ): Promise<Configuration> {\n return (\n await this.restClient.patch<Configuration>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { Configuration } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/configurations\"\n * This is a generated file do not change manually!\n */\nexport class ConfigurationsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/configurations\";\n }\n\n /**\n * Returns all configurations.\n */\n async get(): Promise<Configuration[]> {\n return (\n await this.restClient.get<Configuration[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete all configurations. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Creates a new configuration. Needs roles: 'Advanced User', 'Domain Admin' or 'Expert User'\n *\n * @param body Configuration? - \n */\n async post(\n body?: Configuration,\n ): Promise<Configuration> {\n return (\n await this.restClient.post<Configuration>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { Event } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/events\"\n * This is a generated file do not change manually!\n */\nexport class EventsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/events\";\n }\n\n /**\n * Returns all events of given document structure\n */\n async get(): Promise<Event[]> {\n return (\n await this.restClient.get<Event[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Creates a new event for a document structure.\n *\n * @param body Event? - \n */\n async post(\n body: Event,\n params?: {\n lasteventid?: string,\n }): Promise<Event> {\n return (\n await this.restClient.post<Event>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}/screenshots\"\n * This is a generated file do not change manually!\n */\nexport class ScreenshotsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/screenshots\";\n }\n\n /**\n * Returns a 'screenshot' of a page of the given document structure\n *\n * @param page number? - Number of the page to create a screenshot. Zero based\n * @param x number? - X position of the area to screenshot.\n * @param y number? - Y position of the area to screenshot.\n * @param width number? - Width of the area to screenshot.\n * @param height number? - Height of the area to screenshot.\n */\n async getAsPng(params?: {\n page?: number,\n x?: number,\n y?: number,\n width?: number,\n height?: number,\n }): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.PNG),\n null,\n \"blob\"\n )\n ).toFile();\n }\n}\n","import { BinaryEndpoint } from './binary';\nimport { DocumentStructure } from '../model';\nimport { DocumentStructureOverview } from '../model';\nimport { DocumentStructureReplaceSections } from '../model';\nimport { DocumentStructureUpdate } from '../model';\nimport { EventsEndpoint } from './events';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\nimport { ScreenshotsEndpoint } from './screenshots';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures/{documentstructureid}\"\n * This is a generated file do not change manually!\n */\nexport class DocumentstructureEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly documentstructureid: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documentstructures\" + `/${this.documentstructureid}`;\n }\n\n binary(): BinaryEndpoint {\n return new BinaryEndpoint(this.restClient, this.ENDPOINT);\n }\n\n events(): EventsEndpoint {\n return new EventsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n screenshots(): ScreenshotsEndpoint {\n return new ScreenshotsEndpoint(this.restClient, this.ENDPOINT);\n }\n\n /**\n * Returns the document structure for the given id.\n */\n async get(): Promise<DocumentStructure> {\n return (\n await this.restClient.get<DocumentStructure>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n /**\n * Returns the document structure for the given id.\n */\n async getAsReqifz(): Promise<Blob> {\n return (\n await this.restClient.get<Blob>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.REQIFZ),\n null,\n \"blob\"\n )\n ).toFile();\n }\n\n /**\n * Delete a given document structure.\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Make changes to an existing document structure.\n *\n * @param body DocumentStructureUpdate - \n */\n async patch(\n body: DocumentStructureUpdate,\n ): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.patch<DocumentStructureOverview>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n\n /**\n * Replace paragraphs of an existing document structure.\n *\n * @param body DocumentStructureReplaceSections - \n */\n async put(\n body: DocumentStructureReplaceSections,\n ): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.put<DocumentStructureOverview>(\n this.ENDPOINT,\n body\n )\n ).toModel();\n }\n}\n","import { DocumentStructureOverview } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}/documentstructures\"\n * This is a generated file do not change manually!\n */\nexport class DocumentstructuresEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/documentstructures\";\n }\n\n /**\n * Returns an overview of all available document structures.\n *\n * @param customfield string? - \n * @param customfieldvalues string? - \n */\n async get(params?: {\n customfield?: string,\n customfieldvalues?: string,\n }): Promise<DocumentStructureOverview[]> {\n return (\n await this.restClient.get<DocumentStructureOverview[]>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n\n /**\n * Delete all document structures. Needs role: 'Domain Admin'\n */\n async delete() {\n return await this.restClient.delete(this.ENDPOINT);\n }\n\n /**\n * Creates a new document structure.\n *\n * @param file Blob? - \n * @param name string? - \n * @param publicaccess boolean? - \n * @param configurationid string? - \n */\n async post(data: {\n file?: Blob,\n name?: string,\n publicaccess?: boolean,\n configurationid?: string,\n }): Promise<DocumentStructureOverview> {\n return (\n await this.restClient.post<DocumentStructureOverview>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n}\n","import { ConfigurationEndpoint } from './configuration';\nimport { ConfigurationsEndpoint } from './configurations';\nimport { DocumentstructureEndpoint } from './documentstructure';\nimport { DocumentstructuresEndpoint } from './documentstructures';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains/{domainname}\"\n * This is a generated file do not change manually!\n */\nexport class DomainEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly domainname: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\" + `/${this.domainname}`;\n }\n\n configurations(): ConfigurationsEndpoint;\n configurations(configurationid: string): ConfigurationEndpoint\n \n configurations(configurationid?: string): ConfigurationEndpoint | ConfigurationsEndpoint {\n if(configurationid !== undefined && configurationid !== null) {\n\t return new ConfigurationEndpoint(this.restClient, this.ENDPOINT, configurationid);\n } else {\n\t return new ConfigurationsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n\n documentstructures(): DocumentstructuresEndpoint;\n documentstructures(documentstructureid: string): DocumentstructureEndpoint\n \n documentstructures(documentstructureid?: string): DocumentstructureEndpoint | DocumentstructuresEndpoint {\n if(documentstructureid !== undefined && documentstructureid !== null) {\n\t return new DocumentstructureEndpoint(this.restClient, this.ENDPOINT, documentstructureid);\n } else {\n\t return new DocumentstructuresEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator/domains\"\n * This is a generated file do not change manually!\n */\nexport class DomainsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\";\n }\n}\n","import { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/structurenavigator\"\n * This is a generated file do not change manually!\n */\nexport class StructurenavigatorEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/structurenavigator\";\n }\n\n domains(): DomainsEndpoint;\n domains(domainname: string): DomainEndpoint\n \n domains(domainname?: string): DomainEndpoint | DomainsEndpoint {\n if(domainname !== undefined && domainname !== null) {\n\t return new DomainEndpoint(this.restClient, this.ENDPOINT, domainname);\n } else {\n\t return new DomainsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import * as fs from 'fs';\n\nimport { StructurenavigatorEndpoint } from './structurenavigator';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the StructureNavigator API.\n *\n * @author semantha\n * Calls the /structurenavigator, endpoints.\n *\n * Note:\n * The constructor is not meant to be invoked directly\n * use `loginXXX()` with your credentials instead.\n *\n * this is a generated class do not change manually!\n */\nexport class StructureNavigatorAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the StructureNavigator API\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): StructureNavigatorAPI {\n if(!apiKey) {\n throw new Error('You need to supply an API key to login.');\n }\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new StructureNavigatorAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n\n /**\n * Access to the StructureNavigator API, when there is a auth proxy in place to handle the addition of the Authorization header\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithAuthProxy(\n serverUrl: string\n ): StructureNavigatorAPI {\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new StructureNavigatorAPI(new RestClient(this.parseServerUrl(serverUrl)), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the StructureNavigator API\n *\n * @param serverUrl: string - URL to the StructureNavigator server.\n * @param clientId: string - OAuth2 client id.\n * @param clientSecret: string - OAuth2 client secret.\n * @param tokenUrl: string OAuth2 url to get a valid access token\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): StructureNavigatorAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new StructureNavigatorAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the StructureNavigator API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return StructureNavigatorAPI: Entry point to the StructureNavigator API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : StructureNavigatorAPI {\n if (credentialsFilePath.endsWith('.properties') || credentialsFilePath.endsWith('.PROPERTIES')) {\n const rawData = fs.readFileSync(credentialsFilePath, 'utf8');\n const lines = rawData\n\t .split(/[\\n|\\r\\n]/)\n\t .filter(line => line.length !== 0)\n\t .map(line => line.split('='));\n\t const serverUrl = this.getValueOfInPropertiesFile('serverUrl', lines);\n\t const clientId = this.getValueOfInPropertiesFile('clientId', lines);\n\t const clientSecret = this.getValueOfInPropertiesFile('clientSecret', lines);\n\t const tokenUrl = this.getValueOfInPropertiesFile('tokenUrl', lines);\n\t return StructureNavigatorAPI.loginWithCredentials(serverUrl, clientId, clientSecret, tokenUrl);\n\t}\n throw new Error('Can not login, please supply a credentials properties file.');\n }\n\n private static parseServerUrl(serverUrl: string): string {\n if (serverUrl.endsWith('/')) {\n serverUrl = serverUrl.slice(0, -1);\n }\n if (serverUrl.endsWith('/tt-platform-ui/en/#')) {\n serverUrl = serverUrl.replace('/tt-platform-ui/en/#', '/tt-product-server');\n } else if (!serverUrl.endsWith('/tt-product-server')) {\n serverUrl += '/tt-product-server';\n }\n return serverUrl;\n }\n\n private static getValueOfInPropertiesFile(searchKey: string, lines: string[][]): string {\n for (const line of lines) {\n if (line[0] === searchKey) {\n return line[1].replace('\\\\:', ':');\n }\n }\n throw Error(`.properties files contains no ${searchKey}!`);\n }\n\n endpoint(): string {\n return this.parentEndpoint;\n }\n\n structurenavigator(): StructurenavigatorEndpoint {\n return new StructurenavigatorEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
@@ -1,2 +1,2 @@
1
- import {c as c$1}from'./chunk-PU2IRAN7.mjs';import*as h from'fs';var o=class{constructor(t,r){this.restClient=t;this.parentEndpoint=r;this.ENDPOINT=this.parentEndpoint+"/log";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var s=class{constructor(t,r){this.restClient=t;this.parentEndpoint=r;this.ENDPOINT=this.parentEndpoint+"/track";}ENDPOINT;async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var a=class{constructor(t,r,i){this.restClient=t;this.parentEndpoint=r;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;log(){return new o(this.restClient,this.ENDPOINT)}track(){return new s(this.restClient,this.ENDPOINT)}};var p=class{constructor(t,r){this.restClient=t;this.parentEndpoint=r;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var l=class{constructor(t,r){this.restClient=t;this.parentEndpoint=r;this.ENDPOINT=this.parentEndpoint+"/uitracking";}ENDPOINT;domains(t){return t!=null?new a(this.restClient,this.ENDPOINT,t):new p(this.restClient,this.ENDPOINT)}};var c="/api",m=class n{constructor(t,r){this.restClient=t;this.parentEndpoint=r;}static loginWithApiKey(t,r){if(!r)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new n(new c$1(this.parseServerUrl(t),r),c)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new n(new c$1(this.parseServerUrl(t)),c)}static loginWithCredentials(t,r,i,d){return t=this.parseServerUrl(t),new n(new c$1(t,void 0,r,i,d),c)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=h.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(g=>g.length!==0).map(g=>g.split("=")),d=this.getValueOfInPropertiesFile("serverUrl",i),f=this.getValueOfInPropertiesFile("clientId",i),u=this.getValueOfInPropertiesFile("clientSecret",i),E=this.getValueOfInPropertiesFile("tokenUrl",i);return n.loginWithCredentials(d,f,u,E)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-server"),t}static getValueOfInPropertiesFile(t,r){for(let i of r)if(i[0]===t)return i[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}uitracking(){return new l(this.restClient,this.endpoint())}};export{o as a,s as b,a as c,p as d,l as e,m as f};//# sourceMappingURL=chunk-LBYB72RT.mjs.map
2
- //# sourceMappingURL=chunk-LBYB72RT.mjs.map
1
+ import {c as c$1}from'./chunk-5PB4IBX4.mjs';import*as h from'fs';var o=class{constructor(t,r){this.restClient=t;this.parentEndpoint=r;this.ENDPOINT=this.parentEndpoint+"/log";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var s=class{constructor(t,r){this.restClient=t;this.parentEndpoint=r;this.ENDPOINT=this.parentEndpoint+"/track";}ENDPOINT;async patch(t){return (await this.restClient.patch(this.ENDPOINT,t)).toModel()}};var a=class{constructor(t,r,i){this.restClient=t;this.parentEndpoint=r;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;log(){return new o(this.restClient,this.ENDPOINT)}track(){return new s(this.restClient,this.ENDPOINT)}};var p=class{constructor(t,r){this.restClient=t;this.parentEndpoint=r;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var l=class{constructor(t,r){this.restClient=t;this.parentEndpoint=r;this.ENDPOINT=this.parentEndpoint+"/uitracking";}ENDPOINT;domains(t){return t!=null?new a(this.restClient,this.ENDPOINT,t):new p(this.restClient,this.ENDPOINT)}};var c="/api",m=class n{constructor(t,r){this.restClient=t;this.parentEndpoint=r;}static loginWithApiKey(t,r){if(!r)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new n(new c$1(this.parseServerUrl(t),r),c)}static loginWithAuthProxy(t){if(!t)throw new Error("You need to supply a server url to login.");return new n(new c$1(this.parseServerUrl(t)),c)}static loginWithCredentials(t,r,i,d){return t=this.parseServerUrl(t),new n(new c$1(t,void 0,r,i,d),c)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=h.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(g=>g.length!==0).map(g=>g.split("=")),d=this.getValueOfInPropertiesFile("serverUrl",i),f=this.getValueOfInPropertiesFile("clientId",i),u=this.getValueOfInPropertiesFile("clientSecret",i),E=this.getValueOfInPropertiesFile("tokenUrl",i);return n.loginWithCredentials(d,f,u,E)}throw new Error("Can not login, please supply a credentials properties file.")}static parseServerUrl(t){return t.endsWith("/")&&(t=t.slice(0,-1)),t.endsWith("/tt-platform-ui/en/#")?t=t.replace("/tt-platform-ui/en/#","/tt-product-server"):t.endsWith("/tt-product-server")||(t+="/tt-product-server"),t}static getValueOfInPropertiesFile(t,r){for(let i of r)if(i[0]===t)return i[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}uitracking(){return new l(this.restClient,this.endpoint())}};export{o as a,s as b,a as c,p as d,l as e,m as f};//# sourceMappingURL=chunk-FRZZWIQF.mjs.map
2
+ //# sourceMappingURL=chunk-FRZZWIQF.mjs.map