@luminocity/lemonate-gateway 8.2.18 → 8.2.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1322,22 +1322,15 @@ declare const ItemVisibility: {
1322
1322
  };
1323
1323
 
1324
1324
  type ApiClientOptions = {
1325
- host: "auto" | string;
1326
- viewerHost: "auto" | string;
1327
- collabHost: "auto" | string;
1325
+ environment: string;
1328
1326
  accessToken: string | null;
1329
1327
  apiToken: string | null;
1330
- https: boolean;
1331
1328
  wsAutoReconnect: boolean;
1332
1329
  wsAutoConnect: boolean;
1333
- viewerHttps: boolean;
1334
- collabHttps: boolean;
1335
1330
  forcePublicApi: boolean;
1336
1331
  usePersistentStorage: boolean;
1337
1332
  storageSizeMib: number;
1338
1333
  requestClientId: string | null;
1339
- path: string;
1340
- websocketPath: string;
1341
1334
  debug: boolean;
1342
1335
  };
1343
1336
  type ItemCopyResult = {
@@ -1345,6 +1338,14 @@ type ItemCopyResult = {
1345
1338
  clone: string;
1346
1339
  replaced?: string;
1347
1340
  };
1341
+ type Environment = {
1342
+ id: string;
1343
+ name: string;
1344
+ ssl: boolean;
1345
+ apiHost: string;
1346
+ viewerHost: string;
1347
+ collabHost: string;
1348
+ };
1348
1349
  /**
1349
1350
  * Class representing an ApiClient.
1350
1351
  * @extends EventEmitter
@@ -1358,11 +1359,7 @@ declare class ApiClient extends EventEmitter {
1358
1359
  usePersistentStorage: boolean;
1359
1360
  storageSizeMib: number;
1360
1361
  requestClientId: string | null;
1361
- webProtocol: "https" | "http";
1362
- wsProtocol: "wss" | "ws";
1363
- viewerProtocol: "https" | "http";
1364
- collabProtocol: "wss" | "ws";
1365
- restUrl: string;
1362
+ apiUrl: string;
1366
1363
  wsUrl: string;
1367
1364
  viewerUrl: string;
1368
1365
  collabUrl: string;
@@ -1379,6 +1376,7 @@ declare class ApiClient extends EventEmitter {
1379
1376
  itemCopier: ItemCopier;
1380
1377
  executableExporter: ExecutableExporter;
1381
1378
  eventBus: typeof eventBus;
1379
+ env: Environment;
1382
1380
  api: AxiosInstance;
1383
1381
  ws: WebSocket | null;
1384
1382
  cachedMe: Me | null;
@@ -1394,6 +1392,10 @@ declare class ApiClient extends EventEmitter {
1394
1392
  * @param {Object} options - Configuration options.
1395
1393
  */
1396
1394
  constructor(options?: Partial<ApiClientOptions>);
1395
+ detectEnvironment(): Environment;
1396
+ getEnvironmentById(id: string): Environment | undefined;
1397
+ getEnvironments(): Environment[];
1398
+ switchEnvironment(id: string): void;
1397
1399
  initCaches(): Promise<[void, void, any]>;
1398
1400
  clearCaches(): void;
1399
1401
  isDevPlatform(): boolean;
@@ -1495,11 +1497,6 @@ declare class ApiClient extends EventEmitter {
1495
1497
  * @returns The access token.
1496
1498
  */
1497
1499
  getAccessToken(): string | null;
1498
- /**
1499
- * Update the base URL.
1500
- * @param {string} host - The new host.
1501
- */
1502
- updateBaseUrl(host: any): void;
1503
1500
  /**
1504
1501
  * Set the API base URL.
1505
1502
  * @param url - The new API base URL.