@semantha/product-sdk 9.2.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.
Files changed (119) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +3 -0
  3. package/dist/chunk-4R65LLWL.js +2 -0
  4. package/dist/chunk-4R65LLWL.js.map +1 -0
  5. package/dist/chunk-7Y3CRYXW.mjs +2 -0
  6. package/dist/chunk-7Y3CRYXW.mjs.map +1 -0
  7. package/dist/chunk-BE73RDIS.mjs +2 -0
  8. package/dist/chunk-BE73RDIS.mjs.map +1 -0
  9. package/dist/chunk-DOK44NQJ.mjs +2 -0
  10. package/dist/chunk-DOK44NQJ.mjs.map +1 -0
  11. package/dist/chunk-DURTIKAP.mjs +2 -0
  12. package/dist/chunk-DURTIKAP.mjs.map +1 -0
  13. package/dist/chunk-F5JCME7D.js +2 -0
  14. package/dist/chunk-F5JCME7D.js.map +1 -0
  15. package/dist/chunk-I2MRAQSD.mjs +2 -0
  16. package/dist/chunk-I2MRAQSD.mjs.map +1 -0
  17. package/dist/chunk-IISTQOX3.js +2 -0
  18. package/dist/chunk-IISTQOX3.js.map +1 -0
  19. package/dist/chunk-JCDJ3B7Q.js +2 -0
  20. package/dist/chunk-JCDJ3B7Q.js.map +1 -0
  21. package/dist/chunk-OP5BUX5G.js +2 -0
  22. package/dist/chunk-OP5BUX5G.js.map +1 -0
  23. package/dist/chunk-TNZ7KC6A.mjs +2 -0
  24. package/dist/chunk-TNZ7KC6A.mjs.map +1 -0
  25. package/dist/chunk-Y763UUOV.mjs +2 -0
  26. package/dist/chunk-Y763UUOV.mjs.map +1 -0
  27. package/dist/chunk-Z3N63BWG.js +2 -0
  28. package/dist/chunk-Z3N63BWG.js.map +1 -0
  29. package/dist/chunk-ZSFNB534.js +2 -0
  30. package/dist/chunk-ZSFNB534.js.map +1 -0
  31. package/dist/eventTypeEnum-B89xECKK.d.mts +240 -0
  32. package/dist/eventTypeEnum-B89xECKK.d.ts +240 -0
  33. package/dist/file-box/api/index.d.mts +133 -0
  34. package/dist/file-box/api/index.d.ts +133 -0
  35. package/dist/file-box/api/index.js +2 -0
  36. package/dist/file-box/api/index.js.map +1 -0
  37. package/dist/file-box/api/index.mjs +2 -0
  38. package/dist/file-box/api/index.mjs.map +1 -0
  39. package/dist/file-box/index.d.mts +4 -0
  40. package/dist/file-box/index.d.ts +4 -0
  41. package/dist/file-box/index.js +2 -0
  42. package/dist/file-box/index.js.map +1 -0
  43. package/dist/file-box/index.mjs +2 -0
  44. package/dist/file-box/index.mjs.map +1 -0
  45. package/dist/file-box/model/index.d.mts +47 -0
  46. package/dist/file-box/model/index.d.ts +47 -0
  47. package/dist/file-box/model/index.js +2 -0
  48. package/dist/file-box/model/index.js.map +1 -0
  49. package/dist/file-box/model/index.mjs +2 -0
  50. package/dist/file-box/model/index.mjs.map +1 -0
  51. package/dist/modeEnum-CSw6xLrL.d.mts +600 -0
  52. package/dist/modeEnum-CSw6xLrL.d.ts +600 -0
  53. package/dist/requirements/api/index.d.mts +466 -0
  54. package/dist/requirements/api/index.d.ts +466 -0
  55. package/dist/requirements/api/index.js +2 -0
  56. package/dist/requirements/api/index.js.map +1 -0
  57. package/dist/requirements/api/index.mjs +2 -0
  58. package/dist/requirements/api/index.mjs.map +1 -0
  59. package/dist/requirements/model/index.d.mts +20 -0
  60. package/dist/requirements/model/index.d.ts +20 -0
  61. package/dist/requirements/model/index.js +2 -0
  62. package/dist/requirements/model/index.js.map +1 -0
  63. package/dist/requirements/model/index.mjs +2 -0
  64. package/dist/requirements/model/index.mjs.map +1 -0
  65. package/dist/rest/index.d.mts +52 -0
  66. package/dist/rest/index.d.ts +52 -0
  67. package/dist/rest/index.js +2 -0
  68. package/dist/rest/index.js.map +1 -0
  69. package/dist/rest/index.mjs +2 -0
  70. package/dist/rest/index.mjs.map +1 -0
  71. package/dist/structure-navigator/api/index.d.mts +311 -0
  72. package/dist/structure-navigator/api/index.d.ts +311 -0
  73. package/dist/structure-navigator/api/index.js +2 -0
  74. package/dist/structure-navigator/api/index.js.map +1 -0
  75. package/dist/structure-navigator/api/index.mjs +2 -0
  76. package/dist/structure-navigator/api/index.mjs.map +1 -0
  77. package/dist/structure-navigator/index.d.mts +5 -0
  78. package/dist/structure-navigator/index.d.ts +5 -0
  79. package/dist/structure-navigator/index.js +2 -0
  80. package/dist/structure-navigator/index.js.map +1 -0
  81. package/dist/structure-navigator/index.mjs +2 -0
  82. package/dist/structure-navigator/index.mjs.map +1 -0
  83. package/dist/structure-navigator/model/index.d.mts +70 -0
  84. package/dist/structure-navigator/model/index.d.ts +70 -0
  85. package/dist/structure-navigator/model/index.js +2 -0
  86. package/dist/structure-navigator/model/index.js.map +1 -0
  87. package/dist/structure-navigator/model/index.mjs +2 -0
  88. package/dist/structure-navigator/model/index.mjs.map +1 -0
  89. package/dist/table-extractor/api/index.d.mts +92 -0
  90. package/dist/table-extractor/api/index.d.ts +92 -0
  91. package/dist/table-extractor/api/index.js +2 -0
  92. package/dist/table-extractor/api/index.js.map +1 -0
  93. package/dist/table-extractor/api/index.mjs +2 -0
  94. package/dist/table-extractor/api/index.mjs.map +1 -0
  95. package/dist/table-extractor/model/index.d.mts +20 -0
  96. package/dist/table-extractor/model/index.d.ts +20 -0
  97. package/dist/table-extractor/model/index.js +2 -0
  98. package/dist/table-extractor/model/index.js.map +1 -0
  99. package/dist/table-extractor/model/index.mjs +2 -0
  100. package/dist/table-extractor/model/index.mjs.map +1 -0
  101. package/dist/tracking/api/index.d.mts +133 -0
  102. package/dist/tracking/api/index.d.ts +133 -0
  103. package/dist/tracking/api/index.js +2 -0
  104. package/dist/tracking/api/index.js.map +1 -0
  105. package/dist/tracking/api/index.mjs +2 -0
  106. package/dist/tracking/api/index.mjs.map +1 -0
  107. package/dist/tracking/index.d.mts +4 -0
  108. package/dist/tracking/index.d.ts +4 -0
  109. package/dist/tracking/index.js +2 -0
  110. package/dist/tracking/index.js.map +1 -0
  111. package/dist/tracking/index.mjs +2 -0
  112. package/dist/tracking/index.mjs.map +1 -0
  113. package/dist/tracking/model/index.d.mts +32 -0
  114. package/dist/tracking/model/index.d.ts +32 -0
  115. package/dist/tracking/model/index.js +2 -0
  116. package/dist/tracking/model/index.js.map +1 -0
  117. package/dist/tracking/model/index.mjs +2 -0
  118. package/dist/tracking/model/index.mjs.map +1 -0
  119. package/package.json +38 -0
@@ -0,0 +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-TNZ7KC6A.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"]}
@@ -0,0 +1,2 @@
1
+ import {c}from'./chunk-DOK44NQJ.mjs';import*as h from'fs';var n=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.id=i;this.ENDPOINT=this.parentEndpoint+`/boxes/${this.id}`;}ENDPOINT;async get(){return (await this.restClient.get(this.ENDPOINT,{},this.restClient.toHeader("application/json"))).toModel()}};var o=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/boxes";}ENDPOINT;async post(t,e){return (await this.restClient.post(this.ENDPOINT,e,this.restClient.toHeader("application/json"),t)).toModel()}};var s=class{constructor(t,e,i){this.restClient=t;this.parentEndpoint=e;this.domainname=i;this.ENDPOINT=this.parentEndpoint+`/domains/${this.domainname}`;}ENDPOINT;boxes(t){return t!=null?new n(this.restClient,this.ENDPOINT,t):new o(this.restClient,this.ENDPOINT)}};var p=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/domains";}ENDPOINT};var a=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/filebox";}ENDPOINT;domains(t){return t!=null?new s(this.restClient,this.ENDPOINT,t):new p(this.restClient,this.ENDPOINT)}};var f="/api/v1",g=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(this.parseServerUrl(t),e),f)}static loginWithCredentials(t,e,i,l){return t=this.parseServerUrl(t),new r(new c(t,void 0,e,i,l),f)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let i=h.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(d=>d.length!==0).map(d=>d.split("=")),l=this.getValueOfInPropertiesFile("serverUrl",i),c=this.getValueOfInPropertiesFile("clientId",i),E=this.getValueOfInPropertiesFile("clientSecret",i),u=this.getValueOfInPropertiesFile("tokenUrl",i);return r.loginWithCredentials(l,c,E,u)}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}filebox(){return new a(this.restClient,this.endpoint())}};export{n as a,o as b,s as c,p as d,a as e,g as f};//# sourceMappingURL=chunk-Y763UUOV.mjs.map
2
+ //# sourceMappingURL=chunk-Y763UUOV.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../semantha-product-sdk/file-box/api/box.ts","../semantha-product-sdk/file-box/api/boxes.ts","../semantha-product-sdk/file-box/api/domain.ts","../semantha-product-sdk/file-box/api/domains.ts","../semantha-product-sdk/file-box/api/filebox.ts","../semantha-product-sdk/file-box/api/fileBoxAPI.ts"],"names":["BoxEndpoint","restClient","parentEndpoint","id","BoxesEndpoint","body","params","DomainEndpoint","domainname","DomainsEndpoint","FileboxEndpoint","PARENT_ENDPOINT","FileBoxAPI","_FileBoxAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","line","searchKey"],"mappings":"0DAUaA,IAAAA,CAAAA,CAAN,KAAkB,CAGvB,WAAA,CACmBC,EACAC,CACAC,CAAAA,CAAAA,CACjB,CAHiB,IAAA,CAAA,UAAA,CAAAF,CACA,CAAA,IAAA,CAAA,cAAA,CAAAC,EACA,IAAAC,CAAAA,EAAAA,CAAAA,CAAAA,CAEjB,IAAK,CAAA,QAAA,CAAW,IAAK,CAAA,cAAA,CAAiB,UAAe,IAAK,CAAA,EAAE,CAC9D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CAA2B,CAAA,CACtF,QAAWC,CAAQD,IAAAA,CAAAA,CACjB,GAAIC,CAAAA,CAAK,CAAC,CAAA,GAAMC,EACd,OAAOD,CAAAA,CAAK,CAAC,CAAA,CAAE,OAAQ,CAAA,KAAA,CAAO,GAAG,CAGrC,CAAA,MAAM,KAAM,CAAA,CAAA,8BAAA,EAAiCC,CAAS,CAAA,CAAA,CAAG,CAC3D,CAEA,QAAA,EAAmB,CACjB,OAAO,IAAK,CAAA,cACd,CAEA,OAA2B,EAAA,CACzB,OAAO,IAAIb,CAAgB,CAAA,IAAA,CAAK,WAAY,IAAK,CAAA,QAAA,EAAU,CAC7D,CAEF","file":"chunk-Y763UUOV.mjs","sourcesContent":["import { Box } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains/{domainname}/boxes/{id}\"\n * This is a generated file do not change manually!\n */\nexport class BoxEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly id: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/boxes\" + `/${this.id}`;\n }\n\n async get(): Promise<Box> {\n return (\n await this.restClient.get<Box>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON)\n )\n ).toModel();\n }\n}\n","import { Box } from '../model';\nimport { BoxCreated } from '../model';\nimport { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains/{domainname}/boxes\"\n * This is a generated file do not change manually!\n */\nexport class BoxesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/boxes\";\n }\n\n /**\n * @param body Box? - \n */\n async post(\n body: Box,\n params?: {\n uilanguage?: string,\n }): Promise<BoxCreated> {\n return (\n await this.restClient.post<BoxCreated>(\n this.ENDPOINT,\n params,\n this.restClient.toHeader(MediaType.JSON),\n body\n )\n ).toModel();\n }\n}\n","import { BoxEndpoint } from './box';\nimport { BoxesEndpoint } from './boxes';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains/{domainname}\"\n * This is a generated file do not change manually!\n */\nexport class DomainEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n private readonly domainname: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\" + `/${this.domainname}`;\n }\n\n boxes(): BoxesEndpoint;\n boxes(id: string): BoxEndpoint\n \n boxes(id?: string): BoxEndpoint | BoxesEndpoint {\n if(id !== undefined && id !== null) {\n\t return new BoxEndpoint(this.restClient, this.ENDPOINT, id);\n } else {\n\t return new BoxesEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox/domains\"\n * This is a generated file do not change manually!\n */\nexport class DomainsEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/domains\";\n }\n}\n","import { DomainEndpoint } from './domain';\nimport { DomainsEndpoint } from './domains';\nimport { RestClient } from '../../rest';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/filebox\"\n * This is a generated file do not change manually!\n */\nexport class FileboxEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/filebox\";\n }\n\n domains(): DomainsEndpoint;\n domains(domainname: string): DomainEndpoint\n \n domains(domainname?: string): DomainEndpoint | DomainsEndpoint {\n if(domainname !== undefined && domainname !== null) {\n\t return new DomainEndpoint(this.restClient, this.ENDPOINT, domainname);\n } else {\n\t return new DomainsEndpoint(this.restClient, this.ENDPOINT);\n }\n }\n}\n","import * as fs from 'fs';\n\nimport { FileboxEndpoint } from './filebox';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api/v1';\n\n/**\n * Entry point to the FileBox API.\n *\n * @author semantha\n * Calls the /filebox, endpoints.\n *\n * Note:\n * The constructor is not meant to be invoked directly\n * use `loginXXX()` with your credentials instead.\n *\n * this is a generated class do not change manually!\n */\nexport class FileBoxAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the FileBox API\n *\n * @param serverUrl: string - URL to the FileBox server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): FileBoxAPI {\n if(!apiKey) {\n throw new Error('You need to supply an API key to login.');\n }\n if(!serverUrl) {\n throw new Error('You need to supply a server url to login.');\n }\n return new FileBoxAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the FileBox API\n *\n * @param serverUrl: string - URL to the FileBox server.\n * @param clientId: string - OAuth2 client id.\n * @param clientSecret: string - OAuth2 client secret.\n * @param tokenUrl: string OAuth2 url to get a valid access token\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): FileBoxAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new FileBoxAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the FileBox API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return FileBoxAPI: Entry point to the FileBox API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : FileBoxAPI {\n if (credentialsFilePath.endsWith('.properties') || credentialsFilePath.endsWith('.PROPERTIES')) {\n const rawData = fs.readFileSync(credentialsFilePath, 'utf8');\n const lines = rawData\n\t .split(/[\\n|\\r\\n]/)\n\t .filter(line => line.length !== 0)\n\t .map(line => line.split('='));\n\t const serverUrl = this.getValueOfInPropertiesFile('serverUrl', lines);\n\t const clientId = this.getValueOfInPropertiesFile('clientId', lines);\n\t const clientSecret = this.getValueOfInPropertiesFile('clientSecret', lines);\n\t const tokenUrl = this.getValueOfInPropertiesFile('tokenUrl', lines);\n\t return FileBoxAPI.loginWithCredentials(serverUrl, clientId, clientSecret, tokenUrl);\n\t}\n throw new Error('Can not login, please supply a credentials properties file.');\n }\n\n private static parseServerUrl(serverUrl: string): string {\n if (serverUrl.endsWith('/')) {\n serverUrl = serverUrl.slice(0, -1);\n }\n if (serverUrl.endsWith('/tt-platform-ui/en/#')) {\n serverUrl = serverUrl.replace('/tt-platform-ui/en/#', '/tt-product-server');\n } else if (!serverUrl.endsWith('/tt-product-server')) {\n serverUrl += '/tt-product-server';\n }\n return serverUrl;\n }\n\n private static getValueOfInPropertiesFile(searchKey: string, lines: string[][]): string {\n for (const line of lines) {\n if (line[0] === searchKey) {\n return line[1].replace('\\\\:', ':');\n }\n }\n throw Error(`.properties files contains no ${searchKey}!`);\n }\n\n endpoint(): string {\n return this.parentEndpoint;\n }\n\n filebox(): FileboxEndpoint {\n return new FileboxEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var o=require('axios');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var o__default=/*#__PURE__*/_interopDefault(o);var n=class{constructor(t){this.response=t;}async toModel(){return (await this.response).data}async getStatusCode(){return (await this.response).status}async getStatusText(){return (await this.response).statusText}};var l=(r=>(r.JSON="application/json",r.XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",r.PDF="application/pdf",r.DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",r.ZIP="application/zip",r.REQIFZ="application/reqifz",r.PNG="image/png",r))(l||{}),p=class a{constructor(t,e,i,s,c){this.serverUrl=t;this.apiKey=e;this.clientId=i;this.client_secret=s;this.tokenUrl=c;this.expireTime=0,this.accessToken="";}static LEEWAY=30;expireTime;accessToken;async buildHeadersForJsonRequest(){return {Accept:"application/json",Authorization:`Bearer ${await this.getToken()}`}}async buildHeadersForRequest(){return {Authorization:`Bearer ${await this.getToken()}`}}async getToken(){if(this.apiKey)return this.apiKey;if(this.clientId&&this.client_secret&&this.tokenUrl&&(this.accessToken==""||this.expireTime<performance.now())){let t={grant_type:"client_credentials",client_id:this.clientId,client_secret:this.client_secret,scope:"openid"},e=await o__default.default.post(this.tokenUrl,t,{headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"}});if(e.status>=o__default.default.HttpStatusCode.BadRequest)return "";this.accessToken=e.data.id_token??e.data.access_token,this.expireTime=performance.now()+(e.data.expires_in-a.LEEWAY);}return this.accessToken}async request(t,e,i,s,c){if(!s)s=await this.buildHeadersForJsonRequest();else {let u=await this.buildHeadersForRequest();s={...s,...u};}return new n(o__default.default.request({method:t,url:this.serverUrl+e,headers:{...s,"User-Agent":"semantha TypeScript SDK; "},data:c,params:i}))}async get(t,e,i,s){return this.request("GET",t,e,i,s)}async post(t,e,i,s){return this.request("POST",t,e,i,s)}async delete(t,e){this.request("DELETE",t,e=e);}async patch(t,e){return this.request("PATCH",t,e=e)}async put(t,e){return this.request("PUT",t,e=e)}toHeader(t,e){return e?{Accept:t,"Content-Type":e}:{Accept:t}}};exports.a=n;exports.b=l;exports.c=p;//# sourceMappingURL=chunk-Z3N63BWG.js.map
2
+ //# sourceMappingURL=chunk-Z3N63BWG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../semantha-product-sdk/rest/restResponse.ts","../semantha-product-sdk/rest/restClient.ts"],"names":["RestResponse","response","MediaType","RestClient","_RestClient","serverUrl","apiKey","clientId","client_secret","tokenUrl","data","axios","method","url","params","headers","authHeader","acceptMimeType","contentType"],"mappings":"oJAEO,IAAMA,EAAN,KAAsB,CAC3B,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A,MAAA,CAAQI,CACV,CAAC,CACH,CACF,CAEA,MAAM,GAAOD,CAAAA,CAAAA,CAAaC,EAAcC,CAAqCL,CAAAA,CAAAA,CAAsC,CACjH,OAAO,IAAA,CAAK,QAAW,KAAOG,CAAAA,CAAAA,CAAKC,EAAQC,CAASL,CAAAA,CAAI,CAC1D,CAEA,MAAM,KAAQG,CAAaC,CAAAA,CAAAA,CAAcC,EAAqCL,CAAsC,CAAA,CAClH,OAAO,IAAA,CAAK,QAAW,MAAQG,CAAAA,CAAAA,CAAKC,EAAQC,CAASL,CAAAA,CAAI,CAC3D,CAEA,MAAM,OAAOG,CAAaH,CAAAA,CAAAA,CAA2B,CACnD,IAAK,CAAA,OAAA,CAAc,SAAUG,CAAMH,CAAAA,CAAAA,CAAOA,CAAK,EACjD,CAEA,MAAM,KAAA,CAASG,EAAaH,CAAsC,CAAA,CAChE,OAAO,IAAK,CAAA,OAAA,CAAW,QAASG,CAAMH,CAAAA,CAAAA,CAAOA,CAAK,CACpD,CAEA,MAAM,GAAOG,CAAAA,CAAAA,CAAaH,EAAqC,CAC7D,OAAO,KAAK,OAAW,CAAA,KAAA,CAAOG,CAAMH,CAAAA,CAAAA,CAAOA,CAAK,CAClD,CAEA,SAASO,CAA2BC,CAAAA,CAAAA,CAAiD,CACnF,OAAIA,CAAAA,CACK,CAAE,MAAQD,CAAAA,CAAAA,CAAgB,eAAgBC,CAAY,CAAA,CAExD,CAAE,MAAQD,CAAAA,CAAe,CAClC,CACF","file":"chunk-Z3N63BWG.js","sourcesContent":["import { AxiosResponse } from 'axios';\n\nexport class RestResponse<T> {\n constructor(private readonly response: Promise<AxiosResponse<T>>) {}\n\n async toModel(): Promise<T> {\n return (await this.response).data;\n }\n\n async getStatusCode(): Promise<number> {\n return (await this.response).status;\n }\n\n async getStatusText(): Promise<string> {\n return (await this.response).statusText;\n }\n}\n","import axios, { AxiosRequestConfig, AxiosResponse } from 'axios';\nimport { RestResponse } from './restResponse';\n\nexport enum MediaType {\n JSON = 'application/json',\n XLSX = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n PDF = 'application/pdf',\n DOCX = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n ZIP = 'application/zip',\n REQIFZ = 'application/reqifz',\n PNG = 'image/png'\n}\n\nexport class RestClient {\n // in seconds\n private static readonly LEEWAY = 30;\n\n private expireTime: number;\n private accessToken: string;\n\n constructor(\n private readonly serverUrl: string,\n private readonly apiKey?: string,\n private readonly clientId?: string,\n private readonly client_secret?: string,\n private readonly tokenUrl?: string\n ) {\n this.expireTime = 0.0;\n this.accessToken = '';\n }\n\n async buildHeadersForJsonRequest(): Promise<{ [key: string]: string }> {\n return {\n Accept: 'application/json',\n Authorization: `Bearer ${await this.getToken()}`\n };\n }\n\n async buildHeadersForRequest(): Promise<{ [key: string]: string }> {\n return {\n Authorization: `Bearer ${await this.getToken()}`\n };\n }\n\n async getToken(): Promise<string> {\n if (this.apiKey) {\n return this.apiKey;\n }\n if (\n this.clientId &&\n this.client_secret &&\n this.tokenUrl &&\n (this.accessToken == '' || this.expireTime < performance.now())\n ) {\n const data = {\n grant_type: 'client_credentials',\n client_id: this.clientId,\n client_secret: this.client_secret,\n scope: 'openid'\n };\n const response = await axios.post(this.tokenUrl, data, {\n headers: { accept: 'application/json', 'content-type': 'application/x-www-form-urlencoded' }\n });\n if (response.status >= axios.HttpStatusCode.BadRequest) {\n // example for error response: {\"error\":\"invalid_client\",\"error_description\":\"Invalid client or Invalid client credentials\"}\n // we have no token -> this leads to a permission error\n return '';\n }\n this.accessToken = response.data['id_token'] ?? response.data['access_token'];\n this.expireTime = performance.now() + (response.data['expires_in'] - RestClient.LEEWAY);\n }\n return this.accessToken;\n }\n\n private async request<R>(\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',\n url: string,\n params?: any,\n headers?: { [key: string]: string },\n data?: any\n ): Promise<RestResponse<R>> {\n if (!headers) {\n headers = await this.buildHeadersForJsonRequest();\n } else {\n const authHeader = await this.buildHeadersForRequest();\n headers = { ...headers, ...authHeader };\n }\n return new RestResponse<R>(\n axios.request<R>({\n method: method,\n url: this.serverUrl + url,\n headers: { ...headers, 'User-Agent': 'semantha TypeScript SDK; ' },\n data: data,\n params: params\n })\n );\n }\n\n async get<R>(url: string, params?: any, headers?: { [key: string]: string }, data?: any): Promise<RestResponse<R>> {\n return this.request<R>('GET', url, params, headers, data);\n }\n\n async post<R>(url: string, params?: any, headers?: { [key: string]: string }, data?: any): Promise<RestResponse<R>> {\n return this.request<R>('POST', url, params, headers, data);\n }\n\n async delete(url: string, data?: any): Promise<void> {\n this.request<void>('DELETE', url, (data = data));\n }\n\n async patch<R>(url: string, data?: any): Promise<RestResponse<R>> {\n return this.request<R>('PATCH', url, (data = data));\n }\n\n async put<R>(url: string, data: any): Promise<RestResponse<R>> {\n return this.request<R>('PUT', url, (data = data));\n }\n\n toHeader(acceptMimeType: MediaType, contentType?: string): { [key: string]: string } {\n if (contentType) {\n return { Accept: acceptMimeType, 'Content-Type': contentType };\n }\n return { Accept: acceptMimeType };\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var o=["INPUT","REFERENCE"];function p(e){return o.includes(e)}exports.a=o;exports.b=p;//# sourceMappingURL=chunk-ZSFNB534.js.map
2
+ //# sourceMappingURL=chunk-ZSFNB534.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../semantha-product-sdk/file-box/model/fileTypeEnum.ts"],"names":["FileTypeEnumValues","isFileTypeEnumValue","value"],"mappings":"aAKO,IAAMA,CAAqB,CAAA,CAChC,OACA,CAAA,WACF,EAGO,SAASC,CAAoBC,CAAAA,CAAAA,CAAmC,CACrE,OAAOF,CAAmB,CAAA,QAAA,CAASE,CAAK,CAC1C","file":"chunk-ZSFNB534.js","sourcesContent":["/**\n * @author semantha\n *\n * This is a generated file do not change manually!\n */\nexport const FileTypeEnumValues = [\n 'INPUT',\n 'REFERENCE'\n] as const;\nexport type FileTypeEnum = (typeof FileTypeEnumValues)[number];\n\nexport function isFileTypeEnumValue(value: any): value is FileTypeEnum {\n return FileTypeEnumValues.includes(value);\n}\n\n"]}
@@ -0,0 +1,240 @@
1
+ /**
2
+ * @author semantha
3
+ *
4
+ * This is a generated file do not change manually!
5
+ */
6
+ interface AttributeType {
7
+ type?: string;
8
+ }
9
+
10
+ /**
11
+ * @author semantha
12
+ *
13
+ * This is a generated file do not change manually!
14
+ */
15
+ interface CustomField {
16
+ name: string;
17
+ value: string;
18
+ type: string;
19
+ }
20
+
21
+ /**
22
+ * @author semantha
23
+ *
24
+ * This is a generated file do not change manually!
25
+ */
26
+ interface FormatInformation {
27
+ id?: number;
28
+ textType?: string;
29
+ fontsize?: number;
30
+ bold?: boolean;
31
+ italic?: boolean;
32
+ count?: number;
33
+ targetTextType?: string;
34
+ }
35
+
36
+ /**
37
+ * @author semantha
38
+ *
39
+ * This is a generated file do not change manually!
40
+ */
41
+ interface Rect {
42
+ x: number;
43
+ y: number;
44
+ width: number;
45
+ height: number;
46
+ page: number;
47
+ }
48
+
49
+ /**
50
+ * @author semantha
51
+ *
52
+ * This is a generated file do not change manually!
53
+ */
54
+ interface StructureSentence {
55
+ id: string;
56
+ text?: string;
57
+ position?: number;
58
+ }
59
+
60
+ /**
61
+ * @author semantha
62
+ *
63
+ * This is a generated file do not change manually!
64
+ */
65
+ interface StructureParagraph {
66
+ isContent: boolean;
67
+ id?: string;
68
+ type?: string;
69
+ dataUrlImage?: string;
70
+ sentences?: StructureSentence[];
71
+ position?: number;
72
+ formatId?: number;
73
+ areas?: Rect[];
74
+ }
75
+
76
+ /**
77
+ * @author semantha
78
+ *
79
+ * This is a generated file do not change manually!
80
+ */
81
+ interface Section {
82
+ id?: string;
83
+ type?: string;
84
+ attributes?: {
85
+ [key: string]: string;
86
+ };
87
+ paragraphs?: StructureParagraph[];
88
+ position?: number;
89
+ }
90
+
91
+ /**
92
+ * @author semantha
93
+ *
94
+ * This is a generated file do not change manually!
95
+ */
96
+ interface StructureAttachment {
97
+ name?: string;
98
+ }
99
+
100
+ /**
101
+ * @author semantha
102
+ *
103
+ * This is a generated file do not change manually!
104
+ */
105
+ interface Configuration {
106
+ name?: string;
107
+ splitByTextTypes?: string[];
108
+ splitByRegex?: string;
109
+ attributeTypes?: AttributeType[];
110
+ id?: string;
111
+ documentTypeId?: string;
112
+ }
113
+
114
+ /**
115
+ * @author semantha
116
+ *
117
+ * This is a generated file do not change manually!
118
+ */
119
+ interface ConfigurationUpdate {
120
+ name?: string;
121
+ splitByTextTypes?: string[];
122
+ splitByRegex?: string;
123
+ attributeTypes?: AttributeType[];
124
+ }
125
+
126
+ /**
127
+ * @author semantha
128
+ *
129
+ * This is a generated file do not change manually!
130
+ */
131
+ interface DocumentStructure {
132
+ configurationId: string;
133
+ id?: string;
134
+ name?: string;
135
+ created?: number;
136
+ updated?: number;
137
+ publicAccess?: boolean;
138
+ owner?: string;
139
+ status?: DocumentStructureStatusEnum;
140
+ customFields?: CustomField[];
141
+ sections?: Section[];
142
+ formatInformations?: FormatInformation[];
143
+ attachments?: StructureAttachment[];
144
+ lastEventId?: string;
145
+ }
146
+
147
+ /**
148
+ * @author semantha
149
+ *
150
+ * This is a generated file do not change manually!
151
+ */
152
+ interface DocumentStructureOverview {
153
+ configurationId: string;
154
+ id?: string;
155
+ name?: string;
156
+ created?: number;
157
+ updated?: number;
158
+ publicAccess?: boolean;
159
+ owner?: string;
160
+ status?: DocumentStructureOverviewStatusEnum;
161
+ }
162
+
163
+ /**
164
+ * @author semantha
165
+ *
166
+ * This is a generated file do not change manually!
167
+ */
168
+ declare const DocumentStructureOverviewStatusEnumValues: readonly ["MAPPING", "STRUCTURE"];
169
+ type DocumentStructureOverviewStatusEnum = (typeof DocumentStructureOverviewStatusEnumValues)[number];
170
+ declare function isDocumentStructureOverviewStatusEnumValue(value: any): value is DocumentStructureOverviewStatusEnum;
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
+ /**
182
+ * @author semantha
183
+ *
184
+ * This is a generated file do not change manually!
185
+ */
186
+ interface FormatInformationUpdate {
187
+ id: number;
188
+ targetTextType: string;
189
+ fontsize?: number;
190
+ bold?: boolean;
191
+ italic?: boolean;
192
+ }
193
+
194
+ /**
195
+ * @author semantha
196
+ *
197
+ * This is a generated file do not change manually!
198
+ */
199
+ interface ParagraphFormatUpdate {
200
+ paragraphId: string;
201
+ formatId: number;
202
+ }
203
+
204
+ /**
205
+ * @author semantha
206
+ *
207
+ * This is a generated file do not change manually!
208
+ */
209
+ interface DocumentStructureUpdate {
210
+ name?: string;
211
+ publicAccess?: boolean;
212
+ splitByTextTypes?: string[];
213
+ splitByRegex?: string;
214
+ formatInformations?: FormatInformationUpdate[];
215
+ paragraphs?: ParagraphFormatUpdate[];
216
+ }
217
+
218
+ /**
219
+ * @author semantha
220
+ *
221
+ * This is a generated file do not change manually!
222
+ */
223
+ interface Event {
224
+ type: EventTypeEnum;
225
+ data: Section[];
226
+ id?: string;
227
+ number?: number;
228
+ created?: number;
229
+ }
230
+
231
+ /**
232
+ * @author semantha
233
+ *
234
+ * This is a generated file do not change manually!
235
+ */
236
+ declare const EventTypeEnumValues: readonly ["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"];
237
+ type EventTypeEnum = (typeof EventTypeEnumValues)[number];
238
+ declare function isEventTypeEnumValue(value: any): value is EventTypeEnum;
239
+
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, DocumentStructureStatusEnumValues as f, type DocumentStructureStatusEnum as g, isDocumentStructureStatusEnumValue as h, isDocumentStructureOverviewStatusEnumValue as i, type DocumentStructureUpdate as j, EventTypeEnumValues as k, type EventTypeEnum as l, isEventTypeEnumValue as m, type FormatInformationUpdate as n, type StructureAttachment as o, type StructureParagraph as p, type StructureSentence as q };
@@ -0,0 +1,240 @@
1
+ /**
2
+ * @author semantha
3
+ *
4
+ * This is a generated file do not change manually!
5
+ */
6
+ interface AttributeType {
7
+ type?: string;
8
+ }
9
+
10
+ /**
11
+ * @author semantha
12
+ *
13
+ * This is a generated file do not change manually!
14
+ */
15
+ interface CustomField {
16
+ name: string;
17
+ value: string;
18
+ type: string;
19
+ }
20
+
21
+ /**
22
+ * @author semantha
23
+ *
24
+ * This is a generated file do not change manually!
25
+ */
26
+ interface FormatInformation {
27
+ id?: number;
28
+ textType?: string;
29
+ fontsize?: number;
30
+ bold?: boolean;
31
+ italic?: boolean;
32
+ count?: number;
33
+ targetTextType?: string;
34
+ }
35
+
36
+ /**
37
+ * @author semantha
38
+ *
39
+ * This is a generated file do not change manually!
40
+ */
41
+ interface Rect {
42
+ x: number;
43
+ y: number;
44
+ width: number;
45
+ height: number;
46
+ page: number;
47
+ }
48
+
49
+ /**
50
+ * @author semantha
51
+ *
52
+ * This is a generated file do not change manually!
53
+ */
54
+ interface StructureSentence {
55
+ id: string;
56
+ text?: string;
57
+ position?: number;
58
+ }
59
+
60
+ /**
61
+ * @author semantha
62
+ *
63
+ * This is a generated file do not change manually!
64
+ */
65
+ interface StructureParagraph {
66
+ isContent: boolean;
67
+ id?: string;
68
+ type?: string;
69
+ dataUrlImage?: string;
70
+ sentences?: StructureSentence[];
71
+ position?: number;
72
+ formatId?: number;
73
+ areas?: Rect[];
74
+ }
75
+
76
+ /**
77
+ * @author semantha
78
+ *
79
+ * This is a generated file do not change manually!
80
+ */
81
+ interface Section {
82
+ id?: string;
83
+ type?: string;
84
+ attributes?: {
85
+ [key: string]: string;
86
+ };
87
+ paragraphs?: StructureParagraph[];
88
+ position?: number;
89
+ }
90
+
91
+ /**
92
+ * @author semantha
93
+ *
94
+ * This is a generated file do not change manually!
95
+ */
96
+ interface StructureAttachment {
97
+ name?: string;
98
+ }
99
+
100
+ /**
101
+ * @author semantha
102
+ *
103
+ * This is a generated file do not change manually!
104
+ */
105
+ interface Configuration {
106
+ name?: string;
107
+ splitByTextTypes?: string[];
108
+ splitByRegex?: string;
109
+ attributeTypes?: AttributeType[];
110
+ id?: string;
111
+ documentTypeId?: string;
112
+ }
113
+
114
+ /**
115
+ * @author semantha
116
+ *
117
+ * This is a generated file do not change manually!
118
+ */
119
+ interface ConfigurationUpdate {
120
+ name?: string;
121
+ splitByTextTypes?: string[];
122
+ splitByRegex?: string;
123
+ attributeTypes?: AttributeType[];
124
+ }
125
+
126
+ /**
127
+ * @author semantha
128
+ *
129
+ * This is a generated file do not change manually!
130
+ */
131
+ interface DocumentStructure {
132
+ configurationId: string;
133
+ id?: string;
134
+ name?: string;
135
+ created?: number;
136
+ updated?: number;
137
+ publicAccess?: boolean;
138
+ owner?: string;
139
+ status?: DocumentStructureStatusEnum;
140
+ customFields?: CustomField[];
141
+ sections?: Section[];
142
+ formatInformations?: FormatInformation[];
143
+ attachments?: StructureAttachment[];
144
+ lastEventId?: string;
145
+ }
146
+
147
+ /**
148
+ * @author semantha
149
+ *
150
+ * This is a generated file do not change manually!
151
+ */
152
+ interface DocumentStructureOverview {
153
+ configurationId: string;
154
+ id?: string;
155
+ name?: string;
156
+ created?: number;
157
+ updated?: number;
158
+ publicAccess?: boolean;
159
+ owner?: string;
160
+ status?: DocumentStructureOverviewStatusEnum;
161
+ }
162
+
163
+ /**
164
+ * @author semantha
165
+ *
166
+ * This is a generated file do not change manually!
167
+ */
168
+ declare const DocumentStructureOverviewStatusEnumValues: readonly ["MAPPING", "STRUCTURE"];
169
+ type DocumentStructureOverviewStatusEnum = (typeof DocumentStructureOverviewStatusEnumValues)[number];
170
+ declare function isDocumentStructureOverviewStatusEnumValue(value: any): value is DocumentStructureOverviewStatusEnum;
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
+ /**
182
+ * @author semantha
183
+ *
184
+ * This is a generated file do not change manually!
185
+ */
186
+ interface FormatInformationUpdate {
187
+ id: number;
188
+ targetTextType: string;
189
+ fontsize?: number;
190
+ bold?: boolean;
191
+ italic?: boolean;
192
+ }
193
+
194
+ /**
195
+ * @author semantha
196
+ *
197
+ * This is a generated file do not change manually!
198
+ */
199
+ interface ParagraphFormatUpdate {
200
+ paragraphId: string;
201
+ formatId: number;
202
+ }
203
+
204
+ /**
205
+ * @author semantha
206
+ *
207
+ * This is a generated file do not change manually!
208
+ */
209
+ interface DocumentStructureUpdate {
210
+ name?: string;
211
+ publicAccess?: boolean;
212
+ splitByTextTypes?: string[];
213
+ splitByRegex?: string;
214
+ formatInformations?: FormatInformationUpdate[];
215
+ paragraphs?: ParagraphFormatUpdate[];
216
+ }
217
+
218
+ /**
219
+ * @author semantha
220
+ *
221
+ * This is a generated file do not change manually!
222
+ */
223
+ interface Event {
224
+ type: EventTypeEnum;
225
+ data: Section[];
226
+ id?: string;
227
+ number?: number;
228
+ created?: number;
229
+ }
230
+
231
+ /**
232
+ * @author semantha
233
+ *
234
+ * This is a generated file do not change manually!
235
+ */
236
+ declare const EventTypeEnumValues: readonly ["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"];
237
+ type EventTypeEnum = (typeof EventTypeEnumValues)[number];
238
+ declare function isEventTypeEnumValue(value: any): value is EventTypeEnum;
239
+
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, DocumentStructureStatusEnumValues as f, type DocumentStructureStatusEnum as g, isDocumentStructureStatusEnumValue as h, isDocumentStructureOverviewStatusEnumValue as i, type DocumentStructureUpdate as j, EventTypeEnumValues as k, type EventTypeEnum as l, isEventTypeEnumValue as m, type FormatInformationUpdate as n, type StructureAttachment as o, type StructureParagraph as p, type StructureSentence as q };