@stackone/connect-sdk 2.87.0 → 2.88.0

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
@@ -1,1639 +1,10 @@
1
- import http from "node:http";
2
- import https from "node:https";
3
- import { Readable } from "node:stream";
4
- import { ZodType, z } from "zod/v4";
1
+ import { Account, Action, AuthType, AuthenticationField, AuthenticationNotice, Block, BlockContext, Category, Checkpoint, Connector, ConnectorDocumentation, Cursor, CursorPaginationConfig, DataSyncConfig, DeltaTokenIncrementalConfig, EventToEmit, FlowType, IncrementalConfig, Input, InputLocation, OffsetPaginationConfig, PagePaginationConfig, PaginationConfig, ReleaseStage, Settings, Source, SourceType, Step, StepFunctionName, StepFunctionParams, StepFunctionsFactory, StreamType, SupportConfig, TestActionConfig, TimeFilterIncrementalConfig, TransportType, WebhookSetupPhase, WebhookSetupPhaseKind } from "@stackone/core";
2
+ import { ILogger } from "@stackone/logger";
3
+ import { IOlapClient } from "@stackone/olap";
4
+ import { HttpMethod, IHttpClient } from "@stackone/transport";
5
+ import { z } from "@stackone/utils";
5
6
 
6
- //#region rolldown:runtime
7
- //#endregion
8
- //#region ../logger/src/types.d.ts
9
- interface ILogger {
10
- debug({
11
- category,
12
- message,
13
- traceId,
14
- context
15
- }: {
16
- category?: string;
17
- message: string;
18
- traceId?: string;
19
- context?: Record<string, unknown>;
20
- }): void;
21
- info({
22
- category,
23
- message,
24
- traceId,
25
- context
26
- }: {
27
- category?: string;
28
- message: string;
29
- traceId?: string;
30
- context?: Record<string, unknown>;
31
- }): void;
32
- warning({
33
- category,
34
- message,
35
- traceId,
36
- error,
37
- code,
38
- context
39
- }: {
40
- category?: string;
41
- message: string;
42
- traceId?: string;
43
- error?: LogError;
44
- code?: string;
45
- context?: Record<string, unknown>;
46
- }): void;
47
- error({
48
- category,
49
- message,
50
- traceId,
51
- error,
52
- code,
53
- context
54
- }: {
55
- category?: string;
56
- message: string;
57
- traceId?: string;
58
- error?: LogError;
59
- code: string;
60
- context?: Record<string, unknown>;
61
- }): void;
62
- }
63
- type LogError = Error & {
64
- response?: {
65
- data?: unknown;
66
- };
67
- context?: Record<string, unknown>;
68
- url?: string;
69
- };
70
- //#endregion
71
- //#region ../transport/src/concurrencyManager/types.d.ts
72
- type ConcurrencySubPoolConfig = {
73
- subPoolKey: string;
74
- urlPattern: RegExp | string;
75
- maxConcurrency: number;
76
- };
77
- type ConcurrencyConfig = {
78
- mainMaxConcurrency: number;
79
- subPools?: ConcurrencySubPoolConfig[];
80
- };
81
- //#endregion
82
- //#region ../transport/src/rateLimitManager/types.d.ts
83
- type RateLimitSubPoolConfig = {
84
- subPoolKey: string;
85
- urlPattern: RegExp | string;
86
- rateLimit: number;
87
- };
88
- type RetryUnit = 'seconds' | 'milliseconds' | 'date';
89
- type MappedRateLimitErrorConfig = {
90
- errorStatus: number;
91
- errorMessage: string | RegExp;
92
- errorMessagePath?: string;
93
- retryAfterPath?: string;
94
- retryAfterUnit?: RetryUnit;
95
- retryAfterValue?: number;
96
- };
97
- type RateLimitConfig = {
98
- mainRatelimit: number;
99
- subPools?: RateLimitSubPoolConfig[];
100
- mappedRateLimitErrors?: MappedRateLimitErrorConfig[];
101
- };
102
- //#endregion
103
- //#region ../transport/src/interceptors/types.d.ts
104
- type RequestConfig = {
105
- rateLimits?: RateLimitConfig;
106
- concurrency?: ConcurrencyConfig;
107
- };
108
- //#endregion
109
- //#region ../transport/src/parsers/types.d.ts
110
- declare const QueryArrayFormats: readonly ["repeat", "brackets", "comma", "stringify"];
111
- type QueryArrayFormat = (typeof QueryArrayFormats)[number];
112
- //#endregion
113
- //#region ../transport/src/httpClient/types.d.ts
114
- type HttpHeader = string | string[];
115
- type HttpHeaders = {
116
- [key: string]: HttpHeader;
117
- };
118
- type HttpQueryParamValue = {
119
- value: string | string[];
120
- arrayFormat?: QueryArrayFormat;
121
- };
122
- type HttpQueryParams = {
123
- [key: string]: string | string[] | HttpQueryParamValue;
124
- };
125
- declare const HttpMethods: readonly ["get", "post", "put", "delete", "patch"];
126
- type HttpMethod = (typeof HttpMethods)[number];
127
- type HttpResponse<T = any, P$1 = any> = {
128
- data: T;
129
- status: number;
130
- headers: HttpHeaders;
131
- requestUrl: string;
132
- responseType?: string;
133
- responseTime?: Date;
134
- message?: string;
135
- body?: P$1;
136
- };
137
- type StreamHttpResponse = {
138
- status: number;
139
- headers: HttpHeaders;
140
- stream: Readable;
141
- requestUrl: string;
142
- };
143
- interface IHttpClient {
144
- request<P$1, T>({
145
- headers,
146
- url,
147
- method,
148
- queryParams,
149
- maxRedirects,
150
- responseType,
151
- cacheTTL,
152
- context,
153
- payload,
154
- httpsAgent,
155
- httpAgent,
156
- requestConfig,
157
- httpsAgentConfig
158
- }: {
159
- headers?: HttpHeaders;
160
- url: string;
161
- method?: HttpMethod;
162
- queryParams?: HttpQueryParams;
163
- maxRedirects?: number;
164
- responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
165
- cacheTTL?: number;
166
- context?: RequestContext;
167
- payload?: P$1;
168
- httpsAgent?: https.Agent;
169
- httpAgent?: http.Agent;
170
- requestConfig?: RequestConfig;
171
- httpsAgentConfig?: https.AgentOptions;
172
- }): Promise<HttpResponse<T>>;
173
- get<T>({
174
- headers,
175
- url,
176
- queryParams,
177
- maxRedirects,
178
- cacheTTL,
179
- context,
180
- requestConfig
181
- }: {
182
- headers?: HttpHeaders;
183
- url: string;
184
- queryParams?: HttpQueryParams;
185
- maxRedirects?: number;
186
- cacheTTL?: number;
187
- context?: RequestContext;
188
- requestConfig?: RequestConfig;
189
- }): Promise<HttpResponse<T>>;
190
- post<P$1, T>({
191
- headers,
192
- url,
193
- maxRedirects,
194
- cacheTTL,
195
- context,
196
- payload,
197
- requestConfig
198
- }: {
199
- headers?: HttpHeaders;
200
- url: string;
201
- maxRedirects?: number;
202
- cacheTTL?: number;
203
- context?: RequestContext;
204
- payload?: P$1;
205
- requestConfig?: RequestConfig;
206
- }): Promise<HttpResponse<T>>;
207
- requestStream({
208
- headers,
209
- url,
210
- method,
211
- queryParams,
212
- maxRedirects,
213
- context,
214
- traceId,
215
- payload,
216
- httpsAgent,
217
- httpAgent,
218
- requestConfig,
219
- httpsAgentConfig
220
- }: {
221
- headers?: HttpHeaders;
222
- url: string;
223
- method?: HttpMethod;
224
- queryParams?: HttpQueryParams;
225
- maxRedirects?: number;
226
- context?: RequestContext;
227
- traceId?: string;
228
- payload?: unknown;
229
- httpsAgent?: https.Agent;
230
- httpAgent?: http.Agent;
231
- requestConfig?: RequestConfig;
232
- httpsAgentConfig?: https.AgentOptions;
233
- }): Promise<StreamHttpResponse>;
234
- }
235
- interface OperationSetting {
236
- url?: string;
237
- query?: Record<string, string>;
238
- config?: Partial<APIConfig>;
239
- custom_settings?: Record<string, unknown>;
240
- }
241
- type OperationSettings = Record<string, OperationSetting>;
242
- type AccountSettings = Record<string, string | number | boolean | object>;
243
- type HttpClientBehaviour = 'CONCURRENCY' | 'RETRY';
244
- type APIConfig = Record<string, unknown>;
245
- type RequestContext = {
246
- accountSecureId?: string;
247
- projectSecureId?: string;
248
- organizationId?: number | string;
249
- environment?: string;
250
- authConfigKey?: string;
251
- provider?: string;
252
- service?: string;
253
- resource?: string;
254
- subResource?: string;
255
- childResource?: string;
256
- operation?: string;
257
- action?: string;
258
- mode?: string;
259
- testerUniqueToken?: string;
260
- externalKey?: string;
261
- dataKey?: string;
262
- isDataSync?: boolean;
263
- operationSettings?: OperationSettings;
264
- accountSettings?: AccountSettings;
265
- behaviours?: HttpClientBehaviour[];
266
- };
267
- //#endregion
268
- //#region ../transport/src/signing/types.d.ts
269
- type Aws4SigningOptions = {
270
- strategy: 'aws4';
271
- service: string;
272
- region?: string;
273
- };
274
- type HmacSigningOptions = {
275
- strategy: 'hmac';
276
- algorithm?: 'sha256' | 'sha512';
277
- headerName?: string;
278
- prefix?: string;
279
- };
280
- type SigningOptions = Aws4SigningOptions | HmacSigningOptions;
281
- //#endregion
282
- //#region ../olap/src/olap/olapOptions.d.ts
283
- type OlapOptions = {
284
- logs?: LogsOptions;
285
- advanced?: AdvancedOptions;
286
- defender?: DefenderOptions;
287
- datasets?: DatasetsOptions;
288
- };
289
- type LogsOptions = {
290
- enabled?: boolean;
291
- };
292
- type AdvancedOptions = {
293
- enabled?: boolean;
294
- ttl?: number;
295
- errorsOnly?: boolean;
296
- includeBackground?: boolean;
297
- };
298
- type DefenderOptions = {
299
- enabled?: boolean;
300
- };
301
- type DatasetsOptions = {
302
- enabled?: boolean;
303
- includeBackground?: boolean;
304
- };
305
- //#endregion
306
- //#region ../olap/src/advanced/types.d.ts
307
- type ActionAdvancedLog = {
308
- data: {
309
- [key: string]: unknown;
310
- };
311
- metadata?: {
312
- isBackgroundLog?: boolean;
313
- expirationTime?: number;
314
- };
315
- };
316
- type StepAdvancedLog = {
317
- data: {
318
- [key: string]: unknown;
319
- };
320
- metadata?: {
321
- expirationTime?: number;
322
- };
323
- };
324
- type UnifiedAdvancedLog = {
325
- data: {
326
- [key: string]: unknown;
327
- };
328
- metadata?: {
329
- isBackgroundLog?: boolean;
330
- expirationTime?: number;
331
- };
332
- };
333
- type ProviderAdvancedLog = {
334
- data: {
335
- [key: string]: unknown;
336
- };
337
- metadata?: {
338
- expirationTime?: number;
339
- };
340
- };
341
- //#endregion
342
- //#region ../olap/src/defender/types.d.ts
343
- type DefenderLog = {
344
- result?: {
345
- riskLevel: string;
346
- tier2Score?: number;
347
- [key: string]: unknown;
348
- };
349
- [key: string]: unknown;
350
- };
351
- //#endregion
352
- //#region ../olap/src/types.d.ts
353
- interface IOlapClient {
354
- recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): Promise<void>;
355
- recordActions(actions: Array<{
356
- input: ActionInput;
357
- result: ActionResult;
358
- }>, options?: OlapOptions): Promise<void>;
359
- recordStep(stepInput: StepInput, stepResult: StepResult, options?: OlapOptions): Promise<void>;
360
- recordSteps(steps: Array<{
361
- input: StepInput;
362
- result: StepResult;
363
- }>, options?: OlapOptions): Promise<void>;
364
- recordUnified(unifiedInput: UnifiedInput, unifiedResult: UnifiedResult, options?: OlapOptions): Promise<void>;
365
- recordProvider(providerInput: ProviderInput, providerResult: ProviderResult, options?: OlapOptions): Promise<void>;
366
- getLogs(organizationId: string, projectSecureId: string, query: Query): Promise<QueryResult>;
367
- getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
368
- getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
369
- getLog(organizationId: string, projectSecureId: string, logId: string): Promise<ActionLog | UnifiedLog | StepLog | ProviderLog | undefined>;
370
- getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
371
- getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
372
- getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery): Promise<UnifiedQueryResult>;
373
- getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
374
- getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
375
- getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
376
- getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
377
- getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
378
- getUnifiedAdvancedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedAdvancedLog | undefined>;
379
- getProviderAdvancedLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderAdvancedLog | undefined>;
380
- getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
381
- getLogsStatsAggregate(organizationId: string, projectSecureId: string, query: AggregateQuery): Promise<AggregateResult>;
382
- getLogsStatsDimensions(organizationId: string, projectSecureId: string, query: DimensionsQuery): Promise<DimensionsResult>;
383
- getSourceUsage(organizationId: string, projectSecureId: string, query: SourceQuery): Promise<SourceResult>;
384
- }
385
- type DefenderContext = {
386
- result?: {
387
- riskLevel: string;
388
- tier2Score?: number;
389
- [key: string]: unknown;
390
- };
391
- [key: string]: unknown;
392
- };
393
- type ActionInput = {
394
- actionRunId: string;
395
- actionId?: string;
396
- mode: string;
397
- connectorKey: string;
398
- connectorVersion: string;
399
- connectorOwner?: string;
400
- connectorProfileId?: string;
401
- actionType: string;
402
- category?: string;
403
- organizationId: string;
404
- projectSecureId: string;
405
- accountSecureId: string;
406
- originOwnerId?: string;
407
- originOwnerName?: string;
408
- authType?: AuthType;
409
- authId?: string;
410
- sourceType?: SourceType;
411
- userAgent?: string;
412
- ipAddress?: string;
413
- sessionId?: string;
414
- agentId?: string;
415
- transportType?: TransportType;
416
- streamType?: StreamType;
417
- isBackground?: boolean;
418
- pathParams?: unknown;
419
- queryParams?: unknown;
420
- body?: unknown;
421
- headers?: Record<string, string>;
422
- httpMethod?: string;
423
- url?: string;
424
- path?: string;
425
- resource?: string;
426
- subResource?: string;
427
- childResource?: string;
428
- startTime?: Date;
429
- };
430
- type ActionResult = {
431
- success?: boolean;
432
- statusCode?: number;
433
- message?: string;
434
- headers?: Record<string, string>;
435
- body?: unknown;
436
- defenderContext?: DefenderContext;
437
- endTime?: Date;
438
- };
439
- type StepInput = {
440
- actionRunId: string;
441
- actionMode: string;
442
- actionSuccess?: boolean;
443
- stepIndex: number;
444
- stepId: string;
445
- stepFunctionName?: string;
446
- stepFunctionVersion?: string;
447
- stepIterations?: number;
448
- organizationId: string;
449
- projectSecureId: string;
450
- accountSecureId: string;
451
- inputs?: {
452
- [key: string]: unknown;
453
- };
454
- startTime?: Date;
455
- };
456
- type StepResult = {
457
- success?: boolean;
458
- statusCode?: number;
459
- message?: string;
460
- outputs?: unknown;
461
- errors?: unknown;
462
- skipped?: boolean;
463
- endTime?: Date;
464
- };
465
- type UnifiedInput = {
466
- requestId: string;
467
- organizationId: string;
468
- projectSecureId: string;
469
- accountSecureId: string;
470
- originOwnerId?: string;
471
- originOwnerName?: string;
472
- connectorKey: string;
473
- action?: string;
474
- service?: string;
475
- mode?: string;
476
- httpMethod?: string;
477
- url?: string;
478
- path?: string;
479
- queryParams?: unknown;
480
- body?: unknown;
481
- headers?: Record<string, string>;
482
- resource?: string;
483
- subResource?: string;
484
- childResource?: string;
485
- authType?: AuthType;
486
- authId?: string;
487
- sourceType?: SourceType;
488
- userAgent?: string;
489
- ipAddress?: string;
490
- transportType?: TransportType;
491
- isBackground?: boolean;
492
- startTime?: Date;
493
- };
494
- type UnifiedResult = {
495
- success?: boolean;
496
- statusCode?: number;
497
- message?: string;
498
- headers?: Record<string, string>;
499
- body?: unknown;
500
- endTime?: Date;
501
- };
502
- type ProviderInput = {
503
- requestId: string;
504
- id: string;
505
- organizationId: string;
506
- projectSecureId: string;
507
- accountSecureId: string;
508
- originOwnerId?: string;
509
- originOwnerName?: string;
510
- connectorKey: string;
511
- action: string;
512
- service: string;
513
- mode: string;
514
- httpMethod: string;
515
- url: string;
516
- path?: string;
517
- queryParams?: unknown;
518
- headers?: Record<string, string>;
519
- body?: unknown;
520
- resource?: string;
521
- subResource?: string;
522
- childResource?: string;
523
- startTime?: Date;
524
- };
525
- type ProviderResult = {
526
- success?: boolean;
527
- statusCode?: number;
528
- headers?: Record<string, string>;
529
- body?: unknown;
530
- errors?: unknown;
531
- endTime?: Date;
532
- };
533
- //#endregion
534
- //#region ../olap/src/logs/types.d.ts
535
- declare const LogType: {
536
- readonly Action: "action";
537
- readonly Step: "step";
538
- readonly Unified: "unified";
539
- readonly Provider: "provider";
540
- };
541
- type LogType = (typeof LogType)[keyof typeof LogType];
542
- type Query = {
543
- organizationId?: string | string[];
544
- projectSecureId?: string | string[];
545
- actionRunId?: string | string[];
546
- accountSecureId?: string | string[];
547
- actionId?: string | string[];
548
- connectorKey?: string | string[];
549
- mode?: string | string[];
550
- category?: string | string[];
551
- requestId?: string | string[];
552
- provider?: string | string[];
553
- service?: string | string[];
554
- resource?: string | string[];
555
- subResource?: string | string[];
556
- childResource?: string | string[];
557
- action?: string | string[];
558
- statusCode?: string | string[];
559
- sourceId?: string | string[];
560
- sourceType?: string | string[];
561
- sourceValue?: string | string[];
562
- originOwnerId?: string | string[];
563
- httpMethod?: string | string[];
564
- isBackground?: boolean;
565
- logId?: string | string[];
566
- logType?: (typeof LogType.Action | typeof LogType.Unified) | (typeof LogType.Action | typeof LogType.Unified)[];
567
- success?: boolean;
568
- startTime?: Date;
569
- endTime?: Date;
570
- pageNumber?: number;
571
- pageSize?: number;
572
- };
573
- type QueryResult = {
574
- logs: Array<ActionLog | UnifiedLog | StepLog | ProviderLog>;
575
- total: number;
576
- pageNumber: number;
577
- pageSize: number;
578
- };
579
- type ActionsQuery = {
580
- organizationId?: string | string[];
581
- projectSecureId?: string | string[];
582
- actionRunId?: string | string[];
583
- accountSecureId?: string | string[];
584
- actionId?: string | string[];
585
- connectorKey?: string | string[];
586
- mode?: string | string[];
587
- category?: string | string[];
588
- isBackground?: boolean;
589
- success?: boolean;
590
- startTime?: Date;
591
- endTime?: Date;
592
- pageNumber?: number;
593
- pageSize?: number;
594
- };
595
- type ActionsQueryResult = {
596
- actionLogs: ActionLog[];
597
- total: number;
598
- pageNumber: number;
599
- pageSize: number;
600
- };
601
- type StepsQuery = {
602
- organizationId?: string | string[];
603
- projectSecureId?: string | string[];
604
- accountSecureId?: string | string[];
605
- actionRunId?: string | string[];
606
- stepId?: string | string[];
607
- stepIndex?: number | number[];
608
- success?: boolean;
609
- startTime?: Date;
610
- endTime?: Date;
611
- pageNumber?: number;
612
- pageSize?: number;
613
- };
614
- type StepsQueryResult = {
615
- stepLogs: StepLog[];
616
- total: number;
617
- pageNumber: number;
618
- pageSize: number;
619
- };
620
- type UnifiedQuery = {
621
- organizationId?: string | string[];
622
- projectSecureId?: string | string[];
623
- accountSecureId?: string | string[];
624
- requestId?: string | string[];
625
- connectorKey?: string | string[];
626
- resource?: string | string[];
627
- source?: string | string[];
628
- category?: string | string[];
629
- originOwnerId?: string | string[];
630
- isBackground?: boolean;
631
- success?: boolean;
632
- startTime?: Date;
633
- endTime?: Date;
634
- pageNumber?: number;
635
- pageSize?: number;
636
- };
637
- type UnifiedQueryResult = {
638
- unifiedLogs: UnifiedLog[];
639
- total: number;
640
- pageNumber: number;
641
- pageSize: number;
642
- };
643
- type ProviderQuery = {
644
- organizationId?: string | string[];
645
- projectSecureId?: string | string[];
646
- accountSecureId?: string | string[];
647
- requestId?: string | string[];
648
- id?: string | string[];
649
- success?: boolean;
650
- startTime?: Date;
651
- endTime?: Date;
652
- pageNumber?: number;
653
- pageSize?: number;
654
- };
655
- type ProviderQueryResult = {
656
- providerLogs: ProviderLog[];
657
- total: number;
658
- pageNumber: number;
659
- pageSize: number;
660
- };
661
- type IntervalType = 'minute' | 'hour' | 'day' | 'week' | 'month';
662
- declare const Dimension: {
663
- readonly ConnectorKey: "connector_key";
664
- readonly Success: "success";
665
- readonly ActionType: "action_type";
666
- readonly Mode: "mode";
667
- readonly Service: "service";
668
- readonly Resource: "resource";
669
- readonly ActionId: "action_id";
670
- readonly HttpMethod: "http_method";
671
- readonly AccountSecureId: "account_secure_id";
672
- readonly SourceType: "source_type";
673
- readonly StatusCode: "status_code";
674
- readonly OriginOwnerId: "origin_owner_id";
675
- readonly SourceId: "source_id";
676
- readonly IsBackground: "is_background";
677
- };
678
- type Dimension = (typeof Dimension)[keyof typeof Dimension];
679
- type AggregateQuery = Partial<Query> & {
680
- dimensions?: Dimension[];
681
- intervalType?: IntervalType;
682
- intervalPeriod?: number;
683
- };
684
- type AggregateResult = {
685
- data: Array<{
686
- start_time?: string;
687
- count: number;
688
- [dimension: string]: unknown;
689
- }>;
690
- };
691
- type DimensionsQuery = Partial<Query> & {
692
- dimensions: Dimension[];
693
- maxValues?: number;
694
- };
695
- type DimensionsResult = {
696
- [dimension: string]: Array<{
697
- value: string;
698
- count: number;
699
- }>;
700
- };
701
- type SourceQuery = Partial<Query>;
702
- type SourceResult = Array<{
703
- sourceId: string;
704
- sourceType: string;
705
- requestCount: number;
706
- lastRequest: string;
707
- }>;
708
- interface ILog {
709
- logType: LogType;
710
- eventTime: Date;
711
- startTime: Date;
712
- endTime?: Date;
713
- durationMs?: number;
714
- organizationId: string;
715
- projectSecureId?: string;
716
- accountSecureId?: string;
717
- }
718
- type ActionLog = ILog & {
719
- logType: typeof LogType.Action;
720
- actionRunId: string;
721
- actionId: string;
722
- connectorKey: string;
723
- connectorVersion: string;
724
- connectorOwner?: string;
725
- connectorProfileId?: string;
726
- organizationId: string;
727
- projectSecureId: string;
728
- accountSecureId: string;
729
- actionType?: string;
730
- mode?: string;
731
- category?: string;
732
- originOwnerId?: string;
733
- originOwnerName?: string;
734
- httpMethod?: string;
735
- url?: string;
736
- sourceType?: SourceType;
737
- sourceId?: string;
738
- sourceValue?: string;
739
- authType?: AuthType;
740
- authId?: string;
741
- userAgent?: string;
742
- ipAddress?: string;
743
- sessionId?: string;
744
- agentId?: string;
745
- transportType?: TransportType;
746
- streamType?: StreamType;
747
- isBackground?: boolean;
748
- success?: boolean;
749
- statusCode?: number;
750
- riskLevel?: string;
751
- tier2Score?: number;
752
- advancedExpiresAt?: Date;
753
- defenderExpiresAt?: Date;
754
- };
755
- type StepLog = ILog & {
756
- logType: typeof LogType.Step;
757
- actionRunId: string;
758
- stepIndex: number;
759
- stepId: string;
760
- stepFunctionName?: string;
761
- stepFunctionVersion?: string;
762
- stepIterations?: number;
763
- organizationId: string;
764
- projectSecureId: string;
765
- accountSecureId: string;
766
- skipped?: boolean;
767
- success?: boolean;
768
- statusCode?: number;
769
- message?: string;
770
- };
771
- type UnifiedLog = ILog & {
772
- logType: typeof LogType.Unified;
773
- requestId: string;
774
- organizationId: string;
775
- projectSecureId: string;
776
- accountSecureId: string;
777
- connectorKey: string;
778
- connectorVersion?: string;
779
- mode?: string;
780
- httpMethod?: string;
781
- url?: string;
782
- path?: string;
783
- resource?: string;
784
- subResource?: string;
785
- childResource?: string;
786
- service?: string;
787
- action?: string;
788
- sourceId?: string;
789
- sourceType?: SourceType;
790
- sourceValue?: string;
791
- authType?: AuthType;
792
- authId?: string;
793
- userAgent?: string;
794
- ipAddress?: string;
795
- sessionId?: string;
796
- agentId?: string;
797
- transportType?: TransportType;
798
- streamType?: StreamType;
799
- isBackground?: boolean;
800
- originOwnerId?: string;
801
- originOwnerName?: string;
802
- statusCode?: number;
803
- success?: boolean;
804
- isWorker?: boolean;
805
- status?: number;
806
- provider?: string;
807
- eventDatetime?: Date;
808
- duration?: number;
809
- advancedExpiresAt?: Date;
810
- };
811
- type ProviderLog = ILog & {
812
- logType: typeof LogType.Provider;
813
- requestId: string;
814
- id?: string;
815
- organizationId: string;
816
- projectSecureId: string;
817
- accountSecureId: string;
818
- connectorKey: string;
819
- connectorVersion?: string;
820
- action: string;
821
- mode?: string;
822
- httpMethod: string;
823
- originOwnerId?: string;
824
- originOwnerName?: string;
825
- url: string;
826
- path?: string;
827
- resource?: string;
828
- subResource?: string;
829
- childResource?: string;
830
- service?: string;
831
- success?: boolean;
832
- statusCode?: number;
833
- isWorker?: boolean;
834
- status?: number;
835
- provider?: string;
836
- eventDatetime?: Date;
837
- duration?: number;
838
- };
839
- //#endregion
840
- //#region ../core/src/categories/types.d.ts
841
- type Category = 'hris' | 'crm' | 'ats' | 'lms' | 'marketing' | 'filestorage' | 'iam' | 'internal' | 'action';
842
- //#endregion
843
- //#region ../core/src/compositeIds/types.d.ts
844
- type ComponentConfig = {
845
- name: string;
846
- alias?: string;
847
- };
848
- type ComponentFieldConfig = {
849
- targetFieldKey: string;
850
- remote?: string;
851
- components: ComponentConfig[];
852
- };
853
- type CompositeIdentifierConnectorConfig = {
854
- enabled: boolean;
855
- version?: number;
856
- fields?: ComponentFieldConfig[];
857
- };
858
- //#endregion
859
- //#region ../core/src/exhaustivePagination/basePaginationConfig.d.ts
860
- type IteratorLocation = 'query' | 'body' | 'headers';
861
- interface BasePaginationConfig {
862
- type: string;
863
- response: {
864
- dataKey: string;
865
- };
866
- stopCondition?: string;
867
- }
868
- //#endregion
869
- //#region ../core/src/exhaustivePagination/cursorPaginationConfig.d.ts
870
- interface CursorPaginationConfig extends BasePaginationConfig {
871
- type: 'cursor';
872
- response: {
873
- dataKey: string;
874
- nextKey: string;
875
- };
876
- iterator: {
877
- key: string;
878
- in: IteratorLocation;
879
- };
880
- }
881
- //#endregion
882
- //#region ../core/src/exhaustivePagination/offsetPaginationConfig.d.ts
883
- interface OffsetPaginationConfig extends BasePaginationConfig {
884
- type: 'offset';
885
- iterator: {
886
- offsetKey: string;
887
- limitKey: string;
888
- in: IteratorLocation;
889
- defaultLimit?: number;
890
- };
891
- }
892
- //#endregion
893
- //#region ../core/src/exhaustivePagination/pagePaginationConfig.d.ts
894
- interface PagePaginationConfig extends BasePaginationConfig {
895
- type: 'page';
896
- iterator: {
897
- pageKey: string;
898
- pageSizeKey?: string;
899
- in: IteratorLocation;
900
- startPage?: number;
901
- defaultPageSize?: number;
902
- };
903
- }
904
- //#endregion
905
- //#region ../core/src/exhaustivePagination/index.d.ts
906
- type PaginationConfig = CursorPaginationConfig | OffsetPaginationConfig | PagePaginationConfig;
907
- //#endregion
908
- //#region ../core/src/incrementalSync/baseIncrementalConfig.d.ts
909
- interface BaseIncrementalConfig {
910
- type: string;
911
- iterator: {
912
- key: string;
913
- in: IteratorLocation;
914
- };
915
- }
916
- //#endregion
917
- //#region ../core/src/incrementalSync/deltaTokenConfig.d.ts
918
- interface DeltaTokenIncrementalConfig extends BaseIncrementalConfig {
919
- type: 'delta_token';
920
- response: {
921
- path: string;
922
- onlyOnFinalPage?: boolean;
923
- };
924
- }
925
- //#endregion
926
- //#region ../core/src/incrementalSync/timeFilterConfig.d.ts
927
- interface TimeFilterIncrementalConfig extends BaseIncrementalConfig {
928
- type: 'time_filter';
929
- format: 'iso8601' | 'unix_seconds' | 'unix_millis';
930
- safetyBufferSeconds?: number;
931
- }
932
- //#endregion
933
- //#region ../core/src/incrementalSync/checkpoint.d.ts
934
- type Checkpoint = {
935
- kind: 'timestamp';
936
- value: string;
937
- } | {
938
- kind: 'cursor';
939
- value: string;
940
- };
941
- //#endregion
942
- //#region ../core/src/incrementalSync/index.d.ts
943
- type IncrementalConfig = TimeFilterIncrementalConfig | DeltaTokenIncrementalConfig;
944
- //#endregion
945
- //#region ../core/src/schema/types.d.ts
946
- type Schema = {
947
- name: string;
948
- key: string;
949
- version: string;
950
- description?: string;
951
- category: Category;
952
- fields: {
953
- [name: string]: SchemaField;
954
- };
955
- };
956
- type SchemaField = {
957
- name: string;
958
- type: string;
959
- required: boolean;
960
- description?: string;
961
- };
962
- //#endregion
963
- //#region ../core/src/stepFunctions/stepFunctionsList.d.ts
964
- declare enum StepFunctionName {
965
- TYPECAST = "typecast",
966
- MAP_FIELDS = "map_fields",
967
- GROUP_DATA = "group_data",
968
- REQUEST = "request",
969
- PAGINATED_REQUEST = "paginated_request",
970
- SOAP_REQUEST = "soap_request",
971
- SOAP_PAGINATED_REQUEST = "soap_paginated_request",
972
- STATIC_VALUES = "static_values",
973
- UPLOAD_FILE = "upload_file",
974
- UPLOAD_BINARY = "upload_binary",
975
- DOWNLOAD_FILE = "download_file",
976
- EMIT_EVENT = "emit_event",
977
- BROWSER_USE = "browser_use",
978
- CODE_EXECUTION_LAMBDA = "code_execution_lambda",
979
- SIGN_JWT = "sign_jwt",
980
- }
981
- //#endregion
982
- //#region ../core/src/stepFunctions/types.d.ts
983
- type StepFunction = ({
984
- block,
985
- params
986
- }: {
987
- block: Readonly<Block>;
988
- params?: StepFunctionParams;
989
- }) => Promise<StepFunctionOutput>;
990
- type StepFunctionParams = {
991
- [key: string]: unknown;
992
- };
993
- type StepFunctionMeta = {
994
- functionName: StepFunctionName;
995
- params?: StepFunctionParams;
996
- version?: string;
997
- };
998
- type StepFunctionInstance = {
999
- fn: StepFunction;
1000
- inputSchema?: ZodType;
1001
- outputSchema?: ZodType;
1002
- };
1003
- type StreamOutputData = {
1004
- stream: Readable;
1005
- headers: HttpHeaders;
1006
- contentDisposition: string;
1007
- fileMetadata: {
1008
- contentType?: string;
1009
- contentLength?: number;
1010
- fileName?: string;
1011
- lastModified?: string;
1012
- etag?: string;
1013
- };
1014
- };
1015
- type StepFunctionOutput = {
1016
- block: Block;
1017
- successful: boolean;
1018
- errors?: StepError[];
1019
- output?: {
1020
- [name: string]: unknown;
1021
- };
1022
- streamOutput?: StreamOutputData;
1023
- };
1024
- //#endregion
1025
- //#region ../core/src/steps/types.d.ts
1026
- type StepSnapshot = {
1027
- output?: {
1028
- [name: string]: unknown;
1029
- };
1030
- successful: boolean;
1031
- skipped?: boolean;
1032
- message?: string;
1033
- errors?: StepError[];
1034
- statistics?: StepStatistics;
1035
- };
1036
- type StepsSnapshots = {
1037
- [stepId: string]: StepSnapshot;
1038
- };
1039
- type IntermediateStepsSnapshots = {
1040
- [stepId: string]: IntermediateStepSnapshot;
1041
- };
1042
- type IntermediateStepSnapshot = {
1043
- [interationIndex: number]: {
1044
- iterator?: string;
1045
- snapshot: StepSnapshot;
1046
- };
1047
- };
1048
- type StepError = {
1049
- [key: string]: unknown;
1050
- };
1051
- type BaseStep = {
1052
- id: string;
1053
- description: string;
1054
- ignoreError?: boolean;
1055
- async?: boolean;
1056
- successCriteria?: string;
1057
- condition?: string;
1058
- };
1059
- type SimpleStep = BaseStep & {
1060
- stepFunction: StepFunctionMeta;
1061
- };
1062
- type ForeachStep = BaseStep & {
1063
- iterator: string;
1064
- } & ({
1065
- stepFunction: StepFunctionMeta;
1066
- stepFunctions?: never;
1067
- } | {
1068
- stepFunction?: never;
1069
- stepFunctions: StepFunctionMeta[];
1070
- });
1071
- type Step = SimpleStep | ForeachStep;
1072
- type StepStatistics = {
1073
- startTime?: Date;
1074
- endTime?: Date;
1075
- };
1076
- //#endregion
1077
- //#region ../core/src/connector/types.d.ts
1078
- declare const ReleaseStages: readonly ["preview", "beta", "ga", "deprecated", "internal"];
1079
- type ReleaseStage = (typeof ReleaseStages)[number];
1080
- type ReleaseStages = 'preview' | 'beta' | 'ga' | 'deprecated' | 'internal';
1081
- type ScopeDefinition = {
1082
- name: string;
1083
- description: string;
1084
- includes?: string[];
1085
- };
1086
- type DocumentationReference = {
1087
- title: string;
1088
- url: string;
1089
- description?: string;
1090
- };
1091
- type ConnectorDocumentation = {
1092
- references: DocumentationReference[];
1093
- };
1094
- type EventRouterRule = {
1095
- when: string;
1096
- then: {
1097
- action: string;
1098
- input?: Record<string, unknown>;
1099
- };
1100
- };
1101
- type EventRouter = {
1102
- rules: EventRouterRule[];
1103
- };
1104
- type EventToEmit = {
1105
- eventType: string;
1106
- eventId?: string;
1107
- eventDate?: string;
1108
- data?: unknown;
1109
- };
1110
- type WebhookSetupPhaseKind = 'creation' | 'activation' | 'deletion';
1111
- type WebhookSetupPhase = {
1112
- steps: {
1113
- [stepId: string]: Step;
1114
- };
1115
- result?: string;
1116
- };
1117
- type WebhookSetup = {
1118
- creation: WebhookSetupPhase;
1119
- activation?: WebhookSetupPhase;
1120
- deletion: WebhookSetupPhase;
1121
- isConsolidated?: boolean;
1122
- };
1123
- type EventGuides = {
1124
- setup?: Guide;
1125
- };
1126
- type ConnectorEvents = {
1127
- setup?: WebhookSetup;
1128
- guides?: EventGuides;
1129
- actions?: {
1130
- [actionId: string]: Action;
1131
- };
1132
- router?: EventRouter;
1133
- externalAccountIdExtractor?: Action;
1134
- };
1135
- type Connector = {
1136
- title: string;
1137
- version: string;
1138
- key: string;
1139
- assets: Assets;
1140
- resources?: string;
1141
- documentation?: ConnectorDocumentation;
1142
- description: string;
1143
- details?: string;
1144
- categories?: Category[];
1145
- scopeDefinitions?: {
1146
- [scopeName: string]: ScopeDefinition;
1147
- };
1148
- authentication?: Authentication;
1149
- actions?: {
1150
- [actionId: string]: Action;
1151
- };
1152
- events?: ConnectorEvents;
1153
- rateLimit?: RateLimitConfig;
1154
- concurrency?: ConcurrencyConfig;
1155
- releaseStage?: ReleaseStage;
1156
- forkedFrom?: string;
1157
- owner?: string;
1158
- };
1159
- type Assets = {
1160
- icon: string;
1161
- };
1162
- type ActionType = 'list' | 'get' | 'create' | 'update' | 'delete' | 'custom' | 'refresh_token' | 'test' | 'event' | 'unknown';
1163
- type InputLocation = 'body' | 'query' | 'path' | 'headers';
1164
- type EnumOneOf = {
1165
- values: string[];
1166
- } | {
1167
- ref: string;
1168
- };
1169
- type InputFormat = 'email' | 'url' | 'uuid' | 'date' | 'datetime' | 'uri';
1170
- type InputRules = {
1171
- minLength?: number;
1172
- maxLength?: number;
1173
- pattern?: string;
1174
- format?: InputFormat;
1175
- min?: number;
1176
- max?: number;
1177
- errorMessage?: string;
1178
- };
1179
- type Input = {
1180
- name: string;
1181
- type: 'string' | 'number' | 'boolean' | 'datetime_string' | 'object' | 'enum';
1182
- required: boolean;
1183
- description: string;
1184
- in: InputLocation;
1185
- array?: boolean;
1186
- properties?: Omit<Input, 'in'>[];
1187
- oneOf?: EnumOneOf;
1188
- rules?: InputRules;
1189
- };
1190
- type RequiredIfCondition = {
1191
- field: string;
1192
- equals?: string;
1193
- notEquals?: string;
1194
- present?: boolean;
1195
- };
1196
- type AtLeastOneOfRule = {
1197
- rule: 'atLeastOneOf';
1198
- fields: string[];
1199
- errorMessage?: string;
1200
- };
1201
- type RequiredIfRule = {
1202
- rule: 'requiredIf';
1203
- field: string;
1204
- condition: RequiredIfCondition;
1205
- errorMessage?: string;
1206
- };
1207
- type MutuallyExclusiveRule = {
1208
- rule: 'mutuallyExclusive';
1209
- fields: string[];
1210
- errorMessage?: string;
1211
- };
1212
- type ActionValidationRule = AtLeastOneOfRule | RequiredIfRule | MutuallyExclusiveRule;
1213
- type ActionExample = {
1214
- exampleDescription?: string;
1215
- [key: string]: unknown;
1216
- };
1217
- declare const ExecutionModes: readonly ["sync", "async"];
1218
- type ExecutionMode = (typeof ExecutionModes)[number];
1219
- type Action = {
1220
- id: string;
1221
- categories: Category[];
1222
- label: string;
1223
- description: string;
1224
- details?: string;
1225
- examples?: ActionExample[];
1226
- schema?: Schema;
1227
- schemaType: 'native' | 'unified';
1228
- endpoint?: string;
1229
- resources?: string;
1230
- actionType: ActionType;
1231
- executionMode?: ExecutionMode;
1232
- tags?: string[];
1233
- releaseStage?: ReleaseStage;
1234
- entrypointUrl?: string;
1235
- entrypointHttpMethod?: HttpMethod;
1236
- inputs?: Input[];
1237
- validationRules?: ActionValidationRule[];
1238
- requiredScopes?: string[];
1239
- steps: {
1240
- [stepId: string]: Step;
1241
- };
1242
- result?: string | Record<string, unknown>;
1243
- responses: {
1244
- success: ActionResponse;
1245
- errors: Record<number, ActionResponse>;
1246
- };
1247
- cursor: {
1248
- enabled: boolean;
1249
- pageSize: number;
1250
- };
1251
- compositeIdentifiers: CompositeIdentifierConnectorConfig;
1252
- dataSync?: DataSyncConfig;
1253
- providerEvents?: string[];
1254
- requiresManualSetup?: boolean;
1255
- };
1256
- type DataSyncConfig = {
1257
- allowed: boolean;
1258
- indexField: string | string[];
1259
- dataKey?: string;
1260
- pagination?: PaginationConfig;
1261
- incremental?: IncrementalConfig;
1262
- maxPages?: number;
1263
- maxDurationMinutes?: number;
1264
- };
1265
- type ActionResponse = {
1266
- statusCode: number;
1267
- description?: string;
1268
- };
1269
- type AuthenticationNoticeTop = {
1270
- key: string;
1271
- type: 'warning' | 'info';
1272
- description: string;
1273
- position?: 'top';
1274
- anchor?: string;
1275
- };
1276
- type AuthenticationNoticeBottom = {
1277
- key: string;
1278
- type: 'warning' | 'info';
1279
- description: string;
1280
- position: 'bottom';
1281
- };
1282
- type AuthenticationNotice = AuthenticationNoticeTop | AuthenticationNoticeBottom;
1283
- type AuthenticationFieldBase = {
1284
- key: string;
1285
- label: string;
1286
- required: boolean;
1287
- secret: boolean;
1288
- readOnly: boolean;
1289
- placeholder?: string;
1290
- description?: string;
1291
- tooltip?: string;
1292
- externalSystemAccountIdentifier?: boolean;
1293
- value?: string;
1294
- computed?: boolean;
1295
- };
1296
- type AuthenticationField = (AuthenticationFieldBase & {
1297
- type: 'text' | 'password' | 'text_area';
1298
- options?: never;
1299
- }) | (AuthenticationFieldBase & {
1300
- type: 'select';
1301
- options: {
1302
- value: string;
1303
- label: string;
1304
- }[];
1305
- });
1306
- type SupportConfig = {
1307
- link?: string;
1308
- description?: string;
1309
- guides?: AuthenticationGuides;
1310
- };
1311
- type TestActionConfig = {
1312
- action: Action;
1313
- condition?: string;
1314
- required: boolean;
1315
- };
1316
- type GuideImage = {
1317
- src: string;
1318
- alt: string;
1319
- };
1320
- type GuideStep = {
1321
- title: string;
1322
- content: string;
1323
- list?: string[];
1324
- image?: GuideImage;
1325
- displayScopes?: boolean;
1326
- applicableScopes?: string[];
1327
- };
1328
- type GuideSection = {
1329
- title: string;
1330
- content: string;
1331
- list?: string[];
1332
- image?: GuideImage;
1333
- steps?: GuideStep[];
1334
- applicableScopes?: string[];
1335
- };
1336
- type Guide = {
1337
- warning?: string;
1338
- sections: GuideSection[];
1339
- };
1340
- type AuthenticationGuides = {
1341
- config?: Guide;
1342
- setup?: Guide;
1343
- };
1344
- type AuthorizationDefinition = {
1345
- type: 'none';
1346
- signing?: SigningOptions;
1347
- [authParam: string]: unknown;
1348
- } | {
1349
- type: 'basic';
1350
- [authParam: string]: unknown;
1351
- } | {
1352
- type: 'bearer';
1353
- [authParam: string]: unknown;
1354
- } | {
1355
- type: 'oauth2';
1356
- [authParam: string]: unknown;
1357
- };
1358
- type AuthenticationConfig = {
1359
- envKey: string;
1360
- envName: string;
1361
- type: 'custom' | 'oauth2';
1362
- grantType?: 'authorization_code' | 'client_credentials';
1363
- label: string;
1364
- authorization: AuthorizationDefinition;
1365
- requiredScopes?: string[];
1366
- support?: SupportConfig;
1367
- configFields?: AuthenticationField[];
1368
- configNotices?: AuthenticationNotice[];
1369
- setupFields?: AuthenticationField[];
1370
- setupNotices?: AuthenticationNotice[];
1371
- refreshAuthentication?: {
1372
- schedule?: string;
1373
- action: Action;
1374
- };
1375
- testActions?: TestActionConfig[];
1376
- };
1377
- type Authentication = {
1378
- [authType: string]: {
1379
- production: AuthenticationConfig;
1380
- [envKey: string]: AuthenticationConfig;
1381
- };
1382
- };
1383
- //#endregion
1384
- //#region ../core/src/cursor/types.d.ts
1385
- type Position = {
1386
- pageNumber?: number | null;
1387
- providerPageCursor?: string | null;
1388
- position?: number | null;
1389
- };
1390
- type Cursor = {
1391
- remote: Record<number, Position>;
1392
- version: number;
1393
- timestamp: number;
1394
- };
1395
- //#endregion
1396
- //#region ../core/src/settings/types.d.ts
1397
- type Settings = {
1398
- olap: OlapSettings;
1399
- defender?: DefenderSettings;
1400
- };
1401
- type OlapSettings = {
1402
- logs?: {
1403
- enabled: boolean;
1404
- };
1405
- advanced?: {
1406
- enabled?: boolean;
1407
- ttl?: number;
1408
- errorsOnly?: boolean;
1409
- includeBackground?: boolean;
1410
- };
1411
- };
1412
- type DefenderSettings = {
1413
- enabled: boolean;
1414
- blockHighRisk?: boolean;
1415
- highRiskThreshold?: number;
1416
- mediumRiskThreshold?: number;
1417
- useTier1Classification?: boolean;
1418
- useTier2Classification?: boolean;
1419
- largeResponseBehavior?: 'skip' | 'block' | 'scan_anyway';
1420
- maxResponseSize?: number;
1421
- maxResponseWords?: number;
1422
- tier2Fields?: string[];
1423
- useSfe?: boolean;
1424
- annotateBoundary?: boolean;
1425
- multiheadEnabled?: boolean;
1426
- };
1427
- //#endregion
1428
- //#region ../core/src/source/types.d.ts
1429
- declare const SourceType: {
1430
- readonly RequestTester: "REQUEST_TESTER";
1431
- readonly ActionTester: "ACTION_TESTER";
1432
- readonly Dashboard: "DASHBOARD";
1433
- readonly Playground: "PLAYGROUND";
1434
- readonly SDK: "SDK";
1435
- readonly API: "API";
1436
- readonly Scheduler: "SCHEDULER";
1437
- readonly Webhook: "WEBHOOK";
1438
- readonly Agent: "AGENT";
1439
- readonly DataSync: "DATA_SYNC";
1440
- readonly Internal: "INTERNAL";
1441
- };
1442
- type SourceType = (typeof SourceType)[keyof typeof SourceType];
1443
- declare const TransportType: {
1444
- readonly HTTP: "HTTP";
1445
- readonly MCP: "MCP";
1446
- readonly ActionRPC: "ACTION_RPC";
1447
- readonly WebSocket: "WEBSOCKET";
1448
- };
1449
- type TransportType = (typeof TransportType)[keyof typeof TransportType];
1450
- declare const StreamType: {
1451
- readonly HTTP: "HTTP";
1452
- readonly WebSocket: "WEBSOCKET";
1453
- readonly SSE: "SSE";
1454
- };
1455
- type StreamType = (typeof StreamType)[keyof typeof StreamType] | null;
1456
- declare const AuthType: {
1457
- readonly APIKey: "API_KEY";
1458
- readonly SessionToken: "SESSION_TOKEN";
1459
- readonly UserSession: "USER_SESSION";
1460
- readonly Cookie: "COOKIE";
1461
- readonly Webhook: "WEBHOOK";
1462
- readonly Signature: "SIGNATURE";
1463
- };
1464
- type AuthType = (typeof AuthType)[keyof typeof AuthType];
1465
- type Source = {
1466
- sourceType?: SourceType;
1467
- sourceId?: string;
1468
- userAgent?: string;
1469
- ipAddress?: string;
1470
- sessionId?: string;
1471
- agentId?: string;
1472
- transportType?: TransportType;
1473
- streamType?: StreamType;
1474
- authType?: AuthType;
1475
- authId?: string;
1476
- sourceValue?: string;
1477
- };
1478
- //#endregion
1479
- //#region ../core/src/blocks/types.d.ts
1480
- type Block = {
1481
- inputs?: {
1482
- [key: string]: unknown;
1483
- };
1484
- connector?: Connector;
1485
- context: BlockContext;
1486
- debug?: DebugParams;
1487
- steps?: StepsSnapshots;
1488
- intermediateSteps?: IntermediateStepsSnapshots;
1489
- httpClient?: IHttpClient;
1490
- olapClient?: IOlapClient;
1491
- emitEvent?: (event: EventToEmit) => Promise<void>;
1492
- settings?: Settings;
1493
- logger?: ILogger;
1494
- action?: Action;
1495
- credentials?: Credentials;
1496
- scopes?: string[];
1497
- outputs?: unknown;
1498
- streamOutput?: StreamOutputData;
1499
- nextCursor?: Cursor | null;
1500
- response?: {
1501
- statusCode: number;
1502
- successful: boolean;
1503
- message?: string;
1504
- };
1505
- statistics?: BlockStatistics;
1506
- defenderMetadata?: DefenderMetadata;
1507
- iterator?: {
1508
- item: unknown;
1509
- index: number;
1510
- current?: unknown;
1511
- };
1512
- fieldConfigs?: FieldConfig[];
1513
- result?: BlockIndexedRecord[] | BlockIndexedRecord;
1514
- };
1515
- type FlowType = 'action' | 'refresh_authentication' | 'test_action';
1516
- type BlockContext = {
1517
- organizationId?: string;
1518
- projectSecureId: string;
1519
- accountSecureId: string;
1520
- connectorKey: string;
1521
- connectorVersion: string;
1522
- connectorOwner?: string;
1523
- connectorProfileId?: string;
1524
- category: Category;
1525
- schema?: string;
1526
- actionType: ActionType;
1527
- authenticationType: string;
1528
- environment: string;
1529
- actionRunId?: string;
1530
- originOwnerId?: string;
1531
- originOwnerName?: string;
1532
- sourceType?: SourceType;
1533
- authType?: AuthType;
1534
- authId?: string;
1535
- sessionId?: string;
1536
- agentId?: string;
1537
- userAgent?: string;
1538
- ipAddress?: string;
1539
- transportType?: TransportType;
1540
- streamType?: StreamType;
1541
- flowType?: FlowType;
1542
- sourceId?: string;
1543
- sourceValue?: string;
1544
- service: string;
1545
- resource: string;
1546
- subResource?: string;
1547
- childResource?: string;
1548
- };
1549
- type BlockIndexedRecord = {
1550
- id: string;
1551
- remote_id?: string;
1552
- [key: string]: unknown;
1553
- unified_custom_fields?: {
1554
- [key: string]: unknown;
1555
- };
1556
- };
1557
- type EnumMatcherExpression = {
1558
- matchExpression: string;
1559
- value: string;
1560
- };
1561
- type FieldConfig = {
1562
- expression?: string;
1563
- values?: unknown;
1564
- targetFieldKey: string;
1565
- alias?: string;
1566
- type: string;
1567
- custom: boolean;
1568
- hidden: boolean;
1569
- array: boolean;
1570
- enumMapper?: {
1571
- matcher: string | EnumMatcherExpression[];
1572
- };
1573
- properties?: FieldConfig[];
1574
- requiredScopes?: string[];
1575
- };
1576
- type DebugParams = {
1577
- custom_mappings?: 'disabled' | 'enabled';
1578
- };
1579
- type Credentials = Record<string, unknown>;
1580
- type BlockStatistics = {
1581
- startTime?: Date;
1582
- endTime?: Date;
1583
- };
1584
- type DefenderMetadata = {
1585
- applied: boolean;
1586
- result?: {
1587
- allowed: boolean;
1588
- riskLevel: 'low' | 'medium' | 'high' | 'critical';
1589
- fieldsSanitized: string[];
1590
- patternsByField: Record<string, string[]>;
1591
- detections: string[];
1592
- tier2Score?: number;
1593
- tier2RawScore?: number;
1594
- tier2AuxScore?: number;
1595
- tier2MultiheadBlocked?: boolean;
1596
- tier2SkipReason?: string;
1597
- latencyMs: number;
1598
- };
1599
- skipped?: {
1600
- reason: 'streaming' | 'size_limit' | 'disabled' | 'error';
1601
- estimatedSize?: number;
1602
- threshold?: number;
1603
- error?: string;
1604
- };
1605
- };
1606
- //#endregion
1607
- //#region ../core/src/stepFunctions/factory.d.ts
1608
- declare const StepFunctionsFactory: {
1609
- build({
1610
- functionName,
1611
- version,
1612
- validateSchemas,
1613
- stepFunctionsList
1614
- }: {
1615
- functionName: StepFunctionName;
1616
- version?: string;
1617
- validateSchemas?: boolean;
1618
- stepFunctionsList?: Record<string, Record<string, StepFunctionInstance>>;
1619
- }): StepFunctionInstance;
1620
- };
1621
- //#endregion
1622
- //#region ../core/src/accounts/types.d.ts
1623
- type Account = {
1624
- providerKey: string;
1625
- providerVersion: string;
1626
- connectorOwner?: string;
1627
- connectorProfileId?: string;
1628
- authConfigKey: string;
1629
- environment: string;
1630
- organizationId: string;
1631
- secureId: string;
1632
- credentials?: Record<string, unknown>;
1633
- projectSecureId: string;
1634
- originOwnerId?: string;
1635
- originOwnerName?: string;
1636
- };
7
+ //#region \0rolldown/runtime.js
1637
8
  //#endregion
1638
9
  //#region src/blocks/createBlock.d.ts
1639
10
  declare const createBlock: ({