@gandalan/weblibs 1.5.26 → 1.5.28

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/index.d.ts CHANGED
@@ -1,12 +1,15 @@
1
1
  export * from "./index.js";
2
2
  export { IDASFactory } from "./api/IDAS.js";
3
3
  export { RESTClient } from "./api/RESTClient.js";
4
- export { initIDAS } from "./api/authUtils.js";
5
- export { createApi, fluentApi } from "./api/fluentApi.js";
6
- export { createIDASApi, idasFluentApi } from "./api/idasFluentApi.js";
7
- export { createAuthManager, fluentIdasAuthManager } from "./api/fluentAuthManager.js";
8
- export { fetchEnvConfig } from "./api/fluentEnvUtils.js";
9
- export { restClient } from "./api/fluentRestClient.js";
4
+ export function createApi(): FluentApi;
5
+ export function fluentApi(url: string, authManager: FluentAuthManager | null, serviceName: string): FluentApi;
6
+ export function createIDASApi(): IDASFluentApi;
7
+ export function idasFluentApi(url: string, authManager: FluentAuthManager, serviceName: string): IDASFluentApi;
8
+ export function createAuthManager(): FluentAuthManager;
9
+ export function fluentIdasAuthManager(appToken: string, authBaseUrl: string): FluentAuthManager;
10
+ export function fetchEnvConfig(envConfig?: string): Promise<EnvironmentConfig>;
11
+ export function restClient(): FluentRESTClient;
12
+ export function initIDAS(appToken: string): Promise<Settings | null>;
10
13
 
11
14
  export type AblageApi = {
12
15
  get: (guid: string) => Promise<AblageDTO>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gandalan/weblibs",
3
- "version": "1.5.26",
3
+ "version": "1.5.28",
4
4
  "description": "WebLibs for Gandalan JS/TS projects",
5
5
  "keywords": [
6
6
  "gandalan"
@@ -25,13 +25,19 @@ const businessRootMarkerEnd = "// END GENERATED ROOT BUSINESS TYPEDEFS";
25
25
 
26
26
  const rootValueExportStatements = [
27
27
  "export { IDASFactory } from \"./api/IDAS.js\";",
28
- "export { RESTClient } from \"./api/RESTClient.js\";",
29
- "export { initIDAS } from \"./api/authUtils.js\";",
30
- "export { createApi, fluentApi } from \"./api/fluentApi.js\";",
31
- "export { createIDASApi, idasFluentApi } from \"./api/idasFluentApi.js\";",
32
- "export { createAuthManager, fluentIdasAuthManager } from \"./api/fluentAuthManager.js\";",
33
- "export { fetchEnvConfig } from \"./api/fluentEnvUtils.js\";",
34
- "export { restClient } from \"./api/fluentRestClient.js\";"
28
+ "export { RESTClient } from \"./api/RESTClient.js\";"
29
+ ];
30
+
31
+ const rootFunctionDeclarationStatements = [
32
+ "export function createApi(): FluentApi;",
33
+ "export function fluentApi(url: string, authManager: FluentAuthManager | null, serviceName: string): FluentApi;",
34
+ "export function createIDASApi(): IDASFluentApi;",
35
+ "export function idasFluentApi(url: string, authManager: FluentAuthManager, serviceName: string): IDASFluentApi;",
36
+ "export function createAuthManager(): FluentAuthManager;",
37
+ "export function fluentIdasAuthManager(appToken: string, authBaseUrl: string): FluentAuthManager;",
38
+ "export function fetchEnvConfig(envConfig?: string): Promise<EnvironmentConfig>;",
39
+ "export function restClient(): FluentRESTClient;",
40
+ "export function initIDAS(appToken: string): Promise<Settings | null>;"
35
41
  ];
36
42
 
37
43
  const simpleImportTypePattern = /^import\((?:"|').+(?:"|')\)\.[A-Za-z0-9_$]+$/;
@@ -1501,6 +1507,7 @@ function buildRootDts(publicTypeEntries) {
1501
1507
  const lines = [
1502
1508
  "export * from \"./index.js\";",
1503
1509
  ...rootValueExportStatements,
1510
+ ...rootFunctionDeclarationStatements,
1504
1511
  ""
1505
1512
  ];
1506
1513