@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,92 @@
1
+ import { RestClient } from '../../rest/index.js';
2
+ import { XlRow } from '../model/index.js';
3
+ import 'axios';
4
+
5
+ /**
6
+ * @author semantha
7
+ *
8
+ * Class to access resource "/api/tableextractor/values"
9
+ * This is a generated file do not change manually!
10
+ */
11
+ declare class ValuesEndpoint {
12
+ private readonly restClient;
13
+ private readonly parentEndpoint;
14
+ private readonly ENDPOINT;
15
+ constructor(restClient: RestClient, parentEndpoint: string);
16
+ /**
17
+ * Extracts values from a sheet and returns them
18
+ *
19
+ * @param file Blob? - Xlsx file to extract values from.
20
+ * @param language string? - Locale used to format dates in the sheet on reading values.
21
+ */
22
+ post(data: {
23
+ file?: Blob;
24
+ language?: string;
25
+ }): Promise<XlRow[]>;
26
+ }
27
+
28
+ /**
29
+ * @author semantha
30
+ *
31
+ * Class to access resource "/api/tableextractor"
32
+ * This is a generated file do not change manually!
33
+ */
34
+ declare class TableextractorEndpoint {
35
+ private readonly restClient;
36
+ private readonly parentEndpoint;
37
+ private readonly ENDPOINT;
38
+ constructor(restClient: RestClient, parentEndpoint: string);
39
+ values(): ValuesEndpoint;
40
+ }
41
+
42
+ /**
43
+ * Entry point to the TableExtractor API.
44
+ *
45
+ * @author semantha
46
+ * Calls the /tableextractor, endpoints.
47
+ *
48
+ * Note:
49
+ * The constructor is not meant to be invoked directly
50
+ * use `loginXXX()` with your credentials instead.
51
+ *
52
+ * this is a generated class do not change manually!
53
+ */
54
+ declare class TableExtractorAPI {
55
+ private readonly restClient;
56
+ private readonly parentEndpoint;
57
+ constructor(restClient: RestClient, parentEndpoint: string);
58
+ /**
59
+ * Access to the TableExtractor API
60
+ *
61
+ * @param serverUrl: string - URL to the TableExtractor server.
62
+ * @param apiKey: string - A valid bearer token for accessing the given url.
63
+ *
64
+ * @return TableExtractorAPI: Entry point to the TableExtractor API.
65
+ */
66
+ static loginWithApiKey(serverUrl: string, apiKey: string): TableExtractorAPI;
67
+ /**
68
+ * Access to the TableExtractor API
69
+ *
70
+ * @param serverUrl: string - URL to the TableExtractor server.
71
+ * @param clientId: string - OAuth2 client id.
72
+ * @param clientSecret: string - OAuth2 client secret.
73
+ * @param tokenUrl: string OAuth2 url to get a valid access token
74
+ *
75
+ * @return TableExtractorAPI: Entry point to the TableExtractor API.
76
+ */
77
+ static loginWithCredentials(serverUrl: string, clientId: string, clientSecret: string, tokenUrl: string): TableExtractorAPI;
78
+ /**
79
+ * Access to the TableExtractor API
80
+ *
81
+ * @param credentialsFilePath: string - Path to a properties file providing client credentials.
82
+ *
83
+ * @return TableExtractorAPI: Entry point to the TableExtractor API.
84
+ */
85
+ static loginWithCredentialsFile(credentialsFilePath: string): TableExtractorAPI;
86
+ private static parseServerUrl;
87
+ private static getValueOfInPropertiesFile;
88
+ endpoint(): string;
89
+ tableextractor(): TableextractorEndpoint;
90
+ }
91
+
92
+ export { TableExtractorAPI, TableextractorEndpoint, ValuesEndpoint };
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkZ3N63BWG_js=require('../../chunk-Z3N63BWG.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 n=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/values";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var o=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tableextractor";}ENDPOINT;values(){return new n(this.restClient,this.ENDPOINT)}};var p="/api",c=class i{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new i(new chunkZ3N63BWG_js.c(this.parseServerUrl(t),e),p)}static loginWithCredentials(t,e,r,s){return t=this.parseServerUrl(t),new i(new chunkZ3N63BWG_js.c(t,void 0,e,r,s),p)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let r=d__namespace.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(a=>a.length!==0).map(a=>a.split("=")),s=this.getValueOfInPropertiesFile("serverUrl",r),f=this.getValueOfInPropertiesFile("clientId",r),g=this.getValueOfInPropertiesFile("clientSecret",r),u=this.getValueOfInPropertiesFile("tokenUrl",r);return i.loginWithCredentials(s,f,g,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 r of e)if(r[0]===t)return r[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}tableextractor(){return new o(this.restClient,this.endpoint())}};exports.TableExtractorAPI=c;exports.TableextractorEndpoint=o;exports.ValuesEndpoint=n;//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../semantha-product-sdk/table-extractor/api/values.ts","../../../semantha-product-sdk/table-extractor/api/tableextractor.ts","../../../semantha-product-sdk/table-extractor/api/tableExtractorAPI.ts"],"names":["ValuesEndpoint","restClient","parentEndpoint","data","TableextractorEndpoint","PARENT_ENDPOINT","TableExtractorAPI","_TableExtractorAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","d","line","searchKey"],"mappings":"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","file":"index.js","sourcesContent":["import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\nimport { XlRow } from '../model';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/tableextractor/values\"\n * This is a generated file do not change manually!\n */\nexport class ValuesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/values\";\n }\n\n /**\n * Extracts values from a sheet and returns them\n *\n * @param file Blob? - Xlsx file to extract values from.\n * @param language string? - Locale used to format dates in the sheet on reading values.\n */\n async post(data: {\n file?: Blob,\n language?: string,\n }): Promise<XlRow[]> {\n return (\n await this.restClient.post<XlRow[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n}\n","import { RestClient } from '../../rest';\nimport { ValuesEndpoint } from './values';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/tableextractor\"\n * This is a generated file do not change manually!\n */\nexport class TableextractorEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/tableextractor\";\n }\n\n values(): ValuesEndpoint {\n return new ValuesEndpoint(this.restClient, this.ENDPOINT);\n }\n}\n","import * as fs from 'fs';\n\nimport { TableextractorEndpoint } from './tableextractor';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the TableExtractor API.\n *\n * @author semantha\n * Calls the /tableextractor, 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 TableExtractorAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the TableExtractor API\n *\n * @param serverUrl: string - URL to the TableExtractor server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return TableExtractorAPI: Entry point to the TableExtractor API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): TableExtractorAPI {\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 TableExtractorAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the TableExtractor API\n *\n * @param serverUrl: string - URL to the TableExtractor 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 TableExtractorAPI: Entry point to the TableExtractor API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): TableExtractorAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new TableExtractorAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the TableExtractor API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return TableExtractorAPI: Entry point to the TableExtractor API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : TableExtractorAPI {\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 TableExtractorAPI.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 tableextractor(): TableextractorEndpoint {\n return new TableextractorEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
@@ -0,0 +1,2 @@
1
+ import {c as c$1}from'../../chunk-DOK44NQJ.mjs';import*as d from'fs';var n=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/values";}ENDPOINT;async post(t){return (await this.restClient.post(this.ENDPOINT,{},this.restClient.toHeader("application/json"),t)).toModel()}};var o=class{constructor(t,e){this.restClient=t;this.parentEndpoint=e;this.ENDPOINT=this.parentEndpoint+"/tableextractor";}ENDPOINT;values(){return new n(this.restClient,this.ENDPOINT)}};var p="/api",c=class i{constructor(t,e){this.restClient=t;this.parentEndpoint=e;}static loginWithApiKey(t,e){if(!e)throw new Error("You need to supply an API key to login.");if(!t)throw new Error("You need to supply a server url to login.");return new i(new c$1(this.parseServerUrl(t),e),p)}static loginWithCredentials(t,e,r,s){return t=this.parseServerUrl(t),new i(new c$1(t,void 0,e,r,s),p)}static loginWithCredentialsFile(t){if(t.endsWith(".properties")||t.endsWith(".PROPERTIES")){let r=d.readFileSync(t,"utf8").split(/[\n|\r\n]/).filter(a=>a.length!==0).map(a=>a.split("=")),s=this.getValueOfInPropertiesFile("serverUrl",r),f=this.getValueOfInPropertiesFile("clientId",r),g=this.getValueOfInPropertiesFile("clientSecret",r),u=this.getValueOfInPropertiesFile("tokenUrl",r);return i.loginWithCredentials(s,f,g,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 r of e)if(r[0]===t)return r[1].replace("\\:",":");throw Error(`.properties files contains no ${t}!`)}endpoint(){return this.parentEndpoint}tableextractor(){return new o(this.restClient,this.endpoint())}};export{c as TableExtractorAPI,o as TableextractorEndpoint,n as ValuesEndpoint};//# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../semantha-product-sdk/table-extractor/api/values.ts","../../../semantha-product-sdk/table-extractor/api/tableextractor.ts","../../../semantha-product-sdk/table-extractor/api/tableExtractorAPI.ts"],"names":["ValuesEndpoint","restClient","parentEndpoint","data","TableextractorEndpoint","PARENT_ENDPOINT","TableExtractorAPI","_TableExtractorAPI","serverUrl","apiKey","RestClient","clientId","clientSecret","tokenUrl","credentialsFilePath","lines","line","searchKey"],"mappings":"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","file":"index.mjs","sourcesContent":["import { MediaType } from '../../rest';\nimport { RestClient } from '../../rest';\nimport { XlRow } from '../model';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/tableextractor/values\"\n * This is a generated file do not change manually!\n */\nexport class ValuesEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/values\";\n }\n\n /**\n * Extracts values from a sheet and returns them\n *\n * @param file Blob? - Xlsx file to extract values from.\n * @param language string? - Locale used to format dates in the sheet on reading values.\n */\n async post(data: {\n file?: Blob,\n language?: string,\n }): Promise<XlRow[]> {\n return (\n await this.restClient.post<XlRow[]>(\n this.ENDPOINT,\n {},\n this.restClient.toHeader(MediaType.JSON),\n data\n )\n ).toModel();\n }\n}\n","import { RestClient } from '../../rest';\nimport { ValuesEndpoint } from './values';\n\n/**\n * @author semantha\n *\n * Class to access resource \"/api/tableextractor\"\n * This is a generated file do not change manually!\n */\nexport class TableextractorEndpoint {\n private readonly ENDPOINT: string;\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string,\n ) {\n this.ENDPOINT = this.parentEndpoint + \"/tableextractor\";\n }\n\n values(): ValuesEndpoint {\n return new ValuesEndpoint(this.restClient, this.ENDPOINT);\n }\n}\n","import * as fs from 'fs';\n\nimport { TableextractorEndpoint } from './tableextractor';\nimport { RestClient } from '../../rest';\n\nconst PARENT_ENDPOINT = '/api';\n\n/**\n * Entry point to the TableExtractor API.\n *\n * @author semantha\n * Calls the /tableextractor, 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 TableExtractorAPI {\n\n constructor(\n private readonly restClient: RestClient,\n private readonly parentEndpoint: string\n ) {\n }\n\n /**\n * Access to the TableExtractor API\n *\n * @param serverUrl: string - URL to the TableExtractor server.\n * @param apiKey: string - A valid bearer token for accessing the given url.\n *\n * @return TableExtractorAPI: Entry point to the TableExtractor API.\n */\n static loginWithApiKey(\n serverUrl: string,\n apiKey: string\n ): TableExtractorAPI {\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 TableExtractorAPI(new RestClient(this.parseServerUrl(serverUrl), apiKey), PARENT_ENDPOINT);\n }\n\n /**\n * Access to the TableExtractor API\n *\n * @param serverUrl: string - URL to the TableExtractor 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 TableExtractorAPI: Entry point to the TableExtractor API.\n */\n static loginWithCredentials(\n serverUrl: string,\n clientId: string,\n clientSecret: string,\n tokenUrl: string\n ): TableExtractorAPI {\n serverUrl = this.parseServerUrl(serverUrl);\n return new TableExtractorAPI(new RestClient(serverUrl, undefined, clientId, clientSecret, tokenUrl), PARENT_ENDPOINT);\n }\n\t\n /**\n * Access to the TableExtractor API\n *\n * @param credentialsFilePath: string - Path to a properties file providing client credentials.\n *\n * @return TableExtractorAPI: Entry point to the TableExtractor API.\n */\n static loginWithCredentialsFile(credentialsFilePath: string) : TableExtractorAPI {\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 TableExtractorAPI.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 tableextractor(): TableextractorEndpoint {\n return new TableextractorEndpoint(this.restClient, this.endpoint());\n }\n\n}"]}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @author semantha
3
+ *
4
+ * This is a generated file do not change manually!
5
+ */
6
+ interface XlCell {
7
+ value?: string;
8
+ images?: string[];
9
+ }
10
+
11
+ /**
12
+ * @author semantha
13
+ *
14
+ * This is a generated file do not change manually!
15
+ */
16
+ interface XlRow {
17
+ cells?: XlCell[];
18
+ }
19
+
20
+ export type { XlCell, XlRow };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @author semantha
3
+ *
4
+ * This is a generated file do not change manually!
5
+ */
6
+ interface XlCell {
7
+ value?: string;
8
+ images?: string[];
9
+ }
10
+
11
+ /**
12
+ * @author semantha
13
+ *
14
+ * This is a generated file do not change manually!
15
+ */
16
+ interface XlRow {
17
+ cells?: XlCell[];
18
+ }
19
+
20
+ export type { XlCell, XlRow };
@@ -0,0 +1,2 @@
1
+ 'use strict';//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,2 @@
1
+ //# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
@@ -0,0 +1,133 @@
1
+ import { Logging, Tracking } from '../model/index.mjs';
2
+ import { RestClient } from '../../rest/index.mjs';
3
+ import 'axios';
4
+
5
+ /**
6
+ * @author semantha
7
+ *
8
+ * Class to access resource "/api/uitracking/domains/{domainname}/log"
9
+ * This is a generated file do not change manually!
10
+ */
11
+ declare class LogEndpoint {
12
+ private readonly restClient;
13
+ private readonly parentEndpoint;
14
+ private readonly ENDPOINT;
15
+ constructor(restClient: RestClient, parentEndpoint: string);
16
+ /**
17
+ * @param body Logging? -
18
+ */
19
+ post(body?: Logging): Promise<void>;
20
+ }
21
+
22
+ /**
23
+ * @author semantha
24
+ *
25
+ * Class to access resource "/api/uitracking/domains/{domainname}/track"
26
+ * This is a generated file do not change manually!
27
+ */
28
+ declare class TrackEndpoint {
29
+ private readonly restClient;
30
+ private readonly parentEndpoint;
31
+ private readonly ENDPOINT;
32
+ constructor(restClient: RestClient, parentEndpoint: string);
33
+ /**
34
+ * @param body Tracking -
35
+ */
36
+ patch(body: Tracking): Promise<void>;
37
+ }
38
+
39
+ /**
40
+ * @author semantha
41
+ *
42
+ * Class to access resource "/api/uitracking/domains/{domainname}"
43
+ * This is a generated file do not change manually!
44
+ */
45
+ declare class DomainEndpoint {
46
+ private readonly restClient;
47
+ private readonly parentEndpoint;
48
+ private readonly domainname;
49
+ private readonly ENDPOINT;
50
+ constructor(restClient: RestClient, parentEndpoint: string, domainname: string);
51
+ log(): LogEndpoint;
52
+ track(): TrackEndpoint;
53
+ }
54
+
55
+ /**
56
+ * @author semantha
57
+ *
58
+ * Class to access resource "/api/uitracking/domains"
59
+ * This is a generated file do not change manually!
60
+ */
61
+ declare class DomainsEndpoint {
62
+ private readonly restClient;
63
+ private readonly parentEndpoint;
64
+ private readonly ENDPOINT;
65
+ constructor(restClient: RestClient, parentEndpoint: string);
66
+ }
67
+
68
+ /**
69
+ * @author semantha
70
+ *
71
+ * Class to access resource "/api/uitracking"
72
+ * This is a generated file do not change manually!
73
+ */
74
+ declare class UitrackingEndpoint {
75
+ private readonly restClient;
76
+ private readonly parentEndpoint;
77
+ private readonly ENDPOINT;
78
+ constructor(restClient: RestClient, parentEndpoint: string);
79
+ domains(): DomainsEndpoint;
80
+ domains(domainname: string): DomainEndpoint;
81
+ }
82
+
83
+ /**
84
+ * Entry point to the Tracking API.
85
+ *
86
+ * @author semantha
87
+ * Calls the /uitracking, endpoints.
88
+ *
89
+ * Note:
90
+ * The constructor is not meant to be invoked directly
91
+ * use `loginXXX()` with your credentials instead.
92
+ *
93
+ * this is a generated class do not change manually!
94
+ */
95
+ declare class TrackingAPI {
96
+ private readonly restClient;
97
+ private readonly parentEndpoint;
98
+ constructor(restClient: RestClient, parentEndpoint: string);
99
+ /**
100
+ * Access to the Tracking API
101
+ *
102
+ * @param serverUrl: string - URL to the Tracking server.
103
+ * @param apiKey: string - A valid bearer token for accessing the given url.
104
+ *
105
+ * @return TrackingAPI: Entry point to the Tracking API.
106
+ */
107
+ static loginWithApiKey(serverUrl: string, apiKey: string): TrackingAPI;
108
+ /**
109
+ * Access to the Tracking API
110
+ *
111
+ * @param serverUrl: string - URL to the Tracking server.
112
+ * @param clientId: string - OAuth2 client id.
113
+ * @param clientSecret: string - OAuth2 client secret.
114
+ * @param tokenUrl: string OAuth2 url to get a valid access token
115
+ *
116
+ * @return TrackingAPI: Entry point to the Tracking API.
117
+ */
118
+ static loginWithCredentials(serverUrl: string, clientId: string, clientSecret: string, tokenUrl: string): TrackingAPI;
119
+ /**
120
+ * Access to the Tracking API
121
+ *
122
+ * @param credentialsFilePath: string - Path to a properties file providing client credentials.
123
+ *
124
+ * @return TrackingAPI: Entry point to the Tracking API.
125
+ */
126
+ static loginWithCredentialsFile(credentialsFilePath: string): TrackingAPI;
127
+ private static parseServerUrl;
128
+ private static getValueOfInPropertiesFile;
129
+ endpoint(): string;
130
+ uitracking(): UitrackingEndpoint;
131
+ }
132
+
133
+ export { DomainEndpoint, DomainsEndpoint, LogEndpoint, TrackEndpoint, TrackingAPI, UitrackingEndpoint };
@@ -0,0 +1,133 @@
1
+ import { Logging, Tracking } from '../model/index.js';
2
+ import { RestClient } from '../../rest/index.js';
3
+ import 'axios';
4
+
5
+ /**
6
+ * @author semantha
7
+ *
8
+ * Class to access resource "/api/uitracking/domains/{domainname}/log"
9
+ * This is a generated file do not change manually!
10
+ */
11
+ declare class LogEndpoint {
12
+ private readonly restClient;
13
+ private readonly parentEndpoint;
14
+ private readonly ENDPOINT;
15
+ constructor(restClient: RestClient, parentEndpoint: string);
16
+ /**
17
+ * @param body Logging? -
18
+ */
19
+ post(body?: Logging): Promise<void>;
20
+ }
21
+
22
+ /**
23
+ * @author semantha
24
+ *
25
+ * Class to access resource "/api/uitracking/domains/{domainname}/track"
26
+ * This is a generated file do not change manually!
27
+ */
28
+ declare class TrackEndpoint {
29
+ private readonly restClient;
30
+ private readonly parentEndpoint;
31
+ private readonly ENDPOINT;
32
+ constructor(restClient: RestClient, parentEndpoint: string);
33
+ /**
34
+ * @param body Tracking -
35
+ */
36
+ patch(body: Tracking): Promise<void>;
37
+ }
38
+
39
+ /**
40
+ * @author semantha
41
+ *
42
+ * Class to access resource "/api/uitracking/domains/{domainname}"
43
+ * This is a generated file do not change manually!
44
+ */
45
+ declare class DomainEndpoint {
46
+ private readonly restClient;
47
+ private readonly parentEndpoint;
48
+ private readonly domainname;
49
+ private readonly ENDPOINT;
50
+ constructor(restClient: RestClient, parentEndpoint: string, domainname: string);
51
+ log(): LogEndpoint;
52
+ track(): TrackEndpoint;
53
+ }
54
+
55
+ /**
56
+ * @author semantha
57
+ *
58
+ * Class to access resource "/api/uitracking/domains"
59
+ * This is a generated file do not change manually!
60
+ */
61
+ declare class DomainsEndpoint {
62
+ private readonly restClient;
63
+ private readonly parentEndpoint;
64
+ private readonly ENDPOINT;
65
+ constructor(restClient: RestClient, parentEndpoint: string);
66
+ }
67
+
68
+ /**
69
+ * @author semantha
70
+ *
71
+ * Class to access resource "/api/uitracking"
72
+ * This is a generated file do not change manually!
73
+ */
74
+ declare class UitrackingEndpoint {
75
+ private readonly restClient;
76
+ private readonly parentEndpoint;
77
+ private readonly ENDPOINT;
78
+ constructor(restClient: RestClient, parentEndpoint: string);
79
+ domains(): DomainsEndpoint;
80
+ domains(domainname: string): DomainEndpoint;
81
+ }
82
+
83
+ /**
84
+ * Entry point to the Tracking API.
85
+ *
86
+ * @author semantha
87
+ * Calls the /uitracking, endpoints.
88
+ *
89
+ * Note:
90
+ * The constructor is not meant to be invoked directly
91
+ * use `loginXXX()` with your credentials instead.
92
+ *
93
+ * this is a generated class do not change manually!
94
+ */
95
+ declare class TrackingAPI {
96
+ private readonly restClient;
97
+ private readonly parentEndpoint;
98
+ constructor(restClient: RestClient, parentEndpoint: string);
99
+ /**
100
+ * Access to the Tracking API
101
+ *
102
+ * @param serverUrl: string - URL to the Tracking server.
103
+ * @param apiKey: string - A valid bearer token for accessing the given url.
104
+ *
105
+ * @return TrackingAPI: Entry point to the Tracking API.
106
+ */
107
+ static loginWithApiKey(serverUrl: string, apiKey: string): TrackingAPI;
108
+ /**
109
+ * Access to the Tracking API
110
+ *
111
+ * @param serverUrl: string - URL to the Tracking server.
112
+ * @param clientId: string - OAuth2 client id.
113
+ * @param clientSecret: string - OAuth2 client secret.
114
+ * @param tokenUrl: string OAuth2 url to get a valid access token
115
+ *
116
+ * @return TrackingAPI: Entry point to the Tracking API.
117
+ */
118
+ static loginWithCredentials(serverUrl: string, clientId: string, clientSecret: string, tokenUrl: string): TrackingAPI;
119
+ /**
120
+ * Access to the Tracking API
121
+ *
122
+ * @param credentialsFilePath: string - Path to a properties file providing client credentials.
123
+ *
124
+ * @return TrackingAPI: Entry point to the Tracking API.
125
+ */
126
+ static loginWithCredentialsFile(credentialsFilePath: string): TrackingAPI;
127
+ private static parseServerUrl;
128
+ private static getValueOfInPropertiesFile;
129
+ endpoint(): string;
130
+ uitracking(): UitrackingEndpoint;
131
+ }
132
+
133
+ export { DomainEndpoint, DomainsEndpoint, LogEndpoint, TrackEndpoint, TrackingAPI, UitrackingEndpoint };
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkF5JCME7D_js=require('../../chunk-F5JCME7D.js');require('../../chunk-Z3N63BWG.js');Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkF5JCME7D_js.c}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkF5JCME7D_js.d}});Object.defineProperty(exports,"LogEndpoint",{enumerable:true,get:function(){return chunkF5JCME7D_js.a}});Object.defineProperty(exports,"TrackEndpoint",{enumerable:true,get:function(){return chunkF5JCME7D_js.b}});Object.defineProperty(exports,"TrackingAPI",{enumerable:true,get:function(){return chunkF5JCME7D_js.f}});Object.defineProperty(exports,"UitrackingEndpoint",{enumerable:true,get:function(){return chunkF5JCME7D_js.e}});//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,2 @@
1
+ export{c as DomainEndpoint,d as DomainsEndpoint,a as LogEndpoint,b as TrackEndpoint,f as TrackingAPI,e as UitrackingEndpoint}from'../../chunk-7Y3CRYXW.mjs';import'../../chunk-DOK44NQJ.mjs';//# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
@@ -0,0 +1,4 @@
1
+ export { Logging, LoggingLevelEnum, LoggingLevelEnumValues, Tracking, isLoggingLevelEnumValue } from './model/index.mjs';
2
+ export { DomainEndpoint, DomainsEndpoint, LogEndpoint, TrackEndpoint, TrackingAPI, UitrackingEndpoint } from './api/index.mjs';
3
+ import '../rest/index.mjs';
4
+ import 'axios';
@@ -0,0 +1,4 @@
1
+ export { Logging, LoggingLevelEnum, LoggingLevelEnumValues, Tracking, isLoggingLevelEnumValue } from './model/index.js';
2
+ export { DomainEndpoint, DomainsEndpoint, LogEndpoint, TrackEndpoint, TrackingAPI, UitrackingEndpoint } from './api/index.js';
3
+ import '../rest/index.js';
4
+ import 'axios';
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkF5JCME7D_js=require('../chunk-F5JCME7D.js'),chunkJCDJ3B7Q_js=require('../chunk-JCDJ3B7Q.js');require('../chunk-Z3N63BWG.js');Object.defineProperty(exports,"DomainEndpoint",{enumerable:true,get:function(){return chunkF5JCME7D_js.c}});Object.defineProperty(exports,"DomainsEndpoint",{enumerable:true,get:function(){return chunkF5JCME7D_js.d}});Object.defineProperty(exports,"LogEndpoint",{enumerable:true,get:function(){return chunkF5JCME7D_js.a}});Object.defineProperty(exports,"TrackEndpoint",{enumerable:true,get:function(){return chunkF5JCME7D_js.b}});Object.defineProperty(exports,"TrackingAPI",{enumerable:true,get:function(){return chunkF5JCME7D_js.f}});Object.defineProperty(exports,"UitrackingEndpoint",{enumerable:true,get:function(){return chunkF5JCME7D_js.e}});Object.defineProperty(exports,"LoggingLevelEnumValues",{enumerable:true,get:function(){return chunkJCDJ3B7Q_js.a}});Object.defineProperty(exports,"isLoggingLevelEnumValue",{enumerable:true,get:function(){return chunkJCDJ3B7Q_js.b}});//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,2 @@
1
+ export{c as DomainEndpoint,d as DomainsEndpoint,a as LogEndpoint,b as TrackEndpoint,f as TrackingAPI,e as UitrackingEndpoint}from'../chunk-7Y3CRYXW.mjs';export{a as LoggingLevelEnumValues,b as isLoggingLevelEnumValue}from'../chunk-BE73RDIS.mjs';import'../chunk-DOK44NQJ.mjs';//# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @author semantha
3
+ *
4
+ * This is a generated file do not change manually!
5
+ */
6
+ interface Logging {
7
+ level: LoggingLevelEnum;
8
+ message: string;
9
+ details?: string;
10
+ }
11
+
12
+ /**
13
+ * @author semantha
14
+ *
15
+ * This is a generated file do not change manually!
16
+ */
17
+ declare const LoggingLevelEnumValues: readonly ["INFO", "WARNING", "ERROR"];
18
+ type LoggingLevelEnum = (typeof LoggingLevelEnumValues)[number];
19
+ declare function isLoggingLevelEnumValue(value: any): value is LoggingLevelEnum;
20
+
21
+ /**
22
+ * @author semantha
23
+ *
24
+ * This is a generated file do not change manually!
25
+ */
26
+ interface Tracking {
27
+ app: string;
28
+ type: string;
29
+ name: string;
30
+ }
31
+
32
+ export { type Logging, type LoggingLevelEnum, LoggingLevelEnumValues, type Tracking, isLoggingLevelEnumValue };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @author semantha
3
+ *
4
+ * This is a generated file do not change manually!
5
+ */
6
+ interface Logging {
7
+ level: LoggingLevelEnum;
8
+ message: string;
9
+ details?: string;
10
+ }
11
+
12
+ /**
13
+ * @author semantha
14
+ *
15
+ * This is a generated file do not change manually!
16
+ */
17
+ declare const LoggingLevelEnumValues: readonly ["INFO", "WARNING", "ERROR"];
18
+ type LoggingLevelEnum = (typeof LoggingLevelEnumValues)[number];
19
+ declare function isLoggingLevelEnumValue(value: any): value is LoggingLevelEnum;
20
+
21
+ /**
22
+ * @author semantha
23
+ *
24
+ * This is a generated file do not change manually!
25
+ */
26
+ interface Tracking {
27
+ app: string;
28
+ type: string;
29
+ name: string;
30
+ }
31
+
32
+ export { type Logging, type LoggingLevelEnum, LoggingLevelEnumValues, type Tracking, isLoggingLevelEnumValue };
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkJCDJ3B7Q_js=require('../../chunk-JCDJ3B7Q.js');Object.defineProperty(exports,"LoggingLevelEnumValues",{enumerable:true,get:function(){return chunkJCDJ3B7Q_js.a}});Object.defineProperty(exports,"isLoggingLevelEnumValue",{enumerable:true,get:function(){return chunkJCDJ3B7Q_js.b}});//# sourceMappingURL=index.js.map
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,2 @@
1
+ export{a as LoggingLevelEnumValues,b as isLoggingLevelEnumValue}from'../../chunk-BE73RDIS.mjs';//# sourceMappingURL=index.mjs.map
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@semantha/product-sdk",
3
+ "description": "",
4
+ "version": "9.2.1",
5
+ "files": [
6
+ "./dist"
7
+ ],
8
+ "main": "./dist/index.js",
9
+ "types": "./dist/index.d.ts",
10
+ "scripts": {
11
+ "build": "tsup",
12
+ "lint": "eslint semantha-product-sdk/**/*",
13
+ "prettier": "prettier semantha-product-sdk/**/* --write",
14
+ "test": "jest --verbose",
15
+ "test:coverage": "jest --coverage"
16
+ },
17
+ "author": "Marco Lauinger <marco.lauinger@semantha.ai>",
18
+ "license": "Apache-2.0",
19
+ "homepage": "https://semantha.ai",
20
+ "devDependencies": {
21
+ "@types/jest": "^29.5.14",
22
+ "@types/node": "^20.17.50",
23
+ "eslint": "^9.27.0",
24
+ "jest": "^29.7.0",
25
+ "prettier": "3.6.2",
26
+ "ts-jest": "^29.3.4",
27
+ "tsup": "^8.5.0",
28
+ "typescript": "^5.5.3",
29
+ "typescript-eslint": "^8.32.1"
30
+ },
31
+ "dependencies": {
32
+ "axios": "^1.8.4",
33
+ "dotenv": "^16.4.5"
34
+ },
35
+ "browser": {
36
+ "fs": false
37
+ }
38
+ }