@n8n/api-types 1.37.1 → 1.37.3

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.
@@ -9,6 +9,7 @@ export type InstanceAiCredits = {
9
9
  export declare const AI_GATEWAY_MANAGED_TAG = "__AI_GATEWAY_MANAGED__";
10
10
  export declare function buildRunWorkflowSessionGrantKey(workflowId: string): string;
11
11
  export declare function buildUpdateWorkflowSessionGrantKey(workflowId: string): string;
12
+ export declare function buildCredentialDestinationGrantKey(workflowId: string, origin: string): string;
12
13
  export declare function buildDataTablesSessionGrantKey(action: string): string;
13
14
  export declare function buildSetupSkipGrantKey(subject: string): string;
14
15
  export declare function parseSetupSkipGrants(keys: ReadonlySet<string>): Set<string>;
@@ -313,6 +314,7 @@ export declare const credentialSetupHintSchema: z.ZodObject<{
313
314
  testUrl: z.ZodOptional<z.ZodString>;
314
315
  acceptedStatusCodes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
315
316
  serviceHost: z.ZodOptional<z.ZodString>;
317
+ serviceOrigin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
316
318
  }, "strip", z.ZodTypeAny, {
317
319
  template: {
318
320
  headers?: Record<string, string> | undefined;
@@ -331,6 +333,7 @@ export declare const credentialSetupHintSchema: z.ZodObject<{
331
333
  testUrl?: string | undefined;
332
334
  acceptedStatusCodes?: number[] | undefined;
333
335
  serviceHost?: string | undefined;
336
+ serviceOrigin?: string | undefined;
334
337
  }, {
335
338
  template: {
336
339
  headers?: Record<string, string> | undefined;
@@ -349,6 +352,7 @@ export declare const credentialSetupHintSchema: z.ZodObject<{
349
352
  testUrl?: string | undefined;
350
353
  acceptedStatusCodes?: number[] | undefined;
351
354
  serviceHost?: string | undefined;
355
+ serviceOrigin?: string | undefined;
352
356
  }>;
353
357
  export type InstanceAiCredentialSetupHint = z.infer<typeof credentialSetupHintSchema>;
354
358
  export declare const credentialRequestSchema: z.ZodObject<{
@@ -403,6 +407,7 @@ export declare const credentialRequestSchema: z.ZodObject<{
403
407
  testUrl: z.ZodOptional<z.ZodString>;
404
408
  acceptedStatusCodes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
405
409
  serviceHost: z.ZodOptional<z.ZodString>;
410
+ serviceOrigin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
406
411
  }, "strip", z.ZodTypeAny, {
407
412
  template: {
408
413
  headers?: Record<string, string> | undefined;
@@ -421,6 +426,7 @@ export declare const credentialRequestSchema: z.ZodObject<{
421
426
  testUrl?: string | undefined;
422
427
  acceptedStatusCodes?: number[] | undefined;
423
428
  serviceHost?: string | undefined;
429
+ serviceOrigin?: string | undefined;
424
430
  }, {
425
431
  template: {
426
432
  headers?: Record<string, string> | undefined;
@@ -439,6 +445,7 @@ export declare const credentialRequestSchema: z.ZodObject<{
439
445
  testUrl?: string | undefined;
440
446
  acceptedStatusCodes?: number[] | undefined;
441
447
  serviceHost?: string | undefined;
448
+ serviceOrigin?: string | undefined;
442
449
  }>>;
443
450
  preferNew: z.ZodOptional<z.ZodBoolean>;
444
451
  }, "strip", z.ZodTypeAny, {
@@ -467,6 +474,7 @@ export declare const credentialRequestSchema: z.ZodObject<{
467
474
  testUrl?: string | undefined;
468
475
  acceptedStatusCodes?: number[] | undefined;
469
476
  serviceHost?: string | undefined;
477
+ serviceOrigin?: string | undefined;
470
478
  } | undefined;
471
479
  preferNew?: boolean | undefined;
472
480
  }, {
@@ -495,6 +503,7 @@ export declare const credentialRequestSchema: z.ZodObject<{
495
503
  testUrl?: string | undefined;
496
504
  acceptedStatusCodes?: number[] | undefined;
497
505
  serviceHost?: string | undefined;
506
+ serviceOrigin?: string | undefined;
498
507
  } | undefined;
499
508
  preferNew?: boolean | undefined;
500
509
  }>;
@@ -507,6 +516,26 @@ export declare const credentialFlowSchema: z.ZodObject<{
507
516
  stage: "finalize" | "generic";
508
517
  }>;
509
518
  export type InstanceAiCredentialFlow = z.infer<typeof credentialFlowSchema>;
519
+ export declare const credentialDestinationSchema: z.ZodObject<{
520
+ origin: z.ZodEffects<z.ZodString, string, string>;
521
+ nodeNames: z.ZodArray<z.ZodString, "many">;
522
+ }, "strip", z.ZodTypeAny, {
523
+ origin: string;
524
+ nodeNames: string[];
525
+ }, {
526
+ origin: string;
527
+ nodeNames: string[];
528
+ }>;
529
+ export type InstanceAiCredentialDestination = z.infer<typeof credentialDestinationSchema>;
530
+ export declare const credentialDestinationDecisionSchema: z.ZodObject<Pick<{
531
+ origin: z.ZodEffects<z.ZodString, string, string>;
532
+ nodeNames: z.ZodArray<z.ZodString, "many">;
533
+ }, "origin">, "strip", z.ZodTypeAny, {
534
+ origin: string;
535
+ }, {
536
+ origin: string;
537
+ }>;
538
+ export type InstanceAiCredentialDestinationDecision = z.infer<typeof credentialDestinationDecisionSchema>;
510
539
  export declare const workflowSetupNodeSchema: z.ZodObject<{
511
540
  node: z.ZodObject<{
512
541
  name: z.ZodString;
@@ -617,6 +646,7 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
617
646
  testUrl: z.ZodOptional<z.ZodString>;
618
647
  acceptedStatusCodes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
619
648
  serviceHost: z.ZodOptional<z.ZodString>;
649
+ serviceOrigin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
620
650
  }, "strip", z.ZodTypeAny, {
621
651
  template: {
622
652
  headers?: Record<string, string> | undefined;
@@ -635,6 +665,7 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
635
665
  testUrl?: string | undefined;
636
666
  acceptedStatusCodes?: number[] | undefined;
637
667
  serviceHost?: string | undefined;
668
+ serviceOrigin?: string | undefined;
638
669
  }, {
639
670
  template: {
640
671
  headers?: Record<string, string> | undefined;
@@ -653,6 +684,7 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
653
684
  testUrl?: string | undefined;
654
685
  acceptedStatusCodes?: number[] | undefined;
655
686
  serviceHost?: string | undefined;
687
+ serviceOrigin?: string | undefined;
656
688
  }>>;
657
689
  isTrigger: z.ZodBoolean;
658
690
  isFirstTrigger: z.ZodOptional<z.ZodBoolean>;
@@ -775,6 +807,7 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
775
807
  testUrl?: string | undefined;
776
808
  acceptedStatusCodes?: number[] | undefined;
777
809
  serviceHost?: string | undefined;
810
+ serviceOrigin?: string | undefined;
778
811
  } | undefined;
779
812
  isTrigger: boolean;
780
813
  isFirstTrigger?: boolean | undefined;
@@ -849,6 +882,7 @@ export declare const workflowSetupNodeSchema: z.ZodObject<{
849
882
  testUrl?: string | undefined;
850
883
  acceptedStatusCodes?: number[] | undefined;
851
884
  serviceHost?: string | undefined;
885
+ serviceOrigin?: string | undefined;
852
886
  } | undefined;
853
887
  isTrigger: boolean;
854
888
  isFirstTrigger?: boolean | undefined;
@@ -1163,6 +1197,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1163
1197
  testUrl: z.ZodOptional<z.ZodString>;
1164
1198
  acceptedStatusCodes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1165
1199
  serviceHost: z.ZodOptional<z.ZodString>;
1200
+ serviceOrigin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1166
1201
  }, "strip", z.ZodTypeAny, {
1167
1202
  template: {
1168
1203
  headers?: Record<string, string> | undefined;
@@ -1181,6 +1216,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1181
1216
  testUrl?: string | undefined;
1182
1217
  acceptedStatusCodes?: number[] | undefined;
1183
1218
  serviceHost?: string | undefined;
1219
+ serviceOrigin?: string | undefined;
1184
1220
  }, {
1185
1221
  template: {
1186
1222
  headers?: Record<string, string> | undefined;
@@ -1199,6 +1235,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1199
1235
  testUrl?: string | undefined;
1200
1236
  acceptedStatusCodes?: number[] | undefined;
1201
1237
  serviceHost?: string | undefined;
1238
+ serviceOrigin?: string | undefined;
1202
1239
  }>>;
1203
1240
  preferNew: z.ZodOptional<z.ZodBoolean>;
1204
1241
  }, "strip", z.ZodTypeAny, {
@@ -1227,6 +1264,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1227
1264
  testUrl?: string | undefined;
1228
1265
  acceptedStatusCodes?: number[] | undefined;
1229
1266
  serviceHost?: string | undefined;
1267
+ serviceOrigin?: string | undefined;
1230
1268
  } | undefined;
1231
1269
  preferNew?: boolean | undefined;
1232
1270
  }, {
@@ -1255,6 +1293,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1255
1293
  testUrl?: string | undefined;
1256
1294
  acceptedStatusCodes?: number[] | undefined;
1257
1295
  serviceHost?: string | undefined;
1296
+ serviceOrigin?: string | undefined;
1258
1297
  } | undefined;
1259
1298
  preferNew?: boolean | undefined;
1260
1299
  }>, "many">>;
@@ -1362,6 +1401,16 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1362
1401
  }, {
1363
1402
  stage: "finalize" | "generic";
1364
1403
  }>>;
1404
+ credentialDestination: z.ZodOptional<z.ZodObject<{
1405
+ origin: z.ZodEffects<z.ZodString, string, string>;
1406
+ nodeNames: z.ZodArray<z.ZodString, "many">;
1407
+ }, "strip", z.ZodTypeAny, {
1408
+ origin: string;
1409
+ nodeNames: string[];
1410
+ }, {
1411
+ origin: string;
1412
+ nodeNames: string[];
1413
+ }>>;
1365
1414
  setupRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
1366
1415
  node: z.ZodObject<{
1367
1416
  name: z.ZodString;
@@ -1472,6 +1521,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1472
1521
  testUrl: z.ZodOptional<z.ZodString>;
1473
1522
  acceptedStatusCodes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1474
1523
  serviceHost: z.ZodOptional<z.ZodString>;
1524
+ serviceOrigin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1475
1525
  }, "strip", z.ZodTypeAny, {
1476
1526
  template: {
1477
1527
  headers?: Record<string, string> | undefined;
@@ -1490,6 +1540,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1490
1540
  testUrl?: string | undefined;
1491
1541
  acceptedStatusCodes?: number[] | undefined;
1492
1542
  serviceHost?: string | undefined;
1543
+ serviceOrigin?: string | undefined;
1493
1544
  }, {
1494
1545
  template: {
1495
1546
  headers?: Record<string, string> | undefined;
@@ -1508,6 +1559,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1508
1559
  testUrl?: string | undefined;
1509
1560
  acceptedStatusCodes?: number[] | undefined;
1510
1561
  serviceHost?: string | undefined;
1562
+ serviceOrigin?: string | undefined;
1511
1563
  }>>;
1512
1564
  isTrigger: z.ZodBoolean;
1513
1565
  isFirstTrigger: z.ZodOptional<z.ZodBoolean>;
@@ -1630,6 +1682,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1630
1682
  testUrl?: string | undefined;
1631
1683
  acceptedStatusCodes?: number[] | undefined;
1632
1684
  serviceHost?: string | undefined;
1685
+ serviceOrigin?: string | undefined;
1633
1686
  } | undefined;
1634
1687
  isTrigger: boolean;
1635
1688
  isFirstTrigger?: boolean | undefined;
@@ -1704,6 +1757,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1704
1757
  testUrl?: string | undefined;
1705
1758
  acceptedStatusCodes?: number[] | undefined;
1706
1759
  serviceHost?: string | undefined;
1760
+ serviceOrigin?: string | undefined;
1707
1761
  } | undefined;
1708
1762
  isTrigger: boolean;
1709
1763
  isFirstTrigger?: boolean | undefined;
@@ -1838,6 +1892,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1838
1892
  testUrl?: string | undefined;
1839
1893
  acceptedStatusCodes?: number[] | undefined;
1840
1894
  serviceHost?: string | undefined;
1895
+ serviceOrigin?: string | undefined;
1841
1896
  } | undefined;
1842
1897
  preferNew?: boolean | undefined;
1843
1898
  }[] | undefined;
@@ -1879,6 +1934,10 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1879
1934
  credentialFlow?: {
1880
1935
  stage: "finalize" | "generic";
1881
1936
  } | undefined;
1937
+ credentialDestination?: {
1938
+ origin: string;
1939
+ nodeNames: string[];
1940
+ } | undefined;
1882
1941
  setupRequests?: {
1883
1942
  node: {
1884
1943
  name: string;
@@ -1919,6 +1978,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
1919
1978
  testUrl?: string | undefined;
1920
1979
  acceptedStatusCodes?: number[] | undefined;
1921
1980
  serviceHost?: string | undefined;
1981
+ serviceOrigin?: string | undefined;
1922
1982
  } | undefined;
1923
1983
  isTrigger: boolean;
1924
1984
  isFirstTrigger?: boolean | undefined;
@@ -2012,6 +2072,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
2012
2072
  testUrl?: string | undefined;
2013
2073
  acceptedStatusCodes?: number[] | undefined;
2014
2074
  serviceHost?: string | undefined;
2075
+ serviceOrigin?: string | undefined;
2015
2076
  } | undefined;
2016
2077
  preferNew?: boolean | undefined;
2017
2078
  }[] | undefined;
@@ -2053,6 +2114,10 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
2053
2114
  credentialFlow?: {
2054
2115
  stage: "finalize" | "generic";
2055
2116
  } | undefined;
2117
+ credentialDestination?: {
2118
+ origin: string;
2119
+ nodeNames: string[];
2120
+ } | undefined;
2056
2121
  setupRequests?: {
2057
2122
  node: {
2058
2123
  name: string;
@@ -2093,6 +2158,7 @@ export declare const confirmationRequestPayloadSchema: z.ZodObject<{
2093
2158
  testUrl?: string | undefined;
2094
2159
  acceptedStatusCodes?: number[] | undefined;
2095
2160
  serviceHost?: string | undefined;
2161
+ serviceOrigin?: string | undefined;
2096
2162
  } | undefined;
2097
2163
  isTrigger: boolean;
2098
2164
  isFirstTrigger?: boolean | undefined;
@@ -3591,6 +3657,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3591
3657
  testUrl: z.ZodOptional<z.ZodString>;
3592
3658
  acceptedStatusCodes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
3593
3659
  serviceHost: z.ZodOptional<z.ZodString>;
3660
+ serviceOrigin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3594
3661
  }, "strip", z.ZodTypeAny, {
3595
3662
  template: {
3596
3663
  headers?: Record<string, string> | undefined;
@@ -3609,6 +3676,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3609
3676
  testUrl?: string | undefined;
3610
3677
  acceptedStatusCodes?: number[] | undefined;
3611
3678
  serviceHost?: string | undefined;
3679
+ serviceOrigin?: string | undefined;
3612
3680
  }, {
3613
3681
  template: {
3614
3682
  headers?: Record<string, string> | undefined;
@@ -3627,6 +3695,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3627
3695
  testUrl?: string | undefined;
3628
3696
  acceptedStatusCodes?: number[] | undefined;
3629
3697
  serviceHost?: string | undefined;
3698
+ serviceOrigin?: string | undefined;
3630
3699
  }>>;
3631
3700
  preferNew: z.ZodOptional<z.ZodBoolean>;
3632
3701
  }, "strip", z.ZodTypeAny, {
@@ -3655,6 +3724,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3655
3724
  testUrl?: string | undefined;
3656
3725
  acceptedStatusCodes?: number[] | undefined;
3657
3726
  serviceHost?: string | undefined;
3727
+ serviceOrigin?: string | undefined;
3658
3728
  } | undefined;
3659
3729
  preferNew?: boolean | undefined;
3660
3730
  }, {
@@ -3683,6 +3753,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3683
3753
  testUrl?: string | undefined;
3684
3754
  acceptedStatusCodes?: number[] | undefined;
3685
3755
  serviceHost?: string | undefined;
3756
+ serviceOrigin?: string | undefined;
3686
3757
  } | undefined;
3687
3758
  preferNew?: boolean | undefined;
3688
3759
  }>, "many">>;
@@ -3790,6 +3861,16 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3790
3861
  }, {
3791
3862
  stage: "finalize" | "generic";
3792
3863
  }>>;
3864
+ credentialDestination: z.ZodOptional<z.ZodObject<{
3865
+ origin: z.ZodEffects<z.ZodString, string, string>;
3866
+ nodeNames: z.ZodArray<z.ZodString, "many">;
3867
+ }, "strip", z.ZodTypeAny, {
3868
+ origin: string;
3869
+ nodeNames: string[];
3870
+ }, {
3871
+ origin: string;
3872
+ nodeNames: string[];
3873
+ }>>;
3793
3874
  setupRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
3794
3875
  node: z.ZodObject<{
3795
3876
  name: z.ZodString;
@@ -3900,6 +3981,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3900
3981
  testUrl: z.ZodOptional<z.ZodString>;
3901
3982
  acceptedStatusCodes: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
3902
3983
  serviceHost: z.ZodOptional<z.ZodString>;
3984
+ serviceOrigin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
3903
3985
  }, "strip", z.ZodTypeAny, {
3904
3986
  template: {
3905
3987
  headers?: Record<string, string> | undefined;
@@ -3918,6 +4000,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3918
4000
  testUrl?: string | undefined;
3919
4001
  acceptedStatusCodes?: number[] | undefined;
3920
4002
  serviceHost?: string | undefined;
4003
+ serviceOrigin?: string | undefined;
3921
4004
  }, {
3922
4005
  template: {
3923
4006
  headers?: Record<string, string> | undefined;
@@ -3936,6 +4019,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
3936
4019
  testUrl?: string | undefined;
3937
4020
  acceptedStatusCodes?: number[] | undefined;
3938
4021
  serviceHost?: string | undefined;
4022
+ serviceOrigin?: string | undefined;
3939
4023
  }>>;
3940
4024
  isTrigger: z.ZodBoolean;
3941
4025
  isFirstTrigger: z.ZodOptional<z.ZodBoolean>;
@@ -4058,6 +4142,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4058
4142
  testUrl?: string | undefined;
4059
4143
  acceptedStatusCodes?: number[] | undefined;
4060
4144
  serviceHost?: string | undefined;
4145
+ serviceOrigin?: string | undefined;
4061
4146
  } | undefined;
4062
4147
  isTrigger: boolean;
4063
4148
  isFirstTrigger?: boolean | undefined;
@@ -4132,6 +4217,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4132
4217
  testUrl?: string | undefined;
4133
4218
  acceptedStatusCodes?: number[] | undefined;
4134
4219
  serviceHost?: string | undefined;
4220
+ serviceOrigin?: string | undefined;
4135
4221
  } | undefined;
4136
4222
  isTrigger: boolean;
4137
4223
  isFirstTrigger?: boolean | undefined;
@@ -4266,6 +4352,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4266
4352
  testUrl?: string | undefined;
4267
4353
  acceptedStatusCodes?: number[] | undefined;
4268
4354
  serviceHost?: string | undefined;
4355
+ serviceOrigin?: string | undefined;
4269
4356
  } | undefined;
4270
4357
  preferNew?: boolean | undefined;
4271
4358
  }[] | undefined;
@@ -4307,6 +4394,10 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4307
4394
  credentialFlow?: {
4308
4395
  stage: "finalize" | "generic";
4309
4396
  } | undefined;
4397
+ credentialDestination?: {
4398
+ origin: string;
4399
+ nodeNames: string[];
4400
+ } | undefined;
4310
4401
  setupRequests?: {
4311
4402
  node: {
4312
4403
  name: string;
@@ -4347,6 +4438,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4347
4438
  testUrl?: string | undefined;
4348
4439
  acceptedStatusCodes?: number[] | undefined;
4349
4440
  serviceHost?: string | undefined;
4441
+ serviceOrigin?: string | undefined;
4350
4442
  } | undefined;
4351
4443
  isTrigger: boolean;
4352
4444
  isFirstTrigger?: boolean | undefined;
@@ -4440,6 +4532,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4440
4532
  testUrl?: string | undefined;
4441
4533
  acceptedStatusCodes?: number[] | undefined;
4442
4534
  serviceHost?: string | undefined;
4535
+ serviceOrigin?: string | undefined;
4443
4536
  } | undefined;
4444
4537
  preferNew?: boolean | undefined;
4445
4538
  }[] | undefined;
@@ -4481,6 +4574,10 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4481
4574
  credentialFlow?: {
4482
4575
  stage: "finalize" | "generic";
4483
4576
  } | undefined;
4577
+ credentialDestination?: {
4578
+ origin: string;
4579
+ nodeNames: string[];
4580
+ } | undefined;
4484
4581
  setupRequests?: {
4485
4582
  node: {
4486
4583
  name: string;
@@ -4521,6 +4618,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4521
4618
  testUrl?: string | undefined;
4522
4619
  acceptedStatusCodes?: number[] | undefined;
4523
4620
  serviceHost?: string | undefined;
4621
+ serviceOrigin?: string | undefined;
4524
4622
  } | undefined;
4525
4623
  isTrigger: boolean;
4526
4624
  isFirstTrigger?: boolean | undefined;
@@ -4622,6 +4720,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4622
4720
  testUrl?: string | undefined;
4623
4721
  acceptedStatusCodes?: number[] | undefined;
4624
4722
  serviceHost?: string | undefined;
4723
+ serviceOrigin?: string | undefined;
4625
4724
  } | undefined;
4626
4725
  preferNew?: boolean | undefined;
4627
4726
  }[] | undefined;
@@ -4663,6 +4762,10 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4663
4762
  credentialFlow?: {
4664
4763
  stage: "finalize" | "generic";
4665
4764
  } | undefined;
4765
+ credentialDestination?: {
4766
+ origin: string;
4767
+ nodeNames: string[];
4768
+ } | undefined;
4666
4769
  setupRequests?: {
4667
4770
  node: {
4668
4771
  name: string;
@@ -4703,6 +4806,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4703
4806
  testUrl?: string | undefined;
4704
4807
  acceptedStatusCodes?: number[] | undefined;
4705
4808
  serviceHost?: string | undefined;
4809
+ serviceOrigin?: string | undefined;
4706
4810
  } | undefined;
4707
4811
  isTrigger: boolean;
4708
4812
  isFirstTrigger?: boolean | undefined;
@@ -4804,6 +4908,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4804
4908
  testUrl?: string | undefined;
4805
4909
  acceptedStatusCodes?: number[] | undefined;
4806
4910
  serviceHost?: string | undefined;
4911
+ serviceOrigin?: string | undefined;
4807
4912
  } | undefined;
4808
4913
  preferNew?: boolean | undefined;
4809
4914
  }[] | undefined;
@@ -4845,6 +4950,10 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4845
4950
  credentialFlow?: {
4846
4951
  stage: "finalize" | "generic";
4847
4952
  } | undefined;
4953
+ credentialDestination?: {
4954
+ origin: string;
4955
+ nodeNames: string[];
4956
+ } | undefined;
4848
4957
  setupRequests?: {
4849
4958
  node: {
4850
4959
  name: string;
@@ -4885,6 +4994,7 @@ export declare const instanceAiEventSchema: z.ZodDiscriminatedUnion<"type", [z.Z
4885
4994
  testUrl?: string | undefined;
4886
4995
  acceptedStatusCodes?: number[] | undefined;
4887
4996
  serviceHost?: string | undefined;
4997
+ serviceOrigin?: string | undefined;
4888
4998
  } | undefined;
4889
4999
  isTrigger: boolean;
4890
5000
  isFirstTrigger?: boolean | undefined;
@@ -6337,35 +6447,9 @@ export declare class InstanceAiThreadMessagesQuery extends InstanceAiThreadMessa
6337
6447
  export interface InstanceAiSendMessageResponse {
6338
6448
  runId: string;
6339
6449
  }
6340
- export interface InstanceAiConfirmation {
6341
- requestId: string;
6342
- inputThreadId?: string;
6343
- severity: InstanceAiConfirmationSeverity;
6344
- message: string;
6345
- targetApproval?: InstanceAiTargetApproval;
6346
- credentialRequests?: InstanceAiCredentialRequest[];
6347
- requireUserSelection?: boolean;
6348
- projectId?: string;
6349
- inputType?: 'approval' | 'text' | 'questions' | 'plan-review' | 'resource-decision' | 'continue';
6350
- domainAccess?: DomainAccessMeta;
6351
- webSearch?: WebSearchMeta;
6352
- credentialFlow?: InstanceAiCredentialFlow;
6353
- setupRequests?: InstanceAiWorkflowSetupNode[];
6354
- workflowId?: string;
6355
- planItems?: PlannedTaskArg[];
6356
- questions?: Array<{
6357
- id: string;
6358
- question: string;
6359
- type: 'single' | 'multi' | 'text';
6360
- options?: string[];
6361
- }>;
6362
- introMessage?: string;
6363
- tasks?: TaskList;
6364
- resourceDecision?: GatewayConfirmationRequiredPayload;
6365
- channelConfig?: InstanceAiChannelConfig;
6366
- mcpConnectRequest?: InstanceAiMcpConnectRequest;
6450
+ export type InstanceAiConfirmation = Omit<InstanceAiConfirmationRequestPayload, 'toolCallId' | 'toolName' | 'args'> & {
6367
6451
  expired?: boolean;
6368
- }
6452
+ };
6369
6453
  export interface InstanceAiToolCallState {
6370
6454
  toolCallId: string;
6371
6455
  toolName: string;
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.errorPayloadSchema = exports.INSTANCE_AI_ERROR_CODES = exports.statusPayloadSchema = exports.confirmationRequestPayloadSchema = exports.instanceAiTargetApprovalSchema = exports.confirmationInputTypeSchema = exports.mcpConnectResumeSchema = exports.mcpConnectRequestSchema = exports.mcpConnectServerSchema = exports.channelConfigSchema = exports.gatewayConfirmationRequiredPayloadSchema = exports.gatewayConfirmationRequiredWirePayloadSchema = exports.instanceGatewayResourceDecisionSchema = exports.GATEWAY_CONFIRMATION_REQUIRED_PREFIX = exports.plannedTaskArgSchema = exports.taskListSchema = exports.taskItemSchema = exports.workflowSetupNodeSchema = exports.credentialFlowSchema = exports.credentialRequestSchema = exports.credentialSetupHintSchema = exports.credentialPlaceholderDefSchema = exports.GENERIC_AUTH_CREDENTIAL_TYPES = exports.TEMPLATED_CUSTOM_AUTH_CREDENTIAL_TYPE = exports.toolErrorPayloadSchema = exports.toolResultPayloadSchema = exports.toolInputStartPayloadSchema = exports.toolCallPayloadSchema = exports.reasoningDeltaPayloadSchema = exports.textDeltaPayloadSchema = exports.agentCompletedPayloadSchema = exports.agentSpawnedPayloadSchema = exports.agentSpawnedTargetResourceSchema = exports.runFinishPayloadSchema = exports.runStartPayloadSchema = exports.UNSAFE_OBJECT_KEYS = exports.webSearchMetaSchema = exports.domainAccessMetaSchema = exports.domainAccessActionSchema = exports.instanceAiAgentKindSchema = exports.instanceAiAgentStatusSchema = exports.instanceAiApprovalResumeSchema = exports.instanceAiConfirmationSeveritySchema = exports.instanceAiRunStatusSchema = exports.INSTANCE_AI_EPHEMERAL_EVENT_TYPES = exports.instanceAiEventTypeSchema = exports.WEB_SEARCH_GRANT_KEY = exports.FETCH_URL_ALLOW_ALL_GRANT_KEY = exports.AI_GATEWAY_MANAGED_TAG = exports.UNLIMITED_CREDITS = void 0;
4
- exports.InstanceAiVerifySearchRequest = exports.InstanceAiVerifySandboxRequest = exports.InstanceAiVerifyModelRequest = exports.instanceAiVerificationFailureSchema = exports.InstanceAiAdminSettingsUpdateRequest = exports.instanceAiConnectionSchema = exports.INSTANCE_AI_CATALOG_PROVIDERS = exports.INSTANCE_AI_SEARCH_CREDENTIAL_TYPES = exports.INSTANCE_AI_MODEL_CREDENTIAL_TYPES = exports.instanceAiSandboxProviderSchema = exports.DEFAULT_INSTANCE_AI_PERMISSIONS = exports.INSTANCE_AI_MEMORY_TASK_WAIT_TIMEOUT_MS = exports.InstanceAiThreadMessagesQuery = exports.INSTANCE_AI_THREAD_MESSAGES_MAX_PAGE = exports.INSTANCE_AI_THREAD_MESSAGES_MAX_LIMIT = exports.INSTANCE_AI_THREAD_MESSAGES_DEFAULT_LIMIT = exports.InstanceAiEventsQuery = exports.InstanceAiGatewayEventsQuery = exports.instanceAiGatewayKeySchema = exports.InstanceAiEnsureThreadRequest = exports.INSTANCE_AI_THREAD_ORIGINS = exports.INSTANCE_AI_THREAD_SOURCE_FALLBACK = exports.INSTANCE_AI_THREAD_SOURCES = exports.InstanceAiCorrectTaskRequest = exports.InstanceAiSendMessageRequest = exports.instanceAiHandoffContextSchema = exports.instanceAiAgentPreviewHandoffContextSchema = exports.instanceAiCredentialHandoffContextSchema = exports.instanceAiAttachmentSchema = exports.instanceAiResourceAttachmentSchema = exports.instanceAiNodesAttachmentSchema = exports.instanceAiAgentAttachmentSchema = exports.instanceAiWorkflowAttachmentSchema = exports.instanceAiFileAttachmentSchema = exports.MAX_TOTAL_ATTACHMENT_DECODED_BYTES = exports.MAX_ATTACHMENT_DECODED_BYTES = exports.MAX_TOTAL_ATTACHMENT_BASE64_BYTES = exports.MAX_ATTACHMENT_BASE64_BYTES = exports.instanceAiEventSchema = exports.threadTitleUpdatedPayloadSchema = exports.tasksUpdatePayloadSchema = exports.InstanceAiFilesystemResponseDto = exports.filesystemRequestPayloadSchema = exports.InstanceAiGatewayCreateCredentialDto = exports.InstanceAiGatewayCapabilitiesDto = exports.toolCategorySchema = exports.mcpToolCallResultSchema = exports.mcpToolCallRequestSchema = exports.mcpToolSchema = exports.mcpToolAnnotationsSchema = void 0;
5
- exports.InstanceAiEvalSeedDataTableRowsRequest = exports.InstanceAiEvalRestoreThreadRequest = exports.instanceAiEvalSeedAgentSchema = exports.instanceAiEvalSeedDataTableSchema = exports.InstanceAiEvalCredentialAllowlistRequest = exports.InstanceAiEvalAgentExecutionRequest = exports.InstanceAiEvalExecutionRequest = exports.CANVAS_NODE_CONTEXT_FLAG = exports.INSTANCE_AI_MCP_CONNECTIONS_ENABLED_VARIANT = exports.INSTANCE_AI_MCP_CONNECTIONS_FLAG = exports.CONFIG_EVALUATIONS_ENABLED_VARIANT = exports.CONFIG_EVALUATIONS_FLAG = exports.EVAL_VENDOR_SDK_INTERCEPTION_FLAG = exports.InstanceAiUserPreferencesUpdateRequest = void 0;
3
+ exports.statusPayloadSchema = exports.confirmationRequestPayloadSchema = exports.instanceAiTargetApprovalSchema = exports.confirmationInputTypeSchema = exports.mcpConnectResumeSchema = exports.mcpConnectRequestSchema = exports.mcpConnectServerSchema = exports.channelConfigSchema = exports.gatewayConfirmationRequiredPayloadSchema = exports.gatewayConfirmationRequiredWirePayloadSchema = exports.instanceGatewayResourceDecisionSchema = exports.GATEWAY_CONFIRMATION_REQUIRED_PREFIX = exports.plannedTaskArgSchema = exports.taskListSchema = exports.taskItemSchema = exports.workflowSetupNodeSchema = exports.credentialDestinationDecisionSchema = exports.credentialDestinationSchema = exports.credentialFlowSchema = exports.credentialRequestSchema = exports.credentialSetupHintSchema = exports.credentialPlaceholderDefSchema = exports.GENERIC_AUTH_CREDENTIAL_TYPES = exports.TEMPLATED_CUSTOM_AUTH_CREDENTIAL_TYPE = exports.toolErrorPayloadSchema = exports.toolResultPayloadSchema = exports.toolInputStartPayloadSchema = exports.toolCallPayloadSchema = exports.reasoningDeltaPayloadSchema = exports.textDeltaPayloadSchema = exports.agentCompletedPayloadSchema = exports.agentSpawnedPayloadSchema = exports.agentSpawnedTargetResourceSchema = exports.runFinishPayloadSchema = exports.runStartPayloadSchema = exports.UNSAFE_OBJECT_KEYS = exports.webSearchMetaSchema = exports.domainAccessMetaSchema = exports.domainAccessActionSchema = exports.instanceAiAgentKindSchema = exports.instanceAiAgentStatusSchema = exports.instanceAiApprovalResumeSchema = exports.instanceAiConfirmationSeveritySchema = exports.instanceAiRunStatusSchema = exports.INSTANCE_AI_EPHEMERAL_EVENT_TYPES = exports.instanceAiEventTypeSchema = exports.WEB_SEARCH_GRANT_KEY = exports.FETCH_URL_ALLOW_ALL_GRANT_KEY = exports.AI_GATEWAY_MANAGED_TAG = exports.UNLIMITED_CREDITS = void 0;
4
+ exports.InstanceAiVerifyModelRequest = exports.instanceAiVerificationFailureSchema = exports.InstanceAiAdminSettingsUpdateRequest = exports.instanceAiConnectionSchema = exports.INSTANCE_AI_CATALOG_PROVIDERS = exports.INSTANCE_AI_SEARCH_CREDENTIAL_TYPES = exports.INSTANCE_AI_MODEL_CREDENTIAL_TYPES = exports.instanceAiSandboxProviderSchema = exports.DEFAULT_INSTANCE_AI_PERMISSIONS = exports.INSTANCE_AI_MEMORY_TASK_WAIT_TIMEOUT_MS = exports.InstanceAiThreadMessagesQuery = exports.INSTANCE_AI_THREAD_MESSAGES_MAX_PAGE = exports.INSTANCE_AI_THREAD_MESSAGES_MAX_LIMIT = exports.INSTANCE_AI_THREAD_MESSAGES_DEFAULT_LIMIT = exports.InstanceAiEventsQuery = exports.InstanceAiGatewayEventsQuery = exports.instanceAiGatewayKeySchema = exports.InstanceAiEnsureThreadRequest = exports.INSTANCE_AI_THREAD_ORIGINS = exports.INSTANCE_AI_THREAD_SOURCE_FALLBACK = exports.INSTANCE_AI_THREAD_SOURCES = exports.InstanceAiCorrectTaskRequest = exports.InstanceAiSendMessageRequest = exports.instanceAiHandoffContextSchema = exports.instanceAiAgentPreviewHandoffContextSchema = exports.instanceAiCredentialHandoffContextSchema = exports.instanceAiAttachmentSchema = exports.instanceAiResourceAttachmentSchema = exports.instanceAiNodesAttachmentSchema = exports.instanceAiAgentAttachmentSchema = exports.instanceAiWorkflowAttachmentSchema = exports.instanceAiFileAttachmentSchema = exports.MAX_TOTAL_ATTACHMENT_DECODED_BYTES = exports.MAX_ATTACHMENT_DECODED_BYTES = exports.MAX_TOTAL_ATTACHMENT_BASE64_BYTES = exports.MAX_ATTACHMENT_BASE64_BYTES = exports.instanceAiEventSchema = exports.threadTitleUpdatedPayloadSchema = exports.tasksUpdatePayloadSchema = exports.InstanceAiFilesystemResponseDto = exports.filesystemRequestPayloadSchema = exports.InstanceAiGatewayCreateCredentialDto = exports.InstanceAiGatewayCapabilitiesDto = exports.toolCategorySchema = exports.mcpToolCallResultSchema = exports.mcpToolCallRequestSchema = exports.mcpToolSchema = exports.mcpToolAnnotationsSchema = exports.errorPayloadSchema = exports.INSTANCE_AI_ERROR_CODES = void 0;
5
+ exports.InstanceAiEvalSeedDataTableRowsRequest = exports.InstanceAiEvalRestoreThreadRequest = exports.instanceAiEvalSeedAgentSchema = exports.instanceAiEvalSeedDataTableSchema = exports.InstanceAiEvalCredentialAllowlistRequest = exports.InstanceAiEvalAgentExecutionRequest = exports.InstanceAiEvalExecutionRequest = exports.CANVAS_NODE_CONTEXT_FLAG = exports.INSTANCE_AI_MCP_CONNECTIONS_ENABLED_VARIANT = exports.INSTANCE_AI_MCP_CONNECTIONS_FLAG = exports.CONFIG_EVALUATIONS_ENABLED_VARIANT = exports.CONFIG_EVALUATIONS_FLAG = exports.EVAL_VENDOR_SDK_INTERCEPTION_FLAG = exports.InstanceAiUserPreferencesUpdateRequest = exports.InstanceAiVerifySearchRequest = exports.InstanceAiVerifySandboxRequest = void 0;
6
6
  exports.buildRunWorkflowSessionGrantKey = buildRunWorkflowSessionGrantKey;
7
7
  exports.buildUpdateWorkflowSessionGrantKey = buildUpdateWorkflowSessionGrantKey;
8
+ exports.buildCredentialDestinationGrantKey = buildCredentialDestinationGrantKey;
8
9
  exports.buildDataTablesSessionGrantKey = buildDataTablesSessionGrantKey;
9
10
  exports.buildSetupSkipGrantKey = buildSetupSkipGrantKey;
10
11
  exports.parseSetupSkipGrants = parseSetupSkipGrants;
@@ -35,6 +36,9 @@ function buildRunWorkflowSessionGrantKey(workflowId) {
35
36
  function buildUpdateWorkflowSessionGrantKey(workflowId) {
36
37
  return `workflows:update:${workflowId}`;
37
38
  }
39
+ function buildCredentialDestinationGrantKey(workflowId, origin) {
40
+ return `credential-destination:${encodeURIComponent(workflowId)}:${encodeURIComponent(origin)}`;
41
+ }
38
42
  function buildDataTablesSessionGrantKey(action) {
39
43
  return `data-tables:${action}`;
40
44
  }
@@ -211,6 +215,18 @@ exports.credentialPlaceholderDefSchema = zod_1.z.object({
211
215
  type: zod_1.z.enum(['password', 'plain']).optional(),
212
216
  optional: zod_1.z.boolean().optional(),
213
217
  });
218
+ const exactHttpOriginSchema = zod_1.z
219
+ .string()
220
+ .max(300)
221
+ .refine((value) => {
222
+ try {
223
+ const url = new URL(value);
224
+ return ['http:', 'https:'].includes(url.protocol) && url.origin === value;
225
+ }
226
+ catch {
227
+ return false;
228
+ }
229
+ }, 'Expected an exact HTTP origin');
214
230
  exports.credentialSetupHintSchema = zod_1.z.object({
215
231
  template: zod_1.z.object({
216
232
  headers: zod_1.z.record(zod_1.z.string()).optional(),
@@ -223,6 +239,7 @@ exports.credentialSetupHintSchema = zod_1.z.object({
223
239
  testUrl: zod_1.z.string().optional(),
224
240
  acceptedStatusCodes: zod_1.z.array(zod_1.z.number().int()).max(10).optional(),
225
241
  serviceHost: zod_1.z.string().optional(),
242
+ serviceOrigin: exactHttpOriginSchema.optional(),
226
243
  });
227
244
  exports.credentialRequestSchema = zod_1.z.object({
228
245
  credentialType: zod_1.z.string(),
@@ -235,6 +252,13 @@ exports.credentialRequestSchema = zod_1.z.object({
235
252
  exports.credentialFlowSchema = zod_1.z.object({
236
253
  stage: zod_1.z.enum(['generic', 'finalize']),
237
254
  });
255
+ exports.credentialDestinationSchema = zod_1.z.object({
256
+ origin: exactHttpOriginSchema,
257
+ nodeNames: zod_1.z.array(zod_1.z.string().trim().min(1).max(255)).min(1),
258
+ });
259
+ exports.credentialDestinationDecisionSchema = exports.credentialDestinationSchema.pick({
260
+ origin: true,
261
+ });
238
262
  exports.workflowSetupNodeSchema = zod_1.z.object({
239
263
  node: zod_1.z.object({
240
264
  name: zod_1.z.string(),
@@ -426,6 +450,9 @@ exports.confirmationRequestPayloadSchema = zod_1.z.object({
426
450
  credentialFlow: exports.credentialFlowSchema
427
451
  .optional()
428
452
  .describe('Credential flow stage — finalize renders post-verification credential picker with different copy'),
453
+ credentialDestination: exports.credentialDestinationSchema
454
+ .optional()
455
+ .describe('Exact destination that must be approved before a workflow credential setup card opens'),
429
456
  setupRequests: zod_1.z
430
457
  .array(exports.workflowSetupNodeSchema)
431
458
  .optional()