@membranehq/sdk 0.29.0 → 0.29.1
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/bundle.d.ts +97 -2
- package/dist/bundle.js +27 -15
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +5 -0
- package/dist/dts/accessors/integrations-accessors.d.ts +2 -0
- package/dist/dts/agent/harness-snapshot.d.ts +65 -0
- package/dist/dts/agent/harness.d.ts +107 -0
- package/dist/dts/agent/index.d.ts +6 -0
- package/dist/dts/agent/instruction.d.ts +32 -0
- package/dist/dts/agent/session.d.ts +5 -2
- package/dist/dts/agent/skill.d.ts +50 -0
- package/dist/dts/agent/tool.d.ts +8 -0
- package/dist/dts/agent/worker-contracts.d.ts +2 -0
- package/dist/dts/agent/workspace-element-context.d.ts +3 -0
- package/dist/dts/data-schema/types.d.ts +1 -1
- package/dist/dts/index.browser.d.ts +1 -0
- package/dist/dts/mcp-client/index.d.ts +76 -0
- package/dist/dts/orgs/types.d.ts +519 -1
- package/dist/dts/scenario-templates/index.d.ts +1 -0
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +18 -0
- package/dist/dts/workspace-elements/api/checkpoints-api.d.ts +1 -0
- package/dist/dts/workspace-elements/api/connections-api.d.ts +47 -0
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +9 -0
- package/dist/dts/workspace-elements/api/data-sources-api.d.ts +18 -0
- package/dist/dts/workspace-elements/api/external-api-logs-api.d.ts +9 -0
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +9 -0
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +10 -0
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +9 -0
- package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +18 -0
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +18 -0
- package/dist/dts/workspace-elements/api/flows-api.d.ts +18 -0
- package/dist/dts/workspace-elements/api/incoming-webhooks-api.d.ts +9 -0
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +18 -0
- package/dist/dts/workspace-elements/base/connection-requests/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/connections/index.d.ts +23 -0
- package/dist/dts/workspace-elements/base/connectors/auth.d.ts +6 -0
- package/dist/dts/workspace-elements/base/connectors/index.d.ts +208 -0
- package/dist/dts/workspace-elements/base/connectors/rest-api.d.ts +1 -0
- package/dist/dts/workspace-elements/base/external-event-pulls/index.d.ts +50 -0
- package/dist/dts/workspace-elements/paths.d.ts +1 -0
- package/dist/dts/workspace-elements/types.d.ts +4 -1
- package/dist/index.browser.d.mts +1518 -142
- package/dist/index.browser.d.ts +1518 -142
- package/dist/index.browser.js +418 -18
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +385 -19
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +1518 -142
- package/dist/index.node.d.ts +1518 -142
- package/dist/index.node.js +418 -18
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +385 -19
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -2
package/dist/bundle.d.ts
CHANGED
|
@@ -154,7 +154,10 @@ declare enum WorkspaceElementType {
|
|
|
154
154
|
ActionRunLogRecord = "action-run-log-record",
|
|
155
155
|
ExternalApiLogRecord = "external-api-log-record",
|
|
156
156
|
IncomingWebhookLogRecord = "incoming-webhook-log-record",
|
|
157
|
-
ConnectedProduct = "connected-product"
|
|
157
|
+
ConnectedProduct = "connected-product",
|
|
158
|
+
AgentHarness = "agent-harness",
|
|
159
|
+
AgentSkill = "agent-skill",
|
|
160
|
+
AgentInstruction = "agent-instruction"
|
|
158
161
|
}
|
|
159
162
|
declare enum WorkspaceElementState {
|
|
160
163
|
BUILDING = "BUILDING",
|
|
@@ -314,7 +317,7 @@ interface DataSchema {
|
|
|
314
317
|
};
|
|
315
318
|
items?: DataSchema;
|
|
316
319
|
additionalProperties?: boolean | DataSchema;
|
|
317
|
-
enum?: string[];
|
|
320
|
+
enum?: (string | number)[];
|
|
318
321
|
referenceRecords?: any[];
|
|
319
322
|
referenceCollection?: {
|
|
320
323
|
key?: any;
|
|
@@ -400,6 +403,10 @@ declare const FindConnectionsQuery: z.ZodObject<{
|
|
|
400
403
|
}, z.core.$strip>;
|
|
401
404
|
type FindConnectionsQuery = z.infer<typeof FindConnectionsQuery>;
|
|
402
405
|
declare const CreateConnectionRequest: z.ZodObject<{
|
|
406
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
407
|
+
connector: "connector";
|
|
408
|
+
mcp: "mcp";
|
|
409
|
+
}>>;
|
|
403
410
|
name: z.ZodOptional<z.ZodString>;
|
|
404
411
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
405
412
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
@@ -420,6 +427,10 @@ declare const CreateConnectionRequest: z.ZodObject<{
|
|
|
420
427
|
}, z.core.$strip>;
|
|
421
428
|
type CreateConnectionRequest = z.infer<typeof CreateConnectionRequest>;
|
|
422
429
|
declare const UpdateConnectionRequest: z.ZodObject<{
|
|
430
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
431
|
+
connector: "connector";
|
|
432
|
+
mcp: "mcp";
|
|
433
|
+
}>>;
|
|
423
434
|
name: z.ZodOptional<z.ZodString>;
|
|
424
435
|
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
425
436
|
authOptionKey: z.ZodOptional<z.ZodString>;
|
|
@@ -449,6 +460,10 @@ declare const ConnectionSelector: z.ZodObject<{
|
|
|
449
460
|
type ConnectionSelector = z.infer<typeof ConnectionSelector>;
|
|
450
461
|
declare const ConnectionApiResponse: z.ZodObject<{
|
|
451
462
|
id: z.ZodString;
|
|
463
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
464
|
+
connector: "connector";
|
|
465
|
+
mcp: "mcp";
|
|
466
|
+
}>>;
|
|
452
467
|
name: z.ZodString;
|
|
453
468
|
key: z.ZodOptional<z.ZodString>;
|
|
454
469
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -485,6 +500,11 @@ declare const ConnectionApiResponse: z.ZodObject<{
|
|
|
485
500
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
486
501
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
487
502
|
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
503
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
504
|
+
"provide-input": "provide-input";
|
|
505
|
+
authenticate: "authenticate";
|
|
506
|
+
reauthenticate: "reauthenticate";
|
|
507
|
+
}>>;
|
|
488
508
|
}, z.core.$strip>>;
|
|
489
509
|
userId: z.ZodString;
|
|
490
510
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -554,6 +574,10 @@ declare const ConnectionApiResponse: z.ZodObject<{
|
|
|
554
574
|
}, z.core.$strip>;
|
|
555
575
|
type ConnectionApiResponse = z.infer<typeof ConnectionApiResponse>;
|
|
556
576
|
declare const ConnectPayload: z.ZodObject<{
|
|
577
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
578
|
+
connector: "connector";
|
|
579
|
+
mcp: "mcp";
|
|
580
|
+
}>>;
|
|
557
581
|
requestId: z.ZodOptional<z.ZodString>;
|
|
558
582
|
integrationKey: z.ZodOptional<z.ZodString>;
|
|
559
583
|
integrationId: z.ZodOptional<z.ZodString>;
|
|
@@ -577,6 +601,10 @@ declare const ConnectPayload: z.ZodObject<{
|
|
|
577
601
|
}, z.core.$strip>;
|
|
578
602
|
type ConnectPayload = z.infer<typeof ConnectPayload>;
|
|
579
603
|
declare const ConnectUIOptions: z.ZodObject<{
|
|
604
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
605
|
+
connector: "connector";
|
|
606
|
+
mcp: "mcp";
|
|
607
|
+
}>>;
|
|
580
608
|
connectionId: z.ZodOptional<z.ZodString>;
|
|
581
609
|
integrationId: z.ZodOptional<z.ZodString>;
|
|
582
610
|
integrationKey: z.ZodOptional<z.ZodString>;
|
|
@@ -3686,6 +3714,10 @@ declare const FlowRunApiResponse: z.ZodObject<{
|
|
|
3686
3714
|
}, z.core.$strip>>;
|
|
3687
3715
|
connection: z.ZodOptional<z.ZodObject<{
|
|
3688
3716
|
id: z.ZodString;
|
|
3717
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
3718
|
+
connector: "connector";
|
|
3719
|
+
mcp: "mcp";
|
|
3720
|
+
}>>;
|
|
3689
3721
|
name: z.ZodString;
|
|
3690
3722
|
key: z.ZodOptional<z.ZodString>;
|
|
3691
3723
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3722,6 +3754,11 @@ declare const FlowRunApiResponse: z.ZodObject<{
|
|
|
3722
3754
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
3723
3755
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
3724
3756
|
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
3757
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
3758
|
+
"provide-input": "provide-input";
|
|
3759
|
+
authenticate: "authenticate";
|
|
3760
|
+
reauthenticate: "reauthenticate";
|
|
3761
|
+
}>>;
|
|
3725
3762
|
}, z.core.$strip>>;
|
|
3726
3763
|
userId: z.ZodString;
|
|
3727
3764
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -3892,6 +3929,10 @@ declare const FindFlowRunsResponse: z.ZodObject<{
|
|
|
3892
3929
|
}, z.core.$strip>>;
|
|
3893
3930
|
connection: z.ZodOptional<z.ZodObject<{
|
|
3894
3931
|
id: z.ZodString;
|
|
3932
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
3933
|
+
connector: "connector";
|
|
3934
|
+
mcp: "mcp";
|
|
3935
|
+
}>>;
|
|
3895
3936
|
name: z.ZodString;
|
|
3896
3937
|
key: z.ZodOptional<z.ZodString>;
|
|
3897
3938
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3928,6 +3969,11 @@ declare const FindFlowRunsResponse: z.ZodObject<{
|
|
|
3928
3969
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
3929
3970
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
3930
3971
|
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
3972
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
3973
|
+
"provide-input": "provide-input";
|
|
3974
|
+
authenticate: "authenticate";
|
|
3975
|
+
reauthenticate: "reauthenticate";
|
|
3976
|
+
}>>;
|
|
3931
3977
|
}, z.core.$strip>>;
|
|
3932
3978
|
userId: z.ZodString;
|
|
3933
3979
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -4248,6 +4294,10 @@ declare const FlowApiResponse: z.ZodObject<{
|
|
|
4248
4294
|
}, z.core.$strip>>;
|
|
4249
4295
|
connection: z.ZodOptional<z.ZodObject<{
|
|
4250
4296
|
id: z.ZodString;
|
|
4297
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
4298
|
+
connector: "connector";
|
|
4299
|
+
mcp: "mcp";
|
|
4300
|
+
}>>;
|
|
4251
4301
|
name: z.ZodString;
|
|
4252
4302
|
key: z.ZodOptional<z.ZodString>;
|
|
4253
4303
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -4284,6 +4334,11 @@ declare const FlowApiResponse: z.ZodObject<{
|
|
|
4284
4334
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
4285
4335
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
4286
4336
|
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
4337
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
4338
|
+
"provide-input": "provide-input";
|
|
4339
|
+
authenticate: "authenticate";
|
|
4340
|
+
reauthenticate: "reauthenticate";
|
|
4341
|
+
}>>;
|
|
4287
4342
|
}, z.core.$strip>>;
|
|
4288
4343
|
userId: z.ZodString;
|
|
4289
4344
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -4935,6 +4990,10 @@ declare const DataSourceApiResponse: z.ZodObject<{
|
|
|
4935
4990
|
}, z.core.$strip>>;
|
|
4936
4991
|
connection: z.ZodOptional<z.ZodObject<{
|
|
4937
4992
|
id: z.ZodString;
|
|
4993
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
4994
|
+
connector: "connector";
|
|
4995
|
+
mcp: "mcp";
|
|
4996
|
+
}>>;
|
|
4938
4997
|
name: z.ZodString;
|
|
4939
4998
|
key: z.ZodOptional<z.ZodString>;
|
|
4940
4999
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -4971,6 +5030,11 @@ declare const DataSourceApiResponse: z.ZodObject<{
|
|
|
4971
5030
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
4972
5031
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
4973
5032
|
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
5033
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
5034
|
+
"provide-input": "provide-input";
|
|
5035
|
+
authenticate: "authenticate";
|
|
5036
|
+
reauthenticate: "reauthenticate";
|
|
5037
|
+
}>>;
|
|
4974
5038
|
}, z.core.$strip>>;
|
|
4975
5039
|
userId: z.ZodString;
|
|
4976
5040
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -5363,6 +5427,10 @@ declare const IntegrationApiResponse: z.ZodObject<{
|
|
|
5363
5427
|
}, z.core.$strip>>>;
|
|
5364
5428
|
connection: z.ZodOptional<z.ZodObject<{
|
|
5365
5429
|
id: z.ZodString;
|
|
5430
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
5431
|
+
connector: "connector";
|
|
5432
|
+
mcp: "mcp";
|
|
5433
|
+
}>>;
|
|
5366
5434
|
name: z.ZodString;
|
|
5367
5435
|
key: z.ZodOptional<z.ZodString>;
|
|
5368
5436
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5399,6 +5467,11 @@ declare const IntegrationApiResponse: z.ZodObject<{
|
|
|
5399
5467
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
5400
5468
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
5401
5469
|
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
5470
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
5471
|
+
"provide-input": "provide-input";
|
|
5472
|
+
authenticate: "authenticate";
|
|
5473
|
+
reauthenticate: "reauthenticate";
|
|
5474
|
+
}>>;
|
|
5402
5475
|
}, z.core.$strip>>;
|
|
5403
5476
|
userId: z.ZodString;
|
|
5404
5477
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -5880,6 +5953,10 @@ declare const FieldMappingApiResponse: z.ZodObject<{
|
|
|
5880
5953
|
}, z.core.$strip>>;
|
|
5881
5954
|
connection: z.ZodOptional<z.ZodObject<{
|
|
5882
5955
|
id: z.ZodString;
|
|
5956
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
5957
|
+
connector: "connector";
|
|
5958
|
+
mcp: "mcp";
|
|
5959
|
+
}>>;
|
|
5883
5960
|
name: z.ZodString;
|
|
5884
5961
|
key: z.ZodOptional<z.ZodString>;
|
|
5885
5962
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -5916,6 +5993,11 @@ declare const FieldMappingApiResponse: z.ZodObject<{
|
|
|
5916
5993
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
5917
5994
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
5918
5995
|
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
5996
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
5997
|
+
"provide-input": "provide-input";
|
|
5998
|
+
authenticate: "authenticate";
|
|
5999
|
+
reauthenticate: "reauthenticate";
|
|
6000
|
+
}>>;
|
|
5919
6001
|
}, z.core.$strip>>;
|
|
5920
6002
|
userId: z.ZodString;
|
|
5921
6003
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -6447,6 +6529,10 @@ declare const ExternalEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
6447
6529
|
}, z.core.$strip>>;
|
|
6448
6530
|
connection: z.ZodOptional<z.ZodObject<{
|
|
6449
6531
|
id: z.ZodString;
|
|
6532
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
6533
|
+
connector: "connector";
|
|
6534
|
+
mcp: "mcp";
|
|
6535
|
+
}>>;
|
|
6450
6536
|
name: z.ZodString;
|
|
6451
6537
|
key: z.ZodOptional<z.ZodString>;
|
|
6452
6538
|
isTest: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -6483,6 +6569,11 @@ declare const ExternalEventSubscriptionApiResponse: z.ZodObject<{
|
|
|
6483
6569
|
uiUrl: z.ZodOptional<z.ZodString>;
|
|
6484
6570
|
agentInstructions: z.ZodOptional<z.ZodString>;
|
|
6485
6571
|
handoffAgentInstructions: z.ZodOptional<z.ZodString>;
|
|
6572
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
6573
|
+
"provide-input": "provide-input";
|
|
6574
|
+
authenticate: "authenticate";
|
|
6575
|
+
reauthenticate: "reauthenticate";
|
|
6576
|
+
}>>;
|
|
6486
6577
|
}, z.core.$strip>>;
|
|
6487
6578
|
userId: z.ZodString;
|
|
6488
6579
|
tenantId: z.ZodOptional<z.ZodString>;
|
|
@@ -6702,6 +6793,7 @@ declare class ConnectionAccessor {
|
|
|
6702
6793
|
createdAt: string;
|
|
6703
6794
|
updatedAt: string;
|
|
6704
6795
|
userId: string;
|
|
6796
|
+
type?: "connector" | "mcp" | undefined;
|
|
6705
6797
|
key?: string | undefined;
|
|
6706
6798
|
isTest?: boolean | undefined;
|
|
6707
6799
|
connected?: boolean | undefined;
|
|
@@ -6732,6 +6824,7 @@ declare class ConnectionAccessor {
|
|
|
6732
6824
|
uiUrl?: string | undefined;
|
|
6733
6825
|
agentInstructions?: string | undefined;
|
|
6734
6826
|
handoffAgentInstructions?: string | undefined;
|
|
6827
|
+
reason?: "provide-input" | "authenticate" | "reauthenticate" | undefined;
|
|
6735
6828
|
} | undefined;
|
|
6736
6829
|
tenantId?: string | undefined;
|
|
6737
6830
|
user?: {
|
|
@@ -6943,6 +7036,7 @@ declare class IntegrationAccessor extends ElementAccessor<IntegrationApiResponse
|
|
|
6943
7036
|
createdAt: string;
|
|
6944
7037
|
updatedAt: string;
|
|
6945
7038
|
userId: string;
|
|
7039
|
+
type?: "connector" | "mcp" | undefined;
|
|
6946
7040
|
key?: string | undefined;
|
|
6947
7041
|
isTest?: boolean | undefined;
|
|
6948
7042
|
connected?: boolean | undefined;
|
|
@@ -6973,6 +7067,7 @@ declare class IntegrationAccessor extends ElementAccessor<IntegrationApiResponse
|
|
|
6973
7067
|
uiUrl?: string | undefined;
|
|
6974
7068
|
agentInstructions?: string | undefined;
|
|
6975
7069
|
handoffAgentInstructions?: string | undefined;
|
|
7070
|
+
reason?: "provide-input" | "authenticate" | "reauthenticate" | undefined;
|
|
6976
7071
|
} | undefined;
|
|
6977
7072
|
tenantId?: string | undefined;
|
|
6978
7073
|
user?: {
|
package/dist/bundle.js
CHANGED
|
@@ -22307,6 +22307,9 @@
|
|
|
22307
22307
|
WorkspaceElementType["ExternalApiLogRecord"] = "external-api-log-record";
|
|
22308
22308
|
WorkspaceElementType["IncomingWebhookLogRecord"] = "incoming-webhook-log-record";
|
|
22309
22309
|
WorkspaceElementType["ConnectedProduct"] = "connected-product";
|
|
22310
|
+
WorkspaceElementType["AgentHarness"] = "agent-harness";
|
|
22311
|
+
WorkspaceElementType["AgentSkill"] = "agent-skill";
|
|
22312
|
+
WorkspaceElementType["AgentInstruction"] = "agent-instruction";
|
|
22310
22313
|
})(WorkspaceElementType || (WorkspaceElementType = {}));
|
|
22311
22314
|
var WorkspaceEventType;
|
|
22312
22315
|
(function (WorkspaceEventType) {
|
|
@@ -22852,12 +22855,12 @@
|
|
|
22852
22855
|
}
|
|
22853
22856
|
}
|
|
22854
22857
|
|
|
22855
|
-
var
|
|
22856
|
-
(function (
|
|
22857
|
-
|
|
22858
|
-
|
|
22859
|
-
|
|
22860
|
-
})(
|
|
22858
|
+
var ConnectionDisplayMode;
|
|
22859
|
+
(function (ConnectionDisplayMode) {
|
|
22860
|
+
ConnectionDisplayMode["IFRAME"] = "iframe";
|
|
22861
|
+
ConnectionDisplayMode["POPUP"] = "popup";
|
|
22862
|
+
ConnectionDisplayMode["REDIRECT"] = "redirect";
|
|
22863
|
+
})(ConnectionDisplayMode || (ConnectionDisplayMode = {}));
|
|
22861
22864
|
class ConnectionsAccessor extends ElementInstanceListAccessor {
|
|
22862
22865
|
constructor(client) {
|
|
22863
22866
|
super(client, 'connections');
|
|
@@ -23021,10 +23024,10 @@
|
|
|
23021
23024
|
}
|
|
23022
23025
|
}
|
|
23023
23026
|
async function createOrUpdateConnection(options) {
|
|
23024
|
-
const { client, connectionId, connectionKey, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectionRequestId, apiUri, redirectUri, onPopupClosed, lateEvents, } = options !== null && options !== void 0 ? options : {};
|
|
23025
|
-
let connectionType = await detectConnectionType(options);
|
|
23027
|
+
const { client, type, connectionId, connectionKey, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectionRequestId, apiUri, redirectUri, customState, onPopupClosed, lateEvents, } = options !== null && options !== void 0 ? options : {};
|
|
23028
|
+
let connectionType = type === 'mcp' ? ConnectionDisplayMode.POPUP : await detectConnectionType(options);
|
|
23026
23029
|
if (redirectUri) {
|
|
23027
|
-
connectionType =
|
|
23030
|
+
connectionType = ConnectionDisplayMode.REDIRECT;
|
|
23028
23031
|
}
|
|
23029
23032
|
const freshToken = await client.getToken();
|
|
23030
23033
|
const connectPath = 'connect';
|
|
@@ -23033,6 +23036,7 @@
|
|
|
23033
23036
|
const requestId = simpleUniqueId() + simpleUniqueId();
|
|
23034
23037
|
const payload = {
|
|
23035
23038
|
token: freshToken,
|
|
23039
|
+
type,
|
|
23036
23040
|
input,
|
|
23037
23041
|
connectorParameters,
|
|
23038
23042
|
integrationKey,
|
|
@@ -23047,6 +23051,7 @@
|
|
|
23047
23051
|
connectionRequestId,
|
|
23048
23052
|
requestId,
|
|
23049
23053
|
redirectUri,
|
|
23054
|
+
customState,
|
|
23050
23055
|
};
|
|
23051
23056
|
let cancelCheckInterval;
|
|
23052
23057
|
let lateEventsTimeout;
|
|
@@ -23110,7 +23115,7 @@
|
|
|
23110
23115
|
input.value = JSON.stringify(payload);
|
|
23111
23116
|
form.appendChild(input);
|
|
23112
23117
|
document.body.appendChild(form);
|
|
23113
|
-
if (connectionType ===
|
|
23118
|
+
if (connectionType === ConnectionDisplayMode.IFRAME) {
|
|
23114
23119
|
const iframeElement = document.createElement('iframe');
|
|
23115
23120
|
iframeElement.id = targetElementId;
|
|
23116
23121
|
iframeElement.name = targetElementId;
|
|
@@ -23125,12 +23130,12 @@
|
|
|
23125
23130
|
form.submit();
|
|
23126
23131
|
document.body.removeChild(form);
|
|
23127
23132
|
}
|
|
23128
|
-
if (connectionType ===
|
|
23133
|
+
if (connectionType === ConnectionDisplayMode.REDIRECT) {
|
|
23129
23134
|
form.target = '_self';
|
|
23130
23135
|
form.submit();
|
|
23131
23136
|
document.body.removeChild(form);
|
|
23132
23137
|
}
|
|
23133
|
-
if (connectionType ===
|
|
23138
|
+
if (connectionType === ConnectionDisplayMode.POPUP) {
|
|
23134
23139
|
const width = Math.min(Math.round(screen.width * 0.7), 1000);
|
|
23135
23140
|
const height = Math.min(Math.round(screen.height * 0.6), 800);
|
|
23136
23141
|
const left = Math.round((screen.width - width) / 2);
|
|
@@ -23179,9 +23184,9 @@
|
|
|
23179
23184
|
});
|
|
23180
23185
|
const option = connectionOptions.find((option) => option.key == authOptionKey);
|
|
23181
23186
|
if ((option === null || option === void 0 ? void 0 : option.type) === 'client-credentials') {
|
|
23182
|
-
return
|
|
23187
|
+
return ConnectionDisplayMode.IFRAME;
|
|
23183
23188
|
}
|
|
23184
|
-
return
|
|
23189
|
+
return ConnectionDisplayMode.POPUP;
|
|
23185
23190
|
}
|
|
23186
23191
|
const createCrossWindowListener = ({ requestId, handlers, }) => {
|
|
23187
23192
|
const listener = (event) => {
|
|
@@ -28984,7 +28989,9 @@
|
|
|
28984
28989
|
body: any().optional(),
|
|
28985
28990
|
});
|
|
28986
28991
|
|
|
28992
|
+
const ConnectionType = _enum(['connector', 'mcp']);
|
|
28987
28993
|
const ConnectionEditableProperties = object({
|
|
28994
|
+
type: ConnectionType.optional(),
|
|
28988
28995
|
name: string$1().optional(),
|
|
28989
28996
|
meta: record(string$1(), any()).optional(),
|
|
28990
28997
|
authOptionKey: string$1().optional(),
|
|
@@ -29008,9 +29015,13 @@
|
|
|
29008
29015
|
uiUrl: string$1().optional(),
|
|
29009
29016
|
agentInstructions: string$1().optional(),
|
|
29010
29017
|
handoffAgentInstructions: string$1().optional(),
|
|
29018
|
+
reason: _enum(['authenticate', 'reauthenticate', 'provide-input'])
|
|
29019
|
+
.optional()
|
|
29020
|
+
.describe('[INTERNAL] Cause that triggered this client action; persisted so prompts can be re-rendered on read.'),
|
|
29011
29021
|
});
|
|
29012
29022
|
const BaseConnection = BaseWorkspaceElement.extend({
|
|
29013
29023
|
...TenantLayerElement.shape,
|
|
29024
|
+
type: ConnectionType.optional(),
|
|
29014
29025
|
name: string$1(),
|
|
29015
29026
|
key: string$1().optional(),
|
|
29016
29027
|
isTest: boolean$1().optional(),
|
|
@@ -29775,7 +29786,7 @@
|
|
|
29775
29786
|
properties: record(string$1(), DataSchema).optional(),
|
|
29776
29787
|
items: DataSchema.optional(),
|
|
29777
29788
|
additionalProperties: union([boolean$1(), DataSchema]).optional(),
|
|
29778
|
-
enum: array(string$1()).optional(),
|
|
29789
|
+
enum: array(union([string$1(), number$1()])).optional(),
|
|
29779
29790
|
referenceRecords: array(any()).optional(),
|
|
29780
29791
|
referenceCollection: object({
|
|
29781
29792
|
key: any().optional(),
|
|
@@ -30223,6 +30234,7 @@
|
|
|
30223
30234
|
connectorVersion: string$1().optional(),
|
|
30224
30235
|
});
|
|
30225
30236
|
const ConnectPayload = object({
|
|
30237
|
+
type: ConnectionType.optional(),
|
|
30226
30238
|
requestId: string$1().optional(),
|
|
30227
30239
|
integrationKey: string$1().optional(),
|
|
30228
30240
|
integrationId: string$1().optional(),
|