@membranehq/sdk 0.28.3 → 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 +140 -4
- package/dist/bundle.js +1917 -1394
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connection-events-listener.d.ts +14 -0
- package/dist/dts/accessors/connection-events-listener.test.d.ts +1 -0
- package/dist/dts/accessors/connections-accessors.d.ts +9 -1
- package/dist/dts/accessors/integrations-accessors.d.ts +3 -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 +6 -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 +4 -1
- package/dist/dts/agent/workspace-element-context.d.ts +3 -0
- package/dist/dts/ai-gateway/models.d.ts +4 -0
- package/dist/dts/async-requests/types.d.ts +50 -0
- package/dist/dts/data-schema/types.d.ts +1 -1
- package/dist/dts/deprecation.d.ts +1 -0
- package/dist/dts/errors/index.d.ts +5 -1
- package/dist/dts/index.browser.d.ts +3 -1
- package/dist/dts/mcp-client/index.d.ts +76 -0
- package/dist/dts/oauth/types.d.ts +14 -5
- package/dist/dts/orgs/types.d.ts +1183 -33
- package/dist/dts/orgs/types.test.d.ts +1 -0
- package/dist/dts/platform-user-tokens/types.d.ts +42 -0
- package/dist/dts/scenario-templates/index.d.ts +1 -0
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +50 -72
- package/dist/dts/workspace-elements/api/checkpoints-api.d.ts +1 -1
- package/dist/dts/workspace-elements/api/connections-api.d.ts +71 -1
- package/dist/dts/workspace-elements/api/connectors-api.d.ts +10 -0
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +10 -0
- package/dist/dts/workspace-elements/api/data-sources-api.d.ts +20 -0
- package/dist/dts/workspace-elements/api/external-api-logs-api.d.ts +10 -0
- package/dist/dts/workspace-elements/api/external-apps-api.d.ts +28 -0
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +14 -0
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +13 -0
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +22 -0
- package/dist/dts/workspace-elements/api/external-event-types-api.d.ts +331 -0
- package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +20 -0
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +20 -0
- package/dist/dts/workspace-elements/api/flows-api.d.ts +20 -0
- package/dist/dts/workspace-elements/api/incoming-webhooks-api.d.ts +13 -0
- package/dist/dts/workspace-elements/api/index.d.ts +1 -0
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +32 -7
- package/dist/dts/workspace-elements/base/action-run-log-records/index.d.ts +19 -0
- package/dist/dts/workspace-elements/base/actions/action-payload.d.ts +46 -0
- package/dist/dts/workspace-elements/base/actions/action-payload.test.d.ts +1 -0
- package/dist/dts/workspace-elements/base/actions/index.d.ts +3 -2
- package/dist/dts/workspace-elements/base/app-data-schemas/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/app-event-types/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/connection-requests/index.d.ts +6 -0
- package/dist/dts/workspace-elements/base/connections/index.d.ts +25 -0
- package/dist/dts/workspace-elements/base/connectors/auth.d.ts +6 -0
- package/dist/dts/workspace-elements/base/connectors/index.d.ts +213 -5
- package/dist/dts/workspace-elements/base/connectors/rest-api.d.ts +1 -0
- package/dist/dts/workspace-elements/base/data-link-tables/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/data-sources/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/external-event-log-records/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/external-event-pulls/index.d.ts +50 -0
- package/dist/dts/workspace-elements/base/external-event-subscriptions/index.d.ts +2 -0
- package/dist/dts/workspace-elements/base/external-event-types/index.d.ts +190 -0
- package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/flows/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/integrations/index.d.ts +2 -2
- package/dist/dts/workspace-elements/base/packages/index.d.ts +2 -2
- package/dist/dts/workspace-elements/paths.d.ts +1 -0
- package/dist/dts/workspace-elements/types.d.ts +15 -3
- package/dist/dts/workspace-tokens/index.d.ts +1 -0
- package/dist/dts/{client-tokens → workspace-tokens}/types.d.ts +35 -22
- package/dist/dts/workspaces/api.d.ts +0 -6
- package/dist/dts/workspaces/compare.d.ts +4 -1
- package/dist/index.browser.d.mts +3654 -858
- package/dist/index.browser.d.ts +3654 -858
- package/dist/index.browser.js +1105 -213
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +1032 -207
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +3654 -858
- package/dist/index.node.d.ts +3654 -858
- package/dist/index.node.js +1105 -213
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +1032 -207
- package/dist/index.node.mjs.map +1 -1
- package/package.json +3 -3
- /package/dist/dts/{client-tokens → platform-user-tokens}/index.d.ts +0 -0
package/dist/index.browser.js
CHANGED
|
@@ -58,6 +58,7 @@ exports.BadRequestErrorKey = void 0;
|
|
|
58
58
|
BadRequestErrorKey["ACCESS_DENIED"] = "access_denied";
|
|
59
59
|
BadRequestErrorKey["ALREADY_EXISTS"] = "already_exists";
|
|
60
60
|
BadRequestErrorKey["RATE_LIMIT_EXCEEDED"] = "rate_limit_exceeded";
|
|
61
|
+
BadRequestErrorKey["WORKSPACE_TIER_GATED"] = "workspace_tier_gated";
|
|
61
62
|
})(exports.BadRequestErrorKey || (exports.BadRequestErrorKey = {}));
|
|
62
63
|
exports.ConnectionErrorKey = void 0;
|
|
63
64
|
(function (ConnectionErrorKey) {
|
|
@@ -195,6 +196,11 @@ class AccessDeniedError extends BadRequestError {
|
|
|
195
196
|
this.data.key = exports.BadRequestErrorKey.ACCESS_DENIED;
|
|
196
197
|
}
|
|
197
198
|
}
|
|
199
|
+
class RemoteConnectorCodeUnavailableError extends BadRequestError {
|
|
200
|
+
constructor(arg) {
|
|
201
|
+
super(arg !== null && arg !== void 0 ? arg : 'Operation execution requires connector code, which is not available for connectors served from the remote repository.');
|
|
202
|
+
}
|
|
203
|
+
}
|
|
198
204
|
class CustomCodeError extends MembraneError {
|
|
199
205
|
constructor(arg) {
|
|
200
206
|
super(arg);
|
|
@@ -1359,7 +1365,7 @@ const DataSchema = z.z.lazy(() => z.z
|
|
|
1359
1365
|
properties: z.z.record(z.z.string(), DataSchema).optional(),
|
|
1360
1366
|
items: DataSchema.optional(),
|
|
1361
1367
|
additionalProperties: z.z.union([z.z.boolean(), DataSchema]).optional(),
|
|
1362
|
-
enum: z.z.array(z.z.string()).optional(),
|
|
1368
|
+
enum: z.z.array(z.z.union([z.z.string(), z.z.number()])).optional(),
|
|
1363
1369
|
referenceRecords: z.z.array(z.z.any()).optional(),
|
|
1364
1370
|
referenceCollection: z.z
|
|
1365
1371
|
.object({
|
|
@@ -2494,30 +2500,36 @@ class Eval extends DataBuilderFormulaBase {
|
|
|
2494
2500
|
}
|
|
2495
2501
|
}
|
|
2496
2502
|
}
|
|
2503
|
+
function asLiteralOperandSchema(schema) {
|
|
2504
|
+
if (!schema)
|
|
2505
|
+
return schema;
|
|
2506
|
+
const { readOnly: _readOnly, ...rest } = schema;
|
|
2507
|
+
return rest;
|
|
2508
|
+
}
|
|
2497
2509
|
const OPERATOR_SPECS = {
|
|
2498
2510
|
is: {
|
|
2499
2511
|
name: 'is',
|
|
2500
2512
|
handler: (value, operand) => value == operand,
|
|
2501
2513
|
applicableToSchema: (schema) => schemaIsScalar(schema),
|
|
2502
|
-
getOperandSchema: (schema) => schema,
|
|
2514
|
+
getOperandSchema: (schema) => asLiteralOperandSchema(schema),
|
|
2503
2515
|
},
|
|
2504
2516
|
isNot: {
|
|
2505
2517
|
name: 'is not',
|
|
2506
2518
|
handler: (value, operand) => value != operand,
|
|
2507
2519
|
applicableToSchema: (schema) => schemaIsScalar(schema),
|
|
2508
|
-
getOperandSchema: (schema) => schema,
|
|
2520
|
+
getOperandSchema: (schema) => asLiteralOperandSchema(schema),
|
|
2509
2521
|
},
|
|
2510
2522
|
oneOf: {
|
|
2511
2523
|
name: 'is one of',
|
|
2512
2524
|
handler: (value, operand) => Array.isArray(operand) && operand.includes(value),
|
|
2513
2525
|
applicableToSchema: (schema) => schemaIsScalar(schema) && schema.type !== 'boolean',
|
|
2514
|
-
getOperandSchema: (schema) => ({ type: 'array', items: schema }),
|
|
2526
|
+
getOperandSchema: (schema) => ({ type: 'array', items: asLiteralOperandSchema(schema) }),
|
|
2515
2527
|
},
|
|
2516
2528
|
noneOf: {
|
|
2517
2529
|
name: 'is not one of',
|
|
2518
2530
|
handler: (value, operand) => !Array.isArray(operand) || !operand.includes(value),
|
|
2519
2531
|
applicableToSchema: (schema) => schemaIsScalar(schema) && schema.type !== 'boolean',
|
|
2520
|
-
getOperandSchema: (schema) => ({ type: 'array', items: schema }),
|
|
2532
|
+
getOperandSchema: (schema) => ({ type: 'array', items: asLiteralOperandSchema(schema) }),
|
|
2521
2533
|
},
|
|
2522
2534
|
contains: {
|
|
2523
2535
|
name: 'contains',
|
|
@@ -3497,11 +3509,15 @@ exports.WorkspaceElementType = void 0;
|
|
|
3497
3509
|
WorkspaceElementType["ExternalEventSubscription"] = "external-event-subscription";
|
|
3498
3510
|
WorkspaceElementType["ExternalEventLogRecord"] = "external-event-log-record";
|
|
3499
3511
|
WorkspaceElementType["ExternalEventPull"] = "external-event-pull";
|
|
3512
|
+
WorkspaceElementType["ExternalEventType"] = "external-event-type";
|
|
3500
3513
|
WorkspaceElementType["Screen"] = "screen";
|
|
3501
3514
|
WorkspaceElementType["ActionRunLogRecord"] = "action-run-log-record";
|
|
3502
3515
|
WorkspaceElementType["ExternalApiLogRecord"] = "external-api-log-record";
|
|
3503
3516
|
WorkspaceElementType["IncomingWebhookLogRecord"] = "incoming-webhook-log-record";
|
|
3504
3517
|
WorkspaceElementType["ConnectedProduct"] = "connected-product";
|
|
3518
|
+
WorkspaceElementType["AgentHarness"] = "agent-harness";
|
|
3519
|
+
WorkspaceElementType["AgentSkill"] = "agent-skill";
|
|
3520
|
+
WorkspaceElementType["AgentInstruction"] = "agent-instruction";
|
|
3505
3521
|
})(exports.WorkspaceElementType || (exports.WorkspaceElementType = {}));
|
|
3506
3522
|
exports.WorkspaceEventType = void 0;
|
|
3507
3523
|
(function (WorkspaceEventType) {
|
|
@@ -3633,7 +3649,8 @@ const BaseIntegrationLevelMembraneInterfaceEditableProperties = BaseMembraneInte
|
|
|
3633
3649
|
const BaseIntegrationLevelMembraneInterfaceReadOnlyProperties = BaseMembraneInterfaceReadOnlyProperties.extend({
|
|
3634
3650
|
isCustomized: z.z.boolean().optional(),
|
|
3635
3651
|
});
|
|
3636
|
-
const
|
|
3652
|
+
const BaseExportProperties = BaseMembraneInterfaceEditableProperties.required({ uuid: true, key: true });
|
|
3653
|
+
const BaseIntegrationLevelMembraneInterfaceExportProperties = BaseExportProperties.extend({
|
|
3637
3654
|
integrationUuid: z.z.string().optional(),
|
|
3638
3655
|
parentUuid: z.z.string().optional(),
|
|
3639
3656
|
externalAppUuid: z.z.string().optional(),
|
|
@@ -3926,6 +3943,124 @@ const ACTIONS = {
|
|
|
3926
3943
|
},
|
|
3927
3944
|
};
|
|
3928
3945
|
|
|
3946
|
+
exports.HttpRequestMethod = void 0;
|
|
3947
|
+
(function (HttpRequestMethod) {
|
|
3948
|
+
HttpRequestMethod["GET"] = "GET";
|
|
3949
|
+
HttpRequestMethod["POST"] = "POST";
|
|
3950
|
+
HttpRequestMethod["PATCH"] = "PATCH";
|
|
3951
|
+
HttpRequestMethod["PUT"] = "PUT";
|
|
3952
|
+
HttpRequestMethod["DELETE"] = "DELETE";
|
|
3953
|
+
})(exports.HttpRequestMethod || (exports.HttpRequestMethod = {}));
|
|
3954
|
+
const HttpRequestSpec = z.z.object({
|
|
3955
|
+
method: z.z.string().toUpperCase().pipe(z.z.enum(exports.HttpRequestMethod)).optional(),
|
|
3956
|
+
uri: z.z.any(),
|
|
3957
|
+
headers: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
3958
|
+
query: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
3959
|
+
body: z.z.any().optional(),
|
|
3960
|
+
});
|
|
3961
|
+
const HTTP_REQUEST_SCHEMA = {
|
|
3962
|
+
type: 'object',
|
|
3963
|
+
properties: {
|
|
3964
|
+
uri: { type: 'string' },
|
|
3965
|
+
method: {
|
|
3966
|
+
type: 'string',
|
|
3967
|
+
enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
|
|
3968
|
+
},
|
|
3969
|
+
body: {},
|
|
3970
|
+
query: {
|
|
3971
|
+
type: 'object',
|
|
3972
|
+
section: true,
|
|
3973
|
+
additionalProperties: true,
|
|
3974
|
+
},
|
|
3975
|
+
headers: {
|
|
3976
|
+
type: 'object',
|
|
3977
|
+
section: true,
|
|
3978
|
+
additionalProperties: true,
|
|
3979
|
+
},
|
|
3980
|
+
},
|
|
3981
|
+
};
|
|
3982
|
+
|
|
3983
|
+
const ActionApiPayload = z.z.object({
|
|
3984
|
+
method: z.z.enum(exports.HttpRequestMethod),
|
|
3985
|
+
path: z.z.string().optional(),
|
|
3986
|
+
url: z.z.string().optional(),
|
|
3987
|
+
body: z.z.any().optional(),
|
|
3988
|
+
headers: z.z.record(z.z.string(), z.z.string()).optional(),
|
|
3989
|
+
query: z.z.record(z.z.string(), z.z.union([z.z.string(), z.z.number(), z.z.boolean()])).optional(),
|
|
3990
|
+
});
|
|
3991
|
+
const ActionSnapshot = z.z.object({
|
|
3992
|
+
id: z.z.string().optional(),
|
|
3993
|
+
integrationKey: z.z.string().optional(),
|
|
3994
|
+
key: z.z.string().optional(),
|
|
3995
|
+
connectionKey: z.z.string().optional(),
|
|
3996
|
+
connectionId: z.z.string().optional(),
|
|
3997
|
+
type: z.z.string(),
|
|
3998
|
+
api: ActionApiPayload.optional(),
|
|
3999
|
+
code: z.z.string().optional(),
|
|
4000
|
+
input: z.z.any().optional(),
|
|
4001
|
+
meta: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
4002
|
+
});
|
|
4003
|
+
function configToNamedPayload(type, config) {
|
|
4004
|
+
var _a, _b;
|
|
4005
|
+
if (config == null)
|
|
4006
|
+
return {};
|
|
4007
|
+
switch (type) {
|
|
4008
|
+
case exports.ActionType.ApiRequestToExternalApp:
|
|
4009
|
+
case exports.ActionType.ApiRequestToYourApp:
|
|
4010
|
+
case exports.ActionType.ApiRequest: {
|
|
4011
|
+
const req = config.request;
|
|
4012
|
+
if (!req)
|
|
4013
|
+
return {};
|
|
4014
|
+
return {
|
|
4015
|
+
api: {
|
|
4016
|
+
method: req.method,
|
|
4017
|
+
path: req.path,
|
|
4018
|
+
body: (_a = req.data) !== null && _a !== void 0 ? _a : req.body,
|
|
4019
|
+
headers: req.headers,
|
|
4020
|
+
query: req.query,
|
|
4021
|
+
},
|
|
4022
|
+
};
|
|
4023
|
+
}
|
|
4024
|
+
case exports.ActionType.HttpRequest: {
|
|
4025
|
+
const req = config.request;
|
|
4026
|
+
if (!req)
|
|
4027
|
+
return {};
|
|
4028
|
+
return {
|
|
4029
|
+
api: {
|
|
4030
|
+
method: req.method,
|
|
4031
|
+
url: req.uri,
|
|
4032
|
+
body: (_b = req.body) !== null && _b !== void 0 ? _b : req.data,
|
|
4033
|
+
headers: req.headers,
|
|
4034
|
+
query: req.query,
|
|
4035
|
+
},
|
|
4036
|
+
};
|
|
4037
|
+
}
|
|
4038
|
+
case exports.ActionType.RunJavascript: {
|
|
4039
|
+
const code = config.code;
|
|
4040
|
+
if (typeof code !== 'string')
|
|
4041
|
+
return {};
|
|
4042
|
+
return { code };
|
|
4043
|
+
}
|
|
4044
|
+
default:
|
|
4045
|
+
return {};
|
|
4046
|
+
}
|
|
4047
|
+
}
|
|
4048
|
+
function buildActionSnapshot(args) {
|
|
4049
|
+
const { api, code } = configToNamedPayload(args.type, args.config);
|
|
4050
|
+
return {
|
|
4051
|
+
...(args.id != null && { id: args.id }),
|
|
4052
|
+
...(args.integrationKey != null && { integrationKey: args.integrationKey }),
|
|
4053
|
+
...(args.key != null && { key: args.key }),
|
|
4054
|
+
...(args.connectionId != null && { connectionId: args.connectionId }),
|
|
4055
|
+
...(args.connectionKey != null && { connectionKey: args.connectionKey }),
|
|
4056
|
+
type: args.type,
|
|
4057
|
+
...(api != null && { api }),
|
|
4058
|
+
...(code != null && { code }),
|
|
4059
|
+
...(args.input != null && { input: args.input }),
|
|
4060
|
+
...(args.meta != null && { meta: args.meta }),
|
|
4061
|
+
};
|
|
4062
|
+
}
|
|
4063
|
+
|
|
3929
4064
|
exports.ActionDependencyType = void 0;
|
|
3930
4065
|
(function (ActionDependencyType) {
|
|
3931
4066
|
ActionDependencyType["FieldMapping"] = "FieldMapping";
|
|
@@ -4003,12 +4138,15 @@ const CreateConnectionRequestPayload = z.z.object({
|
|
|
4003
4138
|
connectorId: z.z.string().optional(),
|
|
4004
4139
|
connectorKey: z.z.string().optional(),
|
|
4005
4140
|
connectorVersion: z.z.string().optional(),
|
|
4141
|
+
externalAppId: z.z.string().optional(),
|
|
4142
|
+
externalAppKey: z.z.string().optional(),
|
|
4006
4143
|
connectionId: z.z.string().optional(),
|
|
4007
4144
|
connectionKey: z.z.string().min(1).max(100).optional(),
|
|
4008
4145
|
name: z.z.string().optional(),
|
|
4009
4146
|
allowMultipleConnections: z.z.boolean().optional(),
|
|
4010
4147
|
connectorParameters: z.z.record(z.z.string(), z.z.unknown()).optional(),
|
|
4011
4148
|
redirectUri: z.z.string().url().optional(),
|
|
4149
|
+
customState: z.z.string().optional(),
|
|
4012
4150
|
prompt: z.z.string().optional(),
|
|
4013
4151
|
});
|
|
4014
4152
|
const PatchConnectionRequestPayload = z.z.object({});
|
|
@@ -4020,12 +4158,15 @@ const ConnectionRequest = z.z.object({
|
|
|
4020
4158
|
connectorId: z.z.string().optional(),
|
|
4021
4159
|
connectorKey: z.z.string().optional(),
|
|
4022
4160
|
connectorVersion: z.z.string().optional(),
|
|
4161
|
+
externalAppId: z.z.string().optional(),
|
|
4162
|
+
externalAppKey: z.z.string().optional(),
|
|
4023
4163
|
connectionId: z.z.string().optional(),
|
|
4024
4164
|
connectionKey: z.z.string().optional(),
|
|
4025
4165
|
name: z.z.string().optional(),
|
|
4026
4166
|
allowMultipleConnections: z.z.boolean().optional(),
|
|
4027
4167
|
connectorParameters: z.z.record(z.z.string(), z.z.unknown()).optional(),
|
|
4028
4168
|
redirectUri: z.z.string().url().optional(),
|
|
4169
|
+
customState: z.z.string().optional(),
|
|
4029
4170
|
prompt: z.z.string().optional(),
|
|
4030
4171
|
status: z.z.enum(['pending', 'success', 'cancelled', 'error']),
|
|
4031
4172
|
resultConnectionId: z.z.string().optional(),
|
|
@@ -4034,7 +4175,9 @@ const ConnectionRequest = z.z.object({
|
|
|
4034
4175
|
url: z.z.string(),
|
|
4035
4176
|
});
|
|
4036
4177
|
|
|
4178
|
+
const ConnectionType = z.z.enum(['connector', 'mcp']);
|
|
4037
4179
|
const ConnectionEditableProperties = z.z.object({
|
|
4180
|
+
type: ConnectionType.optional(),
|
|
4038
4181
|
name: z.z.string().optional(),
|
|
4039
4182
|
meta: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
4040
4183
|
authOptionKey: z.z.string().optional(),
|
|
@@ -4057,9 +4200,15 @@ const ConnectionClientAction = z.z.object({
|
|
|
4057
4200
|
description: z.z.string(),
|
|
4058
4201
|
uiUrl: z.z.string().optional(),
|
|
4059
4202
|
agentInstructions: z.z.string().optional(),
|
|
4203
|
+
handoffAgentInstructions: z.z.string().optional(),
|
|
4204
|
+
reason: z.z
|
|
4205
|
+
.enum(['authenticate', 'reauthenticate', 'provide-input'])
|
|
4206
|
+
.optional()
|
|
4207
|
+
.describe('[INTERNAL] Cause that triggered this client action; persisted so prompts can be re-rendered on read.'),
|
|
4060
4208
|
});
|
|
4061
4209
|
const BaseConnection = BaseWorkspaceElement.extend({
|
|
4062
4210
|
...TenantLayerElement.shape,
|
|
4211
|
+
type: ConnectionType.optional(),
|
|
4063
4212
|
name: z.z.string(),
|
|
4064
4213
|
key: z.z.string().optional(),
|
|
4065
4214
|
isTest: z.z.boolean().optional(),
|
|
@@ -4525,6 +4674,11 @@ const OAUTH_CONFIG_SCHEMA = {
|
|
|
4525
4674
|
type: 'boolean',
|
|
4526
4675
|
description: 'Skip sending PKCE parameters in the token request. Some authentication processes error if PKCE is enabled.',
|
|
4527
4676
|
},
|
|
4677
|
+
authorizationCodeParam: {
|
|
4678
|
+
type: 'string',
|
|
4679
|
+
default: 'code',
|
|
4680
|
+
description: 'Name of the redirect query parameter that carries the authorization code. Defaults to "code". Set this for providers that return the code under a non-standard parameter name (e.g. Amazon Selling Partner API uses "spapi_oauth_code").',
|
|
4681
|
+
},
|
|
4528
4682
|
extra: {
|
|
4529
4683
|
type: 'object',
|
|
4530
4684
|
additionalProperties: true,
|
|
@@ -9209,21 +9363,25 @@ exports.ConnectorStatus = void 0;
|
|
|
9209
9363
|
const ConnectorAuthWithFunctions = z.z.object({
|
|
9210
9364
|
type: z.z
|
|
9211
9365
|
.enum(['integration-app-token', 'membrane-token', 'oauth2', 'oauth1', 'client-credentials', 'proxy'])
|
|
9212
|
-
.optional()
|
|
9213
|
-
|
|
9214
|
-
|
|
9215
|
-
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9366
|
+
.optional()
|
|
9367
|
+
.describe('Authentication protocol used by the connector.'),
|
|
9368
|
+
credentialsSchema: DataSchema.optional().describe('JSON Schema describing the credentials produced by the auth flow (e.g. `access_token`, `refresh_token`). Usually inferred from the auth type; override only when the connector stores custom credential fields.'),
|
|
9369
|
+
customCredentialsSchema: DataSchema.optional().describe('Additional JSON Schema for workspace-level overrides of credentials (e.g. BYO-OAuth clientId/clientSecret).'),
|
|
9370
|
+
inputSchema: DataSchema.optional().describe('JSON Schema for end-user input collected during connection (e.g. an API key or subdomain the user types in).'),
|
|
9371
|
+
parametersSchema: DataSchema.optional().describe('JSON Schema for connector-level parameters configured per integration (e.g. region, account ID).'),
|
|
9372
|
+
getCredentialsFromConnectionParameters: GenericFunctionDefinition.optional().describe('Function that derives auth credentials from connection parameters. Use for static-key auth (api-key, basic-auth) where the user-provided input IS the credential.'),
|
|
9373
|
+
refreshCredentials: GenericFunctionDefinition.optional().describe('Function that refreshes expired credentials. Implement for non-standard OAuth refresh flows or when additional credentials need to be refreshed alongside the OAuth token.'),
|
|
9374
|
+
makeApiClient: GenericFunctionDefinition.optional().describe('Function that configures the HTTP client used by operations, actions and data sources. Typically a `mapping` type with `baseUri` and auth header wiring.'),
|
|
9375
|
+
getOAuthConfig: GenericFunctionDefinition.optional().describe('OAuth2: function returning `{ authorizeUri, tokenUri, scopes, noRefreshToken? }` — the authorize/token endpoint URLs and requested scopes.'),
|
|
9376
|
+
getTokenData: GenericFunctionDefinition.optional().describe('OAuth2: function invoked with the raw token response to extract token metadata. Rarely needed.'),
|
|
9377
|
+
getCredentialsFromAccessTokenResponse: GenericFunctionDefinition.optional().describe('OAuth2: function that transforms the token endpoint response into the final credentials object. Required for multi-tenant APIs (Microsoft) or APIs that require post-OAuth bootstrap calls.'),
|
|
9378
|
+
getCredentialsFromRefreshTokenResponse: GenericFunctionDefinition.optional().describe('OAuth2: function that transforms the refresh token endpoint response into the refreshed credentials. Required when refresh responses differ from initial-token responses.'),
|
|
9379
|
+
test: GenericFunctionDefinition.optional().describe('Function that verifies the connection by making a lightweight authenticated API call (typically a `rest-api-mapping` against a `/me`-style endpoint).'),
|
|
9380
|
+
disconnect: GenericFunctionDefinition.optional().describe('Function that revokes credentials at the provider when the connection is removed. Implement only if the provider exposes a revoke endpoint.'),
|
|
9381
|
+
proxyKey: z.z
|
|
9382
|
+
.string()
|
|
9383
|
+
.optional()
|
|
9384
|
+
.describe('For `type: "proxy"` — identifies which proxy configuration the workspace should use.'),
|
|
9227
9385
|
ui: z.z
|
|
9228
9386
|
.object({
|
|
9229
9387
|
schema: DataSchema.optional(),
|
|
@@ -9255,13 +9413,16 @@ const GeneratedConnectorOption = z.z.object({
|
|
|
9255
9413
|
const ConnectorOptions = z.z.record(z.z.string(), ConnectorOption);
|
|
9256
9414
|
const WritableConnectorVersionData = ConnectorAuthWithFunctions.extend({
|
|
9257
9415
|
parametersSchema: DataSchema.optional(),
|
|
9258
|
-
options: z.z
|
|
9416
|
+
options: z.z
|
|
9417
|
+
.record(z.z.string(), WriteableConnectorOption)
|
|
9418
|
+
.optional()
|
|
9419
|
+
.describe('Map of auth option key to auth configuration, for connectors that support multiple auth methods. Mutually exclusive with the top-level auth fields: use either the top-level fields (single-auth) OR `options` (multi-auth), not both.'),
|
|
9259
9420
|
}).omit({
|
|
9260
9421
|
credentialsSchema: true,
|
|
9261
9422
|
});
|
|
9262
9423
|
const ConnectorVersionData = z.z
|
|
9263
9424
|
.object({
|
|
9264
|
-
baseUri: z.z.string(),
|
|
9425
|
+
baseUri: z.z.string().optional(),
|
|
9265
9426
|
revision: z.z.string().optional(),
|
|
9266
9427
|
dataCollectionsCount: z.z.number().optional(),
|
|
9267
9428
|
operationsCount: z.z.number().optional(),
|
|
@@ -9296,9 +9457,12 @@ const WriteableConnectorFields = z.z
|
|
|
9296
9457
|
})
|
|
9297
9458
|
.extend(WritableConnectorVersionData.shape);
|
|
9298
9459
|
const ConnectorExportProperties = WriteableConnectorFields.extend({
|
|
9299
|
-
uuid: z.z.string()
|
|
9300
|
-
})
|
|
9301
|
-
externalAppId: true
|
|
9460
|
+
uuid: z.z.string(),
|
|
9461
|
+
})
|
|
9462
|
+
.omit({ externalAppId: true })
|
|
9463
|
+
.required({ key: true });
|
|
9464
|
+
const ConnectorVersionExportProperties = WritableConnectorVersionData.extend({
|
|
9465
|
+
version: z.z.string().min(1),
|
|
9302
9466
|
});
|
|
9303
9467
|
const UpdateConnectorRequest = WriteableConnectorFields;
|
|
9304
9468
|
const CreateConnectorRequest = WriteableConnectorFields.extend({
|
|
@@ -9312,6 +9476,10 @@ const BaseConnector = z.z.object({
|
|
|
9312
9476
|
externalAppId: z.z.string().optional(),
|
|
9313
9477
|
name: z.z.string(),
|
|
9314
9478
|
logoUri: z.z.string(),
|
|
9479
|
+
appUri: z.z
|
|
9480
|
+
.string()
|
|
9481
|
+
.optional()
|
|
9482
|
+
.describe('Site URL of the linked external app, denormalized onto public connector listings.'),
|
|
9315
9483
|
categories: z.z.array(z.z.string()).optional(),
|
|
9316
9484
|
isPublic: z.z.boolean().optional(),
|
|
9317
9485
|
popularity: z.z.number().optional(),
|
|
@@ -9324,6 +9492,10 @@ const MinimalConnector = z.z.object({
|
|
|
9324
9492
|
key: z.z.string(),
|
|
9325
9493
|
name: z.z.string(),
|
|
9326
9494
|
logoUri: z.z.string(),
|
|
9495
|
+
appUri: z.z
|
|
9496
|
+
.string()
|
|
9497
|
+
.optional()
|
|
9498
|
+
.describe('Site URL of the linked external app, denormalized onto public connector listings.'),
|
|
9327
9499
|
isPublic: z.z.boolean().optional(),
|
|
9328
9500
|
tenantId: z.z.string().optional(),
|
|
9329
9501
|
});
|
|
@@ -9584,8 +9756,8 @@ var ApiTrigger = new FlowNodeSpec({
|
|
|
9584
9756
|
});
|
|
9585
9757
|
|
|
9586
9758
|
var AppEventTrigger = new FlowNodeSpec({
|
|
9587
|
-
name: '
|
|
9588
|
-
description: 'Trigger flow when a matching
|
|
9759
|
+
name: 'Internal Event Trigger',
|
|
9760
|
+
description: 'Trigger flow when a matching Internal Event is received',
|
|
9589
9761
|
isTrigger: true,
|
|
9590
9762
|
});
|
|
9591
9763
|
|
|
@@ -9957,26 +10129,32 @@ const BaseIntegration = BaseMembraneInterface.extend({
|
|
|
9957
10129
|
});
|
|
9958
10130
|
const IntegrationEditableProperties = BaseMembraneInterfaceEditableProperties.extend({
|
|
9959
10131
|
logoUri: z.z.string().optional(),
|
|
9960
|
-
externalAppId: z.z
|
|
10132
|
+
externalAppId: z.z
|
|
10133
|
+
.string()
|
|
10134
|
+
.optional()
|
|
10135
|
+
.describe("External app id; alternative to connectorId — resolves to the app's default connector."),
|
|
9961
10136
|
externalAppUuid: z.z.string().optional(),
|
|
9962
10137
|
appUuid: z.z.string().optional().describe('[INTERNAL] Deprecated: resolved to externalAppId'),
|
|
9963
10138
|
oAuthCallbackUri: z.z.url().or(z.z.literal('')).optional(),
|
|
9964
10139
|
logoBase64: z.z.string().optional(),
|
|
9965
10140
|
connectorVersion: z.z.string().optional(),
|
|
9966
|
-
connectorId: z.z.string().optional(),
|
|
10141
|
+
connectorId: z.z.string().optional().describe('ID of the connector this integration uses.'),
|
|
9967
10142
|
connectorUuid: z.z.string().optional(),
|
|
9968
10143
|
connectorKey: z.z
|
|
9969
10144
|
.string()
|
|
9970
10145
|
.optional()
|
|
9971
10146
|
.describe('Key of the connector; alternative to connectorId. Resolved to connectorId by the API.'),
|
|
9972
|
-
parameters: z.z
|
|
10147
|
+
parameters: z.z
|
|
10148
|
+
.record(z.z.string(), z.z.any())
|
|
10149
|
+
.optional()
|
|
10150
|
+
.describe('Connector-specific parameters (e.g. OAuth { clientId, clientSecret, scopes }).'),
|
|
9973
10151
|
optionsConfig: IntegrationOptions.optional(),
|
|
9974
10152
|
});
|
|
9975
10153
|
const IntegrationExportProperties = IntegrationEditableProperties.omit({
|
|
9976
10154
|
connectorId: true,
|
|
9977
10155
|
externalAppId: true,
|
|
9978
10156
|
parameters: true,
|
|
9979
|
-
});
|
|
10157
|
+
}).required({ uuid: true, key: true });
|
|
9980
10158
|
const AppliedToIntegrations = (elementSchema) => z.z.array(z.z.object({
|
|
9981
10159
|
element: elementSchema,
|
|
9982
10160
|
integration: BaseIntegration,
|
|
@@ -10073,7 +10251,7 @@ const DataLinkTableSpecificProperties = z.z.object({
|
|
|
10073
10251
|
dataLinkTableId: z.z.string().optional(),
|
|
10074
10252
|
});
|
|
10075
10253
|
const DataLinkTableEditableProperties = BaseMembraneInterfaceEditableProperties.extend(DataLinkTableSpecificProperties.shape);
|
|
10076
|
-
const DataLinkTableExportProperties =
|
|
10254
|
+
const DataLinkTableExportProperties = BaseExportProperties.extend(DataLinkTableSpecificProperties.shape).omit({
|
|
10077
10255
|
connectionId: true,
|
|
10078
10256
|
dataLinkTableId: true,
|
|
10079
10257
|
});
|
|
@@ -10096,43 +10274,6 @@ const DataLinkTableConfig = z.z.object({
|
|
|
10096
10274
|
key: z.z.string(),
|
|
10097
10275
|
});
|
|
10098
10276
|
|
|
10099
|
-
exports.HttpRequestMethod = void 0;
|
|
10100
|
-
(function (HttpRequestMethod) {
|
|
10101
|
-
HttpRequestMethod["GET"] = "GET";
|
|
10102
|
-
HttpRequestMethod["POST"] = "POST";
|
|
10103
|
-
HttpRequestMethod["PATCH"] = "PATCH";
|
|
10104
|
-
HttpRequestMethod["PUT"] = "PUT";
|
|
10105
|
-
HttpRequestMethod["DELETE"] = "DELETE";
|
|
10106
|
-
})(exports.HttpRequestMethod || (exports.HttpRequestMethod = {}));
|
|
10107
|
-
const HttpRequestSpec = z.z.object({
|
|
10108
|
-
method: z.z.string().toUpperCase().pipe(z.z.enum(exports.HttpRequestMethod)).optional(),
|
|
10109
|
-
uri: z.z.any(),
|
|
10110
|
-
headers: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
10111
|
-
query: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
10112
|
-
body: z.z.any().optional(),
|
|
10113
|
-
});
|
|
10114
|
-
const HTTP_REQUEST_SCHEMA = {
|
|
10115
|
-
type: 'object',
|
|
10116
|
-
properties: {
|
|
10117
|
-
uri: { type: 'string' },
|
|
10118
|
-
method: {
|
|
10119
|
-
type: 'string',
|
|
10120
|
-
enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
|
|
10121
|
-
},
|
|
10122
|
-
body: {},
|
|
10123
|
-
query: {
|
|
10124
|
-
type: 'object',
|
|
10125
|
-
section: true,
|
|
10126
|
-
additionalProperties: true,
|
|
10127
|
-
},
|
|
10128
|
-
headers: {
|
|
10129
|
-
type: 'object',
|
|
10130
|
-
section: true,
|
|
10131
|
-
additionalProperties: true,
|
|
10132
|
-
},
|
|
10133
|
-
},
|
|
10134
|
-
};
|
|
10135
|
-
|
|
10136
10277
|
const BaseAppEventType = BaseMembraneInterface.extend({
|
|
10137
10278
|
revision: z.z.string(),
|
|
10138
10279
|
archivedAt: z.z.string().optional(),
|
|
@@ -10151,7 +10292,7 @@ const AppEventTypeEditableProperties = BaseMembraneInterfaceEditableProperties.e
|
|
|
10151
10292
|
userIdFormula: z.z.any().optional(),
|
|
10152
10293
|
subscribeRequest: HttpRequestSpec.optional(),
|
|
10153
10294
|
});
|
|
10154
|
-
const AppEventTypeExportProperties =
|
|
10295
|
+
const AppEventTypeExportProperties = BaseExportProperties.extend({});
|
|
10155
10296
|
|
|
10156
10297
|
const BaseAppEventSubscription = BaseMembraneInterface.extend({
|
|
10157
10298
|
...TenantLayerElement.shape,
|
|
@@ -10173,7 +10314,7 @@ const AppDataSchemaSpecificProperties = z.z.object({
|
|
|
10173
10314
|
code: z.z.string().optional(),
|
|
10174
10315
|
});
|
|
10175
10316
|
const AppDataSchemaEditableProperties = BaseMembraneInterfaceEditableProperties.extend(AppDataSchemaSpecificProperties.shape);
|
|
10176
|
-
const AppDataSchemaExportProperties =
|
|
10317
|
+
const AppDataSchemaExportProperties = BaseExportProperties.extend(AppDataSchemaSpecificProperties.shape).omit({
|
|
10177
10318
|
appDataSchemaId: true,
|
|
10178
10319
|
});
|
|
10179
10320
|
const AppDataSchemaReadOnlyProperties = BaseMembraneInterfaceReadOnlyProperties.extend({
|
|
@@ -10210,6 +10351,7 @@ const BaseExternalEventSubscription = TenantLayerElement.extend({
|
|
|
10210
10351
|
name: z.z.string().optional(),
|
|
10211
10352
|
connectionId: z.z.string(),
|
|
10212
10353
|
integrationId: z.z.string(),
|
|
10354
|
+
externalEventTypeId: z.z.string().optional(),
|
|
10213
10355
|
config: ExternalEventSubscriptionConfig.optional(),
|
|
10214
10356
|
status: z.z.enum(exports.ExternalEventSubscriptionStatus).optional(),
|
|
10215
10357
|
error: ErrorDataSchema.optional(),
|
|
@@ -10226,6 +10368,7 @@ const BaseExternalEventSubscription = TenantLayerElement.extend({
|
|
|
10226
10368
|
nextRefreshTimestamp: z.z.number().optional(),
|
|
10227
10369
|
globalWebhookKey: z.z.string().optional(),
|
|
10228
10370
|
globalWebhookEventSelector: z.z.string().optional(),
|
|
10371
|
+
incomingWebhookUri: z.z.string().optional(),
|
|
10229
10372
|
webhookUri: z.z.string().optional(),
|
|
10230
10373
|
});
|
|
10231
10374
|
|
|
@@ -10240,6 +10383,7 @@ const BaseExternalEventLogRecord = ActivityLogRecord.extend({
|
|
|
10240
10383
|
externalEventSubscriptionId: z.z.string(),
|
|
10241
10384
|
integrationId: z.z.string(),
|
|
10242
10385
|
connectionId: z.z.string(),
|
|
10386
|
+
externalEventTypeId: z.z.string().optional(),
|
|
10243
10387
|
payload: z.z.any().optional(),
|
|
10244
10388
|
launchedFlowRunIds: z.z.array(z.z.string()).optional(),
|
|
10245
10389
|
status: z.z.enum(exports.ExternalEventLogStatus),
|
|
@@ -10263,8 +10407,71 @@ const BaseExternalEventPull = ActivityLogRecord.extend({
|
|
|
10263
10407
|
isFullScan: z.z.boolean().optional(),
|
|
10264
10408
|
status: z.z.enum(exports.ExternalEventPullStatus),
|
|
10265
10409
|
collectedEventIds: z.z.array(z.z.string()),
|
|
10410
|
+
telemetryUri: z.z
|
|
10411
|
+
.string()
|
|
10412
|
+
.optional()
|
|
10413
|
+
.describe('Storage key of the per-pull diagnostic telemetry artifact (what this pull observed and why it did or did not emit events). Read via GET /external-event-pulls/{id}/telemetry.'),
|
|
10266
10414
|
error: ErrorDataSchema.optional(),
|
|
10267
10415
|
});
|
|
10416
|
+
const ExternalEventPullTelemetry = z.z.object({
|
|
10417
|
+
pullId: z.z.string(),
|
|
10418
|
+
subscriptionId: z.z.string(),
|
|
10419
|
+
connectionId: z.z.string().optional(),
|
|
10420
|
+
strategy: z.z.enum(['full-scan', 'pull-latest-records', 'custom-pull', 'skipped', 'unknown']),
|
|
10421
|
+
eventType: z.z.string().optional(),
|
|
10422
|
+
collectionKey: z.z.string().optional(),
|
|
10423
|
+
startedAt: z.z.string(),
|
|
10424
|
+
finishedAt: z.z.string(),
|
|
10425
|
+
emittedEventCount: z.z.number(),
|
|
10426
|
+
emittedEvents: z.z.array(z.z.object({ type: z.z.string(), recordId: z.z.string().optional() })),
|
|
10427
|
+
notes: z.z.array(z.z.string()),
|
|
10428
|
+
fullScan: z.z
|
|
10429
|
+
.object({
|
|
10430
|
+
totalRecords: z.z.number(),
|
|
10431
|
+
totalPages: z.z.number(),
|
|
10432
|
+
previousSnapshotId: z.z.string().optional(),
|
|
10433
|
+
previousSnapshotRecordCount: z.z.number().optional(),
|
|
10434
|
+
previousSnapshotMissing: z.z.boolean(),
|
|
10435
|
+
newSnapshotId: z.z.string().optional(),
|
|
10436
|
+
isBaseline: z.z.boolean(),
|
|
10437
|
+
})
|
|
10438
|
+
.optional(),
|
|
10439
|
+
pullLatest: z.z
|
|
10440
|
+
.object({
|
|
10441
|
+
stateBefore: z.z.object({ id: z.z.string().optional(), datetime: z.z.string().optional() }).optional(),
|
|
10442
|
+
stateAfter: z.z.object({ id: z.z.string().optional(), datetime: z.z.string().optional() }).optional(),
|
|
10443
|
+
pagesScanned: z.z.number(),
|
|
10444
|
+
scannedRecords: z.z.array(z.z.object({ id: z.z.string(), datetime: z.z.string().optional() })),
|
|
10445
|
+
newRecordIds: z.z.array(z.z.string()),
|
|
10446
|
+
isBaseline: z.z.boolean(),
|
|
10447
|
+
})
|
|
10448
|
+
.optional(),
|
|
10449
|
+
});
|
|
10450
|
+
|
|
10451
|
+
exports.ExternalEventTypeImplementationType = void 0;
|
|
10452
|
+
(function (ExternalEventTypeImplementationType) {
|
|
10453
|
+
ExternalEventTypeImplementationType["Webhook"] = "webhook";
|
|
10454
|
+
})(exports.ExternalEventTypeImplementationType || (exports.ExternalEventTypeImplementationType = {}));
|
|
10455
|
+
const EXTERNAL_EVENT_TYPE_FUNCTION_KEYS = ['subscribe', 'unsubscribe', 'handle', 'refresh'];
|
|
10456
|
+
const ExternalEventTypeCommonFields = {
|
|
10457
|
+
schema: DataSchema.optional(),
|
|
10458
|
+
parametersSchema: DataSchema.optional(),
|
|
10459
|
+
example: z.z.any().optional(),
|
|
10460
|
+
type: z.z.nativeEnum(exports.ExternalEventTypeImplementationType).optional(),
|
|
10461
|
+
subscribe: GenericFunctionDefinition.optional(),
|
|
10462
|
+
unsubscribe: GenericFunctionDefinition.optional(),
|
|
10463
|
+
handle: GenericFunctionDefinition.optional(),
|
|
10464
|
+
refresh: GenericFunctionDefinition.optional(),
|
|
10465
|
+
};
|
|
10466
|
+
const ExternalEventTypeEditableProperties = BaseIntegrationLevelMembraneInterfaceEditableProperties.extend({
|
|
10467
|
+
...ExternalEventTypeCommonFields,
|
|
10468
|
+
});
|
|
10469
|
+
const ExternalEventTypeExportProperties = BaseIntegrationLevelMembraneInterfaceExportProperties.extend({
|
|
10470
|
+
...ExternalEventTypeCommonFields,
|
|
10471
|
+
});
|
|
10472
|
+
const BaseExternalEventType = BaseIntegrationLevelMembraneInterface.extend({
|
|
10473
|
+
...ExternalEventTypeCommonFields,
|
|
10474
|
+
});
|
|
10268
10475
|
|
|
10269
10476
|
exports.ActionRunLogStatus = void 0;
|
|
10270
10477
|
(function (ActionRunLogStatus) {
|
|
@@ -10279,8 +10486,10 @@ const BaseActionRunLogRecord = ActivityLogRecord.extend({
|
|
|
10279
10486
|
actionId: z.z.string().optional().describe('[INTERNAL] Deprecated: Use integrationActionId instead'),
|
|
10280
10487
|
actionInstanceId: z.z.string().optional().describe('[INTERNAL] Deprecated: Use connectionActionId instead'),
|
|
10281
10488
|
integrationId: z.z.string(),
|
|
10282
|
-
connectionId: z.z
|
|
10283
|
-
|
|
10489
|
+
connectionId: z.z
|
|
10490
|
+
.string()
|
|
10491
|
+
.describe('[DEPRECATED] Deprecated: Read from action.connectionId or action.connectionKey instead'),
|
|
10492
|
+
input: z.z.any().optional().describe('[DEPRECATED] Deprecated: Read from action.input instead'),
|
|
10284
10493
|
output: z.z.any().optional(),
|
|
10285
10494
|
status: z.z.enum(exports.ActionRunLogStatus),
|
|
10286
10495
|
createdAt: z.z.string(),
|
|
@@ -10288,6 +10497,7 @@ const BaseActionRunLogRecord = ActivityLogRecord.extend({
|
|
|
10288
10497
|
error: ErrorDataSchema.optional(),
|
|
10289
10498
|
duration: z.z.number().optional(),
|
|
10290
10499
|
meta: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
10500
|
+
action: ActionSnapshot.optional().describe('Complete /act-body snapshot of what ran — sufficient to replay the run by POSTing back to /act.'),
|
|
10291
10501
|
});
|
|
10292
10502
|
|
|
10293
10503
|
const ConnectedProductType = z.z.enum(['ai-agent', 'app']);
|
|
@@ -10433,7 +10643,6 @@ const ListActionInstancesForConnectionQuery = FindActionsQuery;
|
|
|
10433
10643
|
const FindActionInstancesQuery = FindActionsQuery;
|
|
10434
10644
|
|
|
10435
10645
|
const ActionRunLogRecordApiResponse = BaseActionRunLogRecord.extend({
|
|
10436
|
-
action: BaseAction.optional(),
|
|
10437
10646
|
actionInstance: BaseAction.optional(),
|
|
10438
10647
|
integration: BaseIntegration.optional(),
|
|
10439
10648
|
connection: BaseConnection.optional(),
|
|
@@ -10660,6 +10869,18 @@ const ConnectionMessagePayload = z.z.discriminatedUnion('type', [
|
|
|
10660
10869
|
connectionId: z.z.string().optional(),
|
|
10661
10870
|
}),
|
|
10662
10871
|
]);
|
|
10872
|
+
const ConnectionEntityMessagePayload = z.z.discriminatedUnion('type', [
|
|
10873
|
+
z.z.object({
|
|
10874
|
+
type: z.z.literal('connected'),
|
|
10875
|
+
connectionId: z.z.string(),
|
|
10876
|
+
timestamp: z.z.string(),
|
|
10877
|
+
message: z.z.string().optional(),
|
|
10878
|
+
}),
|
|
10879
|
+
z.z.object({
|
|
10880
|
+
type: z.z.literal('connectionPatched'),
|
|
10881
|
+
connectionId: z.z.string(),
|
|
10882
|
+
}),
|
|
10883
|
+
]);
|
|
10663
10884
|
const GenerateOptionsRequest = z.z.object({
|
|
10664
10885
|
integrationId: z.z.string().optional(),
|
|
10665
10886
|
integrationKey: z.z.string().optional(),
|
|
@@ -10670,12 +10891,15 @@ const GenerateOptionsRequest = z.z.object({
|
|
|
10670
10891
|
connectorVersion: z.z.string().optional(),
|
|
10671
10892
|
});
|
|
10672
10893
|
const ConnectPayload = z.z.object({
|
|
10894
|
+
type: ConnectionType.optional(),
|
|
10673
10895
|
requestId: z.z.string().optional(),
|
|
10674
10896
|
integrationKey: z.z.string().optional(),
|
|
10675
10897
|
integrationId: z.z.string().optional(),
|
|
10676
10898
|
connectorId: z.z.string().optional(),
|
|
10677
10899
|
connectorKey: z.z.string().optional(),
|
|
10678
10900
|
connectorVersion: z.z.string().optional(),
|
|
10901
|
+
externalAppId: z.z.string().optional(),
|
|
10902
|
+
externalAppKey: z.z.string().optional(),
|
|
10679
10903
|
connectionId: z.z.string().optional(),
|
|
10680
10904
|
connectionKey: z.z.string().min(1).max(100).optional(),
|
|
10681
10905
|
name: z.z.string().optional(),
|
|
@@ -10696,6 +10920,15 @@ const ConnectUIOptions = ConnectPayload.omit({ input: true, redirectUri: true })
|
|
|
10696
10920
|
const ListPublicConnectorsQuery = PaginationQuery.merge(IncludeArchivedQuery).extend({
|
|
10697
10921
|
search: z.z.string().optional(),
|
|
10698
10922
|
});
|
|
10923
|
+
const ListConnectorsQuery = z.z.object({
|
|
10924
|
+
limit: z.z.coerce.number().optional(),
|
|
10925
|
+
cursor: z.z.string().optional(),
|
|
10926
|
+
workspaceId: z.z.string().optional().describe('[INTERNAL] Legacy field for backward compatibility'),
|
|
10927
|
+
search: z.z.string().optional(),
|
|
10928
|
+
appUuid: z.z.string().optional(),
|
|
10929
|
+
externalAppId: z.z.string().optional(),
|
|
10930
|
+
includeArchived: zodBooleanCoercion().optional(),
|
|
10931
|
+
});
|
|
10699
10932
|
|
|
10700
10933
|
const DataSourceApiResponse = BaseDataSource.extend({
|
|
10701
10934
|
integration: BaseIntegration.optional(),
|
|
@@ -10784,6 +11017,27 @@ const ListExternalAppsQuery = PaginationQuery.merge(IncludeArchivedQuery).extend
|
|
|
10784
11017
|
isFlag: true,
|
|
10785
11018
|
}),
|
|
10786
11019
|
});
|
|
11020
|
+
const CreateExternalAppRequest = z.z.object({
|
|
11021
|
+
key: z.z.string().min(1).describe('Machine key (e.g., "attio"). Unique per workspace.'),
|
|
11022
|
+
name: z.z.string().min(1).describe('Human-readable app name (e.g., "Attio").'),
|
|
11023
|
+
appUri: z.z.url().optional().describe('App\'s main URL (e.g., "https://attio.com").'),
|
|
11024
|
+
logoUri: z.z.url().optional(),
|
|
11025
|
+
categories: z.z.array(z.z.string()).optional().describe('[INTERNAL] Categorization tags used by the Universe catalog.'),
|
|
11026
|
+
defaultConnectorId: z.z
|
|
11027
|
+
.string()
|
|
11028
|
+
.optional()
|
|
11029
|
+
.describe('[INTERNAL] Connector ID surfaced as the default for this app in the Universe catalog.'),
|
|
11030
|
+
basePackageId: z.z.string().optional().describe('[INTERNAL] Base package ID this app is derived from.'),
|
|
11031
|
+
hasFreeTestAccount: z.z.boolean().nullable().optional().describe('[INTERNAL] Whether the app has a free test account.'),
|
|
11032
|
+
freeTestAccountGuide: z.z.string().optional().describe('[INTERNAL] Guide for obtaining a free test account.'),
|
|
11033
|
+
freeTestAccountGuideVerifiedAt: z.z.iso
|
|
11034
|
+
.datetime()
|
|
11035
|
+
.nullable()
|
|
11036
|
+
.optional()
|
|
11037
|
+
.describe('[INTERNAL] When the free test account guide was last verified.'),
|
|
11038
|
+
tenantId: z.z.string().optional(),
|
|
11039
|
+
});
|
|
11040
|
+
const UpdateExternalAppRequest = CreateExternalAppRequest.partial();
|
|
10787
11041
|
|
|
10788
11042
|
const ExternalEvent = BaseExternalEvent.extend({
|
|
10789
11043
|
appliedToIntegrations: AppliedToIntegrations(BaseExternalEvent).optional(),
|
|
@@ -10917,7 +11171,7 @@ const FindFlowRunsResponse = z.z.object({
|
|
|
10917
11171
|
cursor: z.z.string().optional(),
|
|
10918
11172
|
});
|
|
10919
11173
|
|
|
10920
|
-
const CreateIntegrationRequest = IntegrationEditableProperties;
|
|
11174
|
+
const CreateIntegrationRequest = IntegrationEditableProperties.merge(IntentProperties);
|
|
10921
11175
|
const UpdateIntegrationRequest = IntegrationEditableProperties.partial();
|
|
10922
11176
|
const FindIntegrationsQuery = z.z
|
|
10923
11177
|
.object({
|
|
@@ -10934,6 +11188,10 @@ const FindIntegrationsQuery = z.z
|
|
|
10934
11188
|
.number()
|
|
10935
11189
|
.optional()
|
|
10936
11190
|
.describe('Override auto-generate integrations from web search: 1 to enable, 0 to disable'),
|
|
11191
|
+
all: z.z.coerce
|
|
11192
|
+
.number()
|
|
11193
|
+
.optional()
|
|
11194
|
+
.describe('Enable all auto-generation sources (connectors, external apps, web search) regardless of workspace settings or per-source flags'),
|
|
10937
11195
|
})
|
|
10938
11196
|
.merge(PaginationQuery)
|
|
10939
11197
|
.merge(SearchQuery)
|
|
@@ -10957,12 +11215,12 @@ const IntegrationApiResponse = BaseIntegration.extend({
|
|
|
10957
11215
|
.array(IntegrationAuthOption)
|
|
10958
11216
|
.optional()
|
|
10959
11217
|
.describe('[INTERNAL] Deprecated: Use POST /connectors/:id/generate-options instead'),
|
|
10960
|
-
});
|
|
10961
|
-
const IntegrationListItem = IntegrationApiResponse.extend({
|
|
10962
11218
|
id: z.z.string().optional(),
|
|
10963
11219
|
logoUri: z.z.string().optional(),
|
|
10964
11220
|
appUri: z.z.string().optional(),
|
|
11221
|
+
isConnected: z.z.boolean().optional(),
|
|
10965
11222
|
});
|
|
11223
|
+
const IntegrationListItem = IntegrationApiResponse;
|
|
10966
11224
|
|
|
10967
11225
|
const PackageElementApi = z.z.object({
|
|
10968
11226
|
id: z.z.string(),
|
|
@@ -11010,7 +11268,7 @@ const CheckpointApiResponse = z.z.object({
|
|
|
11010
11268
|
checkpointNumber: z.z.number(),
|
|
11011
11269
|
snapshot: z.z.record(z.z.string(), z.z.unknown()),
|
|
11012
11270
|
createdAt: z.z.string(),
|
|
11013
|
-
|
|
11271
|
+
asyncRequestId: z.z.string().optional(),
|
|
11014
11272
|
metadata: z.z.record(z.z.string(), z.z.unknown()).optional(),
|
|
11015
11273
|
});
|
|
11016
11274
|
const CheckpointDiffOperationSchema = z.z.object({
|
|
@@ -11342,6 +11600,13 @@ const ListExternalEventLogRecordsQuery = PaginationQuery.extend({
|
|
|
11342
11600
|
filterTitle: 'Event Subscription',
|
|
11343
11601
|
referenceElementType: exports.WorkspaceElementType.ExternalEventSubscription,
|
|
11344
11602
|
}),
|
|
11603
|
+
externalEventTypeId: z.z
|
|
11604
|
+
.string()
|
|
11605
|
+
.optional()
|
|
11606
|
+
.meta({
|
|
11607
|
+
filterTitle: 'External Event Type',
|
|
11608
|
+
referenceElementType: exports.WorkspaceElementType.ExternalEventType,
|
|
11609
|
+
}),
|
|
11345
11610
|
status: z.z
|
|
11346
11611
|
.enum(exports.ExternalEventLogStatus)
|
|
11347
11612
|
.optional()
|
|
@@ -11493,6 +11758,13 @@ const ListExternalEventSubscriptionsQuery = PaginationQuery.merge(IncludeArchive
|
|
|
11493
11758
|
externalAppId: z.z.string().optional().meta({
|
|
11494
11759
|
hidden: true,
|
|
11495
11760
|
}),
|
|
11761
|
+
externalEventTypeId: z.z
|
|
11762
|
+
.string()
|
|
11763
|
+
.optional()
|
|
11764
|
+
.meta({
|
|
11765
|
+
filterTitle: 'External Event Type',
|
|
11766
|
+
referenceElementType: exports.WorkspaceElementType.ExternalEventType,
|
|
11767
|
+
}),
|
|
11496
11768
|
status: z.z
|
|
11497
11769
|
.enum(exports.ExternalEventSubscriptionStatus)
|
|
11498
11770
|
.optional()
|
|
@@ -11500,11 +11772,56 @@ const ListExternalEventSubscriptionsQuery = PaginationQuery.merge(IncludeArchive
|
|
|
11500
11772
|
filterTitle: 'Status',
|
|
11501
11773
|
}),
|
|
11502
11774
|
});
|
|
11775
|
+
const CreateExternalEventSubscriptionRequest = z.z.object({
|
|
11776
|
+
connectionId: z.z.string(),
|
|
11777
|
+
externalEventTypeId: z.z.string(),
|
|
11778
|
+
});
|
|
11503
11779
|
const ExternalEventSubscriptionApiResponse = BaseExternalEventSubscription.extend({
|
|
11504
11780
|
user: BaseCustomer.optional(),
|
|
11505
11781
|
connection: BaseConnection.optional(),
|
|
11506
11782
|
integration: BaseIntegration.optional(),
|
|
11507
11783
|
});
|
|
11784
|
+
const PatchExternalEventSubscriptionRequest = z.z.object({
|
|
11785
|
+
webhookUri: z.z.url().or(z.z.literal('')).optional(),
|
|
11786
|
+
});
|
|
11787
|
+
|
|
11788
|
+
const CreateExternalEventTypeRequest = ExternalEventTypeEditableProperties.extend({
|
|
11789
|
+
name: z.z.string(),
|
|
11790
|
+
});
|
|
11791
|
+
const UpdateExternalEventTypeRequest = ExternalEventTypeEditableProperties;
|
|
11792
|
+
const FindExternalEventTypesQuery = FindIntegrationLevelMembraneInterfaceQuery.extend({
|
|
11793
|
+
isUniversal: zodBooleanCoercion()
|
|
11794
|
+
.optional()
|
|
11795
|
+
.meta({
|
|
11796
|
+
filterTitle: 'Is Universal',
|
|
11797
|
+
isFlag: true,
|
|
11798
|
+
}),
|
|
11799
|
+
externalAppId: z.z
|
|
11800
|
+
.string()
|
|
11801
|
+
.optional()
|
|
11802
|
+
.meta({
|
|
11803
|
+
filterTitle: 'External App',
|
|
11804
|
+
referenceElementType: exports.WorkspaceElementType.App,
|
|
11805
|
+
}),
|
|
11806
|
+
tenantId: z.z
|
|
11807
|
+
.string()
|
|
11808
|
+
.optional()
|
|
11809
|
+
.meta({
|
|
11810
|
+
filterTitle: 'Tenant',
|
|
11811
|
+
referenceElementType: exports.WorkspaceElementType.Customer,
|
|
11812
|
+
}),
|
|
11813
|
+
parentId: z.z
|
|
11814
|
+
.string()
|
|
11815
|
+
.optional()
|
|
11816
|
+
.meta({ hidden: true }),
|
|
11817
|
+
universalParentId: z.z
|
|
11818
|
+
.string()
|
|
11819
|
+
.optional()
|
|
11820
|
+
.meta({ hidden: true }),
|
|
11821
|
+
});
|
|
11822
|
+
const ExternalEventTypeApiResponse = BaseExternalEventType.extend({
|
|
11823
|
+
appliedToIntegrations: AppliedToIntegrations(BaseExternalEventType).optional(),
|
|
11824
|
+
});
|
|
11508
11825
|
|
|
11509
11826
|
const ListAppEventLogRecordsQuery = CommonListElementsQuery.extend({
|
|
11510
11827
|
tenantId: z.z
|
|
@@ -11641,6 +11958,13 @@ const ListIncomingWebhooksQuery = PaginationQuery.extend({
|
|
|
11641
11958
|
filterTitle: 'Connection',
|
|
11642
11959
|
referenceElementType: exports.WorkspaceElementType.Connection,
|
|
11643
11960
|
}),
|
|
11961
|
+
subscriptionId: z.z
|
|
11962
|
+
.string()
|
|
11963
|
+
.optional()
|
|
11964
|
+
.meta({
|
|
11965
|
+
filterTitle: 'Subscription',
|
|
11966
|
+
referenceElementType: exports.WorkspaceElementType.ExternalEventSubscription,
|
|
11967
|
+
}),
|
|
11644
11968
|
status: z.z
|
|
11645
11969
|
.enum(exports.IncomingWebhooksState)
|
|
11646
11970
|
.optional()
|
|
@@ -11971,6 +12295,7 @@ const AI_GATEWAY_SUPPORTED_MODELS = [
|
|
|
11971
12295
|
{ id: 'anthropic/claude-opus-4.6', name: 'Claude Opus 4.6' },
|
|
11972
12296
|
{ id: 'anthropic/claude-sonnet-4.5', name: 'Claude Sonnet 4.5' },
|
|
11973
12297
|
{ id: 'anthropic/claude-opus-4.5', name: 'Claude Opus 4.5' },
|
|
12298
|
+
{ id: 'anthropic/claude-haiku-4.5', name: 'Claude Haiku 4.5' },
|
|
11974
12299
|
{ id: 'openai/gpt-5.2', name: 'GPT-5.2' },
|
|
11975
12300
|
{ id: 'openai/gpt-5-nano', name: 'GPT-5 Nano' },
|
|
11976
12301
|
{ id: 'google/gemini-3-pro-preview', name: 'Gemini 3 Pro' },
|
|
@@ -12017,8 +12342,8 @@ const AgentSession = z.z.object({
|
|
|
12017
12342
|
id: z.z.string(),
|
|
12018
12343
|
workspaceId: z.z.string(),
|
|
12019
12344
|
orgWorkspaceId: z.z.string().optional(),
|
|
12020
|
-
workspaceElementType: z.z.enum(exports.WorkspaceElementType),
|
|
12021
|
-
workspaceElementId: z.z.string(),
|
|
12345
|
+
workspaceElementType: z.z.enum(exports.WorkspaceElementType).optional(),
|
|
12346
|
+
workspaceElementId: z.z.string().optional(),
|
|
12022
12347
|
type: z.z.string(),
|
|
12023
12348
|
status: z.z.enum(exports.AgentSessionStatus),
|
|
12024
12349
|
prompt: z.z.string(),
|
|
@@ -12033,6 +12358,8 @@ const AgentSession = z.z.object({
|
|
|
12033
12358
|
hasWorker: z.z.boolean(),
|
|
12034
12359
|
isExternal: z.z.boolean().optional(),
|
|
12035
12360
|
agentName: z.z.enum(exports.AgentName).optional(),
|
|
12361
|
+
agentHarnessId: z.z.string().optional(),
|
|
12362
|
+
agentHarnessSnapshotId: z.z.string().optional(),
|
|
12036
12363
|
output: z.z.record(z.z.string(), z.z.unknown()).optional(),
|
|
12037
12364
|
createdAt: z.z.iso.datetime(),
|
|
12038
12365
|
updatedAt: z.z.iso.datetime(),
|
|
@@ -12049,6 +12376,7 @@ const CreateAgentSession = z.z.object({
|
|
|
12049
12376
|
isExternal: z.z.boolean().optional(),
|
|
12050
12377
|
modelId: AIGatewaySupportedModelIdSchema.optional(),
|
|
12051
12378
|
agentName: z.z.enum(exports.AgentName).optional(),
|
|
12379
|
+
agentHarnessId: z.z.string().min(1).optional(),
|
|
12052
12380
|
promptAttachments: z.z.array(AgentSessionAttachment).optional(),
|
|
12053
12381
|
});
|
|
12054
12382
|
const AgentSessionInputSchema = z.z.object({
|
|
@@ -12192,6 +12520,8 @@ const WorkspaceElementSpecs = {
|
|
|
12192
12520
|
editablePropertiesSchema: IntegrationEditableProperties,
|
|
12193
12521
|
exportPropertiesSchema: IntegrationExportProperties,
|
|
12194
12522
|
hasKey: true,
|
|
12523
|
+
isAgentic: true,
|
|
12524
|
+
agentName: exports.AgentName.CONNECTION_BUILDING,
|
|
12195
12525
|
relatedIntegrationLayerElements: [
|
|
12196
12526
|
exports.WorkspaceElementType.Connection,
|
|
12197
12527
|
exports.WorkspaceElementType.Package,
|
|
@@ -12446,8 +12776,8 @@ const WorkspaceElementSpecs = {
|
|
|
12446
12776
|
[exports.WorkspaceElementType.AppEventType]: {
|
|
12447
12777
|
type: exports.WorkspaceElementType.AppEventType,
|
|
12448
12778
|
apiPath: 'app-event-types',
|
|
12449
|
-
name: '
|
|
12450
|
-
namePlural: '
|
|
12779
|
+
name: 'Internal Event Type',
|
|
12780
|
+
namePlural: 'Internal Event Types',
|
|
12451
12781
|
isMembraneInterface: true,
|
|
12452
12782
|
exportPropertiesSchema: AppEventTypeExportProperties,
|
|
12453
12783
|
editablePropertiesSchema: AppEventTypeEditableProperties,
|
|
@@ -12459,8 +12789,8 @@ const WorkspaceElementSpecs = {
|
|
|
12459
12789
|
type: exports.WorkspaceElementType.AppEventSubscription,
|
|
12460
12790
|
apiPath: 'app-event-subscriptions',
|
|
12461
12791
|
collectionName: 'app-event-subscriptions',
|
|
12462
|
-
name: '
|
|
12463
|
-
namePlural: '
|
|
12792
|
+
name: 'Internal Event Subscription',
|
|
12793
|
+
namePlural: 'Internal Event Subscriptions',
|
|
12464
12794
|
isMembraneInterface: true,
|
|
12465
12795
|
isProOnly: true,
|
|
12466
12796
|
statsKey: 'appEventSubscriptions',
|
|
@@ -12468,8 +12798,8 @@ const WorkspaceElementSpecs = {
|
|
|
12468
12798
|
[exports.WorkspaceElementType.AppEventLogRecord]: {
|
|
12469
12799
|
type: exports.WorkspaceElementType.AppEventLogRecord,
|
|
12470
12800
|
apiPath: 'app-events',
|
|
12471
|
-
name: '
|
|
12472
|
-
namePlural: '
|
|
12801
|
+
name: 'Internal Event Log Record',
|
|
12802
|
+
namePlural: 'Internal Event Log Records',
|
|
12473
12803
|
isProOnly: true,
|
|
12474
12804
|
statsKey: 'appEvents',
|
|
12475
12805
|
},
|
|
@@ -12523,9 +12853,27 @@ const WorkspaceElementSpecs = {
|
|
|
12523
12853
|
isProOnly: true,
|
|
12524
12854
|
statsKey: 'externalEventPulls',
|
|
12525
12855
|
},
|
|
12526
|
-
[exports.WorkspaceElementType.
|
|
12527
|
-
type: exports.WorkspaceElementType.
|
|
12528
|
-
apiPath: 'external-
|
|
12856
|
+
[exports.WorkspaceElementType.ExternalEventType]: {
|
|
12857
|
+
type: exports.WorkspaceElementType.ExternalEventType,
|
|
12858
|
+
apiPath: 'external-event-types',
|
|
12859
|
+
collectionName: 'external-event-types',
|
|
12860
|
+
name: 'External Event Type',
|
|
12861
|
+
namePlural: 'External Event Types',
|
|
12862
|
+
isMembraneInterface: true,
|
|
12863
|
+
isIntegrationLevel: true,
|
|
12864
|
+
hasParentChildRelationship: true,
|
|
12865
|
+
parentFieldKey: 'parentId',
|
|
12866
|
+
apiResponseSchema: ExternalEventTypeApiResponse,
|
|
12867
|
+
findQuerySchema: FindExternalEventTypesQuery,
|
|
12868
|
+
editablePropertiesSchema: ExternalEventTypeEditableProperties,
|
|
12869
|
+
exportPropertiesSchema: ExternalEventTypeExportProperties,
|
|
12870
|
+
hasKey: true,
|
|
12871
|
+
hasUuid: true,
|
|
12872
|
+
statsKey: 'externalEventTypes',
|
|
12873
|
+
},
|
|
12874
|
+
[exports.WorkspaceElementType.ExternalApiLogRecord]: {
|
|
12875
|
+
type: exports.WorkspaceElementType.ExternalApiLogRecord,
|
|
12876
|
+
apiPath: 'external-api-logs',
|
|
12529
12877
|
name: 'External API Log Record',
|
|
12530
12878
|
namePlural: 'External API Log Records',
|
|
12531
12879
|
statsKey: 'externalApiLogs',
|
|
@@ -12553,6 +12901,30 @@ const WorkspaceElementSpecs = {
|
|
|
12553
12901
|
namePlural: 'Connected Products',
|
|
12554
12902
|
hasKey: true,
|
|
12555
12903
|
},
|
|
12904
|
+
[exports.WorkspaceElementType.AgentHarness]: {
|
|
12905
|
+
type: exports.WorkspaceElementType.AgentHarness,
|
|
12906
|
+
apiPath: 'agent/harness',
|
|
12907
|
+
collectionName: 'agent-harnesses',
|
|
12908
|
+
name: 'Agent Harness',
|
|
12909
|
+
namePlural: 'Agent Harnesses',
|
|
12910
|
+
hasKey: true,
|
|
12911
|
+
},
|
|
12912
|
+
[exports.WorkspaceElementType.AgentSkill]: {
|
|
12913
|
+
type: exports.WorkspaceElementType.AgentSkill,
|
|
12914
|
+
apiPath: 'agent/skills',
|
|
12915
|
+
collectionName: 'agent-skills',
|
|
12916
|
+
name: 'Agent Skill',
|
|
12917
|
+
namePlural: 'Agent Skills',
|
|
12918
|
+
hasKey: true,
|
|
12919
|
+
},
|
|
12920
|
+
[exports.WorkspaceElementType.AgentInstruction]: {
|
|
12921
|
+
type: exports.WorkspaceElementType.AgentInstruction,
|
|
12922
|
+
apiPath: 'agent/instructions',
|
|
12923
|
+
collectionName: 'agent-instructions',
|
|
12924
|
+
name: 'Agent Instruction',
|
|
12925
|
+
namePlural: 'Agent Instructions',
|
|
12926
|
+
hasKey: true,
|
|
12927
|
+
},
|
|
12556
12928
|
};
|
|
12557
12929
|
function getEditablePathsForElementType(elementType) {
|
|
12558
12930
|
return getEditablePathsForElementType$1(WorkspaceElementSpecs, elementType);
|
|
@@ -12612,6 +12984,11 @@ function getConnectorVersionPath(connectorUuid, version) {
|
|
|
12612
12984
|
const versionDir = version === CONNECTOR_VERSION_DEVELOPMENT ? 'development' : version;
|
|
12613
12985
|
return `${connectorsPath}/${connectorUuid}/${versionDir}/src.zip`;
|
|
12614
12986
|
}
|
|
12987
|
+
function getConnectorVersionSpecPath(connectorUuid, version) {
|
|
12988
|
+
const connectorsPath = WorkspaceElementSpecs[exports.WorkspaceElementType.Connector].apiPath;
|
|
12989
|
+
const versionDir = version === CONNECTOR_VERSION_DEVELOPMENT ? 'development' : version;
|
|
12990
|
+
return `${connectorsPath}/${connectorUuid}/${versionDir}/spec.yml`;
|
|
12991
|
+
}
|
|
12615
12992
|
|
|
12616
12993
|
class SelfAccessor {
|
|
12617
12994
|
constructor(client) {
|
|
@@ -13567,12 +13944,6 @@ const GenerateWorkspaceAccessTokenRequest = z.z.object({
|
|
|
13567
13944
|
const GenerateWorkspaceAccessTokenResponse = z.z.object({
|
|
13568
13945
|
token: z.z.string().describe('The generated access token'),
|
|
13569
13946
|
});
|
|
13570
|
-
const ListWorkspacesQuery = z.z
|
|
13571
|
-
.object({
|
|
13572
|
-
orgId: z.z.string().optional().describe('Filter workspaces by organization ID'),
|
|
13573
|
-
workspaceKey: z.z.string().optional().describe('Filter workspaces by workspace key'),
|
|
13574
|
-
})
|
|
13575
|
-
.merge(IncludeArchivedQuery);
|
|
13576
13947
|
const GetWorkspaceQuery = IncludeArchivedQuery;
|
|
13577
13948
|
const MembraneCredentials = z.z.object({
|
|
13578
13949
|
apiUri: z.z.string().describe('Uri for Membrane API'),
|
|
@@ -13637,7 +14008,7 @@ function compareWorkspaceExports(baseExport, targetExport, options = { includeDe
|
|
|
13637
14008
|
[exports.WorkspaceElementChangeType.UPDATE]: new Set(),
|
|
13638
14009
|
[exports.WorkspaceElementChangeType.DELETE]: new Set(),
|
|
13639
14010
|
};
|
|
13640
|
-
const
|
|
14011
|
+
const sourceUuidByTargetUuid = new Map();
|
|
13641
14012
|
const diffs = [];
|
|
13642
14013
|
const integrationMap = buildIntegrationsMap([
|
|
13643
14014
|
...(baseExport[exports.WorkspaceElementType.Integration] || []),
|
|
@@ -13664,11 +14035,46 @@ function compareWorkspaceExports(baseExport, targetExport, options = { includeDe
|
|
|
13664
14035
|
allSelectors.add(selector);
|
|
13665
14036
|
}
|
|
13666
14037
|
}
|
|
14038
|
+
const baseSelectorByUuid = new Map();
|
|
14039
|
+
for (const [selector, base] of baseMap) {
|
|
14040
|
+
if (base.element.uuid)
|
|
14041
|
+
baseSelectorByUuid.set(base.element.uuid, selector);
|
|
14042
|
+
}
|
|
14043
|
+
const pairs = [];
|
|
14044
|
+
const uuidPairedBaseSelectors = new Set();
|
|
14045
|
+
const uuidPairedTargetSelectors = new Set();
|
|
14046
|
+
for (const [selector, target] of targetMap) {
|
|
14047
|
+
const uuid = target.element.uuid;
|
|
14048
|
+
if (!uuid)
|
|
14049
|
+
continue;
|
|
14050
|
+
const baseSelector = baseSelectorByUuid.get(uuid);
|
|
14051
|
+
if (baseSelector === undefined || uuidPairedBaseSelectors.has(baseSelector))
|
|
14052
|
+
continue;
|
|
14053
|
+
const base = baseMap.get(baseSelector);
|
|
14054
|
+
if (base.type !== target.type)
|
|
14055
|
+
continue;
|
|
14056
|
+
pairs.push({ base, target });
|
|
14057
|
+
uuidPairedBaseSelectors.add(baseSelector);
|
|
14058
|
+
uuidPairedTargetSelectors.add(selector);
|
|
14059
|
+
}
|
|
13667
14060
|
for (const selector of allSelectors) {
|
|
13668
14061
|
const base = baseMap.get(selector);
|
|
13669
14062
|
const target = targetMap.get(selector);
|
|
14063
|
+
const baseFree = base !== undefined && !uuidPairedBaseSelectors.has(selector);
|
|
14064
|
+
const targetFree = target !== undefined && !uuidPairedTargetSelectors.has(selector);
|
|
14065
|
+
if (baseFree && targetFree) {
|
|
14066
|
+
pairs.push({ base, target });
|
|
14067
|
+
}
|
|
14068
|
+
else if (baseFree) {
|
|
14069
|
+
pairs.push({ base });
|
|
14070
|
+
}
|
|
14071
|
+
else if (targetFree) {
|
|
14072
|
+
pairs.push({ target });
|
|
14073
|
+
}
|
|
14074
|
+
}
|
|
14075
|
+
for (const { base, target } of pairs) {
|
|
13670
14076
|
if (base && target && base.element.uuid !== target.element.uuid) {
|
|
13671
|
-
|
|
14077
|
+
sourceUuidByTargetUuid.set(target.element.uuid, base.element.uuid);
|
|
13672
14078
|
}
|
|
13673
14079
|
const change = compareElementExports(base === null || base === void 0 ? void 0 : base.element, target === null || target === void 0 ? void 0 : target.element);
|
|
13674
14080
|
if (options.includeDeletions === false && (change === null || change === void 0 ? void 0 : change.type) === exports.WorkspaceElementChangeType.DELETE) {
|
|
@@ -13683,12 +14089,15 @@ function compareWorkspaceExports(baseExport, targetExport, options = { includeDe
|
|
|
13683
14089
|
changes[change.uuid] = { elementType: subject.type, path };
|
|
13684
14090
|
comparison[change.type].add(change.uuid);
|
|
13685
14091
|
if (options.includeDiff) {
|
|
14092
|
+
const basePath = base
|
|
14093
|
+
? getMembraneElementPath(base.type, base.element.key, getIntegrationIdentifier(base.element, integrationMap))
|
|
14094
|
+
: path;
|
|
13686
14095
|
const baseYaml = base ? yaml__namespace.dump(base.element, { sortKeys: true }) : '';
|
|
13687
14096
|
const targetYaml = target ? yaml__namespace.dump(target.element, { sortKeys: true }) : '';
|
|
13688
|
-
diffs.push(diff.createTwoFilesPatch(`a/${
|
|
14097
|
+
diffs.push(diff.createTwoFilesPatch(`a/${basePath}`, `b/${path}`, baseYaml, targetYaml));
|
|
13689
14098
|
}
|
|
13690
14099
|
}
|
|
13691
|
-
const result = { comparison, changes,
|
|
14100
|
+
const result = { comparison, changes, sourceUuidByTargetUuid };
|
|
13692
14101
|
if (options.includeDiff) {
|
|
13693
14102
|
result.diff = diffs.join('\n').trim();
|
|
13694
14103
|
}
|
|
@@ -13715,6 +14124,64 @@ function compareElementExports(baseElement, targetElement) {
|
|
|
13715
14124
|
}
|
|
13716
14125
|
return undefined;
|
|
13717
14126
|
}
|
|
14127
|
+
function emptyComparisonResult() {
|
|
14128
|
+
return {
|
|
14129
|
+
comparison: {
|
|
14130
|
+
[exports.WorkspaceElementChangeType.CREATE]: new Set(),
|
|
14131
|
+
[exports.WorkspaceElementChangeType.UPDATE]: new Set(),
|
|
14132
|
+
[exports.WorkspaceElementChangeType.DELETE]: new Set(),
|
|
14133
|
+
},
|
|
14134
|
+
changes: {},
|
|
14135
|
+
sourceUuidByTargetUuid: new Map(),
|
|
14136
|
+
};
|
|
14137
|
+
}
|
|
14138
|
+
function mergeComparisons(dest, src) {
|
|
14139
|
+
for (const changeType of Object.values(exports.WorkspaceElementChangeType)) {
|
|
14140
|
+
for (const uuid of src.comparison[changeType])
|
|
14141
|
+
dest.comparison[changeType].add(uuid);
|
|
14142
|
+
}
|
|
14143
|
+
Object.assign(dest.changes, src.changes);
|
|
14144
|
+
for (const [k, v] of src.sourceUuidByTargetUuid)
|
|
14145
|
+
dest.sourceUuidByTargetUuid.set(k, v);
|
|
14146
|
+
if (src.diff)
|
|
14147
|
+
dest.diff = dest.diff ? `${dest.diff}\n${src.diff}` : src.diff;
|
|
14148
|
+
return dest;
|
|
14149
|
+
}
|
|
14150
|
+
function compareElementMaps(baseElements, targetElements, type, options = { includeDeletions: true }) {
|
|
14151
|
+
const changes = {};
|
|
14152
|
+
const comparison = {
|
|
14153
|
+
[exports.WorkspaceElementChangeType.CREATE]: new Set(),
|
|
14154
|
+
[exports.WorkspaceElementChangeType.UPDATE]: new Set(),
|
|
14155
|
+
[exports.WorkspaceElementChangeType.DELETE]: new Set(),
|
|
14156
|
+
};
|
|
14157
|
+
const sourceUuidByTargetUuid = new Map();
|
|
14158
|
+
const diffs = [];
|
|
14159
|
+
const allPaths = new Set([...baseElements.keys(), ...targetElements.keys()]);
|
|
14160
|
+
for (const path of allPaths) {
|
|
14161
|
+
const base = baseElements.get(path);
|
|
14162
|
+
const target = targetElements.get(path);
|
|
14163
|
+
if (base && target && base.uuid !== target.uuid) {
|
|
14164
|
+
sourceUuidByTargetUuid.set(target.uuid, base.uuid);
|
|
14165
|
+
}
|
|
14166
|
+
const change = compareElementExports(base, target);
|
|
14167
|
+
if (options.includeDeletions === false && (change === null || change === void 0 ? void 0 : change.type) === exports.WorkspaceElementChangeType.DELETE)
|
|
14168
|
+
continue;
|
|
14169
|
+
if (!change)
|
|
14170
|
+
continue;
|
|
14171
|
+
changes[change.uuid] = { elementType: type, path };
|
|
14172
|
+
comparison[change.type].add(change.uuid);
|
|
14173
|
+
if (options.includeDiff) {
|
|
14174
|
+
const baseYaml = base ? yaml__namespace.dump(base, { sortKeys: true }) : '';
|
|
14175
|
+
const targetYaml = target ? yaml__namespace.dump(target, { sortKeys: true }) : '';
|
|
14176
|
+
diffs.push(diff.createTwoFilesPatch(`a/${path}`, `b/${path}`, baseYaml, targetYaml));
|
|
14177
|
+
}
|
|
14178
|
+
}
|
|
14179
|
+
const result = { comparison, changes, sourceUuidByTargetUuid };
|
|
14180
|
+
if (options.includeDiff) {
|
|
14181
|
+
result.diff = diffs.join('\n').trim();
|
|
14182
|
+
}
|
|
14183
|
+
return result;
|
|
14184
|
+
}
|
|
13718
14185
|
function getIntegrationIdentifier(element, integrationMap) {
|
|
13719
14186
|
let integrationIdentifier;
|
|
13720
14187
|
if (element.integrationUuid) {
|
|
@@ -13791,11 +14258,21 @@ exports.OrgUserRole = void 0;
|
|
|
13791
14258
|
OrgUserRole["Member"] = "member";
|
|
13792
14259
|
OrgUserRole["ReadOnly"] = "read-only";
|
|
13793
14260
|
})(exports.OrgUserRole || (exports.OrgUserRole = {}));
|
|
14261
|
+
exports.UserWorkspaceRole = void 0;
|
|
14262
|
+
(function (UserWorkspaceRole) {
|
|
14263
|
+
UserWorkspaceRole["Admin"] = "admin";
|
|
14264
|
+
UserWorkspaceRole["Member"] = "member";
|
|
14265
|
+
UserWorkspaceRole["ReadOnly"] = "read-only";
|
|
14266
|
+
})(exports.UserWorkspaceRole || (exports.UserWorkspaceRole = {}));
|
|
13794
14267
|
exports.OrgUserStatus = void 0;
|
|
13795
14268
|
(function (OrgUserStatus) {
|
|
13796
14269
|
OrgUserStatus["Invited"] = "invited";
|
|
13797
14270
|
OrgUserStatus["Active"] = "active";
|
|
13798
14271
|
})(exports.OrgUserStatus || (exports.OrgUserStatus = {}));
|
|
14272
|
+
const UserWorkspaceAccess = z.z.object({
|
|
14273
|
+
workspaceId: z.z.string(),
|
|
14274
|
+
role: z.z.enum(exports.UserWorkspaceRole),
|
|
14275
|
+
});
|
|
13799
14276
|
const OrgLimits = z.z.object({
|
|
13800
14277
|
numberOfWorkspaces: z.z.number().optional(),
|
|
13801
14278
|
todayUsage: z.z.number().optional(),
|
|
@@ -13845,6 +14322,10 @@ const Org = z.z.object({
|
|
|
13845
14322
|
engineAutoChargeThreshold: z.z.number().optional(),
|
|
13846
14323
|
engineAutoChargePurchaseAmount: z.z.number().optional(),
|
|
13847
14324
|
engineAutoChargeMonthlyLimit: z.z.number().optional(),
|
|
14325
|
+
currentUserCanLeave: z.z
|
|
14326
|
+
.boolean()
|
|
14327
|
+
.optional()
|
|
14328
|
+
.describe('[INTERNAL] Whether the current user can leave this org (false if sole admin)'),
|
|
13848
14329
|
});
|
|
13849
14330
|
const EngineCreditsProjectionResponse = z.z.object({
|
|
13850
14331
|
averageDailyUsage: z.z.number(),
|
|
@@ -13890,6 +14371,14 @@ const OrgWorkspace = z.z
|
|
|
13890
14371
|
featureFlags: z.z.array(z.z.string()).optional().describe('[INTERNAL] Feature flags'),
|
|
13891
14372
|
logoUri: z.z.string().optional().describe('URI for the workspace logo'),
|
|
13892
14373
|
membraneInstanceId: z.z.string().optional().describe('[INTERNAL] Membrane instance ID'),
|
|
14374
|
+
operatorLimits: WorkspaceLimitsSchema.optional().describe('[INTERNAL] Operator-set limit overrides stored on the hub. Mirrored to the instance via PUT /workspaces/:key/limits.'),
|
|
14375
|
+
operatorLimitsSyncedAt: zodDateCoercion()
|
|
14376
|
+
.optional()
|
|
14377
|
+
.describe('[INTERNAL] Last time operatorLimits were successfully mirrored to the owning instance.'),
|
|
14378
|
+
operatorLimitsSyncError: z.z
|
|
14379
|
+
.string()
|
|
14380
|
+
.optional()
|
|
14381
|
+
.describe('[INTERNAL] Last error message from a failed mirror attempt; cleared after a successful sync.'),
|
|
13893
14382
|
})
|
|
13894
14383
|
.merge(WorkspaceEditableFields);
|
|
13895
14384
|
const OrgWorkspaceUpdateRequest = z.z
|
|
@@ -13938,6 +14427,7 @@ const CreateOrgRequest = z.z.object({
|
|
|
13938
14427
|
integrationApps: z.z.string().optional(),
|
|
13939
14428
|
firstIntegrationUseCase: z.z.string().optional(),
|
|
13940
14429
|
referralSource: z.z.string().optional(),
|
|
14430
|
+
useCase: z.z.string().max(1024).optional(),
|
|
13941
14431
|
builder: z.z.array(z.z.enum(['me', 'team'])).optional(),
|
|
13942
14432
|
stripeCustomerId: z.z.string().optional(),
|
|
13943
14433
|
signupSource: z.z.string().optional(),
|
|
@@ -13953,19 +14443,23 @@ const BaseOrgUser = z.z.object({
|
|
|
13953
14443
|
role: z.z.string(),
|
|
13954
14444
|
status: z.z.string(),
|
|
13955
14445
|
workspaces: z.z.array(z.z.string()).optional(),
|
|
14446
|
+
workspacesWithRoles: z.z.array(UserWorkspaceAccess).optional(),
|
|
13956
14447
|
});
|
|
13957
14448
|
const FullOrgUser = BaseOrgUser.extend({
|
|
13958
14449
|
user: FullPlatformUser,
|
|
13959
14450
|
org: Org,
|
|
14451
|
+
workspaces: z.z.array(OrgWorkspace).or(z.z.array(z.z.string())).optional(),
|
|
13960
14452
|
});
|
|
13961
14453
|
const CreateOrgUserRequest = z.z.object({
|
|
13962
14454
|
email: z.z.string(),
|
|
13963
14455
|
workspaces: z.z.array(z.z.string()).optional(),
|
|
14456
|
+
workspacesWithRoles: z.z.array(UserWorkspaceAccess).optional(),
|
|
13964
14457
|
});
|
|
13965
14458
|
const UpdateOrgUserRequest = z.z.object({
|
|
13966
14459
|
role: z.z.enum(exports.OrgUserRole).optional(),
|
|
13967
14460
|
status: z.z.enum(exports.OrgUserStatus).optional(),
|
|
13968
14461
|
workspaces: z.z.array(z.z.string()).optional(),
|
|
14462
|
+
workspacesWithRoles: z.z.array(UserWorkspaceAccess).optional(),
|
|
13969
14463
|
});
|
|
13970
14464
|
const OrgInvitation = z.z.object({
|
|
13971
14465
|
id: z.z.string(),
|
|
@@ -14180,6 +14674,14 @@ class ElementInstanceAccessor {
|
|
|
14180
14674
|
}
|
|
14181
14675
|
}
|
|
14182
14676
|
|
|
14677
|
+
const warned = new Set();
|
|
14678
|
+
function warnDeprecatedOnce(key, message) {
|
|
14679
|
+
if (warned.has(key))
|
|
14680
|
+
return;
|
|
14681
|
+
warned.add(key);
|
|
14682
|
+
console.warn(`[Membrane deprecation] ${message}`);
|
|
14683
|
+
}
|
|
14684
|
+
|
|
14183
14685
|
class ConnectionLevelElementAccessor {
|
|
14184
14686
|
constructor(client, connectionSelector, selector, elementKey, query) {
|
|
14185
14687
|
this.client = client;
|
|
@@ -14288,6 +14790,7 @@ class ActionAccessor extends ElementAccessor {
|
|
|
14288
14790
|
return await this.options.client.post(this.getPath('reset'));
|
|
14289
14791
|
}
|
|
14290
14792
|
async run(input, options) {
|
|
14793
|
+
warnDeprecatedOnce('ActionAccessor.run', 'ActionAccessor.run() is deprecated. Use POST /act with { action: { id } } or { integrationKey, key } instead.');
|
|
14291
14794
|
const queryParams = options
|
|
14292
14795
|
? {
|
|
14293
14796
|
integrationKey: options.integrationKey,
|
|
@@ -14322,6 +14825,7 @@ class ConnectionLevelActionAccessor extends ConnectionLevelElementAccessor {
|
|
|
14322
14825
|
this.query = query;
|
|
14323
14826
|
}
|
|
14324
14827
|
async run(input) {
|
|
14828
|
+
warnDeprecatedOnce('ConnectionLevelActionAccessor.run', 'ConnectionLevelActionAccessor.run() is deprecated. Use POST /act with { action: { id } } or { integrationKey, key } instead.');
|
|
14325
14829
|
return this.client.post(this.uri('/run'), input);
|
|
14326
14830
|
}
|
|
14327
14831
|
}
|
|
@@ -14791,6 +15295,64 @@ async function openIframeWithPost(url, postData, callbacks = {}, { mountTargetSe
|
|
|
14791
15295
|
});
|
|
14792
15296
|
}
|
|
14793
15297
|
|
|
15298
|
+
function routeConnectionEventMessage(message, requestId, handlers) {
|
|
15299
|
+
var _a, _b, _c, _d, _e;
|
|
15300
|
+
if (!isConnectionMessagePayload(message))
|
|
15301
|
+
return;
|
|
15302
|
+
if (message.requestId && message.requestId !== requestId)
|
|
15303
|
+
return;
|
|
15304
|
+
if (message.type === 'newConnectionCreated') {
|
|
15305
|
+
(_a = handlers.onSuccess) === null || _a === void 0 ? void 0 : _a.call(handlers, message.connection);
|
|
15306
|
+
(_b = handlers.onTerminal) === null || _b === void 0 ? void 0 : _b.call(handlers);
|
|
15307
|
+
return;
|
|
15308
|
+
}
|
|
15309
|
+
if (message.type === 'newConnectionFailure') {
|
|
15310
|
+
const error = new MembraneError((_c = message.errorData) !== null && _c !== void 0 ? _c : message.error);
|
|
15311
|
+
if (message.connectionId) {
|
|
15312
|
+
error.data.data = { ...error.data.data, connectionId: message.connectionId };
|
|
15313
|
+
}
|
|
15314
|
+
(_d = handlers.onFailure) === null || _d === void 0 ? void 0 : _d.call(handlers, error);
|
|
15315
|
+
(_e = handlers.onTerminal) === null || _e === void 0 ? void 0 : _e.call(handlers);
|
|
15316
|
+
}
|
|
15317
|
+
}
|
|
15318
|
+
function isConnectionMessagePayload(value) {
|
|
15319
|
+
if (!value || typeof value !== 'object')
|
|
15320
|
+
return false;
|
|
15321
|
+
const m = value;
|
|
15322
|
+
return m.source === 'integration.app' && typeof m.type === 'string';
|
|
15323
|
+
}
|
|
15324
|
+
function createConnectionEventsSubscription(options) {
|
|
15325
|
+
const { apiUri, getToken, requestId, handlers } = options;
|
|
15326
|
+
let eventSource = null;
|
|
15327
|
+
let cancelled = false;
|
|
15328
|
+
const close = () => {
|
|
15329
|
+
cancelled = true;
|
|
15330
|
+
eventSource === null || eventSource === void 0 ? void 0 : eventSource.close();
|
|
15331
|
+
eventSource = null;
|
|
15332
|
+
};
|
|
15333
|
+
Promise.resolve(getToken()).then((token) => {
|
|
15334
|
+
if (cancelled)
|
|
15335
|
+
return;
|
|
15336
|
+
const url = urljoin(apiUri, '/sse/connection-events', requestId) + `?token=${encodeURIComponent(token)}`;
|
|
15337
|
+
try {
|
|
15338
|
+
eventSource = new EventSource(url);
|
|
15339
|
+
eventSource.onmessage = (event) => {
|
|
15340
|
+
let data;
|
|
15341
|
+
try {
|
|
15342
|
+
data = JSON.parse(event.data);
|
|
15343
|
+
}
|
|
15344
|
+
catch (_a) {
|
|
15345
|
+
return;
|
|
15346
|
+
}
|
|
15347
|
+
routeConnectionEventMessage(data, requestId, handlers);
|
|
15348
|
+
};
|
|
15349
|
+
eventSource.onerror = close;
|
|
15350
|
+
}
|
|
15351
|
+
catch (_a) { }
|
|
15352
|
+
});
|
|
15353
|
+
return close;
|
|
15354
|
+
}
|
|
15355
|
+
|
|
14794
15356
|
class DataSourcesAccessor extends ElementListAccessor {
|
|
14795
15357
|
constructor(client) {
|
|
14796
15358
|
super(client, 'data-sources');
|
|
@@ -15196,12 +15758,12 @@ class ConnectionLevelFlowsAccessor extends ConnectionLevelElementsListAccessor {
|
|
|
15196
15758
|
}
|
|
15197
15759
|
}
|
|
15198
15760
|
|
|
15199
|
-
var
|
|
15200
|
-
(function (
|
|
15201
|
-
|
|
15202
|
-
|
|
15203
|
-
|
|
15204
|
-
})(
|
|
15761
|
+
var ConnectionDisplayMode;
|
|
15762
|
+
(function (ConnectionDisplayMode) {
|
|
15763
|
+
ConnectionDisplayMode["IFRAME"] = "iframe";
|
|
15764
|
+
ConnectionDisplayMode["POPUP"] = "popup";
|
|
15765
|
+
ConnectionDisplayMode["REDIRECT"] = "redirect";
|
|
15766
|
+
})(ConnectionDisplayMode || (ConnectionDisplayMode = {}));
|
|
15205
15767
|
class ConnectionsAccessor extends ElementInstanceListAccessor {
|
|
15206
15768
|
constructor(client) {
|
|
15207
15769
|
super(client, 'connections');
|
|
@@ -15251,6 +15813,9 @@ class ConnectionAccessor {
|
|
|
15251
15813
|
async archive() {
|
|
15252
15814
|
return this.client.delete(`/connections/${this.connectionSelector}`);
|
|
15253
15815
|
}
|
|
15816
|
+
async restore() {
|
|
15817
|
+
return this.client.post(`/connections/${this.connectionSelector}/restore`);
|
|
15818
|
+
}
|
|
15254
15819
|
async request(path, data = null) {
|
|
15255
15820
|
const pathWithoutSlash = path.startsWith('/') ? path.slice(1) : path;
|
|
15256
15821
|
return this.client.post(`/connections/${this.connectionSelector}/api/${pathWithoutSlash}`, data);
|
|
@@ -15362,17 +15927,19 @@ class ConnectionProxy {
|
|
|
15362
15927
|
}
|
|
15363
15928
|
}
|
|
15364
15929
|
async function createOrUpdateConnection(options) {
|
|
15365
|
-
const { client, connectionId, connectionKey, integrationKey, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectionRequestId, apiUri, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
|
|
15366
|
-
let connectionType = await detectConnectionType(options);
|
|
15930
|
+
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 : {};
|
|
15931
|
+
let connectionType = type === 'mcp' ? ConnectionDisplayMode.POPUP : await detectConnectionType(options);
|
|
15367
15932
|
if (redirectUri) {
|
|
15368
|
-
connectionType =
|
|
15933
|
+
connectionType = ConnectionDisplayMode.REDIRECT;
|
|
15369
15934
|
}
|
|
15370
15935
|
const freshToken = await client.getToken();
|
|
15371
15936
|
const connectPath = 'connect';
|
|
15372
15937
|
return new Promise((resolve, reject) => {
|
|
15938
|
+
var _a, _b;
|
|
15373
15939
|
const requestId = simpleUniqueId() + simpleUniqueId();
|
|
15374
15940
|
const payload = {
|
|
15375
15941
|
token: freshToken,
|
|
15942
|
+
type,
|
|
15376
15943
|
input,
|
|
15377
15944
|
connectorParameters,
|
|
15378
15945
|
integrationKey,
|
|
@@ -15387,26 +15954,54 @@ async function createOrUpdateConnection(options) {
|
|
|
15387
15954
|
connectionRequestId,
|
|
15388
15955
|
requestId,
|
|
15389
15956
|
redirectUri,
|
|
15957
|
+
customState,
|
|
15390
15958
|
};
|
|
15391
15959
|
let cancelCheckInterval;
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
|
|
15395
|
-
|
|
15396
|
-
|
|
15397
|
-
|
|
15398
|
-
|
|
15399
|
-
|
|
15400
|
-
|
|
15401
|
-
|
|
15402
|
-
|
|
15960
|
+
let lateEventsTimeout;
|
|
15961
|
+
let promiseSettled = false;
|
|
15962
|
+
const handlers = {
|
|
15963
|
+
onSuccess: (data) => {
|
|
15964
|
+
var _a;
|
|
15965
|
+
if (promiseSettled) {
|
|
15966
|
+
(_a = lateEvents === null || lateEvents === void 0 ? void 0 : lateEvents.onConnection) === null || _a === void 0 ? void 0 : _a.call(lateEvents, data);
|
|
15967
|
+
}
|
|
15968
|
+
else {
|
|
15969
|
+
promiseSettled = true;
|
|
15970
|
+
resolve(data);
|
|
15971
|
+
}
|
|
15972
|
+
},
|
|
15973
|
+
onFailure: (error) => {
|
|
15974
|
+
var _a;
|
|
15975
|
+
if (promiseSettled) {
|
|
15976
|
+
(_a = lateEvents === null || lateEvents === void 0 ? void 0 : lateEvents.onFailure) === null || _a === void 0 ? void 0 : _a.call(lateEvents, error);
|
|
15977
|
+
}
|
|
15978
|
+
else {
|
|
15979
|
+
promiseSettled = true;
|
|
15980
|
+
reject(error);
|
|
15981
|
+
}
|
|
15982
|
+
},
|
|
15983
|
+
onTerminal: () => cleanup(),
|
|
15984
|
+
};
|
|
15985
|
+
const { stopCrossWindow } = createCrossWindowListener({ requestId, handlers });
|
|
15986
|
+
const stopSSE = createConnectionEventsSubscription({
|
|
15403
15987
|
apiUri: apiUri,
|
|
15988
|
+
getToken: () => freshToken,
|
|
15404
15989
|
requestId,
|
|
15405
|
-
|
|
15406
|
-
handler: eventHandler,
|
|
15990
|
+
handlers,
|
|
15407
15991
|
});
|
|
15992
|
+
if (lateEvents) {
|
|
15993
|
+
lateEventsTimeout = setTimeout(stopSSE, 30 * 60 * 1000);
|
|
15994
|
+
if ((_a = lateEvents.signal) === null || _a === void 0 ? void 0 : _a.aborted) {
|
|
15995
|
+
stopSSE();
|
|
15996
|
+
}
|
|
15997
|
+
else {
|
|
15998
|
+
(_b = lateEvents.signal) === null || _b === void 0 ? void 0 : _b.addEventListener('abort', stopSSE, { once: true });
|
|
15999
|
+
}
|
|
16000
|
+
}
|
|
15408
16001
|
function cleanup() {
|
|
15409
16002
|
clearInterval(cancelCheckInterval);
|
|
16003
|
+
if (lateEventsTimeout)
|
|
16004
|
+
clearTimeout(lateEventsTimeout);
|
|
15410
16005
|
stopCrossWindow();
|
|
15411
16006
|
stopSSE();
|
|
15412
16007
|
}
|
|
@@ -15423,7 +16018,7 @@ async function createOrUpdateConnection(options) {
|
|
|
15423
16018
|
input.value = JSON.stringify(payload);
|
|
15424
16019
|
form.appendChild(input);
|
|
15425
16020
|
document.body.appendChild(form);
|
|
15426
|
-
if (connectionType ===
|
|
16021
|
+
if (connectionType === ConnectionDisplayMode.IFRAME) {
|
|
15427
16022
|
const iframeElement = document.createElement('iframe');
|
|
15428
16023
|
iframeElement.id = targetElementId;
|
|
15429
16024
|
iframeElement.name = targetElementId;
|
|
@@ -15438,12 +16033,12 @@ async function createOrUpdateConnection(options) {
|
|
|
15438
16033
|
form.submit();
|
|
15439
16034
|
document.body.removeChild(form);
|
|
15440
16035
|
}
|
|
15441
|
-
if (connectionType ===
|
|
16036
|
+
if (connectionType === ConnectionDisplayMode.REDIRECT) {
|
|
15442
16037
|
form.target = '_self';
|
|
15443
16038
|
form.submit();
|
|
15444
16039
|
document.body.removeChild(form);
|
|
15445
16040
|
}
|
|
15446
|
-
if (connectionType ===
|
|
16041
|
+
if (connectionType === ConnectionDisplayMode.POPUP) {
|
|
15447
16042
|
const width = Math.min(Math.round(screen.width * 0.7), 1000);
|
|
15448
16043
|
const height = Math.min(Math.round(screen.height * 0.6), 800);
|
|
15449
16044
|
const left = Math.round((screen.width - width) / 2);
|
|
@@ -15464,9 +16059,15 @@ async function createOrUpdateConnection(options) {
|
|
|
15464
16059
|
}, 1000);
|
|
15465
16060
|
cancelCheckInterval = setInterval(() => {
|
|
15466
16061
|
if (popup === null || popup === void 0 ? void 0 : popup.closed) {
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
16062
|
+
clearInterval(cancelCheckInterval);
|
|
16063
|
+
stopCrossWindow();
|
|
16064
|
+
if (!lateEvents)
|
|
16065
|
+
stopSSE();
|
|
16066
|
+
if (!promiseSettled) {
|
|
16067
|
+
promiseSettled = true;
|
|
16068
|
+
onPopupClosed === null || onPopupClosed === void 0 ? void 0 : onPopupClosed();
|
|
16069
|
+
resolve(null);
|
|
16070
|
+
}
|
|
15470
16071
|
}
|
|
15471
16072
|
}, 1000);
|
|
15472
16073
|
}
|
|
@@ -15486,64 +16087,21 @@ async function detectConnectionType({ client, authOptionKey, connectorId, connec
|
|
|
15486
16087
|
});
|
|
15487
16088
|
const option = connectionOptions.find((option) => option.key == authOptionKey);
|
|
15488
16089
|
if ((option === null || option === void 0 ? void 0 : option.type) === 'client-credentials') {
|
|
15489
|
-
return
|
|
16090
|
+
return ConnectionDisplayMode.IFRAME;
|
|
15490
16091
|
}
|
|
15491
|
-
return
|
|
16092
|
+
return ConnectionDisplayMode.POPUP;
|
|
15492
16093
|
}
|
|
15493
|
-
const
|
|
15494
|
-
|
|
15495
|
-
|
|
15496
|
-
const message = event.data || {};
|
|
15497
|
-
if (message.source == 'integration.app' && (message.requestId == requestId || !message.requestId)) {
|
|
15498
|
-
if (message.type == 'newConnectionCreated') {
|
|
15499
|
-
onResolve(message.connection);
|
|
15500
|
-
}
|
|
15501
|
-
if (message.type == 'newConnectionFailure') {
|
|
15502
|
-
const error = new MembraneError((_a = message.errorData) !== null && _a !== void 0 ? _a : message.error);
|
|
15503
|
-
if (message.connectionId) {
|
|
15504
|
-
error.data.data = { ...error.data.data, connectionId: message.connectionId };
|
|
15505
|
-
}
|
|
15506
|
-
onReject(error);
|
|
15507
|
-
}
|
|
15508
|
-
onFinally();
|
|
15509
|
-
}
|
|
16094
|
+
const createCrossWindowListener = ({ requestId, handlers, }) => {
|
|
16095
|
+
const listener = (event) => {
|
|
16096
|
+
routeConnectionEventMessage(event.data, requestId, handlers);
|
|
15510
16097
|
};
|
|
15511
|
-
|
|
15512
|
-
const createCrossWindowListener = ({ handler }) => {
|
|
15513
|
-
window.addEventListener('message', handler);
|
|
16098
|
+
window.addEventListener('message', listener);
|
|
15514
16099
|
return {
|
|
15515
16100
|
stopCrossWindow: () => {
|
|
15516
|
-
window.removeEventListener('message',
|
|
16101
|
+
window.removeEventListener('message', listener);
|
|
15517
16102
|
},
|
|
15518
16103
|
};
|
|
15519
16104
|
};
|
|
15520
|
-
const createSSEListener = ({ apiUri, requestId, token, handler, }) => {
|
|
15521
|
-
const sseUrl = urljoin(apiUri, '/sse/connection-events', requestId) + `?token=${encodeURIComponent(token)}`;
|
|
15522
|
-
let eventSource = null;
|
|
15523
|
-
const closeSseConnection = () => {
|
|
15524
|
-
eventSource === null || eventSource === void 0 ? void 0 : eventSource.close();
|
|
15525
|
-
eventSource = null;
|
|
15526
|
-
};
|
|
15527
|
-
try {
|
|
15528
|
-
eventSource = new EventSource(sseUrl);
|
|
15529
|
-
eventSource.onmessage = (event) => {
|
|
15530
|
-
const eventCopy = {
|
|
15531
|
-
...event,
|
|
15532
|
-
data: JSON.parse(event.data),
|
|
15533
|
-
};
|
|
15534
|
-
handler(eventCopy);
|
|
15535
|
-
};
|
|
15536
|
-
eventSource.onerror = () => {
|
|
15537
|
-
closeSseConnection();
|
|
15538
|
-
};
|
|
15539
|
-
}
|
|
15540
|
-
catch (err) {
|
|
15541
|
-
console.error('Error setting up SSE connection:', err);
|
|
15542
|
-
}
|
|
15543
|
-
return {
|
|
15544
|
-
stopSSE: closeSseConnection,
|
|
15545
|
-
};
|
|
15546
|
-
};
|
|
15547
16105
|
|
|
15548
16106
|
class FlowsAccessor extends ElementListAccessor {
|
|
15549
16107
|
constructor(client) {
|
|
@@ -16019,6 +16577,124 @@ const ScenarioTemplate = z.z.object({
|
|
|
16019
16577
|
handyElements: z.z.array(HandyScenarioTemplateElement).optional(),
|
|
16020
16578
|
});
|
|
16021
16579
|
|
|
16580
|
+
const AgentInstruction = z.z.object({
|
|
16581
|
+
id: z.z.string(),
|
|
16582
|
+
workspaceId: z.z.string(),
|
|
16583
|
+
name: z.z.string(),
|
|
16584
|
+
key: z.z.string(),
|
|
16585
|
+
text: z.z.string().min(1),
|
|
16586
|
+
revision: z.z.string().optional(),
|
|
16587
|
+
archivedAt: z.z.iso.datetime().optional(),
|
|
16588
|
+
createdAt: z.z.iso.datetime().optional(),
|
|
16589
|
+
updatedAt: z.z.iso.datetime().optional(),
|
|
16590
|
+
});
|
|
16591
|
+
const CreateAgentInstructionRequest = z.z.object({
|
|
16592
|
+
name: z.z.string().min(1),
|
|
16593
|
+
key: z.z.string().min(1).optional(),
|
|
16594
|
+
text: z.z.string().min(1),
|
|
16595
|
+
});
|
|
16596
|
+
const UpdateAgentInstructionRequest = CreateAgentInstructionRequest.partial();
|
|
16597
|
+
const FindAgentInstructionQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchivedQuery);
|
|
16598
|
+
|
|
16599
|
+
const AgentSkill = z.z.object({
|
|
16600
|
+
id: z.z.string(),
|
|
16601
|
+
workspaceId: z.z.string(),
|
|
16602
|
+
name: z.z.string(),
|
|
16603
|
+
key: z.z.string(),
|
|
16604
|
+
description: z.z.string().min(1),
|
|
16605
|
+
body: z.z.string().min(1),
|
|
16606
|
+
sourceUrl: z.z.url().optional(),
|
|
16607
|
+
revision: z.z.string().optional(),
|
|
16608
|
+
archivedAt: z.z.iso.datetime().optional(),
|
|
16609
|
+
createdAt: z.z.iso.datetime().optional(),
|
|
16610
|
+
updatedAt: z.z.iso.datetime().optional(),
|
|
16611
|
+
});
|
|
16612
|
+
const CreateAgentSkillRequest = z.z.object({
|
|
16613
|
+
name: z.z.string().min(1),
|
|
16614
|
+
key: z.z.string().min(1).optional(),
|
|
16615
|
+
description: z.z.string().min(1),
|
|
16616
|
+
body: z.z.string().min(1),
|
|
16617
|
+
sourceUrl: z.z.url().optional(),
|
|
16618
|
+
});
|
|
16619
|
+
const UpdateAgentSkillRequest = CreateAgentSkillRequest.partial();
|
|
16620
|
+
const PreviewAgentSkillSourceRequest = z.z.object({
|
|
16621
|
+
sourceUrl: z.z.url(),
|
|
16622
|
+
});
|
|
16623
|
+
const PreviewAgentSkillSourceResponse = z.z.object({
|
|
16624
|
+
name: z.z.string().min(1),
|
|
16625
|
+
key: z.z.string().min(1).optional(),
|
|
16626
|
+
description: z.z.string().min(1),
|
|
16627
|
+
body: z.z.string().min(1),
|
|
16628
|
+
sourceUrl: z.z.url(),
|
|
16629
|
+
});
|
|
16630
|
+
const FindAgentSkillQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchivedQuery);
|
|
16631
|
+
|
|
16632
|
+
const AgentTool = z.z.object({
|
|
16633
|
+
id: z.z.string().min(1),
|
|
16634
|
+
name: z.z.string().min(1),
|
|
16635
|
+
description: z.z.string().min(1),
|
|
16636
|
+
enabledByDefault: z.z.boolean().default(false),
|
|
16637
|
+
});
|
|
16638
|
+
|
|
16639
|
+
const AgentHarnessReferenceList = z.z.array(z.z.string());
|
|
16640
|
+
const AgentHarnessReferenceListWithDefault = AgentHarnessReferenceList.default([]);
|
|
16641
|
+
const AgentHarness = z.z.object({
|
|
16642
|
+
id: z.z.string(),
|
|
16643
|
+
workspaceId: z.z.string(),
|
|
16644
|
+
name: z.z.string(),
|
|
16645
|
+
key: z.z.string(),
|
|
16646
|
+
description: z.z.string().optional(),
|
|
16647
|
+
systemPrompt: z.z.string().optional(),
|
|
16648
|
+
defaultModel: AIGatewaySupportedModelIdSchema,
|
|
16649
|
+
toolIds: AgentHarnessReferenceListWithDefault,
|
|
16650
|
+
skillIds: AgentHarnessReferenceListWithDefault,
|
|
16651
|
+
instructionIds: AgentHarnessReferenceListWithDefault,
|
|
16652
|
+
tools: z.z.array(AgentTool).default([]),
|
|
16653
|
+
skills: z.z.array(AgentSkill).default([]),
|
|
16654
|
+
instructions: z.z.array(AgentInstruction).default([]),
|
|
16655
|
+
revision: z.z.string().optional(),
|
|
16656
|
+
archivedAt: z.z.iso.datetime().optional(),
|
|
16657
|
+
createdAt: z.z.iso.datetime().optional(),
|
|
16658
|
+
updatedAt: z.z.iso.datetime().optional(),
|
|
16659
|
+
});
|
|
16660
|
+
const CreateAgentHarnessRequest = z.z.object({
|
|
16661
|
+
name: z.z.string().min(1),
|
|
16662
|
+
key: z.z.string().min(1).optional(),
|
|
16663
|
+
description: z.z.string().optional(),
|
|
16664
|
+
systemPrompt: z.z.string().optional(),
|
|
16665
|
+
defaultModel: AIGatewaySupportedModelIdSchema,
|
|
16666
|
+
toolIds: AgentHarnessReferenceList.optional(),
|
|
16667
|
+
skillIds: AgentHarnessReferenceList.optional(),
|
|
16668
|
+
instructionIds: AgentHarnessReferenceList.optional(),
|
|
16669
|
+
});
|
|
16670
|
+
const UpdateAgentHarnessRequest = CreateAgentHarnessRequest.partial();
|
|
16671
|
+
const FindAgentHarnessQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchivedQuery);
|
|
16672
|
+
|
|
16673
|
+
const AgentHarnessSnapshotReferenceList = z.z.array(z.z.string()).default([]);
|
|
16674
|
+
const AgentHarnessSnapshot = z.z.object({
|
|
16675
|
+
id: z.z.string(),
|
|
16676
|
+
workspaceId: z.z.string(),
|
|
16677
|
+
agentHarnessId: z.z.string(),
|
|
16678
|
+
agentHarnessRevision: z.z.string().optional(),
|
|
16679
|
+
name: z.z.string(),
|
|
16680
|
+
key: z.z.string(),
|
|
16681
|
+
description: z.z.string().optional(),
|
|
16682
|
+
systemPrompt: z.z.string().default(''),
|
|
16683
|
+
defaultModel: AIGatewaySupportedModelIdSchema,
|
|
16684
|
+
hash: z.z.string().optional(),
|
|
16685
|
+
toolIds: AgentHarnessSnapshotReferenceList,
|
|
16686
|
+
tools: z.z.array(AgentTool).default([]),
|
|
16687
|
+
skillIds: AgentHarnessSnapshotReferenceList,
|
|
16688
|
+
skills: z.z.array(AgentSkill).default([]),
|
|
16689
|
+
instructionIds: AgentHarnessSnapshotReferenceList,
|
|
16690
|
+
instructions: z.z.array(AgentInstruction).default([]),
|
|
16691
|
+
createdAt: z.z.iso.datetime().optional(),
|
|
16692
|
+
updatedAt: z.z.iso.datetime().optional(),
|
|
16693
|
+
});
|
|
16694
|
+
const FindAgentHarnessSnapshotQuery = PaginationQuery.extend({
|
|
16695
|
+
agentHarnessId: z.z.string().optional(),
|
|
16696
|
+
});
|
|
16697
|
+
|
|
16022
16698
|
function formatSessionCost(cost) {
|
|
16023
16699
|
if (cost === undefined || cost === null)
|
|
16024
16700
|
return '-';
|
|
@@ -16032,11 +16708,12 @@ const SessionCredentials = z.z.object({
|
|
|
16032
16708
|
});
|
|
16033
16709
|
const SessionParameters = z.z.object({
|
|
16034
16710
|
id: z.z.string().optional(),
|
|
16711
|
+
leaseId: z.z.string().uuid().optional(),
|
|
16035
16712
|
accessToken: z.z.string().optional(),
|
|
16036
16713
|
credentials: SessionCredentials.optional(),
|
|
16037
16714
|
apiUri: z.z.string().optional(),
|
|
16038
16715
|
prompt: z.z.string().optional(),
|
|
16039
|
-
elementType: z.z.
|
|
16716
|
+
elementType: z.z.enum(exports.WorkspaceElementType).optional(),
|
|
16040
16717
|
elementId: z.z.string().optional(),
|
|
16041
16718
|
customerId: z.z.string().optional(),
|
|
16042
16719
|
opencodeSessionUuid: z.z.string().optional(),
|
|
@@ -16044,10 +16721,28 @@ const SessionParameters = z.z.object({
|
|
|
16044
16721
|
openRouterApiKey: z.z.string().optional(),
|
|
16045
16722
|
modelId: z.z.string().optional(),
|
|
16046
16723
|
agentName: z.z.enum(exports.AgentName).optional(),
|
|
16724
|
+
agentHarnessSnapshotId: z.z.string().optional(),
|
|
16047
16725
|
engine: z.z.enum(['opencode', 'inline']).optional(),
|
|
16048
16726
|
attachments: z.z.array(AgentSessionAttachment).optional(),
|
|
16049
16727
|
});
|
|
16050
16728
|
|
|
16729
|
+
const AGENT_WORKSPACE_ELEMENT_CONTEXT_TYPES = [
|
|
16730
|
+
exports.WorkspaceElementType.Integration,
|
|
16731
|
+
exports.WorkspaceElementType.Connection,
|
|
16732
|
+
exports.WorkspaceElementType.Action,
|
|
16733
|
+
exports.WorkspaceElementType.Flow,
|
|
16734
|
+
exports.WorkspaceElementType.DataSource,
|
|
16735
|
+
exports.WorkspaceElementType.FieldMapping,
|
|
16736
|
+
exports.WorkspaceElementType.DataLinkTable,
|
|
16737
|
+
exports.WorkspaceElementType.AppDataSchema,
|
|
16738
|
+
exports.WorkspaceElementType.AppEventType,
|
|
16739
|
+
exports.WorkspaceElementType.ExternalEventType,
|
|
16740
|
+
];
|
|
16741
|
+
const AGENT_WORKSPACE_ELEMENT_CONTEXT_TYPE_SET = new Set(AGENT_WORKSPACE_ELEMENT_CONTEXT_TYPES);
|
|
16742
|
+
function canFetchAgentWorkspaceElementContext(elementType) {
|
|
16743
|
+
return !!elementType && AGENT_WORKSPACE_ELEMENT_CONTEXT_TYPE_SET.has(elementType);
|
|
16744
|
+
}
|
|
16745
|
+
|
|
16051
16746
|
exports.AsyncRequestStatus = void 0;
|
|
16052
16747
|
(function (AsyncRequestStatus) {
|
|
16053
16748
|
AsyncRequestStatus["PENDING"] = "pending";
|
|
@@ -16060,6 +16755,29 @@ const AsyncRequestTriggerResponse = z.z.object({
|
|
|
16060
16755
|
jobId: z.z.string(),
|
|
16061
16756
|
accessKey: z.z.string(),
|
|
16062
16757
|
});
|
|
16758
|
+
const ListableAsyncRequestType = z.z.enum(['export-workspace', 'import-workspace']);
|
|
16759
|
+
const AsyncRequestStatusSchema = z.z.nativeEnum(exports.AsyncRequestStatus);
|
|
16760
|
+
const AsyncRequest = z.z.object({
|
|
16761
|
+
id: z.z.string(),
|
|
16762
|
+
requestType: ListableAsyncRequestType,
|
|
16763
|
+
status: AsyncRequestStatusSchema,
|
|
16764
|
+
progress: z.z.number().optional(),
|
|
16765
|
+
result: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
16766
|
+
error: ErrorDataSchema.optional(),
|
|
16767
|
+
meta: z.z.record(z.z.string(), z.z.any()).optional(),
|
|
16768
|
+
createdAt: zodDateCoercion(),
|
|
16769
|
+
startedAt: zodDateCoercion().optional(),
|
|
16770
|
+
completedAt: zodDateCoercion().optional(),
|
|
16771
|
+
});
|
|
16772
|
+
const ListAsyncRequestsQuery = z.z.object({
|
|
16773
|
+
requestType: ListableAsyncRequestType,
|
|
16774
|
+
status: AsyncRequestStatusSchema.optional(),
|
|
16775
|
+
limit: z.z.coerce.number().int().min(1).max(100).default(50),
|
|
16776
|
+
cursor: z.z.coerce.number().int().min(0).optional(),
|
|
16777
|
+
});
|
|
16778
|
+
const ListAsyncRequestsResponse = z.z.object({
|
|
16779
|
+
items: z.z.array(AsyncRequest),
|
|
16780
|
+
});
|
|
16063
16781
|
|
|
16064
16782
|
const SelfHostingToken = z.z.object({
|
|
16065
16783
|
id: z.z.string(),
|
|
@@ -16086,33 +16804,6 @@ const ValidateSelfHostingTokenResponse = z.z.object({
|
|
|
16086
16804
|
orgName: z.z.string().optional(),
|
|
16087
16805
|
});
|
|
16088
16806
|
|
|
16089
|
-
const CLIENT_TOKEN_GRANT_TYPES = ['mcp-oauth', 'cli-oauth', 'agent-session', 'api'];
|
|
16090
|
-
const ClientTokenGrantType = z.z.enum(CLIENT_TOKEN_GRANT_TYPES);
|
|
16091
|
-
const ClientToken = z.z.object({
|
|
16092
|
-
id: z.z.string(),
|
|
16093
|
-
workspaceId: z.z.string().optional(),
|
|
16094
|
-
platformUserId: z.z.string().optional(),
|
|
16095
|
-
tenantId: z.z.string().optional(),
|
|
16096
|
-
grantType: ClientTokenGrantType,
|
|
16097
|
-
grantId: z.z.string().optional(),
|
|
16098
|
-
grantName: z.z.string().optional(),
|
|
16099
|
-
connectedProductId: z.z.string().optional(),
|
|
16100
|
-
createdAt: z.z.string(),
|
|
16101
|
-
});
|
|
16102
|
-
const CreateClientTokenResponse = ClientToken.extend({
|
|
16103
|
-
accessToken: z.z.string(),
|
|
16104
|
-
});
|
|
16105
|
-
const CreateClientTokenRequest = z.z.object({
|
|
16106
|
-
grantType: ClientTokenGrantType,
|
|
16107
|
-
grantId: z.z.string(),
|
|
16108
|
-
grantName: z.z.string(),
|
|
16109
|
-
tenantId: z.z.string().optional(),
|
|
16110
|
-
clientKey: z.z.string().optional(),
|
|
16111
|
-
});
|
|
16112
|
-
const ClientTokenListResponse = z.z.object({
|
|
16113
|
-
items: z.z.array(ClientToken),
|
|
16114
|
-
});
|
|
16115
|
-
|
|
16116
16807
|
const MEMBRANE_CLI_CLIENT_ID = 'membrane-cli';
|
|
16117
16808
|
const OAUTH_TOKEN_TYPE_PLATFORM_USER = 'platform-user';
|
|
16118
16809
|
const OAUTH_TOKEN_TYPE_TENANT = 'tenant';
|
|
@@ -16122,6 +16813,20 @@ const OAUTH_TOKEN_TYPES = [
|
|
|
16122
16813
|
OAUTH_TOKEN_TYPE_TENANT,
|
|
16123
16814
|
OAUTH_TOKEN_TYPE_CONNECTION,
|
|
16124
16815
|
];
|
|
16816
|
+
const AuthContextSettings = z.z.object({
|
|
16817
|
+
defaultWorkspaceKey: z.z.string().optional(),
|
|
16818
|
+
defaultTenantKey: z.z.string().optional(),
|
|
16819
|
+
connectionId: z.z.string().optional(),
|
|
16820
|
+
});
|
|
16821
|
+
const PatchTokenSettingsRequest = z.z.object({
|
|
16822
|
+
settings: z.z
|
|
16823
|
+
.object({
|
|
16824
|
+
defaultWorkspaceKey: z.z.string().nullable().optional(),
|
|
16825
|
+
defaultTenantKey: z.z.string().nullable().optional(),
|
|
16826
|
+
connectionId: z.z.string().nullable().optional(),
|
|
16827
|
+
})
|
|
16828
|
+
.optional(),
|
|
16829
|
+
});
|
|
16125
16830
|
const OAuthTokenResponse = z.z.object({
|
|
16126
16831
|
access_token: z.z.string(),
|
|
16127
16832
|
token_type: z.z.string(),
|
|
@@ -16133,6 +16838,126 @@ const OAuthTokenResponse = z.z.object({
|
|
|
16133
16838
|
org_id: z.z.string().optional(),
|
|
16134
16839
|
});
|
|
16135
16840
|
|
|
16841
|
+
const PLATFORM_USER_TOKEN_GRANT_TYPES = ['cli-oauth'];
|
|
16842
|
+
const PlatformUserTokenGrantType = z.z.enum(PLATFORM_USER_TOKEN_GRANT_TYPES);
|
|
16843
|
+
const PlatformUserToken = z.z.object({
|
|
16844
|
+
id: z.z.string(),
|
|
16845
|
+
platformUserId: z.z.string(),
|
|
16846
|
+
grantType: PlatformUserTokenGrantType,
|
|
16847
|
+
grantId: z.z.string().optional(),
|
|
16848
|
+
grantName: z.z.string().optional(),
|
|
16849
|
+
settings: AuthContextSettings.optional(),
|
|
16850
|
+
createdAt: z.z.string(),
|
|
16851
|
+
lastUsedDate: z.z.string().optional(),
|
|
16852
|
+
});
|
|
16853
|
+
const PlatformUserTokenListResponse = z.z.object({
|
|
16854
|
+
items: z.z.array(PlatformUserToken),
|
|
16855
|
+
});
|
|
16856
|
+
|
|
16857
|
+
const MCP_PROTOCOL_VERSION = '2025-11-25';
|
|
16858
|
+
const McpConnectionInput = z.z.object({
|
|
16859
|
+
mcpServerUrl: z.z.string().url().optional(),
|
|
16860
|
+
});
|
|
16861
|
+
const ProtectedResourceMetadata = z.z.object({
|
|
16862
|
+
resource: z.z.string().url(),
|
|
16863
|
+
authorization_servers: z.z.array(z.z.string().url()).min(1),
|
|
16864
|
+
bearer_methods_supported: z.z.array(z.z.string()).optional(),
|
|
16865
|
+
scopes_supported: z.z.array(z.z.string()).optional(),
|
|
16866
|
+
});
|
|
16867
|
+
const AuthorizationServerMetadata = z.z
|
|
16868
|
+
.object({
|
|
16869
|
+
issuer: z.z.string().url(),
|
|
16870
|
+
authorization_endpoint: z.z.string().url(),
|
|
16871
|
+
token_endpoint: z.z.string().url(),
|
|
16872
|
+
registration_endpoint: z.z.string().url().optional(),
|
|
16873
|
+
scopes_supported: z.z.array(z.z.string()).optional(),
|
|
16874
|
+
response_types_supported: z.z.array(z.z.string()).optional(),
|
|
16875
|
+
grant_types_supported: z.z.array(z.z.string()).optional(),
|
|
16876
|
+
code_challenge_methods_supported: z.z.array(z.z.string()).optional(),
|
|
16877
|
+
token_endpoint_auth_methods_supported: z.z.array(z.z.string()).optional(),
|
|
16878
|
+
client_id_metadata_document_supported: z.z.boolean().optional(),
|
|
16879
|
+
})
|
|
16880
|
+
.passthrough();
|
|
16881
|
+
const DynamicClientRegistrationResponse = z.z
|
|
16882
|
+
.object({
|
|
16883
|
+
client_id: z.z.string(),
|
|
16884
|
+
client_secret: z.z.string().optional(),
|
|
16885
|
+
client_id_issued_at: z.z.number().optional(),
|
|
16886
|
+
client_secret_expires_at: z.z.number().optional(),
|
|
16887
|
+
registration_access_token: z.z.string().optional(),
|
|
16888
|
+
registration_client_uri: z.z.string().url().optional(),
|
|
16889
|
+
})
|
|
16890
|
+
.passthrough();
|
|
16891
|
+
const McpTokenResponse = z.z
|
|
16892
|
+
.object({
|
|
16893
|
+
access_token: z.z.string(),
|
|
16894
|
+
token_type: z.z.string(),
|
|
16895
|
+
expires_in: z.z.number().optional(),
|
|
16896
|
+
refresh_token: z.z.string().optional(),
|
|
16897
|
+
scope: z.z.string().optional(),
|
|
16898
|
+
})
|
|
16899
|
+
.passthrough();
|
|
16900
|
+
const McpTool = z.z
|
|
16901
|
+
.object({
|
|
16902
|
+
name: z.z.string(),
|
|
16903
|
+
description: z.z.string().optional(),
|
|
16904
|
+
inputSchema: z.z.record(z.z.string(), z.z.unknown()),
|
|
16905
|
+
})
|
|
16906
|
+
.passthrough();
|
|
16907
|
+
const McpSynthesizedAction = z.z.object({
|
|
16908
|
+
mcp: z.z.literal(true),
|
|
16909
|
+
id: z.z.string(),
|
|
16910
|
+
connectionId: z.z.string(),
|
|
16911
|
+
key: z.z.string(),
|
|
16912
|
+
name: z.z.string(),
|
|
16913
|
+
description: z.z.string().optional(),
|
|
16914
|
+
inputSchema: z.z.record(z.z.string(), z.z.unknown()).optional(),
|
|
16915
|
+
isReadOnly: z.z.literal(true),
|
|
16916
|
+
});
|
|
16917
|
+
const McpAuthState = z.z.object({
|
|
16918
|
+
asIssuer: z.z.string().url(),
|
|
16919
|
+
tokenEndpoint: z.z.string().url(),
|
|
16920
|
+
clientId: z.z.string(),
|
|
16921
|
+
clientSecret: z.z.string().optional(),
|
|
16922
|
+
canonicalResource: z.z.string(),
|
|
16923
|
+
scope: z.z.string().optional(),
|
|
16924
|
+
});
|
|
16925
|
+
const McpCredentials = z.z.object({
|
|
16926
|
+
accessToken: z.z.string(),
|
|
16927
|
+
refreshToken: z.z.string().optional(),
|
|
16928
|
+
expiresAt: z.z.coerce.date().optional(),
|
|
16929
|
+
tokenType: z.z.string().default('Bearer'),
|
|
16930
|
+
});
|
|
16931
|
+
|
|
16932
|
+
const WORKSPACE_TOKEN_GRANT_TYPES = ['mcp-oauth', 'agent-session', 'api'];
|
|
16933
|
+
const WorkspaceTokenGrantType = z.z.enum(WORKSPACE_TOKEN_GRANT_TYPES);
|
|
16934
|
+
const WorkspaceToken = z.z.object({
|
|
16935
|
+
id: z.z.string(),
|
|
16936
|
+
workspaceId: z.z.string(),
|
|
16937
|
+
tenantId: z.z.string().optional(),
|
|
16938
|
+
platformUserId: z.z.string().optional(),
|
|
16939
|
+
grantType: WorkspaceTokenGrantType,
|
|
16940
|
+
grantId: z.z.string().optional(),
|
|
16941
|
+
grantName: z.z.string().optional(),
|
|
16942
|
+
connectedProductId: z.z.string().optional(),
|
|
16943
|
+
settings: AuthContextSettings.optional(),
|
|
16944
|
+
createdAt: z.z.string(),
|
|
16945
|
+
lastUsedDate: z.z.string().optional(),
|
|
16946
|
+
});
|
|
16947
|
+
const CreateWorkspaceTokenResponse = WorkspaceToken.extend({
|
|
16948
|
+
accessToken: z.z.string(),
|
|
16949
|
+
});
|
|
16950
|
+
const CreateWorkspaceTokenRequest = z.z.object({
|
|
16951
|
+
grantType: WorkspaceTokenGrantType,
|
|
16952
|
+
grantId: z.z.string(),
|
|
16953
|
+
grantName: z.z.string(),
|
|
16954
|
+
tenantId: z.z.string().optional(),
|
|
16955
|
+
clientKey: z.z.string().optional(),
|
|
16956
|
+
});
|
|
16957
|
+
const WorkspaceTokenListResponse = z.z.object({
|
|
16958
|
+
items: z.z.array(WorkspaceToken),
|
|
16959
|
+
});
|
|
16960
|
+
|
|
16136
16961
|
const CONSOLE_ACCOUNT_API_TOKEN_PATH = 'settings/account/api-token';
|
|
16137
16962
|
|
|
16138
16963
|
const PendingQueueCountSchema = z.z.object({
|
|
@@ -16757,6 +17582,7 @@ injectFormulaCatalog(getFormula, isFormula, hasFormulas);
|
|
|
16757
17582
|
|
|
16758
17583
|
exports.ACTIONS = ACTIONS;
|
|
16759
17584
|
exports.AGENTIC_CONNECTION_REQUEST_SCREEN_PATH = AGENTIC_CONNECTION_REQUEST_SCREEN_PATH;
|
|
17585
|
+
exports.AGENT_WORKSPACE_ELEMENT_CONTEXT_TYPES = AGENT_WORKSPACE_ELEMENT_CONTEXT_TYPES;
|
|
16760
17586
|
exports.AIGatewaySupportedModelIdSchema = AIGatewaySupportedModelIdSchema;
|
|
16761
17587
|
exports.AI_GATEWAY_PROVIDER_MODELS = AI_GATEWAY_PROVIDER_MODELS;
|
|
16762
17588
|
exports.AI_GATEWAY_SUPPORTED_MODELS = AI_GATEWAY_SUPPORTED_MODELS;
|
|
@@ -16768,6 +17594,7 @@ exports.AccountResponse = AccountResponse;
|
|
|
16768
17594
|
exports.ActApiDispatch = ActApiDispatch;
|
|
16769
17595
|
exports.ActRequest = ActRequest;
|
|
16770
17596
|
exports.ActionAccessor = ActionAccessor;
|
|
17597
|
+
exports.ActionApiPayload = ActionApiPayload;
|
|
16771
17598
|
exports.ActionApiResponse = ActionApiResponse;
|
|
16772
17599
|
exports.ActionDependency = ActionDependency;
|
|
16773
17600
|
exports.ActionEditableProperties = ActionEditableProperties;
|
|
@@ -16780,12 +17607,18 @@ exports.ActionRunError = ActionRunError;
|
|
|
16780
17607
|
exports.ActionRunLogRecordApiResponse = ActionRunLogRecordApiResponse;
|
|
16781
17608
|
exports.ActionRunResponse = ActionRunResponse;
|
|
16782
17609
|
exports.ActionRunsStatsQuery = ActionRunsStatsQuery;
|
|
17610
|
+
exports.ActionSnapshot = ActionSnapshot;
|
|
16783
17611
|
exports.ActionsAccessor = ActionsAccessor;
|
|
16784
17612
|
exports.ActivityLogRecord = ActivityLogRecord;
|
|
16785
17613
|
exports.ActivityStatsQuery = ActivityStatsQuery;
|
|
17614
|
+
exports.AgentHarness = AgentHarness;
|
|
17615
|
+
exports.AgentHarnessSnapshot = AgentHarnessSnapshot;
|
|
17616
|
+
exports.AgentInstruction = AgentInstruction;
|
|
16786
17617
|
exports.AgentSession = AgentSession;
|
|
16787
17618
|
exports.AgentSessionAttachment = AgentSessionAttachment;
|
|
16788
17619
|
exports.AgentSessionInputSchema = AgentSessionInputSchema;
|
|
17620
|
+
exports.AgentSkill = AgentSkill;
|
|
17621
|
+
exports.AgentTool = AgentTool;
|
|
16789
17622
|
exports.AiAgentAudience = AiAgentAudience;
|
|
16790
17623
|
exports.AiAgentParameters = AiAgentParameters;
|
|
16791
17624
|
exports.AiAgentType = AiAgentType;
|
|
@@ -16814,8 +17647,12 @@ exports.AppEventTypeExportProperties = AppEventTypeExportProperties;
|
|
|
16814
17647
|
exports.AppEventTypesAccessor = AppEventTypesAccessor;
|
|
16815
17648
|
exports.AppSchema = AppSchema;
|
|
16816
17649
|
exports.AppliedToIntegrations = AppliedToIntegrations;
|
|
17650
|
+
exports.AsyncRequest = AsyncRequest;
|
|
17651
|
+
exports.AsyncRequestStatusSchema = AsyncRequestStatusSchema;
|
|
16817
17652
|
exports.AsyncRequestTriggerResponse = AsyncRequestTriggerResponse;
|
|
16818
17653
|
exports.AuthContextPermissionsSchema = AuthContextPermissionsSchema;
|
|
17654
|
+
exports.AuthContextSettings = AuthContextSettings;
|
|
17655
|
+
exports.AuthorizationServerMetadata = AuthorizationServerMetadata;
|
|
16819
17656
|
exports.BackwardCompatibleDataSourceEditableProperties = BackwardCompatibleDataSourceEditableProperties;
|
|
16820
17657
|
exports.BadRequestError = BadRequestError;
|
|
16821
17658
|
exports.BaseAction = BaseAction;
|
|
@@ -16834,10 +17671,12 @@ exports.BaseDataLinkTable = BaseDataLinkTable;
|
|
|
16834
17671
|
exports.BaseDataLinkTableInstance = BaseDataLinkTableInstance;
|
|
16835
17672
|
exports.BaseDataSource = BaseDataSource;
|
|
16836
17673
|
exports.BaseDataSourceInstance = BaseDataSourceInstance;
|
|
17674
|
+
exports.BaseExportProperties = BaseExportProperties;
|
|
16837
17675
|
exports.BaseExternalEvent = BaseExternalEvent;
|
|
16838
17676
|
exports.BaseExternalEventLogRecord = BaseExternalEventLogRecord;
|
|
16839
17677
|
exports.BaseExternalEventPull = BaseExternalEventPull;
|
|
16840
17678
|
exports.BaseExternalEventSubscription = BaseExternalEventSubscription;
|
|
17679
|
+
exports.BaseExternalEventType = BaseExternalEventType;
|
|
16841
17680
|
exports.BaseFieldMapping = BaseFieldMapping;
|
|
16842
17681
|
exports.BaseFieldMappingInstance = BaseFieldMappingInstance;
|
|
16843
17682
|
exports.BaseFlow = BaseFlow;
|
|
@@ -16856,7 +17695,6 @@ exports.BaseOrgUser = BaseOrgUser;
|
|
|
16856
17695
|
exports.BasePackage = BasePackage;
|
|
16857
17696
|
exports.BaseScreen = BaseScreen;
|
|
16858
17697
|
exports.BaseWorkspaceElement = BaseWorkspaceElement;
|
|
16859
|
-
exports.CLIENT_TOKEN_GRANT_TYPES = CLIENT_TOKEN_GRANT_TYPES;
|
|
16860
17698
|
exports.CONNECTION_REQUEST_ID_PARAM = CONNECTION_REQUEST_ID_PARAM;
|
|
16861
17699
|
exports.CONNECTION_REQUEST_SCREEN_PATH = CONNECTION_REQUEST_SCREEN_PATH;
|
|
16862
17700
|
exports.CONNECTOR_AUTH_TYPES = CONNECTOR_AUTH_TYPES;
|
|
@@ -16873,9 +17711,6 @@ exports.CONSOLE_ACCOUNT_API_TOKEN_PATH = CONSOLE_ACCOUNT_API_TOKEN_PATH;
|
|
|
16873
17711
|
exports.CheckpointApiResponse = CheckpointApiResponse;
|
|
16874
17712
|
exports.CheckpointDiffOperationSchema = CheckpointDiffOperationSchema;
|
|
16875
17713
|
exports.CheckpointDiffResponseSchema = CheckpointDiffResponseSchema;
|
|
16876
|
-
exports.ClientToken = ClientToken;
|
|
16877
|
-
exports.ClientTokenGrantType = ClientTokenGrantType;
|
|
16878
|
-
exports.ClientTokenListResponse = ClientTokenListResponse;
|
|
16879
17714
|
exports.CommonFindElementsQuery = CommonFindElementsQuery;
|
|
16880
17715
|
exports.CommonFindInstancesQuery = CommonFindInstancesQuery;
|
|
16881
17716
|
exports.CommonInstancesListQuery = CommonInstancesListQuery;
|
|
@@ -16895,6 +17730,7 @@ exports.ConnectionAttemptLogApiResponse = ConnectionAttemptLogApiResponse;
|
|
|
16895
17730
|
exports.ConnectionClientAction = ConnectionClientAction;
|
|
16896
17731
|
exports.ConnectionDataCollectionAccessor = ConnectionDataCollectionAccessor;
|
|
16897
17732
|
exports.ConnectionEditableProperties = ConnectionEditableProperties;
|
|
17733
|
+
exports.ConnectionEntityMessagePayload = ConnectionEntityMessagePayload;
|
|
16898
17734
|
exports.ConnectionError = ConnectionError;
|
|
16899
17735
|
exports.ConnectionExportProperties = ConnectionExportProperties;
|
|
16900
17736
|
exports.ConnectionLevelActionAccessor = ConnectionLevelActionAccessor;
|
|
@@ -16915,6 +17751,7 @@ exports.ConnectionRequest = ConnectionRequest;
|
|
|
16915
17751
|
exports.ConnectionSelector = ConnectionSelector;
|
|
16916
17752
|
exports.ConnectionSpec = ConnectionSpec;
|
|
16917
17753
|
exports.ConnectionTestResponse = ConnectionTestResponse;
|
|
17754
|
+
exports.ConnectionType = ConnectionType;
|
|
16918
17755
|
exports.ConnectionsAccessor = ConnectionsAccessor;
|
|
16919
17756
|
exports.Connector = Connector;
|
|
16920
17757
|
exports.ConnectorAuth = ConnectorAuth;
|
|
@@ -16954,12 +17791,14 @@ exports.ConnectorUdmSpec = ConnectorUdmSpec;
|
|
|
16954
17791
|
exports.ConnectorUiSpec = ConnectorUiSpec;
|
|
16955
17792
|
exports.ConnectorVersion = ConnectorVersion;
|
|
16956
17793
|
exports.ConnectorVersionData = ConnectorVersionData;
|
|
17794
|
+
exports.ConnectorVersionExportProperties = ConnectorVersionExportProperties;
|
|
16957
17795
|
exports.CreateActionInstanceRequest = CreateActionInstanceRequest;
|
|
16958
17796
|
exports.CreateActionRequest = CreateActionRequest;
|
|
17797
|
+
exports.CreateAgentHarnessRequest = CreateAgentHarnessRequest;
|
|
17798
|
+
exports.CreateAgentInstructionRequest = CreateAgentInstructionRequest;
|
|
16959
17799
|
exports.CreateAgentSession = CreateAgentSession;
|
|
17800
|
+
exports.CreateAgentSkillRequest = CreateAgentSkillRequest;
|
|
16960
17801
|
exports.CreateAlert = CreateAlert;
|
|
16961
|
-
exports.CreateClientTokenRequest = CreateClientTokenRequest;
|
|
16962
|
-
exports.CreateClientTokenResponse = CreateClientTokenResponse;
|
|
16963
17802
|
exports.CreateConnectedProductRequest = CreateConnectedProductRequest;
|
|
16964
17803
|
exports.CreateConnectionRequest = CreateConnectionRequest;
|
|
16965
17804
|
exports.CreateConnectionRequestPayload = CreateConnectionRequestPayload;
|
|
@@ -16968,6 +17807,9 @@ exports.CreateCustomerRequest = CreateCustomerRequest;
|
|
|
16968
17807
|
exports.CreateDataLinkTableRequest = CreateDataLinkTableRequest;
|
|
16969
17808
|
exports.CreateDataSourceInstanceRequest = CreateDataSourceInstanceRequest;
|
|
16970
17809
|
exports.CreateDataSourceRequest = CreateDataSourceRequest;
|
|
17810
|
+
exports.CreateExternalAppRequest = CreateExternalAppRequest;
|
|
17811
|
+
exports.CreateExternalEventSubscriptionRequest = CreateExternalEventSubscriptionRequest;
|
|
17812
|
+
exports.CreateExternalEventTypeRequest = CreateExternalEventTypeRequest;
|
|
16971
17813
|
exports.CreateFieldMappingInstanceRequest = CreateFieldMappingInstanceRequest;
|
|
16972
17814
|
exports.CreateFieldMappingRequest = CreateFieldMappingRequest;
|
|
16973
17815
|
exports.CreateFlowNodeRequest = CreateFlowNodeRequest;
|
|
@@ -16984,6 +17826,8 @@ exports.CreateScreenRequest = CreateScreenRequest;
|
|
|
16984
17826
|
exports.CreateSelfHostingTokenRequest = CreateSelfHostingTokenRequest;
|
|
16985
17827
|
exports.CreateSelfHostingTokenResponse = CreateSelfHostingTokenResponse;
|
|
16986
17828
|
exports.CreateWorkspaceRequest = CreateWorkspaceRequest;
|
|
17829
|
+
exports.CreateWorkspaceTokenRequest = CreateWorkspaceTokenRequest;
|
|
17830
|
+
exports.CreateWorkspaceTokenResponse = CreateWorkspaceTokenResponse;
|
|
16987
17831
|
exports.CustomCodeError = CustomCodeError;
|
|
16988
17832
|
exports.CustomerAccessor = CustomerAccessor;
|
|
16989
17833
|
exports.CustomerApiResponse = CustomerApiResponse;
|
|
@@ -17079,7 +17923,9 @@ exports.DbBackedCountsSchema = DbBackedCountsSchema;
|
|
|
17079
17923
|
exports.DependencyError = DependencyError;
|
|
17080
17924
|
exports.DomainFromEmail = DomainFromEmail;
|
|
17081
17925
|
exports.DownstreamFlowNodeRunSchema = DownstreamFlowNodeRunSchema;
|
|
17926
|
+
exports.DynamicClientRegistrationResponse = DynamicClientRegistrationResponse;
|
|
17082
17927
|
exports.EDITABLE_LIMITS = EDITABLE_LIMITS;
|
|
17928
|
+
exports.EXTERNAL_EVENT_TYPE_FUNCTION_KEYS = EXTERNAL_EVENT_TYPE_FUNCTION_KEYS;
|
|
17083
17929
|
exports.ElementAccessor = ElementAccessor;
|
|
17084
17930
|
exports.ElementInstanceAccessor = ElementInstanceAccessor;
|
|
17085
17931
|
exports.ElementInstanceListAccessor = ElementInstanceListAccessor;
|
|
@@ -17095,10 +17941,14 @@ exports.ExternalApiLogApiResponse = ExternalApiLogApiResponse;
|
|
|
17095
17941
|
exports.ExternalEvent = ExternalEvent;
|
|
17096
17942
|
exports.ExternalEventLogRecordApiResponse = ExternalEventLogRecordApiResponse;
|
|
17097
17943
|
exports.ExternalEventPullApiResponse = ExternalEventPullApiResponse;
|
|
17944
|
+
exports.ExternalEventPullTelemetry = ExternalEventPullTelemetry;
|
|
17098
17945
|
exports.ExternalEventSubscriptionAccessor = ExternalEventSubscriptionAccessor;
|
|
17099
17946
|
exports.ExternalEventSubscriptionApiResponse = ExternalEventSubscriptionApiResponse;
|
|
17100
17947
|
exports.ExternalEventSubscriptionConfig = ExternalEventSubscriptionConfig;
|
|
17101
17948
|
exports.ExternalEventSubscriptionsAccessor = ExternalEventSubscriptionsAccessor;
|
|
17949
|
+
exports.ExternalEventTypeApiResponse = ExternalEventTypeApiResponse;
|
|
17950
|
+
exports.ExternalEventTypeEditableProperties = ExternalEventTypeEditableProperties;
|
|
17951
|
+
exports.ExternalEventTypeExportProperties = ExternalEventTypeExportProperties;
|
|
17102
17952
|
exports.ExternalEventUnitConfig = ExternalEventUnitConfig;
|
|
17103
17953
|
exports.FLOW_NODE_SPECS = FLOW_NODE_SPECS;
|
|
17104
17954
|
exports.FieldMappingAccessor = FieldMappingAccessor;
|
|
@@ -17114,6 +17964,10 @@ exports.FindActionInstancesQuery = FindActionInstancesQuery;
|
|
|
17114
17964
|
exports.FindActionRunLogsQuery = FindActionRunLogsQuery;
|
|
17115
17965
|
exports.FindActionRunLogsResponse = FindActionRunLogsResponse;
|
|
17116
17966
|
exports.FindActionsQuery = FindActionsQuery;
|
|
17967
|
+
exports.FindAgentHarnessQuery = FindAgentHarnessQuery;
|
|
17968
|
+
exports.FindAgentHarnessSnapshotQuery = FindAgentHarnessSnapshotQuery;
|
|
17969
|
+
exports.FindAgentInstructionQuery = FindAgentInstructionQuery;
|
|
17970
|
+
exports.FindAgentSkillQuery = FindAgentSkillQuery;
|
|
17117
17971
|
exports.FindAlertsQuery = FindAlertsQuery;
|
|
17118
17972
|
exports.FindAppDataSchemaInstancesQuery = FindAppDataSchemaInstancesQuery;
|
|
17119
17973
|
exports.FindAppDataSchemasQuery = FindAppDataSchemasQuery;
|
|
@@ -17138,6 +17992,7 @@ exports.FindDataSourceInstancesQuery = FindDataSourceInstancesQuery;
|
|
|
17138
17992
|
exports.FindDataSourceSyncsQuery = FindDataSourceSyncsQuery;
|
|
17139
17993
|
exports.FindDataSourcesQuery = FindDataSourcesQuery;
|
|
17140
17994
|
exports.FindExternalEventPullsQuery = FindExternalEventPullsQuery;
|
|
17995
|
+
exports.FindExternalEventTypesQuery = FindExternalEventTypesQuery;
|
|
17141
17996
|
exports.FindFieldMappingInstancesQuery = FindFieldMappingInstancesQuery;
|
|
17142
17997
|
exports.FindFieldMappingsQuery = FindFieldMappingsQuery;
|
|
17143
17998
|
exports.FindFlowInstancesQuery = FindFlowInstancesQuery;
|
|
@@ -17229,6 +18084,9 @@ exports.JavascriptFunction = JavascriptFunction;
|
|
|
17229
18084
|
exports.JsonataFormula = JsonataFormula;
|
|
17230
18085
|
exports.ListActionInstancesForConnectionQuery = ListActionInstancesForConnectionQuery;
|
|
17231
18086
|
exports.ListAppEventLogRecordsQuery = ListAppEventLogRecordsQuery;
|
|
18087
|
+
exports.ListAsyncRequestsQuery = ListAsyncRequestsQuery;
|
|
18088
|
+
exports.ListAsyncRequestsResponse = ListAsyncRequestsResponse;
|
|
18089
|
+
exports.ListConnectorsQuery = ListConnectorsQuery;
|
|
17232
18090
|
exports.ListDataSourceInstancesForConnectionQuery = ListDataSourceInstancesForConnectionQuery;
|
|
17233
18091
|
exports.ListExternalApiLogsQuery = ListExternalApiLogsQuery;
|
|
17234
18092
|
exports.ListExternalAppsQuery = ListExternalAppsQuery;
|
|
@@ -17243,7 +18101,8 @@ exports.ListOrgWorkspacesQuery = ListOrgWorkspacesQuery;
|
|
|
17243
18101
|
exports.ListOrgWorkspacesResponse = ListOrgWorkspacesResponse;
|
|
17244
18102
|
exports.ListPublicConnectorsQuery = ListPublicConnectorsQuery;
|
|
17245
18103
|
exports.ListPublicPackagesQuery = ListPublicPackagesQuery;
|
|
17246
|
-
exports.
|
|
18104
|
+
exports.ListableAsyncRequestType = ListableAsyncRequestType;
|
|
18105
|
+
exports.MCP_PROTOCOL_VERSION = MCP_PROTOCOL_VERSION;
|
|
17247
18106
|
exports.MEMBRANE_CLI_CLIENT_ID = MEMBRANE_CLI_CLIENT_ID;
|
|
17248
18107
|
exports.MEMBRANE_ELEMENT_CONFIG_FILE_NAME = MEMBRANE_ELEMENT_CONFIG_FILE_NAME;
|
|
17249
18108
|
exports.MEMBRANE_SESSION_ID_HEADER = MEMBRANE_SESSION_ID_HEADER;
|
|
@@ -17251,6 +18110,12 @@ exports.MIN_FULL_SYNC_INTERVAL_SECONDS = MIN_FULL_SYNC_INTERVAL_SECONDS;
|
|
|
17251
18110
|
exports.MIN_PULL_UPDATES_INTERVAL_SECONDS = MIN_PULL_UPDATES_INTERVAL_SECONDS;
|
|
17252
18111
|
exports.MappingFunction = MappingFunction;
|
|
17253
18112
|
exports.MappingSchema = MappingSchema;
|
|
18113
|
+
exports.McpAuthState = McpAuthState;
|
|
18114
|
+
exports.McpConnectionInput = McpConnectionInput;
|
|
18115
|
+
exports.McpCredentials = McpCredentials;
|
|
18116
|
+
exports.McpSynthesizedAction = McpSynthesizedAction;
|
|
18117
|
+
exports.McpTokenResponse = McpTokenResponse;
|
|
18118
|
+
exports.McpTool = McpTool;
|
|
17254
18119
|
exports.MembraneAgentKey = MembraneAgentKey;
|
|
17255
18120
|
exports.MembraneAxiosInstance = axios;
|
|
17256
18121
|
exports.MembraneClient = MembraneClient;
|
|
@@ -17287,6 +18152,7 @@ exports.OrgWorkspaceUser = OrgWorkspaceUser;
|
|
|
17287
18152
|
exports.PACKAGE_VERSION_DEVELOPMENT = PACKAGE_VERSION_DEVELOPMENT;
|
|
17288
18153
|
exports.PACKAGE_VERSION_LATEST = PACKAGE_VERSION_LATEST;
|
|
17289
18154
|
exports.PARALLEL_EXECUTION_LIMITS = PARALLEL_EXECUTION_LIMITS;
|
|
18155
|
+
exports.PLATFORM_USER_TOKEN_GRANT_TYPES = PLATFORM_USER_TOKEN_GRANT_TYPES;
|
|
17290
18156
|
exports.PackageAccessor = PackageAccessor;
|
|
17291
18157
|
exports.PackageApiResponse = PackageApiResponse;
|
|
17292
18158
|
exports.PackageCalculatedProperties = PackageCalculatedProperties;
|
|
@@ -17302,13 +18168,22 @@ exports.PaginationQuery = PaginationQuery;
|
|
|
17302
18168
|
exports.PaginationResponse = PaginationResponse;
|
|
17303
18169
|
exports.PatchAgentSessionSchema = PatchAgentSessionSchema;
|
|
17304
18170
|
exports.PatchConnectionRequestPayload = PatchConnectionRequestPayload;
|
|
18171
|
+
exports.PatchExternalEventSubscriptionRequest = PatchExternalEventSubscriptionRequest;
|
|
18172
|
+
exports.PatchTokenSettingsRequest = PatchTokenSettingsRequest;
|
|
17305
18173
|
exports.PatchUserWorkspaceSettings = PatchUserWorkspaceSettings;
|
|
17306
18174
|
exports.PendingQueueCountSchema = PendingQueueCountSchema;
|
|
17307
18175
|
exports.PendingTasksSummarySchema = PendingTasksSummarySchema;
|
|
17308
18176
|
exports.PlatformUser = PlatformUser;
|
|
18177
|
+
exports.PlatformUserToken = PlatformUserToken;
|
|
18178
|
+
exports.PlatformUserTokenGrantType = PlatformUserTokenGrantType;
|
|
18179
|
+
exports.PlatformUserTokenListResponse = PlatformUserTokenListResponse;
|
|
18180
|
+
exports.PreviewAgentSkillSourceRequest = PreviewAgentSkillSourceRequest;
|
|
18181
|
+
exports.PreviewAgentSkillSourceResponse = PreviewAgentSkillSourceResponse;
|
|
18182
|
+
exports.ProtectedResourceMetadata = ProtectedResourceMetadata;
|
|
17309
18183
|
exports.RATE_LIMITS = RATE_LIMITS;
|
|
17310
18184
|
exports.REFERENCE_ELEMENT_TYPE_SELF = REFERENCE_ELEMENT_TYPE_SELF;
|
|
17311
18185
|
exports.RateLimitExceededError = RateLimitExceededError;
|
|
18186
|
+
exports.RemoteConnectorCodeUnavailableError = RemoteConnectorCodeUnavailableError;
|
|
17312
18187
|
exports.RequestMappingSchema = RequestMappingSchema;
|
|
17313
18188
|
exports.ResetFlowInstanceOptions = ResetFlowInstanceOptions;
|
|
17314
18189
|
exports.RestApiMappingFunction = RestApiMappingFunction;
|
|
@@ -17340,6 +18215,9 @@ exports.UNIFIED_DATA_MODELS = UNIFIED_DATA_MODELS;
|
|
|
17340
18215
|
exports.UnitRunError = UnitRunError;
|
|
17341
18216
|
exports.UpdateActionInstanceRequest = UpdateActionInstanceRequest;
|
|
17342
18217
|
exports.UpdateActionRequest = UpdateActionRequest;
|
|
18218
|
+
exports.UpdateAgentHarnessRequest = UpdateAgentHarnessRequest;
|
|
18219
|
+
exports.UpdateAgentInstructionRequest = UpdateAgentInstructionRequest;
|
|
18220
|
+
exports.UpdateAgentSkillRequest = UpdateAgentSkillRequest;
|
|
17343
18221
|
exports.UpdateConnectedProductRequest = UpdateConnectedProductRequest;
|
|
17344
18222
|
exports.UpdateConnectionRequest = UpdateConnectionRequest;
|
|
17345
18223
|
exports.UpdateConnectorRequest = UpdateConnectorRequest;
|
|
@@ -17347,6 +18225,8 @@ exports.UpdateCustomerRequest = UpdateCustomerRequest;
|
|
|
17347
18225
|
exports.UpdateDataLinkTableRequest = UpdateDataLinkTableRequest;
|
|
17348
18226
|
exports.UpdateDataSourceInstanceRequest = UpdateDataSourceInstanceRequest;
|
|
17349
18227
|
exports.UpdateDataSourceRequest = UpdateDataSourceRequest;
|
|
18228
|
+
exports.UpdateExternalAppRequest = UpdateExternalAppRequest;
|
|
18229
|
+
exports.UpdateExternalEventTypeRequest = UpdateExternalEventTypeRequest;
|
|
17350
18230
|
exports.UpdateFieldMappingInstanceRequest = UpdateFieldMappingInstanceRequest;
|
|
17351
18231
|
exports.UpdateFieldMappingRequest = UpdateFieldMappingRequest;
|
|
17352
18232
|
exports.UpdateFlowRequest = UpdateFlowRequest;
|
|
@@ -17362,6 +18242,7 @@ exports.UpdateWorkspaceLimitsRequest = UpdateWorkspaceLimitsRequest;
|
|
|
17362
18242
|
exports.UpdateWorkspaceRequest = UpdateWorkspaceRequest;
|
|
17363
18243
|
exports.UpstreamFlowNodeRunSchema = UpstreamFlowNodeRunSchema;
|
|
17364
18244
|
exports.UserAccessor = UserAccessor;
|
|
18245
|
+
exports.UserWorkspaceAccess = UserWorkspaceAccess;
|
|
17365
18246
|
exports.UsersAccessor = UsersAccessor;
|
|
17366
18247
|
exports.ValidateSelfHostingTokenRequest = ValidateSelfHostingTokenRequest;
|
|
17367
18248
|
exports.ValidateSelfHostingTokenResponse = ValidateSelfHostingTokenResponse;
|
|
@@ -17369,6 +18250,7 @@ exports.WORKSPACE_DATABASE_RECORD_COLLECTIONS = WORKSPACE_DATABASE_RECORD_COLLEC
|
|
|
17369
18250
|
exports.WORKSPACE_ELEMENTS_STATS_COLLECTIONS = WORKSPACE_ELEMENTS_STATS_COLLECTIONS;
|
|
17370
18251
|
exports.WORKSPACE_ELEMENT_COLLECTIONS = WORKSPACE_ELEMENT_COLLECTIONS;
|
|
17371
18252
|
exports.WORKSPACE_SIZE_LIMITS = WORKSPACE_SIZE_LIMITS;
|
|
18253
|
+
exports.WORKSPACE_TOKEN_GRANT_TYPES = WORKSPACE_TOKEN_GRANT_TYPES;
|
|
17372
18254
|
exports.Workspace = Workspace;
|
|
17373
18255
|
exports.WorkspaceEditableFields = WorkspaceEditableFields;
|
|
17374
18256
|
exports.WorkspaceElementSearchQuery = WorkspaceElementSearchQuery;
|
|
@@ -17379,6 +18261,9 @@ exports.WorkspaceLimitsSchema = WorkspaceLimitsSchema;
|
|
|
17379
18261
|
exports.WorkspaceOnboardingData = WorkspaceOnboardingData;
|
|
17380
18262
|
exports.WorkspacePublicKey = WorkspacePublicKey;
|
|
17381
18263
|
exports.WorkspaceSettingsSchema = WorkspaceSettingsSchema;
|
|
18264
|
+
exports.WorkspaceToken = WorkspaceToken;
|
|
18265
|
+
exports.WorkspaceTokenGrantType = WorkspaceTokenGrantType;
|
|
18266
|
+
exports.WorkspaceTokenListResponse = WorkspaceTokenListResponse;
|
|
17382
18267
|
exports.WritableConnectorVersionData = WritableConnectorVersionData;
|
|
17383
18268
|
exports.WritablePackageVersionData = WritablePackageVersionData;
|
|
17384
18269
|
exports.WriteableConnectorFields = WriteableConnectorFields;
|
|
@@ -17388,11 +18273,15 @@ exports.addRequiredFieldsToSchema = addRequiredFieldsToSchema;
|
|
|
17388
18273
|
exports.addUdmFallbackFields = addUdmFallbackFields;
|
|
17389
18274
|
exports.addUndefinedWriteableProperties = addUndefinedWriteableProperties;
|
|
17390
18275
|
exports.backwardCompatibleFilterMatch = backwardCompatibleFilterMatch;
|
|
18276
|
+
exports.buildActionSnapshot = buildActionSnapshot;
|
|
17391
18277
|
exports.buildData = buildData;
|
|
17392
18278
|
exports.buildDataSchema = buildDataSchema;
|
|
17393
18279
|
exports.buildValue = buildValue;
|
|
18280
|
+
exports.canFetchAgentWorkspaceElementContext = canFetchAgentWorkspaceElementContext;
|
|
18281
|
+
exports.compareElementMaps = compareElementMaps;
|
|
17394
18282
|
exports.compareWorkspaceExports = compareWorkspaceExports;
|
|
17395
18283
|
exports.compressDataSchema = compressDataSchema;
|
|
18284
|
+
exports.configToNamedPayload = configToNamedPayload;
|
|
17396
18285
|
exports.createCompoundSchema = createCompoundSchema;
|
|
17397
18286
|
exports.createFlowInstanceSchema = createFlowInstanceSchema;
|
|
17398
18287
|
exports.createObjectFromLocators = createObjectFromLocators;
|
|
@@ -17402,6 +18291,7 @@ exports.createSchema = createSchema;
|
|
|
17402
18291
|
exports.dataCollectionEventTypeToExternalEventType = dataCollectionEventTypeToExternalEventType;
|
|
17403
18292
|
exports.dataLocationParametersMatch = dataLocationParametersMatch;
|
|
17404
18293
|
exports.doesMatchFilter = doesMatchFilter;
|
|
18294
|
+
exports.emptyComparisonResult = emptyComparisonResult;
|
|
17405
18295
|
exports.excludeFieldsFromSchema = excludeFieldsFromSchema;
|
|
17406
18296
|
exports.excludeFieldsFromValue = excludeFieldsFromValue;
|
|
17407
18297
|
exports.excludeReadOnlyFieldsFromSchema = excludeReadOnlyFieldsFromSchema;
|
|
@@ -17427,6 +18317,7 @@ exports.getChildNodeKeys = getChildNodeKeys;
|
|
|
17427
18317
|
exports.getConnectionRequestUrl = getConnectionRequestUrl;
|
|
17428
18318
|
exports.getConnectorSpecPath = getConnectorSpecPath;
|
|
17429
18319
|
exports.getConnectorVersionPath = getConnectorVersionPath;
|
|
18320
|
+
exports.getConnectorVersionSpecPath = getConnectorVersionSpecPath;
|
|
17430
18321
|
exports.getDataCollectionCreateFields = getDataCollectionCreateFields;
|
|
17431
18322
|
exports.getDataCollectionUpdateFields = getDataCollectionUpdateFields;
|
|
17432
18323
|
exports.getDataLocationMethodPath = getDataLocationMethodPath;
|
|
@@ -17503,6 +18394,7 @@ exports.makeDataLocationPath = makeDataLocationPath;
|
|
|
17503
18394
|
exports.makeDataRecordSchema = makeDataRecordSchema;
|
|
17504
18395
|
exports.makeObjectPropertyLocator = makeObjectPropertyLocator;
|
|
17505
18396
|
exports.makeSchemaForLocator = makeSchemaForLocator;
|
|
18397
|
+
exports.mergeComparisons = mergeComparisons;
|
|
17506
18398
|
exports.mergeSchemas = mergeSchemas;
|
|
17507
18399
|
exports.mergeWithFormulas = mergeWithFormulas;
|
|
17508
18400
|
exports.nonEmptyObjectProperties = nonEmptyObjectProperties;
|