@semantha/product-sdk 10.1.0 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-CS7BBFY4.mjs +2 -0
- package/dist/chunk-CS7BBFY4.mjs.map +1 -0
- package/dist/{chunk-NGJU6JRX.js → chunk-J6MTVURL.js} +2 -2
- package/dist/chunk-J6MTVURL.js.map +1 -0
- package/dist/{chunk-4R65LLWL.js → chunk-KFGKXHFV.js} +2 -2
- package/dist/{chunk-4R65LLWL.js.map → chunk-KFGKXHFV.js.map} +1 -1
- package/dist/{chunk-TNZ7KC6A.mjs → chunk-OFG4XO3Z.mjs} +2 -2
- package/dist/{chunk-TNZ7KC6A.mjs.map → chunk-OFG4XO3Z.mjs.map} +1 -1
- package/dist/{eventTypeEnum-B89xECKK.d.mts → eventTypeEnum-Ht9OkfT2.d.mts} +22 -10
- package/dist/{eventTypeEnum-B89xECKK.d.ts → eventTypeEnum-Ht9OkfT2.d.ts} +22 -10
- package/dist/file-box/index.js +1 -1
- package/dist/file-box/index.mjs +1 -1
- package/dist/structure-navigator/api/index.d.mts +7 -1
- package/dist/structure-navigator/api/index.d.ts +7 -1
- package/dist/structure-navigator/api/index.js +1 -1
- package/dist/structure-navigator/api/index.mjs +1 -1
- package/dist/structure-navigator/index.d.mts +1 -1
- package/dist/structure-navigator/index.d.ts +1 -1
- package/dist/structure-navigator/index.js +1 -1
- package/dist/structure-navigator/index.mjs +1 -1
- package/dist/structure-navigator/model/index.d.mts +2 -2
- package/dist/structure-navigator/model/index.d.ts +2 -2
- package/dist/structure-navigator/model/index.js +1 -1
- package/dist/structure-navigator/model/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-27V2G4KK.mjs +0 -2
- package/dist/chunk-27V2G4KK.mjs.map +0 -1
- package/dist/chunk-NGJU6JRX.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {c as c$1}from'./chunk-OHHE5EHF.mjs';import*as D from'fs';var o=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 s=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 a=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 l=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 p=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 u=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 o(this.restClient,this.ENDPOINT)}events(){return new l(this.restClient,this.ENDPOINT)}screenshots(){return new p(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 c=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 d=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 s(this.restClient,this.ENDPOINT,t):new a(this.restClient,this.ENDPOINT)}documentstructures(t){return t!=null?new u(this.restClient,this.ENDPOINT,t):new c(this.restClient,this.ENDPOINT)}};var m=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/structurenavigator";}ENDPOINT;domains(t){return t!=null?new d(this.restClient,this.ENDPOINT,t):new m(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 loginWithCredentials(t,e,i,g){return t=this.parseServerUrl(t),new r(new c$1(t,void 0,e,i,g),E)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=D.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(N=>N.length!==0).map(N=>N.split("=")),g=this.getValueOfInPropertiesFile("serverUrl",i),P=this.getValueOfInPropertiesFile("clientId",i),O=this.getValueOfInPropertiesFile("clientSecret",i),v=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(g,P,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 h(this.restClient,this.endpoint())}};export{o as a,s as b,a as c,l as d,p as e,u as f,c as g,d as h,m as i,h as j,C as k};//# sourceMappingURL=chunk-CS7BBFY4.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-CS7BBFY4.mjs.map
|
|
@@ -0,0 +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":"iEASaA,IAAAA,CAAAA,CAAN,KAAqB,CAG1B,WACmBC,CAAAA,CAAAA,CACAC,EACjB,CAFiB,IAAA,CAAA,UAAA,CAAAD,CACA,CAAA,IAAA,CAAA,cAAA,CAAAC,CAEjB,CAAA,IAAA,CAAK,SAAW,IAAK,CAAA,cAAA,CAAiB,UACxC,CAPiB,QAYjB,CAAA,MAAM,WAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAW,CAAA,GAAA,CACpB,KAAK,QACL,CAAA,EACA,CAAA,IAAA,CAAK,UAAW,CAAA,QAAA,CAAA,mEAAuB,EACvC,IACA,CAAA,MACF,CACA,EAAA,MAAA,EACJ,CAIA,MAAM,SAA2B,EAAA,CAC/B,OACE,CAAA,MAAM,IAAK,CAAA,UAAA,CAAW,GACpB,CAAA,IAAA,CAAK,QACL,CAAA,EACA,CAAA,IAAA,CAAK,UAAW,CAAA,QAAA,CAAA,yEAAuB,EACvC,IACA,CAAA,MACF,CACA,EAAA,MAAA,EACJ,CAIA,MAAM,QAA0B,EAAA,CAC9B,OACE,CAAA,MAAM,IAAK,CAAA,UAAA,CAAW,IACpB,IAAK,CAAA,QAAA,CACL,EAAC,CACD,IAAK,CAAA,UAAA,CAAW,QAAsB,CAAA,iBAAA,CAAA,CACtC,IACA,CAAA,MACF,CACA,EAAA,MAAA,EACJ,CACF,EClDaC,IAAAA,CAAAA,CAAN,KAA4B,CAGjC,WAC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AAA,CAA2B,cAAgBG,CAAAA,CAAK,EACpEF,CAAW,CAAA,IAAA,CAAK,0BAA2B,CAAA,UAAA,CAAYE,CAAK,CAAA,CAClE,OAAOR,CAAAA,CAAsB,oBAAqBC,CAAAA,CAAAA,CAAWG,CAAUC,CAAAA,CAAAA,CAAcC,CAAQ,CAC/F,CACG,MAAM,IAAI,KAAM,CAAA,6DAA6D,CAC/E,CAEA,OAAe,cAAeL,CAAAA,CAAAA,CAA2B,CACvD,OAAIA,CAAU,CAAA,QAAA,CAAS,GAAG,CACxBA,GAAAA,CAAAA,CAAYA,CAAU,CAAA,KAAA,CAAM,CAAG,CAAA,EAAE,CAE/BA,CAAAA,CAAAA,CAAAA,CAAU,QAAS,CAAA,sBAAsB,CAC3CA,CAAAA,CAAAA,CAAYA,CAAU,CAAA,OAAA,CAAQ,uBAAwB,oBAAoB,CAAA,CAChEA,CAAU,CAAA,QAAA,CAAS,oBAAoB,CAAA,GACjDA,GAAa,oBAERA,CAAAA,CAAAA,CACT,CAEA,OAAe,0BAA2BS,CAAAA,CAAAA,CAAmBF,EAA2B,CACtF,IAAA,IAAWC,CAAQD,IAAAA,CAAAA,CACjB,GAAIC,CAAAA,CAAK,CAAC,CAAA,GAAMC,CACd,CAAA,OAAOD,CAAK,CAAA,CAAC,CAAE,CAAA,OAAA,CAAQ,MAAO,GAAG,CAAA,CAGrC,MAAM,KAAA,CAAM,CAAiCC,8BAAAA,EAAAA,CAAS,GAAG,CAC3D,CAEA,QAAmB,EAAA,CACjB,OAAO,IAAA,CAAK,cACd,CAEA,kBAAA,EAAiD,CAC/C,OAAO,IAAIb,CAAAA,CAA2B,IAAK,CAAA,UAAA,CAAY,IAAK,CAAA,QAAA,EAAU,CACxE,CAEF","file":"chunk-CS7BBFY4.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 * 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
|
-
'use strict';var chunkWFUCUDFC_js=require('./chunk-WFUCUDFC.js'),
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
'use strict';var chunkWFUCUDFC_js=require('./chunk-WFUCUDFC.js'),D=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 D__namespace=/*#__PURE__*/_interopNamespace(D);var o=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 s=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 a=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 l=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 p=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 u=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 o(this.restClient,this.ENDPOINT)}events(){return new l(this.restClient,this.ENDPOINT)}screenshots(){return new p(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 c=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 d=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 s(this.restClient,this.ENDPOINT,t):new a(this.restClient,this.ENDPOINT)}documentstructures(t){return t!=null?new u(this.restClient,this.ENDPOINT,t):new c(this.restClient,this.ENDPOINT)}};var m=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/structurenavigator";}ENDPOINT;domains(t){return t!=null?new d(this.restClient,this.ENDPOINT,t):new m(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 chunkWFUCUDFC_js.c(this.parseServerUrl(t),e),E)}static loginWithCredentials(t,e,i,g){return t=this.parseServerUrl(t),new r(new chunkWFUCUDFC_js.c(t,void 0,e,i,g),E)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=D__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(N=>N.length!==0).map(N=>N.split("=")),g=this.getValueOfInPropertiesFile("serverUrl",i),P=this.getValueOfInPropertiesFile("clientId",i),O=this.getValueOfInPropertiesFile("clientSecret",i),v=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(g,P,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 h(this.restClient,this.endpoint())}};exports.a=o;exports.b=s;exports.c=a;exports.d=l;exports.e=p;exports.f=u;exports.g=c;exports.h=d;exports.i=m;exports.j=h;exports.k=C;//# sourceMappingURL=chunk-J6MTVURL.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-J6MTVURL.js.map
|
|
@@ -0,0 +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","D","line","searchKey"],"mappings":"ubASaA,IAAAA,CAAAA,CAAN,KAAqB,CAG1B,WACmBC,CAAAA,CAAAA,CACAC,EACjB,CAFiB,IAAA,CAAA,UAAA,CAAAD,CACA,CAAA,IAAA,CAAA,cAAA,CAAAC,CAEjB,CAAA,IAAA,CAAK,SAAW,IAAK,CAAA,cAAA,CAAiB,UACxC,CAPiB,QAYjB,CAAA,MAAM,WAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAW,CAAA,GAAA,CACpB,KAAK,QACL,CAAA,EACA,CAAA,IAAA,CAAK,UAAW,CAAA,QAAA,CAAA,mEAAuB,EACvC,IACA,CAAA,MACF,CACA,EAAA,MAAA,EACJ,CAIA,MAAM,SAA2B,EAAA,CAC/B,OACE,CAAA,MAAM,IAAK,CAAA,UAAA,CAAW,GACpB,CAAA,IAAA,CAAK,QACL,CAAA,EACA,CAAA,IAAA,CAAK,UAAW,CAAA,QAAA,CAAA,yEAAuB,EACvC,IACA,CAAA,MACF,CACA,EAAA,MAAA,EACJ,CAIA,MAAM,QAA0B,EAAA,CAC9B,OACE,CAAA,MAAM,IAAK,CAAA,UAAA,CAAW,IACpB,IAAK,CAAA,QAAA,CACL,EAAC,CACD,IAAK,CAAA,UAAA,CAAW,QAAsB,CAAA,iBAAA,CAAA,CACtC,IACA,CAAA,MACF,CACA,EAAA,MAAA,EACJ,CACF,EClDaC,IAAAA,CAAAA,CAAN,KAA4B,CAGjC,WACmBF,CAAAA,CAAAA,CACAC,EACAE,CACjB,CAAA,CAHiB,IAAAH,CAAAA,UAAAA,CAAAA,CAAAA,CAC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CAAYE,CAAK,CAAA,CAClE,OAAOR,CAAAA,CAAsB,oBAAqBC,CAAAA,CAAAA,CAAWG,CAAUC,CAAAA,CAAAA,CAAcC,CAAQ,CAC/F,CACG,MAAM,IAAI,KAAM,CAAA,6DAA6D,CAC/E,CAEA,OAAe,cAAeL,CAAAA,CAAAA,CAA2B,CACvD,OAAIA,CAAU,CAAA,QAAA,CAAS,GAAG,CACxBA,GAAAA,CAAAA,CAAYA,CAAU,CAAA,KAAA,CAAM,CAAG,CAAA,EAAE,CAE/BA,CAAAA,CAAAA,CAAAA,CAAU,QAAS,CAAA,sBAAsB,CAC3CA,CAAAA,CAAAA,CAAYA,CAAU,CAAA,OAAA,CAAQ,uBAAwB,oBAAoB,CAAA,CAChEA,CAAU,CAAA,QAAA,CAAS,oBAAoB,CAAA,GACjDA,GAAa,oBAERA,CAAAA,CAAAA,CACT,CAEA,OAAe,0BAA2BU,CAAAA,CAAAA,CAAmBH,EAA2B,CACtF,IAAA,IAAWE,CAAQF,IAAAA,CAAAA,CACjB,GAAIE,CAAAA,CAAK,CAAC,CAAA,GAAMC,CACd,CAAA,OAAOD,CAAK,CAAA,CAAC,CAAE,CAAA,OAAA,CAAQ,MAAO,GAAG,CAAA,CAGrC,MAAM,KAAA,CAAM,CAAiCC,8BAAAA,EAAAA,CAAS,GAAG,CAC3D,CAEA,QAAmB,EAAA,CACjB,OAAO,IAAA,CAAK,cACd,CAEA,kBAAA,EAAiD,CAC/C,OAAO,IAAId,CAAAA,CAA2B,IAAK,CAAA,UAAA,CAAY,IAAK,CAAA,QAAA,EAAU,CACxE,CAEF","file":"chunk-J6MTVURL.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 * 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
|
-
'use strict';var e=["MAPPING","STRUCTURE"];function n(t){return e.includes(t)}var u=["MAPPING","STRUCTURE"];function
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
'use strict';var e=["MAPPING","STRUCTURE"];function n(t){return e.includes(t)}var u=["MAPPING","STRUCTURE"];function E(t){return u.includes(t)}var r=["MAPPING","STRUCTURE"];function s(t){return r.includes(t)}var o=["MERGED_SECTION","MOVED_SECTION","SPLITTED_SECTION","UPDATED_SECTION","DELETED_PARAGRAPH","MERGED_PARAGRAPH","MOVED_PARAGRAPH","SPLITTED_PARAGRAPH","UPDATED_PARAGRAPH","INSERTED_PARAGRAPH","MERGED_SENTENCE","SPLITTED_SENTENCE","DELETED_CHARACTER","INSERTED_CHARACTER"];function S(t){return o.includes(t)}exports.a=e;exports.b=n;exports.c=u;exports.d=E;exports.e=r;exports.f=s;exports.g=o;exports.h=S;//# sourceMappingURL=chunk-KFGKXHFV.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-KFGKXHFV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../semantha-product-sdk/structure-navigator/model/bulkDocumentStructureStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/documentStructureOverviewStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/documentStructureStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/eventTypeEnum.ts"],"names":["BulkDocumentStructureStatusEnumValues","isBulkDocumentStructureStatusEnumValue","value","DocumentStructureOverviewStatusEnumValues","isDocumentStructureOverviewStatusEnumValue","DocumentStructureStatusEnumValues","isDocumentStructureStatusEnumValue","EventTypeEnumValues","isEventTypeEnumValue"],"mappings":"aAKO,IAAMA,CAAwC,CAAA,CACnD,SACA,CAAA,WACF,EAGO,SAASC,CAAAA,CAAuCC,CAAsD,CAAA,CAC3G,OAAOF,CAAsC,CAAA,QAAA,CAASE,CAAK,CAC7D,CCRaC,IAAAA,CAAAA,CAA4C,CACvD,SAAA,CACA,WACF,EAGO,SAASC,CAAAA,CAA2CF,EAA0D,CACnH,OAAOC,CAA0C,CAAA,QAAA,CAASD,CAAK,CACjE,CCRaG,IAAAA,CAAAA,CAAoC,CAC/C,SACA,CAAA,WACF,EAGO,SAASC,CAAmCJ,CAAAA,CAAAA,CAAkD,CACnG,OAAOG,EAAkC,QAASH,CAAAA,CAAK,CACzD,KCRaK,CAAsB,CAAA,CACjC,gBACA,CAAA,eAAA,CACA,mBACA,iBACA,CAAA,mBAAA,CACA,kBACA,CAAA,iBAAA,CACA,qBACA,mBACA,CAAA,oBAAA,CACA,iBACA,CAAA,mBAAA,CACA,oBACA,oBACF,EAGO,SAASC,CAAAA,CAAqBN,EAAoC,CACvE,OAAOK,CAAoB,CAAA,QAAA,CAASL,CAAK,CAC3C","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../semantha-product-sdk/structure-navigator/model/bulkDocumentStructureStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/documentStructureOverviewStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/documentStructureStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/eventTypeEnum.ts"],"names":["BulkDocumentStructureStatusEnumValues","isBulkDocumentStructureStatusEnumValue","value","DocumentStructureOverviewStatusEnumValues","isDocumentStructureOverviewStatusEnumValue","DocumentStructureStatusEnumValues","isDocumentStructureStatusEnumValue","EventTypeEnumValues","isEventTypeEnumValue"],"mappings":"aAKO,IAAMA,CAAwC,CAAA,CACnD,SACA,CAAA,WACF,EAGO,SAASC,CAAAA,CAAuCC,CAAsD,CAAA,CAC3G,OAAOF,CAAsC,CAAA,QAAA,CAASE,CAAK,CAC7D,CCRaC,IAAAA,CAAAA,CAA4C,CACvD,SAAA,CACA,WACF,EAGO,SAASC,CAAAA,CAA2CF,EAA0D,CACnH,OAAOC,CAA0C,CAAA,QAAA,CAASD,CAAK,CACjE,CCRaG,IAAAA,CAAAA,CAAoC,CAC/C,SACA,CAAA,WACF,EAGO,SAASC,CAAmCJ,CAAAA,CAAAA,CAAkD,CACnG,OAAOG,EAAkC,QAASH,CAAAA,CAAK,CACzD,KCRaK,CAAsB,CAAA,CACjC,gBACA,CAAA,eAAA,CACA,mBACA,iBACA,CAAA,mBAAA,CACA,kBACA,CAAA,iBAAA,CACA,qBACA,mBACA,CAAA,oBAAA,CACA,iBACA,CAAA,mBAAA,CACA,oBACA,oBACF,EAGO,SAASC,CAAAA,CAAqBN,EAAoC,CACvE,OAAOK,CAAoB,CAAA,QAAA,CAASL,CAAK,CAC3C","file":"chunk-KFGKXHFV.js","sourcesContent":["/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const BulkDocumentStructureStatusEnumValues = [\n 'MAPPING',\n 'STRUCTURE'\n] as const;\nexport type BulkDocumentStructureStatusEnum = (typeof BulkDocumentStructureStatusEnumValues)[number];\n\nexport function isBulkDocumentStructureStatusEnumValue(value: any): value is BulkDocumentStructureStatusEnum {\n return BulkDocumentStructureStatusEnumValues.includes(value);\n}\n\n","/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const DocumentStructureOverviewStatusEnumValues = [\n 'MAPPING',\n 'STRUCTURE'\n] as const;\nexport type DocumentStructureOverviewStatusEnum = (typeof DocumentStructureOverviewStatusEnumValues)[number];\n\nexport function isDocumentStructureOverviewStatusEnumValue(value: any): value is DocumentStructureOverviewStatusEnum {\n return DocumentStructureOverviewStatusEnumValues.includes(value);\n}\n\n","/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const DocumentStructureStatusEnumValues = [\n 'MAPPING',\n 'STRUCTURE'\n] as const;\nexport type DocumentStructureStatusEnum = (typeof DocumentStructureStatusEnumValues)[number];\n\nexport function isDocumentStructureStatusEnumValue(value: any): value is DocumentStructureStatusEnum {\n return DocumentStructureStatusEnumValues.includes(value);\n}\n\n","/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const EventTypeEnumValues = [\n 'MERGED_SECTION',\n 'MOVED_SECTION',\n 'SPLITTED_SECTION',\n 'UPDATED_SECTION',\n 'DELETED_PARAGRAPH',\n 'MERGED_PARAGRAPH',\n 'MOVED_PARAGRAPH',\n 'SPLITTED_PARAGRAPH',\n 'UPDATED_PARAGRAPH',\n 'INSERTED_PARAGRAPH',\n 'MERGED_SENTENCE',\n 'SPLITTED_SENTENCE',\n 'DELETED_CHARACTER',\n 'INSERTED_CHARACTER'\n] as const;\nexport type EventTypeEnum = (typeof EventTypeEnumValues)[number];\n\nexport function isEventTypeEnumValue(value: any): value is EventTypeEnum {\n return EventTypeEnumValues.includes(value);\n}\n\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=["MAPPING","STRUCTURE"];function n(t){return e.includes(t)}var u=["MAPPING","STRUCTURE"];function
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
var e=["MAPPING","STRUCTURE"];function n(t){return e.includes(t)}var u=["MAPPING","STRUCTURE"];function E(t){return u.includes(t)}var r=["MAPPING","STRUCTURE"];function s(t){return r.includes(t)}var o=["MERGED_SECTION","MOVED_SECTION","SPLITTED_SECTION","UPDATED_SECTION","DELETED_PARAGRAPH","MERGED_PARAGRAPH","MOVED_PARAGRAPH","SPLITTED_PARAGRAPH","UPDATED_PARAGRAPH","INSERTED_PARAGRAPH","MERGED_SENTENCE","SPLITTED_SENTENCE","DELETED_CHARACTER","INSERTED_CHARACTER"];function S(t){return o.includes(t)}export{e as a,n as b,u as c,E as d,r as e,s as f,o as g,S as h};//# sourceMappingURL=chunk-OFG4XO3Z.mjs.map
|
|
2
|
+
//# sourceMappingURL=chunk-OFG4XO3Z.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../semantha-product-sdk/structure-navigator/model/bulkDocumentStructureStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/documentStructureOverviewStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/documentStructureStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/eventTypeEnum.ts"],"names":["BulkDocumentStructureStatusEnumValues","isBulkDocumentStructureStatusEnumValue","value","DocumentStructureOverviewStatusEnumValues","isDocumentStructureOverviewStatusEnumValue","DocumentStructureStatusEnumValues","isDocumentStructureStatusEnumValue","EventTypeEnumValues","isEventTypeEnumValue"],"mappings":"AAKO,IAAMA,CAAwC,CAAA,CACnD,SACA,CAAA,WACF,EAGO,SAASC,CAAAA,CAAuCC,CAAsD,CAAA,CAC3G,OAAOF,CAAsC,CAAA,QAAA,CAASE,CAAK,CAC7D,CCRaC,IAAAA,CAAAA,CAA4C,CACvD,SAAA,CACA,WACF,EAGO,SAASC,CAAAA,CAA2CF,EAA0D,CACnH,OAAOC,CAA0C,CAAA,QAAA,CAASD,CAAK,CACjE,CCRaG,IAAAA,CAAAA,CAAoC,CAC/C,SACA,CAAA,WACF,EAGO,SAASC,CAAmCJ,CAAAA,CAAAA,CAAkD,CACnG,OAAOG,EAAkC,QAASH,CAAAA,CAAK,CACzD,KCRaK,CAAsB,CAAA,CACjC,gBACA,CAAA,eAAA,CACA,mBACA,iBACA,CAAA,mBAAA,CACA,kBACA,CAAA,iBAAA,CACA,qBACA,mBACA,CAAA,oBAAA,CACA,iBACA,CAAA,mBAAA,CACA,oBACA,oBACF,EAGO,SAASC,CAAAA,CAAqBN,EAAoC,CACvE,OAAOK,CAAoB,CAAA,QAAA,CAASL,CAAK,CAC3C","file":"chunk-
|
|
1
|
+
{"version":3,"sources":["../semantha-product-sdk/structure-navigator/model/bulkDocumentStructureStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/documentStructureOverviewStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/documentStructureStatusEnum.ts","../semantha-product-sdk/structure-navigator/model/eventTypeEnum.ts"],"names":["BulkDocumentStructureStatusEnumValues","isBulkDocumentStructureStatusEnumValue","value","DocumentStructureOverviewStatusEnumValues","isDocumentStructureOverviewStatusEnumValue","DocumentStructureStatusEnumValues","isDocumentStructureStatusEnumValue","EventTypeEnumValues","isEventTypeEnumValue"],"mappings":"AAKO,IAAMA,CAAwC,CAAA,CACnD,SACA,CAAA,WACF,EAGO,SAASC,CAAAA,CAAuCC,CAAsD,CAAA,CAC3G,OAAOF,CAAsC,CAAA,QAAA,CAASE,CAAK,CAC7D,CCRaC,IAAAA,CAAAA,CAA4C,CACvD,SAAA,CACA,WACF,EAGO,SAASC,CAAAA,CAA2CF,EAA0D,CACnH,OAAOC,CAA0C,CAAA,QAAA,CAASD,CAAK,CACjE,CCRaG,IAAAA,CAAAA,CAAoC,CAC/C,SACA,CAAA,WACF,EAGO,SAASC,CAAmCJ,CAAAA,CAAAA,CAAkD,CACnG,OAAOG,EAAkC,QAASH,CAAAA,CAAK,CACzD,KCRaK,CAAsB,CAAA,CACjC,gBACA,CAAA,eAAA,CACA,mBACA,iBACA,CAAA,mBAAA,CACA,kBACA,CAAA,iBAAA,CACA,qBACA,mBACA,CAAA,oBAAA,CACA,iBACA,CAAA,mBAAA,CACA,oBACA,oBACF,EAGO,SAASC,CAAAA,CAAqBN,EAAoC,CACvE,OAAOK,CAAoB,CAAA,QAAA,CAASL,CAAK,CAC3C","file":"chunk-OFG4XO3Z.mjs","sourcesContent":["/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const BulkDocumentStructureStatusEnumValues = [\n 'MAPPING',\n 'STRUCTURE'\n] as const;\nexport type BulkDocumentStructureStatusEnum = (typeof BulkDocumentStructureStatusEnumValues)[number];\n\nexport function isBulkDocumentStructureStatusEnumValue(value: any): value is BulkDocumentStructureStatusEnum {\n return BulkDocumentStructureStatusEnumValues.includes(value);\n}\n\n","/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const DocumentStructureOverviewStatusEnumValues = [\n 'MAPPING',\n 'STRUCTURE'\n] as const;\nexport type DocumentStructureOverviewStatusEnum = (typeof DocumentStructureOverviewStatusEnumValues)[number];\n\nexport function isDocumentStructureOverviewStatusEnumValue(value: any): value is DocumentStructureOverviewStatusEnum {\n return DocumentStructureOverviewStatusEnumValues.includes(value);\n}\n\n","/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const DocumentStructureStatusEnumValues = [\n 'MAPPING',\n 'STRUCTURE'\n] as const;\nexport type DocumentStructureStatusEnum = (typeof DocumentStructureStatusEnumValues)[number];\n\nexport function isDocumentStructureStatusEnumValue(value: any): value is DocumentStructureStatusEnum {\n return DocumentStructureStatusEnumValues.includes(value);\n}\n\n","/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const EventTypeEnumValues = [\n 'MERGED_SECTION',\n 'MOVED_SECTION',\n 'SPLITTED_SECTION',\n 'UPDATED_SECTION',\n 'DELETED_PARAGRAPH',\n 'MERGED_PARAGRAPH',\n 'MOVED_PARAGRAPH',\n 'SPLITTED_PARAGRAPH',\n 'UPDATED_PARAGRAPH',\n 'INSERTED_PARAGRAPH',\n 'MERGED_SENTENCE',\n 'SPLITTED_SENTENCE',\n 'DELETED_CHARACTER',\n 'INSERTED_CHARACTER'\n] as const;\nexport type EventTypeEnum = (typeof EventTypeEnumValues)[number];\n\nexport function isEventTypeEnumValue(value: any): value is EventTypeEnum {\n return EventTypeEnumValues.includes(value);\n}\n\n"]}
|
|
@@ -169,15 +169,6 @@ declare const DocumentStructureOverviewStatusEnumValues: readonly ["MAPPING", "S
|
|
|
169
169
|
type DocumentStructureOverviewStatusEnum = (typeof DocumentStructureOverviewStatusEnumValues)[number];
|
|
170
170
|
declare function isDocumentStructureOverviewStatusEnumValue(value: any): value is DocumentStructureOverviewStatusEnum;
|
|
171
171
|
|
|
172
|
-
/**
|
|
173
|
-
* @author semantha
|
|
174
|
-
*
|
|
175
|
-
* This is a generated file do not change manually!
|
|
176
|
-
*/
|
|
177
|
-
declare const DocumentStructureStatusEnumValues: readonly ["MAPPING", "STRUCTURE"];
|
|
178
|
-
type DocumentStructureStatusEnum = (typeof DocumentStructureStatusEnumValues)[number];
|
|
179
|
-
declare function isDocumentStructureStatusEnumValue(value: any): value is DocumentStructureStatusEnum;
|
|
180
|
-
|
|
181
172
|
/**
|
|
182
173
|
* @author semantha
|
|
183
174
|
*
|
|
@@ -191,6 +182,27 @@ interface FormatInformationUpdate {
|
|
|
191
182
|
italic?: boolean;
|
|
192
183
|
}
|
|
193
184
|
|
|
185
|
+
/**
|
|
186
|
+
* @author semantha
|
|
187
|
+
*
|
|
188
|
+
* This is a generated file do not change manually!
|
|
189
|
+
*/
|
|
190
|
+
interface DocumentStructureReplaceSections {
|
|
191
|
+
splitByTextTypes?: string[];
|
|
192
|
+
splitByRegex?: string;
|
|
193
|
+
formatInformations?: FormatInformationUpdate[];
|
|
194
|
+
paragraphs?: StructureParagraph[];
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @author semantha
|
|
199
|
+
*
|
|
200
|
+
* This is a generated file do not change manually!
|
|
201
|
+
*/
|
|
202
|
+
declare const DocumentStructureStatusEnumValues: readonly ["MAPPING", "STRUCTURE"];
|
|
203
|
+
type DocumentStructureStatusEnum = (typeof DocumentStructureStatusEnumValues)[number];
|
|
204
|
+
declare function isDocumentStructureStatusEnumValue(value: any): value is DocumentStructureStatusEnum;
|
|
205
|
+
|
|
194
206
|
/**
|
|
195
207
|
* @author semantha
|
|
196
208
|
*
|
|
@@ -237,4 +249,4 @@ declare const EventTypeEnumValues: readonly ["MERGED_SECTION", "MOVED_SECTION",
|
|
|
237
249
|
type EventTypeEnum = (typeof EventTypeEnumValues)[number];
|
|
238
250
|
declare function isEventTypeEnumValue(value: any): value is EventTypeEnum;
|
|
239
251
|
|
|
240
|
-
export { type AttributeType as A, type Configuration as C, type DocumentStructure as D, type Event as E, type FormatInformation as F, type ParagraphFormatUpdate as P, type Rect as R, type Section as S, type ConfigurationUpdate as a, type CustomField as b, type DocumentStructureOverview as c, DocumentStructureOverviewStatusEnumValues as d, type DocumentStructureOverviewStatusEnum as e,
|
|
252
|
+
export { type AttributeType as A, type Configuration as C, type DocumentStructure as D, type Event as E, type FormatInformation as F, type ParagraphFormatUpdate as P, type Rect as R, type Section as S, type ConfigurationUpdate as a, type CustomField as b, type DocumentStructureOverview as c, DocumentStructureOverviewStatusEnumValues as d, type DocumentStructureOverviewStatusEnum as e, type DocumentStructureReplaceSections as f, DocumentStructureStatusEnumValues as g, type DocumentStructureStatusEnum as h, isDocumentStructureOverviewStatusEnumValue as i, isDocumentStructureStatusEnumValue as j, type DocumentStructureUpdate as k, EventTypeEnumValues as l, type EventTypeEnum as m, isEventTypeEnumValue as n, type FormatInformationUpdate as o, type StructureAttachment as p, type StructureParagraph as q, type StructureSentence as r };
|
|
@@ -169,15 +169,6 @@ declare const DocumentStructureOverviewStatusEnumValues: readonly ["MAPPING", "S
|
|
|
169
169
|
type DocumentStructureOverviewStatusEnum = (typeof DocumentStructureOverviewStatusEnumValues)[number];
|
|
170
170
|
declare function isDocumentStructureOverviewStatusEnumValue(value: any): value is DocumentStructureOverviewStatusEnum;
|
|
171
171
|
|
|
172
|
-
/**
|
|
173
|
-
* @author semantha
|
|
174
|
-
*
|
|
175
|
-
* This is a generated file do not change manually!
|
|
176
|
-
*/
|
|
177
|
-
declare const DocumentStructureStatusEnumValues: readonly ["MAPPING", "STRUCTURE"];
|
|
178
|
-
type DocumentStructureStatusEnum = (typeof DocumentStructureStatusEnumValues)[number];
|
|
179
|
-
declare function isDocumentStructureStatusEnumValue(value: any): value is DocumentStructureStatusEnum;
|
|
180
|
-
|
|
181
172
|
/**
|
|
182
173
|
* @author semantha
|
|
183
174
|
*
|
|
@@ -191,6 +182,27 @@ interface FormatInformationUpdate {
|
|
|
191
182
|
italic?: boolean;
|
|
192
183
|
}
|
|
193
184
|
|
|
185
|
+
/**
|
|
186
|
+
* @author semantha
|
|
187
|
+
*
|
|
188
|
+
* This is a generated file do not change manually!
|
|
189
|
+
*/
|
|
190
|
+
interface DocumentStructureReplaceSections {
|
|
191
|
+
splitByTextTypes?: string[];
|
|
192
|
+
splitByRegex?: string;
|
|
193
|
+
formatInformations?: FormatInformationUpdate[];
|
|
194
|
+
paragraphs?: StructureParagraph[];
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* @author semantha
|
|
199
|
+
*
|
|
200
|
+
* This is a generated file do not change manually!
|
|
201
|
+
*/
|
|
202
|
+
declare const DocumentStructureStatusEnumValues: readonly ["MAPPING", "STRUCTURE"];
|
|
203
|
+
type DocumentStructureStatusEnum = (typeof DocumentStructureStatusEnumValues)[number];
|
|
204
|
+
declare function isDocumentStructureStatusEnumValue(value: any): value is DocumentStructureStatusEnum;
|
|
205
|
+
|
|
194
206
|
/**
|
|
195
207
|
* @author semantha
|
|
196
208
|
*
|
|
@@ -237,4 +249,4 @@ declare const EventTypeEnumValues: readonly ["MERGED_SECTION", "MOVED_SECTION",
|
|
|
237
249
|
type EventTypeEnum = (typeof EventTypeEnumValues)[number];
|
|
238
250
|
declare function isEventTypeEnumValue(value: any): value is EventTypeEnum;
|
|
239
251
|
|
|
240
|
-
export { type AttributeType as A, type Configuration as C, type DocumentStructure as D, type Event as E, type FormatInformation as F, type ParagraphFormatUpdate as P, type Rect as R, type Section as S, type ConfigurationUpdate as a, type CustomField as b, type DocumentStructureOverview as c, DocumentStructureOverviewStatusEnumValues as d, type DocumentStructureOverviewStatusEnum as e,
|
|
252
|
+
export { type AttributeType as A, type Configuration as C, type DocumentStructure as D, type Event as E, type FormatInformation as F, type ParagraphFormatUpdate as P, type Rect as R, type Section as S, type ConfigurationUpdate as a, type CustomField as b, type DocumentStructureOverview as c, DocumentStructureOverviewStatusEnumValues as d, type DocumentStructureOverviewStatusEnum as e, type DocumentStructureReplaceSections as f, DocumentStructureStatusEnumValues as g, type DocumentStructureStatusEnum as h, isDocumentStructureOverviewStatusEnumValue as i, isDocumentStructureStatusEnumValue as j, type DocumentStructureUpdate as k, EventTypeEnumValues as l, type EventTypeEnum as m, isEventTypeEnumValue as n, type FormatInformationUpdate as o, type StructureAttachment as p, type StructureParagraph as q, type StructureSentence as r };
|
package/dist/file-box/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkCA66WME5_js=require('../chunk-CA66WME5.js')
|
|
1
|
+
'use strict';var chunkCA66WME5_js=require('../chunk-CA66WME5.js'),chunkZSFNB534_js=require('../chunk-ZSFNB534.js');require('../chunk-WFUCUDFC.js');Object.defineProperty(exports,"BoxEndpoint",{enumerable:true,get:function(){return chunkCA66WME5_js.a}});Object.defineProperty(exports,"BoxesEndpoint",{enumerable:true,get:function(){return chunkCA66WME5_js.b}});Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkCA66WME5_js.c}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkCA66WME5_js.d}});Object.defineProperty(exports,"FileBoxAPI",{enumerable:true,get:function(){return chunkCA66WME5_js.f}});Object.defineProperty(exports,"FileboxEndpoint",{enumerable:true,get:function(){return chunkCA66WME5_js.e}});Object.defineProperty(exports,"FileTypeEnumValues",{enumerable:true,get:function(){return chunkZSFNB534_js.a}});Object.defineProperty(exports,"isFileTypeEnumValue",{enumerable:true,get:function(){return chunkZSFNB534_js.b}});//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/file-box/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as BoxEndpoint,b as BoxesEndpoint,c as DomainEndpoint,d as DomainsEndpoint,f as FileBoxAPI,e as FileboxEndpoint}from'../chunk-YXKZIGLW.mjs';
|
|
1
|
+
export{a as BoxEndpoint,b as BoxesEndpoint,c as DomainEndpoint,d as DomainsEndpoint,f as FileBoxAPI,e as FileboxEndpoint}from'../chunk-YXKZIGLW.mjs';export{a as FileTypeEnumValues,b as isFileTypeEnumValue}from'../chunk-DURTIKAP.mjs';import'../chunk-OHHE5EHF.mjs';//# sourceMappingURL=index.mjs.map
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RestClient, RestResponse } from '../../rest/index.mjs';
|
|
2
|
-
import { C as Configuration, a as ConfigurationUpdate, E as Event, D as DocumentStructure,
|
|
2
|
+
import { C as Configuration, a as ConfigurationUpdate, E as Event, D as DocumentStructure, k as DocumentStructureUpdate, c as DocumentStructureOverview, f as DocumentStructureReplaceSections } from '../../eventTypeEnum-Ht9OkfT2.mjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -169,6 +169,12 @@ declare class DocumentstructureEndpoint {
|
|
|
169
169
|
* @param body DocumentStructureUpdate -
|
|
170
170
|
*/
|
|
171
171
|
patch(body: DocumentStructureUpdate): Promise<DocumentStructureOverview>;
|
|
172
|
+
/**
|
|
173
|
+
* Replace paragraphs of an existing document structure.
|
|
174
|
+
*
|
|
175
|
+
* @param body DocumentStructureReplaceSections -
|
|
176
|
+
*/
|
|
177
|
+
put(body: DocumentStructureReplaceSections): Promise<DocumentStructureOverview>;
|
|
172
178
|
}
|
|
173
179
|
|
|
174
180
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RestClient, RestResponse } from '../../rest/index.js';
|
|
2
|
-
import { C as Configuration, a as ConfigurationUpdate, E as Event, D as DocumentStructure,
|
|
2
|
+
import { C as Configuration, a as ConfigurationUpdate, E as Event, D as DocumentStructure, k as DocumentStructureUpdate, c as DocumentStructureOverview, f as DocumentStructureReplaceSections } from '../../eventTypeEnum-Ht9OkfT2.js';
|
|
3
3
|
import 'axios';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -169,6 +169,12 @@ declare class DocumentstructureEndpoint {
|
|
|
169
169
|
* @param body DocumentStructureUpdate -
|
|
170
170
|
*/
|
|
171
171
|
patch(body: DocumentStructureUpdate): Promise<DocumentStructureOverview>;
|
|
172
|
+
/**
|
|
173
|
+
* Replace paragraphs of an existing document structure.
|
|
174
|
+
*
|
|
175
|
+
* @param body DocumentStructureReplaceSections -
|
|
176
|
+
*/
|
|
177
|
+
put(body: DocumentStructureReplaceSections): Promise<DocumentStructureOverview>;
|
|
172
178
|
}
|
|
173
179
|
|
|
174
180
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkJ6MTVURL_js=require('../../chunk-J6MTVURL.js');require('../../chunk-WFUCUDFC.js');Object.defineProperty(exports,"BinaryEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.a}});Object.defineProperty(exports,"ConfigurationEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.b}});Object.defineProperty(exports,"ConfigurationsEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.c}});Object.defineProperty(exports,"DocumentstructureEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.f}});Object.defineProperty(exports,"DocumentstructuresEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.g}});Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.h}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.i}});Object.defineProperty(exports,"EventsEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.d}});Object.defineProperty(exports,"ScreenshotsEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.e}});Object.defineProperty(exports,"StructureNavigatorAPI",{enumerable:true,get:function(){return chunkJ6MTVURL_js.k}});Object.defineProperty(exports,"StructurenavigatorEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.j}});//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as BinaryEndpoint,b as ConfigurationEndpoint,c as ConfigurationsEndpoint,f as DocumentstructureEndpoint,g as DocumentstructuresEndpoint,h as DomainEndpoint,i as DomainsEndpoint,d as EventsEndpoint,e as ScreenshotsEndpoint,k as StructureNavigatorAPI,j as StructurenavigatorEndpoint}from'../../chunk-
|
|
1
|
+
export{a as BinaryEndpoint,b as ConfigurationEndpoint,c as ConfigurationsEndpoint,f as DocumentstructureEndpoint,g as DocumentstructuresEndpoint,h as DomainEndpoint,i as DomainsEndpoint,d as EventsEndpoint,e as ScreenshotsEndpoint,k as StructureNavigatorAPI,j as StructurenavigatorEndpoint}from'../../chunk-CS7BBFY4.mjs';import'../../chunk-OHHE5EHF.mjs';//# sourceMappingURL=index.mjs.map
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AttributeType, C as Configuration, a as ConfigurationUpdate, b as CustomField, D as DocumentStructure, c as DocumentStructureOverview, e as DocumentStructureOverviewStatusEnum, d as DocumentStructureOverviewStatusEnumValues,
|
|
1
|
+
export { A as AttributeType, C as Configuration, a as ConfigurationUpdate, b as CustomField, D as DocumentStructure, c as DocumentStructureOverview, e as DocumentStructureOverviewStatusEnum, d as DocumentStructureOverviewStatusEnumValues, f as DocumentStructureReplaceSections, h as DocumentStructureStatusEnum, g as DocumentStructureStatusEnumValues, k as DocumentStructureUpdate, E as Event, m as EventTypeEnum, l as EventTypeEnumValues, F as FormatInformation, o as FormatInformationUpdate, P as ParagraphFormatUpdate, R as Rect, S as Section, p as StructureAttachment, q as StructureParagraph, r as StructureSentence, i as isDocumentStructureOverviewStatusEnumValue, j as isDocumentStructureStatusEnumValue, n as isEventTypeEnumValue } from '../eventTypeEnum-Ht9OkfT2.mjs';
|
|
2
2
|
export { BulkConfiguration, BulkDocumentStructure, BulkDocumentStructureStatusEnum, BulkDocumentStructureStatusEnumValues, BulkFormatInformation, isBulkDocumentStructureStatusEnumValue } from './model/index.mjs';
|
|
3
3
|
export { BinaryEndpoint, ConfigurationEndpoint, ConfigurationsEndpoint, DocumentstructureEndpoint, DocumentstructuresEndpoint, DomainEndpoint, DomainsEndpoint, EventsEndpoint, ScreenshotsEndpoint, StructureNavigatorAPI, StructurenavigatorEndpoint } from './api/index.mjs';
|
|
4
4
|
import '../rest/index.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AttributeType, C as Configuration, a as ConfigurationUpdate, b as CustomField, D as DocumentStructure, c as DocumentStructureOverview, e as DocumentStructureOverviewStatusEnum, d as DocumentStructureOverviewStatusEnumValues,
|
|
1
|
+
export { A as AttributeType, C as Configuration, a as ConfigurationUpdate, b as CustomField, D as DocumentStructure, c as DocumentStructureOverview, e as DocumentStructureOverviewStatusEnum, d as DocumentStructureOverviewStatusEnumValues, f as DocumentStructureReplaceSections, h as DocumentStructureStatusEnum, g as DocumentStructureStatusEnumValues, k as DocumentStructureUpdate, E as Event, m as EventTypeEnum, l as EventTypeEnumValues, F as FormatInformation, o as FormatInformationUpdate, P as ParagraphFormatUpdate, R as Rect, S as Section, p as StructureAttachment, q as StructureParagraph, r as StructureSentence, i as isDocumentStructureOverviewStatusEnumValue, j as isDocumentStructureStatusEnumValue, n as isEventTypeEnumValue } from '../eventTypeEnum-Ht9OkfT2.js';
|
|
2
2
|
export { BulkConfiguration, BulkDocumentStructure, BulkDocumentStructureStatusEnum, BulkDocumentStructureStatusEnumValues, BulkFormatInformation, isBulkDocumentStructureStatusEnumValue } from './model/index.js';
|
|
3
3
|
export { BinaryEndpoint, ConfigurationEndpoint, ConfigurationsEndpoint, DocumentstructureEndpoint, DocumentstructuresEndpoint, DomainEndpoint, DomainsEndpoint, EventsEndpoint, ScreenshotsEndpoint, StructureNavigatorAPI, StructurenavigatorEndpoint } from './api/index.js';
|
|
4
4
|
import '../rest/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkJ6MTVURL_js=require('../chunk-J6MTVURL.js'),chunkKFGKXHFV_js=require('../chunk-KFGKXHFV.js');require('../chunk-WFUCUDFC.js');Object.defineProperty(exports,"BinaryEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.a}});Object.defineProperty(exports,"ConfigurationEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.b}});Object.defineProperty(exports,"ConfigurationsEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.c}});Object.defineProperty(exports,"DocumentstructureEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.f}});Object.defineProperty(exports,"DocumentstructuresEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.g}});Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.h}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.i}});Object.defineProperty(exports,"EventsEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.d}});Object.defineProperty(exports,"ScreenshotsEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.e}});Object.defineProperty(exports,"StructureNavigatorAPI",{enumerable:true,get:function(){return chunkJ6MTVURL_js.k}});Object.defineProperty(exports,"StructurenavigatorEndpoint",{enumerable:true,get:function(){return chunkJ6MTVURL_js.j}});Object.defineProperty(exports,"BulkDocumentStructureStatusEnumValues",{enumerable:true,get:function(){return chunkKFGKXHFV_js.a}});Object.defineProperty(exports,"DocumentStructureOverviewStatusEnumValues",{enumerable:true,get:function(){return chunkKFGKXHFV_js.c}});Object.defineProperty(exports,"DocumentStructureStatusEnumValues",{enumerable:true,get:function(){return chunkKFGKXHFV_js.e}});Object.defineProperty(exports,"EventTypeEnumValues",{enumerable:true,get:function(){return chunkKFGKXHFV_js.g}});Object.defineProperty(exports,"isBulkDocumentStructureStatusEnumValue",{enumerable:true,get:function(){return chunkKFGKXHFV_js.b}});Object.defineProperty(exports,"isDocumentStructureOverviewStatusEnumValue",{enumerable:true,get:function(){return chunkKFGKXHFV_js.d}});Object.defineProperty(exports,"isDocumentStructureStatusEnumValue",{enumerable:true,get:function(){return chunkKFGKXHFV_js.f}});Object.defineProperty(exports,"isEventTypeEnumValue",{enumerable:true,get:function(){return chunkKFGKXHFV_js.h}});//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as BinaryEndpoint,b as ConfigurationEndpoint,c as ConfigurationsEndpoint,f as DocumentstructureEndpoint,g as DocumentstructuresEndpoint,h as DomainEndpoint,i as DomainsEndpoint,d as EventsEndpoint,e as ScreenshotsEndpoint,k as StructureNavigatorAPI,j as StructurenavigatorEndpoint}from'../chunk-
|
|
1
|
+
export{a as BinaryEndpoint,b as ConfigurationEndpoint,c as ConfigurationsEndpoint,f as DocumentstructureEndpoint,g as DocumentstructuresEndpoint,h as DomainEndpoint,i as DomainsEndpoint,d as EventsEndpoint,e as ScreenshotsEndpoint,k as StructureNavigatorAPI,j as StructurenavigatorEndpoint}from'../chunk-CS7BBFY4.mjs';export{a as BulkDocumentStructureStatusEnumValues,c as DocumentStructureOverviewStatusEnumValues,e as DocumentStructureStatusEnumValues,g as EventTypeEnumValues,b as isBulkDocumentStructureStatusEnumValue,d as isDocumentStructureOverviewStatusEnumValue,f as isDocumentStructureStatusEnumValue,h as isEventTypeEnumValue}from'../chunk-OFG4XO3Z.mjs';import'../chunk-OHHE5EHF.mjs';//# sourceMappingURL=index.mjs.map
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AttributeType, b as CustomField, S as Section, F as FormatInformation,
|
|
2
|
-
export { C as Configuration, a as ConfigurationUpdate, D as DocumentStructure, c as DocumentStructureOverview, e as DocumentStructureOverviewStatusEnum, d as DocumentStructureOverviewStatusEnumValues,
|
|
1
|
+
import { A as AttributeType, b as CustomField, S as Section, F as FormatInformation, p as StructureAttachment } from '../../eventTypeEnum-Ht9OkfT2.mjs';
|
|
2
|
+
export { C as Configuration, a as ConfigurationUpdate, D as DocumentStructure, c as DocumentStructureOverview, e as DocumentStructureOverviewStatusEnum, d as DocumentStructureOverviewStatusEnumValues, f as DocumentStructureReplaceSections, h as DocumentStructureStatusEnum, g as DocumentStructureStatusEnumValues, k as DocumentStructureUpdate, E as Event, m as EventTypeEnum, l as EventTypeEnumValues, o as FormatInformationUpdate, P as ParagraphFormatUpdate, R as Rect, q as StructureParagraph, r as StructureSentence, i as isDocumentStructureOverviewStatusEnumValue, j as isDocumentStructureStatusEnumValue, n as isEventTypeEnumValue } from '../../eventTypeEnum-Ht9OkfT2.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @author semantha
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AttributeType, b as CustomField, S as Section, F as FormatInformation,
|
|
2
|
-
export { C as Configuration, a as ConfigurationUpdate, D as DocumentStructure, c as DocumentStructureOverview, e as DocumentStructureOverviewStatusEnum, d as DocumentStructureOverviewStatusEnumValues,
|
|
1
|
+
import { A as AttributeType, b as CustomField, S as Section, F as FormatInformation, p as StructureAttachment } from '../../eventTypeEnum-Ht9OkfT2.js';
|
|
2
|
+
export { C as Configuration, a as ConfigurationUpdate, D as DocumentStructure, c as DocumentStructureOverview, e as DocumentStructureOverviewStatusEnum, d as DocumentStructureOverviewStatusEnumValues, f as DocumentStructureReplaceSections, h as DocumentStructureStatusEnum, g as DocumentStructureStatusEnumValues, k as DocumentStructureUpdate, E as Event, m as EventTypeEnum, l as EventTypeEnumValues, o as FormatInformationUpdate, P as ParagraphFormatUpdate, R as Rect, q as StructureParagraph, r as StructureSentence, i as isDocumentStructureOverviewStatusEnumValue, j as isDocumentStructureStatusEnumValue, n as isEventTypeEnumValue } from '../../eventTypeEnum-Ht9OkfT2.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @author semantha
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkKFGKXHFV_js=require('../../chunk-KFGKXHFV.js');Object.defineProperty(exports,"BulkDocumentStructureStatusEnumValues",{enumerable:true,get:function(){return chunkKFGKXHFV_js.a}});Object.defineProperty(exports,"DocumentStructureOverviewStatusEnumValues",{enumerable:true,get:function(){return chunkKFGKXHFV_js.c}});Object.defineProperty(exports,"DocumentStructureStatusEnumValues",{enumerable:true,get:function(){return chunkKFGKXHFV_js.e}});Object.defineProperty(exports,"EventTypeEnumValues",{enumerable:true,get:function(){return chunkKFGKXHFV_js.g}});Object.defineProperty(exports,"isBulkDocumentStructureStatusEnumValue",{enumerable:true,get:function(){return chunkKFGKXHFV_js.b}});Object.defineProperty(exports,"isDocumentStructureOverviewStatusEnumValue",{enumerable:true,get:function(){return chunkKFGKXHFV_js.d}});Object.defineProperty(exports,"isDocumentStructureStatusEnumValue",{enumerable:true,get:function(){return chunkKFGKXHFV_js.f}});Object.defineProperty(exports,"isEventTypeEnumValue",{enumerable:true,get:function(){return chunkKFGKXHFV_js.h}});//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as BulkDocumentStructureStatusEnumValues,c as DocumentStructureOverviewStatusEnumValues,e as DocumentStructureStatusEnumValues,g as EventTypeEnumValues,b as isBulkDocumentStructureStatusEnumValue,d as isDocumentStructureOverviewStatusEnumValue,f as isDocumentStructureStatusEnumValue,h as isEventTypeEnumValue}from'../../chunk-
|
|
1
|
+
export{a as BulkDocumentStructureStatusEnumValues,c as DocumentStructureOverviewStatusEnumValues,e as DocumentStructureStatusEnumValues,g as EventTypeEnumValues,b as isBulkDocumentStructureStatusEnumValue,d as isDocumentStructureOverviewStatusEnumValue,f as isDocumentStructureStatusEnumValue,h as isEventTypeEnumValue}from'../../chunk-OFG4XO3Z.mjs';//# sourceMappingURL=index.mjs.map
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
package/dist/chunk-27V2G4KK.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {c as c$1}from'./chunk-OHHE5EHF.mjs';import*as P from'fs';var o=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 s=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 a=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 l=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 p=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 u=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 o(this.restClient,this.ENDPOINT)}events(){return new l(this.restClient,this.ENDPOINT)}screenshots(){return new p(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()}};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 c=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 s(this.restClient,this.ENDPOINT,t):new a(this.restClient,this.ENDPOINT)}documentstructures(t){return t!=null?new u(this.restClient,this.ENDPOINT,t):new d(this.restClient,this.ENDPOINT)}};var m=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var h=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/structurenavigator";}ENDPOINT;domains(t){return t!=null?new c(this.restClient,this.ENDPOINT,t):new m(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 loginWithCredentials(t,e,i,g){return t=this.parseServerUrl(t),new r(new c$1(t,void 0,e,i,g),E)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=P.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(N=>N.length!==0).map(N=>N.split("=")),g=this.getValueOfInPropertiesFile("serverUrl",i),D=this.getValueOfInPropertiesFile("clientId",i),O=this.getValueOfInPropertiesFile("clientSecret",i),y=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(g,D,O,y)}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 h(this.restClient,this.endpoint())}};export{o as a,s as b,a as c,l as d,p as e,u as f,d as g,c as h,m as i,h as j,C as k};//# sourceMappingURL=chunk-27V2G4KK.mjs.map
|
|
2
|
-
//# sourceMappingURL=chunk-27V2G4KK.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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":"iEASaA,IAAAA,CAAAA,CAAN,KAAqB,CAG1B,WACmBC,CAAAA,CAAAA,CACAC,EACjB,CAFiB,IAAA,CAAA,UAAA,CAAAD,CACA,CAAA,IAAA,CAAA,cAAA,CAAAC,CAEjB,CAAA,IAAA,CAAK,SAAW,IAAK,CAAA,cAAA,CAAiB,UACxC,CAPiB,QAYjB,CAAA,MAAM,WAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAW,CAAA,GAAA,CACpB,KAAK,QACL,CAAA,EACA,CAAA,IAAA,CAAK,UAAW,CAAA,QAAA,CAAA,mEAAuB,EACvC,IACA,CAAA,MACF,CACA,EAAA,MAAA,EACJ,CAIA,M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C,OAAO,IAAIb,CAAAA,CAA2B,IAAK,CAAA,UAAA,CAAY,IAAK,CAAA,QAAA,EAAU,CACxE,CAEF","file":"chunk-27V2G4KK.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 { 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","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 * 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 +0,0 @@
|
|
|
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":"ubASaA,IAAAA,CAAAA,CAAN,KAAqB,CAG1B,WACmBC,CAAAA,CAAAA,CACAC,EACjB,CAFiB,IAAA,CAAA,UAAA,CAAAD,CACA,CAAA,IAAA,CAAA,cAAA,CAAAC,CAEjB,CAAA,IAAA,CAAK,SAAW,IAAK,CAAA,cAAA,CAAiB,UACxC,CAPiB,QAYjB,CAAA,MAAM,WAA2B,CAC/B,OAAA,CACE,MAAM,IAAA,CAAK,UAAW,CAAA,GAAA,CACpB,KAAK,QACL,CAAA,EACA,CAAA,IAAA,CAAK,UAAW,CAAA,QAAA,CAAA,mEAAuB,EACvC,IACA,CAAA,MACF,CACA,EAAA,MAAA,EACJ,CAIA,MAAM,SAA2B,EAAA,CAC/B,OACE,CAAA,MAAM,IAAK,CAAA,UAAA,CAAW,IACpB,IAAK,CAAA,QAAA,CACL,EAAC,CACD,IAAK,CAAA,UAAA,CAAW,kFAAuB,CACvC,CAAA,IAAA,CACA,MACF,CAAA,EACA,MAAO,EACX,CAIA,MAAM,QAAA,EAA0B,CAC9B,OAAA,CACE,MAAM,IAAA,CAAK,WAAW,GACpB,CAAA,IAAA,CAAK,QACL,CAAA,EACA,CAAA,IAAA,CAAK,WAAW,QAAsB,CAAA,iBAAA,CAAA,CACtC,IACA,CAAA,MACF,CACA,EAAA,MAAA,EACJ,CACF,EClDaC,IAAAA,CAAAA,CAAN,KAA4B,CAGjC,YACmBF,CACAC,CAAAA,CAAAA,CACAE,CACjB,CAAA,CAHiB,IAAAH,CAAAA,UAAAA,CAAAA,CAAAA,CACA,oBAAAC,CACA,CAAA,IAAA,CAAA,eAAA,CAAAE,CAEjB,CAA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,GAAG,IACxBA,CAAYA,CAAAA,CAAAA,CAAU,KAAM,CAAA,CAAA,CAAG,EAAE,CAAA,CAAA,CAE/BA,CAAU,CAAA,QAAA,CAAS,sBAAsB,CAAA,CAC3CA,CAAYA,CAAAA,CAAAA,CAAU,OAAQ,CAAA,sBAAA,CAAwB,oBAAoB,CAChEA,CAAAA,CAAAA,CAAU,QAAS,CAAA,oBAAoB,CACjDA,GAAAA,CAAAA,EAAa,sBAERA,CACT,CAEA,OAAe,0BAAA,CAA2BU,CAAmBH,CAAAA,CAAAA,CAA2B,CACtF,IAAWE,IAAAA,CAAAA,IAAQF,CACjB,CAAA,GAAIE,CAAK,CAAA,CAAC,IAAMC,CACd,CAAA,OAAOD,CAAK,CAAA,CAAC,CAAE,CAAA,OAAA,CAAQ,MAAO,GAAG,CAAA,CAGrC,MAAM,KAAA,CAAM,CAAiCC,8BAAAA,EAAAA,CAAS,GAAG,CAC3D,CAEA,QAAmB,EAAA,CACjB,OAAO,IAAA,CAAK,cACd,CAEA,kBAAA,EAAiD,CAC/C,OAAO,IAAId,CAAAA,CAA2B,IAAK,CAAA,UAAA,CAAY,IAAK,CAAA,QAAA,EAAU,CACxE,CAEF","file":"chunk-NGJU6JRX.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 { 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","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 * 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}"]}
|