@gandalan/weblibs 1.5.26 → 1.5.27

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
@@ -7,6 +7,15 @@ export { createIDASApi, idasFluentApi } from "./api/idasFluentApi.js";
7
7
  export { createAuthManager, fluentIdasAuthManager } from "./api/fluentAuthManager.js";
8
8
  export { fetchEnvConfig } from "./api/fluentEnvUtils.js";
9
9
  export { restClient } from "./api/fluentRestClient.js";
10
+ export function createApi(): FluentApi;
11
+ export function fluentApi(url: string, authManager: FluentAuthManager | null, serviceName: string): FluentApi;
12
+ export function createIDASApi(): IDASFluentApi;
13
+ export function idasFluentApi(url: string, authManager: FluentAuthManager, serviceName: string): IDASFluentApi;
14
+ export function createAuthManager(): FluentAuthManager;
15
+ export function fluentIdasAuthManager(appToken: string, authBaseUrl: string): FluentAuthManager;
16
+ export function fetchEnvConfig(envConfig?: string): Promise<EnvironmentConfig>;
17
+ export function restClient(): FluentRESTClient;
18
+ export function initIDAS(appToken: string): Promise<Settings | null>;
10
19
 
11
20
  export type AblageApi = {
12
21
  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.27",
4
4
  "description": "WebLibs for Gandalan JS/TS projects",
5
5
  "keywords": [
6
6
  "gandalan"
@@ -34,6 +34,18 @@ const rootValueExportStatements = [
34
34
  "export { restClient } from \"./api/fluentRestClient.js\";"
35
35
  ];
36
36
 
37
+ const rootFunctionDeclarationStatements = [
38
+ "export function createApi(): FluentApi;",
39
+ "export function fluentApi(url: string, authManager: FluentAuthManager | null, serviceName: string): FluentApi;",
40
+ "export function createIDASApi(): IDASFluentApi;",
41
+ "export function idasFluentApi(url: string, authManager: FluentAuthManager, serviceName: string): IDASFluentApi;",
42
+ "export function createAuthManager(): FluentAuthManager;",
43
+ "export function fluentIdasAuthManager(appToken: string, authBaseUrl: string): FluentAuthManager;",
44
+ "export function fetchEnvConfig(envConfig?: string): Promise<EnvironmentConfig>;",
45
+ "export function restClient(): FluentRESTClient;",
46
+ "export function initIDAS(appToken: string): Promise<Settings | null>;"
47
+ ];
48
+
37
49
  const simpleImportTypePattern = /^import\((?:"|').+(?:"|')\)\.[A-Za-z0-9_$]+$/;
38
50
  const returnTypeOfCreateApiPattern = /^ReturnType<\s*typeof\s+(create[A-Za-z0-9_$]+Api)\s*>$/;
39
51
 
@@ -1501,6 +1513,7 @@ function buildRootDts(publicTypeEntries) {
1501
1513
  const lines = [
1502
1514
  "export * from \"./index.js\";",
1503
1515
  ...rootValueExportStatements,
1516
+ ...rootFunctionDeclarationStatements,
1504
1517
  ""
1505
1518
  ];
1506
1519