@stackone/connect-sdk 2.46.0 → 2.48.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 +141 -12
- package/dist/index.d.mts +141 -12
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -345,6 +345,28 @@ type DefenderLog = {
|
|
|
345
345
|
};
|
|
346
346
|
//#endregion
|
|
347
347
|
//#region ../olap/src/logs/types.d.ts
|
|
348
|
+
type Query = {
|
|
349
|
+
organizationId?: string | string[];
|
|
350
|
+
projectSecureId?: string | string[];
|
|
351
|
+
actionRunId?: string | string[];
|
|
352
|
+
accountSecureId?: string | string[];
|
|
353
|
+
actionId?: string | string[];
|
|
354
|
+
connectorKey?: string | string[];
|
|
355
|
+
mode?: string | string[];
|
|
356
|
+
category?: string | string[];
|
|
357
|
+
logType?: ('action' | 'unified') | ('action' | 'unified')[];
|
|
358
|
+
success?: boolean;
|
|
359
|
+
startTime?: Date;
|
|
360
|
+
endTime?: Date;
|
|
361
|
+
pageNumber?: number;
|
|
362
|
+
pageSize?: number;
|
|
363
|
+
};
|
|
364
|
+
type QueryResult = {
|
|
365
|
+
logs: Array<ActionLog | UnifiedLog | StepLog | ProviderLog>;
|
|
366
|
+
total: number;
|
|
367
|
+
pageNumber: number;
|
|
368
|
+
pageSize: number;
|
|
369
|
+
};
|
|
348
370
|
type ActionsQuery = {
|
|
349
371
|
organizationId?: string | string[];
|
|
350
372
|
projectSecureId?: string | string[];
|
|
@@ -385,7 +407,58 @@ type StepsQueryResult = {
|
|
|
385
407
|
pageNumber: number;
|
|
386
408
|
pageSize: number;
|
|
387
409
|
};
|
|
388
|
-
type
|
|
410
|
+
type UnifiedQuery = {
|
|
411
|
+
organizationId?: string | string[];
|
|
412
|
+
projectSecureId?: string | string[];
|
|
413
|
+
accountSecureId?: string | string[];
|
|
414
|
+
requestId?: string | string[];
|
|
415
|
+
connectorKey?: string | string[];
|
|
416
|
+
resource?: string | string[];
|
|
417
|
+
source?: string | string[];
|
|
418
|
+
category?: string | string[];
|
|
419
|
+
originOwnerId?: string | string[];
|
|
420
|
+
success?: boolean;
|
|
421
|
+
startTime?: Date;
|
|
422
|
+
endTime?: Date;
|
|
423
|
+
pageNumber?: number;
|
|
424
|
+
pageSize?: number;
|
|
425
|
+
};
|
|
426
|
+
type UnifiedQueryResult = {
|
|
427
|
+
unifiedLogs: UnifiedLog[];
|
|
428
|
+
total: number;
|
|
429
|
+
pageNumber: number;
|
|
430
|
+
pageSize: number;
|
|
431
|
+
};
|
|
432
|
+
type ProviderQuery = {
|
|
433
|
+
organizationId?: string | string[];
|
|
434
|
+
projectSecureId?: string | string[];
|
|
435
|
+
accountSecureId?: string | string[];
|
|
436
|
+
requestId?: string | string[];
|
|
437
|
+
id?: string | string[];
|
|
438
|
+
success?: boolean;
|
|
439
|
+
startTime?: Date;
|
|
440
|
+
endTime?: Date;
|
|
441
|
+
pageNumber?: number;
|
|
442
|
+
pageSize?: number;
|
|
443
|
+
};
|
|
444
|
+
type ProviderQueryResult = {
|
|
445
|
+
providerLogs: ProviderLog[];
|
|
446
|
+
total: number;
|
|
447
|
+
pageNumber: number;
|
|
448
|
+
pageSize: number;
|
|
449
|
+
};
|
|
450
|
+
interface ILog {
|
|
451
|
+
logType: 'action' | 'step' | 'unified' | 'provider';
|
|
452
|
+
eventTime: Date;
|
|
453
|
+
startTime: Date;
|
|
454
|
+
endTime?: Date;
|
|
455
|
+
durationMs?: number;
|
|
456
|
+
organizationId: string;
|
|
457
|
+
projectSecureId?: string;
|
|
458
|
+
accountSecureId?: string;
|
|
459
|
+
}
|
|
460
|
+
type ActionLog = ILog & {
|
|
461
|
+
logType: 'action';
|
|
389
462
|
actionRunId: string;
|
|
390
463
|
actionId: string;
|
|
391
464
|
connectorKey: string;
|
|
@@ -404,14 +477,11 @@ type ActionLog = {
|
|
|
404
477
|
sourceValue?: string;
|
|
405
478
|
success?: boolean;
|
|
406
479
|
statusCode?: number;
|
|
407
|
-
startTime?: Date;
|
|
408
|
-
endTime?: Date;
|
|
409
|
-
durationMs?: number;
|
|
410
|
-
eventTime?: Date;
|
|
411
480
|
riskLevel?: string;
|
|
412
481
|
tier2Score?: number;
|
|
413
482
|
};
|
|
414
|
-
type StepLog = {
|
|
483
|
+
type StepLog = ILog & {
|
|
484
|
+
logType: 'step';
|
|
415
485
|
actionRunId: string;
|
|
416
486
|
stepIndex: number;
|
|
417
487
|
stepId: string;
|
|
@@ -421,20 +491,79 @@ type StepLog = {
|
|
|
421
491
|
skipped?: boolean;
|
|
422
492
|
success?: boolean;
|
|
423
493
|
message?: string;
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
494
|
+
};
|
|
495
|
+
type UnifiedLog = ILog & {
|
|
496
|
+
logType: 'unified';
|
|
497
|
+
requestId: string;
|
|
498
|
+
connectorKey: string;
|
|
499
|
+
connectorVersion?: string;
|
|
500
|
+
organizationId: string;
|
|
501
|
+
projectSecureId: string;
|
|
502
|
+
accountSecureId: string;
|
|
503
|
+
mode?: string;
|
|
504
|
+
httpMethod?: string;
|
|
505
|
+
url?: string;
|
|
506
|
+
path?: string;
|
|
507
|
+
resource?: string;
|
|
508
|
+
subResource?: string;
|
|
509
|
+
childResource?: string;
|
|
510
|
+
service?: string;
|
|
511
|
+
action?: string;
|
|
512
|
+
sourceId?: string;
|
|
513
|
+
sourceType?: string;
|
|
514
|
+
sourceValue?: string;
|
|
515
|
+
originOwnerId?: string;
|
|
516
|
+
originOwnerName?: string;
|
|
517
|
+
status: number;
|
|
518
|
+
success: boolean;
|
|
519
|
+
isWorker?: boolean;
|
|
520
|
+
};
|
|
521
|
+
type ProviderLog = ILog & {
|
|
522
|
+
logType: 'provider';
|
|
523
|
+
requestId: string;
|
|
524
|
+
id?: string;
|
|
525
|
+
action: string;
|
|
526
|
+
mode?: string;
|
|
527
|
+
httpMethod: string;
|
|
528
|
+
originOwnerId?: string;
|
|
529
|
+
originOwnerName?: string;
|
|
530
|
+
url: string;
|
|
531
|
+
path?: string;
|
|
532
|
+
connectorKey: string;
|
|
533
|
+
connectorVersion?: string;
|
|
534
|
+
resource: string;
|
|
535
|
+
subResource?: string;
|
|
536
|
+
childResource?: string;
|
|
537
|
+
service: string;
|
|
538
|
+
success: boolean;
|
|
539
|
+
status: number;
|
|
540
|
+
isWorker?: boolean;
|
|
541
|
+
organizationId: string;
|
|
542
|
+
projectSecureId: string;
|
|
543
|
+
accountSecureId: string;
|
|
428
544
|
};
|
|
429
545
|
//#endregion
|
|
430
546
|
//#region ../olap/src/types.d.ts
|
|
431
547
|
interface IOlapClient {
|
|
432
|
-
recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): void
|
|
433
|
-
|
|
548
|
+
recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): Promise<void>;
|
|
549
|
+
recordActions(actions: Array<{
|
|
550
|
+
input: ActionInput;
|
|
551
|
+
result: ActionResult;
|
|
552
|
+
}>, options?: OlapOptions): Promise<void>;
|
|
553
|
+
recordStep(stepInput: StepInput, stepResult: StepResult, options?: OlapOptions): Promise<void>;
|
|
554
|
+
recordSteps(steps: Array<{
|
|
555
|
+
input: StepInput;
|
|
556
|
+
result: StepResult;
|
|
557
|
+
}>, options?: OlapOptions): Promise<void>;
|
|
558
|
+
getLogs(organizationId: string, projectSecureId: string, query: Query): Promise<QueryResult>;
|
|
434
559
|
getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
|
|
435
560
|
getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
|
|
436
561
|
getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
|
|
437
562
|
getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
|
|
563
|
+
getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery): Promise<UnifiedQueryResult>;
|
|
564
|
+
getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
|
|
565
|
+
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
|
|
566
|
+
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
|
|
438
567
|
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
439
568
|
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
440
569
|
getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
|
package/dist/index.d.mts
CHANGED
|
@@ -345,6 +345,28 @@ type DefenderLog = {
|
|
|
345
345
|
};
|
|
346
346
|
//#endregion
|
|
347
347
|
//#region ../olap/src/logs/types.d.ts
|
|
348
|
+
type Query = {
|
|
349
|
+
organizationId?: string | string[];
|
|
350
|
+
projectSecureId?: string | string[];
|
|
351
|
+
actionRunId?: string | string[];
|
|
352
|
+
accountSecureId?: string | string[];
|
|
353
|
+
actionId?: string | string[];
|
|
354
|
+
connectorKey?: string | string[];
|
|
355
|
+
mode?: string | string[];
|
|
356
|
+
category?: string | string[];
|
|
357
|
+
logType?: ('action' | 'unified') | ('action' | 'unified')[];
|
|
358
|
+
success?: boolean;
|
|
359
|
+
startTime?: Date;
|
|
360
|
+
endTime?: Date;
|
|
361
|
+
pageNumber?: number;
|
|
362
|
+
pageSize?: number;
|
|
363
|
+
};
|
|
364
|
+
type QueryResult = {
|
|
365
|
+
logs: Array<ActionLog | UnifiedLog | StepLog | ProviderLog>;
|
|
366
|
+
total: number;
|
|
367
|
+
pageNumber: number;
|
|
368
|
+
pageSize: number;
|
|
369
|
+
};
|
|
348
370
|
type ActionsQuery = {
|
|
349
371
|
organizationId?: string | string[];
|
|
350
372
|
projectSecureId?: string | string[];
|
|
@@ -385,7 +407,58 @@ type StepsQueryResult = {
|
|
|
385
407
|
pageNumber: number;
|
|
386
408
|
pageSize: number;
|
|
387
409
|
};
|
|
388
|
-
type
|
|
410
|
+
type UnifiedQuery = {
|
|
411
|
+
organizationId?: string | string[];
|
|
412
|
+
projectSecureId?: string | string[];
|
|
413
|
+
accountSecureId?: string | string[];
|
|
414
|
+
requestId?: string | string[];
|
|
415
|
+
connectorKey?: string | string[];
|
|
416
|
+
resource?: string | string[];
|
|
417
|
+
source?: string | string[];
|
|
418
|
+
category?: string | string[];
|
|
419
|
+
originOwnerId?: string | string[];
|
|
420
|
+
success?: boolean;
|
|
421
|
+
startTime?: Date;
|
|
422
|
+
endTime?: Date;
|
|
423
|
+
pageNumber?: number;
|
|
424
|
+
pageSize?: number;
|
|
425
|
+
};
|
|
426
|
+
type UnifiedQueryResult = {
|
|
427
|
+
unifiedLogs: UnifiedLog[];
|
|
428
|
+
total: number;
|
|
429
|
+
pageNumber: number;
|
|
430
|
+
pageSize: number;
|
|
431
|
+
};
|
|
432
|
+
type ProviderQuery = {
|
|
433
|
+
organizationId?: string | string[];
|
|
434
|
+
projectSecureId?: string | string[];
|
|
435
|
+
accountSecureId?: string | string[];
|
|
436
|
+
requestId?: string | string[];
|
|
437
|
+
id?: string | string[];
|
|
438
|
+
success?: boolean;
|
|
439
|
+
startTime?: Date;
|
|
440
|
+
endTime?: Date;
|
|
441
|
+
pageNumber?: number;
|
|
442
|
+
pageSize?: number;
|
|
443
|
+
};
|
|
444
|
+
type ProviderQueryResult = {
|
|
445
|
+
providerLogs: ProviderLog[];
|
|
446
|
+
total: number;
|
|
447
|
+
pageNumber: number;
|
|
448
|
+
pageSize: number;
|
|
449
|
+
};
|
|
450
|
+
interface ILog {
|
|
451
|
+
logType: 'action' | 'step' | 'unified' | 'provider';
|
|
452
|
+
eventTime: Date;
|
|
453
|
+
startTime: Date;
|
|
454
|
+
endTime?: Date;
|
|
455
|
+
durationMs?: number;
|
|
456
|
+
organizationId: string;
|
|
457
|
+
projectSecureId?: string;
|
|
458
|
+
accountSecureId?: string;
|
|
459
|
+
}
|
|
460
|
+
type ActionLog = ILog & {
|
|
461
|
+
logType: 'action';
|
|
389
462
|
actionRunId: string;
|
|
390
463
|
actionId: string;
|
|
391
464
|
connectorKey: string;
|
|
@@ -404,14 +477,11 @@ type ActionLog = {
|
|
|
404
477
|
sourceValue?: string;
|
|
405
478
|
success?: boolean;
|
|
406
479
|
statusCode?: number;
|
|
407
|
-
startTime?: Date;
|
|
408
|
-
endTime?: Date;
|
|
409
|
-
durationMs?: number;
|
|
410
|
-
eventTime?: Date;
|
|
411
480
|
riskLevel?: string;
|
|
412
481
|
tier2Score?: number;
|
|
413
482
|
};
|
|
414
|
-
type StepLog = {
|
|
483
|
+
type StepLog = ILog & {
|
|
484
|
+
logType: 'step';
|
|
415
485
|
actionRunId: string;
|
|
416
486
|
stepIndex: number;
|
|
417
487
|
stepId: string;
|
|
@@ -421,20 +491,79 @@ type StepLog = {
|
|
|
421
491
|
skipped?: boolean;
|
|
422
492
|
success?: boolean;
|
|
423
493
|
message?: string;
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
494
|
+
};
|
|
495
|
+
type UnifiedLog = ILog & {
|
|
496
|
+
logType: 'unified';
|
|
497
|
+
requestId: string;
|
|
498
|
+
connectorKey: string;
|
|
499
|
+
connectorVersion?: string;
|
|
500
|
+
organizationId: string;
|
|
501
|
+
projectSecureId: string;
|
|
502
|
+
accountSecureId: string;
|
|
503
|
+
mode?: string;
|
|
504
|
+
httpMethod?: string;
|
|
505
|
+
url?: string;
|
|
506
|
+
path?: string;
|
|
507
|
+
resource?: string;
|
|
508
|
+
subResource?: string;
|
|
509
|
+
childResource?: string;
|
|
510
|
+
service?: string;
|
|
511
|
+
action?: string;
|
|
512
|
+
sourceId?: string;
|
|
513
|
+
sourceType?: string;
|
|
514
|
+
sourceValue?: string;
|
|
515
|
+
originOwnerId?: string;
|
|
516
|
+
originOwnerName?: string;
|
|
517
|
+
status: number;
|
|
518
|
+
success: boolean;
|
|
519
|
+
isWorker?: boolean;
|
|
520
|
+
};
|
|
521
|
+
type ProviderLog = ILog & {
|
|
522
|
+
logType: 'provider';
|
|
523
|
+
requestId: string;
|
|
524
|
+
id?: string;
|
|
525
|
+
action: string;
|
|
526
|
+
mode?: string;
|
|
527
|
+
httpMethod: string;
|
|
528
|
+
originOwnerId?: string;
|
|
529
|
+
originOwnerName?: string;
|
|
530
|
+
url: string;
|
|
531
|
+
path?: string;
|
|
532
|
+
connectorKey: string;
|
|
533
|
+
connectorVersion?: string;
|
|
534
|
+
resource: string;
|
|
535
|
+
subResource?: string;
|
|
536
|
+
childResource?: string;
|
|
537
|
+
service: string;
|
|
538
|
+
success: boolean;
|
|
539
|
+
status: number;
|
|
540
|
+
isWorker?: boolean;
|
|
541
|
+
organizationId: string;
|
|
542
|
+
projectSecureId: string;
|
|
543
|
+
accountSecureId: string;
|
|
428
544
|
};
|
|
429
545
|
//#endregion
|
|
430
546
|
//#region ../olap/src/types.d.ts
|
|
431
547
|
interface IOlapClient {
|
|
432
|
-
recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): void
|
|
433
|
-
|
|
548
|
+
recordAction(actionInput: ActionInput, actionResult: ActionResult, options?: OlapOptions): Promise<void>;
|
|
549
|
+
recordActions(actions: Array<{
|
|
550
|
+
input: ActionInput;
|
|
551
|
+
result: ActionResult;
|
|
552
|
+
}>, options?: OlapOptions): Promise<void>;
|
|
553
|
+
recordStep(stepInput: StepInput, stepResult: StepResult, options?: OlapOptions): Promise<void>;
|
|
554
|
+
recordSteps(steps: Array<{
|
|
555
|
+
input: StepInput;
|
|
556
|
+
result: StepResult;
|
|
557
|
+
}>, options?: OlapOptions): Promise<void>;
|
|
558
|
+
getLogs(organizationId: string, projectSecureId: string, query: Query): Promise<QueryResult>;
|
|
434
559
|
getActionLogs(organizationId: string, projectSecureId: string, query: ActionsQuery): Promise<ActionsQueryResult>;
|
|
435
560
|
getActionLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionLog | undefined>;
|
|
436
561
|
getStepLogs(organizationId: string, projectSecureId: string, query: StepsQuery): Promise<StepsQueryResult>;
|
|
437
562
|
getStepLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepLog | undefined>;
|
|
563
|
+
getUnifiedLogs(organizationId: string, projectSecureId: string, query: UnifiedQuery): Promise<UnifiedQueryResult>;
|
|
564
|
+
getUnifiedLog(organizationId: string, projectSecureId: string, requestId: string): Promise<UnifiedLog | undefined>;
|
|
565
|
+
getProviderLogs(organizationId: string, projectSecureId: string, query: ProviderQuery): Promise<ProviderQueryResult>;
|
|
566
|
+
getProviderLog(organizationId: string, projectSecureId: string, requestId: string, id: string): Promise<ProviderLog | undefined>;
|
|
438
567
|
getActionAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<ActionAdvancedLog | undefined>;
|
|
439
568
|
getStepAdvancedLog(organizationId: string, projectSecureId: string, actionRunId: string, stepIndex: number): Promise<StepAdvancedLog | undefined>;
|
|
440
569
|
getDefenderLog(organizationId: string, projectSecureId: string, actionRunId: string): Promise<DefenderLog | undefined>;
|