@airtop/sdk 1.0.0-alpha2.39 → 1.0.0-alpha2.40

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.cts CHANGED
@@ -15,11 +15,11 @@ export { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
15
15
  import { ILogLayer } from 'loglayer';
16
16
  export { ILogLayer } from 'loglayer';
17
17
  import { Issue, SessionConfigV1, ListAutomationsOutput, AutomationData, FilesResponse, EnvelopeDefaultMeta, GetFileData, CreateFileData, AirtopPagination, ExternalFile, ServicePromptActionResponseEnvelope, ServicePromptParameters, ExternalSessionWithConnectionInfo, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse, WindowsResponse } from '@airtop/core/resources/shared.js';
18
- export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MicroInteractionConfig, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse, WindowsResponse, WindowsWithMeta } from '@airtop/core/resources/shared.js';
18
+ export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse, WindowsResponse, WindowsWithMeta } from '@airtop/core/resources/shared.js';
19
19
  import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
20
20
  import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
21
21
  import * as _airtop_core_resources_js from '@airtop/core/resources.js';
22
- import { ConnectedServicesActionResponseEnvelope } from '@airtop/core/resources.js';
22
+ import { ConnectedServicesActionResponseEnvelope, SessionGetConnectedServicesParams } from '@airtop/core/resources.js';
23
23
  import { DeepOmit } from 'deep-utility-types';
24
24
  export { DeepOmit } from 'deep-utility-types';
25
25
 
@@ -181,7 +181,7 @@ declare class AirtopBase {
181
181
  * @returns Logger instance
182
182
  * @see {@link https://loglayer.dev | LogLayer Documentation}
183
183
  */
184
- getLogger(): ILogLayer;
184
+ getLogger(): ILogLayer<ILogLayer<any>>;
185
185
  /**
186
186
  * Converts input data to JSON schema format
187
187
  * @param input - Data to be converted (schema input, string, or object)
@@ -1263,8 +1263,20 @@ declare class AirtopSessionClient extends AirtopBase {
1263
1263
  * Retrieves the list of connected services available for the current session.
1264
1264
  * @param requestOptions - Request options
1265
1265
  * @returns A promise that resolves to the connected services response containing service details
1266
+ * @deprecated Use `getConnectedServices({ options, requestOptions })` instead
1266
1267
  */
1267
1268
  getConnectedServices(requestOptions?: AirtopRequestOptions): Promise<ConnectedServicesActionResponseEnvelope>;
1269
+ /**
1270
+ * Retrieves the list of connected services available for the current session.
1271
+ * @param config - Configuration object containing options and requestOptions
1272
+ * @param config.options - Query parameters for filtering connected services
1273
+ * @param config.requestOptions - Request options
1274
+ * @returns A promise that resolves to the connected services response containing service details
1275
+ */
1276
+ getConnectedServices(config: {
1277
+ options?: SessionGetConnectedServicesParams;
1278
+ requestOptions?: AirtopRequestOptions;
1279
+ }): Promise<ConnectedServicesActionResponseEnvelope>;
1268
1280
  /**
1269
1281
  * Waits for a file to be downloaded in a session and reach 'available' status.
1270
1282
  * Defaults to looking back 5 seconds in the event stream for the file to be available.
package/dist/index.d.ts CHANGED
@@ -15,11 +15,11 @@ export { AirtopJsonSchemaAdapter } from '@airtop/json-schema-adapter';
15
15
  import { ILogLayer } from 'loglayer';
16
16
  export { ILogLayer } from 'loglayer';
17
17
  import { Issue, SessionConfigV1, ListAutomationsOutput, AutomationData, FilesResponse, EnvelopeDefaultMeta, GetFileData, CreateFileData, AirtopPagination, ExternalFile, ServicePromptActionResponseEnvelope, ServicePromptParameters, ExternalSessionWithConnectionInfo, ExtractActionResponseEnvelope, ActActionResponseEnvelope, LlmActionResponseEnvelope, NodeHandle, WaitForPageActionResponseEnvelope, NavigateActionResponseEnvelope, FindOneActionResponseEnvelope, FindManyActionResponseEnvelope, AIPromptResponse as AIPromptResponse$1, WindowIDDataResponse, OperationOutcomeResponse, WindowsResponse } from '@airtop/core/resources/shared.js';
18
- export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MicroInteractionConfig, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse, WindowsResponse, WindowsWithMeta } from '@airtop/core/resources/shared.js';
18
+ export { AIResponseEnvelope, ActActionResponseData, AgentInvocationData, AgentVersionData, AirtopPagination, AsyncConfig, AsyncSessionAIResponseEnvelope, BrowserWaitNavigationConfig, ClickConfig, ClientProvidedResponseMetadata, CreateFileData, EnvelopeDefaultMeta, ExternalSessionAIResponseMetadata, ExternalSessionAIResponseMetadataUsage, ExternalSessionConfig, ExternalSessionWithConnectionInfo, ExtractActionResponseData, FindManyActionResponseData, FindOneActionResponseData, GetFileData, IntervalMonitorConfig, Issue, LlmActionResponseData, MonitorConfig, NavigateActionResponseData, OperationOutcome, OperationOutcomeResponse, PageQueryConfig, PageQueryExperimentalConfig, PaginatedExtractionConfig, ScrapeResponseContent, ScrapeResponseEnvelope, ScrapeResponseOutput, ScreenshotConfig, ScreenshotMetadata, ScreenshotRequestConfig, ScreenshotScrollPosition, ScreenshotViewportDimensions, ScrollByConfig, ScrollToEdgeConfig, ServicePromptActionResponseData, SummaryExperimentalConfig, VisualAnalysisConfig, WaitForPageActionResponseData, WindowIDData, WindowIDDataResponse, WindowInfo, WindowResponse, WindowsResponse, WindowsWithMeta } from '@airtop/core/resources/shared.js';
19
19
  import { AutomationUpdateDescriptionParams } from '@airtop/core/resources/automations.js';
20
20
  import * as _airtop_core_resources_sessions_mjs from '@airtop/core/resources/sessions.mjs';
21
21
  import * as _airtop_core_resources_js from '@airtop/core/resources.js';
22
- import { ConnectedServicesActionResponseEnvelope } from '@airtop/core/resources.js';
22
+ import { ConnectedServicesActionResponseEnvelope, SessionGetConnectedServicesParams } from '@airtop/core/resources.js';
23
23
  import { DeepOmit } from 'deep-utility-types';
24
24
  export { DeepOmit } from 'deep-utility-types';
25
25
 
@@ -181,7 +181,7 @@ declare class AirtopBase {
181
181
  * @returns Logger instance
182
182
  * @see {@link https://loglayer.dev | LogLayer Documentation}
183
183
  */
184
- getLogger(): ILogLayer;
184
+ getLogger(): ILogLayer<ILogLayer<any>>;
185
185
  /**
186
186
  * Converts input data to JSON schema format
187
187
  * @param input - Data to be converted (schema input, string, or object)
@@ -1263,8 +1263,20 @@ declare class AirtopSessionClient extends AirtopBase {
1263
1263
  * Retrieves the list of connected services available for the current session.
1264
1264
  * @param requestOptions - Request options
1265
1265
  * @returns A promise that resolves to the connected services response containing service details
1266
+ * @deprecated Use `getConnectedServices({ options, requestOptions })` instead
1266
1267
  */
1267
1268
  getConnectedServices(requestOptions?: AirtopRequestOptions): Promise<ConnectedServicesActionResponseEnvelope>;
1269
+ /**
1270
+ * Retrieves the list of connected services available for the current session.
1271
+ * @param config - Configuration object containing options and requestOptions
1272
+ * @param config.options - Query parameters for filtering connected services
1273
+ * @param config.requestOptions - Request options
1274
+ * @returns A promise that resolves to the connected services response containing service details
1275
+ */
1276
+ getConnectedServices(config: {
1277
+ options?: SessionGetConnectedServicesParams;
1278
+ requestOptions?: AirtopRequestOptions;
1279
+ }): Promise<ConnectedServicesActionResponseEnvelope>;
1268
1280
  /**
1269
1281
  * Waits for a file to be downloaded in a session and reach 'available' status.
1270
1282
  * Defaults to looking back 5 seconds in the event stream for the file to be available.
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ var require_package = __commonJS({
9
9
  module.exports = {
10
10
  name: "@airtop/sdk",
11
11
  description: "Airtop SDK for TypeScript",
12
- version: "1.0.0-alpha2.39",
12
+ version: "1.0.0-alpha2.40",
13
13
  type: "module",
14
14
  main: "./dist/index.cjs",
15
15
  module: "./dist/index.js",
@@ -48,10 +48,10 @@ var require_package = __commonJS({
48
48
  "verify-types": "tsc --noEmit && tsc --noEmit --project tsconfig.e2e.json"
49
49
  },
50
50
  dependencies: {
51
- "@airtop/core": "0.1.0-alpha.48",
51
+ "@airtop/core": "0.1.0-alpha.49",
52
52
  "@airtop/json-schema-adapter": "workspace:*",
53
53
  "date-fns": "4.1.0",
54
- loglayer: "6.7.0",
54
+ loglayer: "8.1.0",
55
55
  "serialize-error": "12.0.0",
56
56
  uuid: "11.1.0"
57
57
  },
@@ -1393,15 +1393,13 @@ var AirtopSessionClient = class extends AirtopBase {
1393
1393
  options
1394
1394
  );
1395
1395
  }
1396
- /**
1397
- * Retrieves the list of connected services available for the current session.
1398
- * @param requestOptions - Request options
1399
- * @returns A promise that resolves to the connected services response containing service details
1400
- */
1401
- async getConnectedServices(requestOptions = {}) {
1396
+ async getConnectedServices(configOrRequestOptions) {
1397
+ const isConfigFormat = configOrRequestOptions && ("options" in configOrRequestOptions || "requestOptions" in configOrRequestOptions);
1398
+ const options = isConfigFormat ? configOrRequestOptions.options : void 0;
1399
+ const requestOptions = isConfigFormat ? configOrRequestOptions.requestOptions || {} : configOrRequestOptions || {};
1402
1400
  return withRequestCompletionPolling(
1403
1401
  this.client,
1404
- () => this.client.sessions.getConnectedServices(this.sessionId),
1402
+ () => this.client.sessions.getConnectedServices(this.sessionId, options),
1405
1403
  requestOptions
1406
1404
  );
1407
1405
  }
@@ -1446,9 +1444,7 @@ ${JSON.stringify(event, null, 2)}`);
1446
1444
  }
1447
1445
  const thresholdTime = startTime.getTime() - lookbackSeconds * 1e3;
1448
1446
  if (eventTime < thresholdTime) {
1449
- this.log.info(
1450
- `stopping event processing - encountered event older than lookbackSeconds threshold`
1451
- );
1447
+ this.log.info(`stopping event processing - encountered event older than lookbackSeconds threshold`);
1452
1448
  break;
1453
1449
  }
1454
1450
  return {