@membranehq/sdk 0.9.11 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.d.ts +75 -34
- package/dist/bundle.js +34 -17
- package/dist/bundle.js.map +1 -1
- package/dist/dts/accessors/connections-accessors.d.ts +18 -12
- package/dist/dts/accessors/integrations-accessors.d.ts +15 -11
- package/dist/dts/agent/session.d.ts +10 -0
- package/dist/dts/alerts/index.d.ts +1 -0
- package/dist/dts/alerts/types.d.ts +106 -13
- package/dist/dts/alerts/utils.d.ts +8 -0
- package/dist/dts/config/index.d.ts +1 -0
- package/dist/dts/dto/index.d.ts +3 -0
- package/dist/dts/functions/base.d.ts +2 -2
- package/dist/dts/index.browser.d.ts +1 -0
- package/dist/dts/logging/index.d.ts +9 -0
- package/dist/dts/orgs/types.d.ts +68 -1
- package/dist/dts/platform-users.d.ts +17 -2
- package/dist/dts/usage/types.d.ts +1 -0
- package/dist/dts/webhooks/types.d.ts +4 -2
- package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +6 -2
- package/dist/dts/workspace-elements/api/connections-api.d.ts +19 -4
- package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +3 -1
- package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +3 -1
- package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +3 -1
- package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +3 -1
- package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +3 -1
- package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +6 -2
- package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +6 -2
- package/dist/dts/workspace-elements/api/flows-api.d.ts +6 -2
- package/dist/dts/workspace-elements/api/integrations-api.d.ts +5 -4
- package/dist/dts/workspace-elements/api/packages-api.d.ts +2 -0
- package/dist/dts/workspace-elements/base/actions/index.d.ts +1 -1
- package/dist/dts/workspace-elements/base/connections/types.d.ts +3 -1
- package/dist/dts/workspace-elements/base/connectors/auth.d.ts +20 -0
- package/dist/dts/workspace-elements/base/connectors/functions.d.ts +12 -490
- package/dist/dts/workspace-elements/base/connectors/functions.test.d.ts +1 -0
- package/dist/dts/workspace-elements/base/connectors/index.d.ts +1 -0
- package/dist/dts/workspace-elements/base/connectors/types.d.ts +922 -478
- package/dist/dts/workspace-elements/base/data-collections/data-locations/collections/methods/base.d.ts +1 -2
- package/dist/dts/workspace-elements/base/integrations/index.d.ts +0 -2
- package/dist/dts/workspace-elements/base/packages/index.d.ts +2 -0
- package/dist/dts/workspace-elements/element-utils.d.ts +2 -0
- package/dist/dts/workspace-elements/element-utils.test.d.ts +1 -0
- package/dist/dts/workspace-elements/index.d.ts +1 -0
- package/dist/dts/workspace-elements/types.d.ts +9 -3
- package/dist/dts/workspaces/types.d.ts +39 -1
- package/dist/index.browser.d.mts +1420 -641
- package/dist/index.browser.d.ts +1420 -641
- package/dist/index.browser.js +608 -122
- package/dist/index.browser.js.map +1 -1
- package/dist/index.browser.mjs +584 -123
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.node.d.mts +1370 -590
- package/dist/index.node.d.ts +1370 -590
- package/dist/index.node.js +615 -122
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +591 -123
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.browser.mjs
CHANGED
|
@@ -3475,6 +3475,7 @@ var WorkspaceEventType;
|
|
|
3475
3475
|
WorkspaceEventType["FlowRunCompleted"] = "flowRun.completed";
|
|
3476
3476
|
WorkspaceEventType["FlowRunFailed"] = "flowRun.failed";
|
|
3477
3477
|
WorkspaceEventType["FlowRunStopped"] = "flowRun.stopped";
|
|
3478
|
+
WorkspaceEventType["AlertCreated"] = "alert.created";
|
|
3478
3479
|
})(WorkspaceEventType || (WorkspaceEventType = {}));
|
|
3479
3480
|
var WorkspaceElementState;
|
|
3480
3481
|
(function (WorkspaceElementState) {
|
|
@@ -3525,8 +3526,9 @@ const BaseIntegrationLevelMembraneInterfaceExportProperties = BaseMembraneInterf
|
|
|
3525
3526
|
parentUuid: z.string().optional(),
|
|
3526
3527
|
isCustomized: z.boolean().optional(),
|
|
3527
3528
|
});
|
|
3529
|
+
const MembraneElementLayer = z.enum(['universal', 'integration', 'connection']);
|
|
3528
3530
|
const IntegrationLevelMembraneInterfaceSelectorQuery = z.object({
|
|
3529
|
-
layer:
|
|
3531
|
+
layer: MembraneElementLayer.optional(),
|
|
3530
3532
|
integrationKey: z.string().optional(),
|
|
3531
3533
|
integrationId: z.string().optional(),
|
|
3532
3534
|
connectionId: z.string().optional(),
|
|
@@ -3546,8 +3548,7 @@ const WorkspaceElementSearchQuery = z.object({
|
|
|
3546
3548
|
});
|
|
3547
3549
|
const WorkspaceElementSearchResult = z.object({
|
|
3548
3550
|
elementType: z.enum(WorkspaceElementType),
|
|
3549
|
-
|
|
3550
|
-
name: z.string(),
|
|
3551
|
+
element: z.any(),
|
|
3551
3552
|
});
|
|
3552
3553
|
|
|
3553
3554
|
function mergeWithFormulas(a, b) {
|
|
@@ -3769,7 +3770,9 @@ const BaseConnection = BaseWorkspaceElement.extend({
|
|
|
3769
3770
|
isDefunct: z.boolean().optional(),
|
|
3770
3771
|
state: z.enum(WorkspaceElementState).optional(),
|
|
3771
3772
|
error: ErrorDataSchema.optional(),
|
|
3772
|
-
integrationId: z.string(),
|
|
3773
|
+
integrationId: z.string().optional(),
|
|
3774
|
+
connectorId: z.string().optional(),
|
|
3775
|
+
connectorVersion: z.string().optional(),
|
|
3773
3776
|
authOptionKey: z.string().optional(),
|
|
3774
3777
|
createdAt: z.string(),
|
|
3775
3778
|
updatedAt: z.string(),
|
|
@@ -3855,6 +3858,7 @@ const ConnectorAuthSpec = z.object({
|
|
|
3855
3858
|
title: z.string().optional(),
|
|
3856
3859
|
description: z.string().optional(),
|
|
3857
3860
|
type: z.enum(CONNECTOR_AUTH_TYPES),
|
|
3861
|
+
inputSchema: DataSchema.optional(),
|
|
3858
3862
|
ui: z
|
|
3859
3863
|
.object({
|
|
3860
3864
|
schema: DataSchema.optional(),
|
|
@@ -3884,11 +3888,12 @@ function getAuthSpec(spec, authOptionKey) {
|
|
|
3884
3888
|
const getDefaultAuthInputSchema = (args) => {
|
|
3885
3889
|
var _a, _b, _c, _d, _e, _f;
|
|
3886
3890
|
const authSpec = getAuthSpec(args.connectorSpec, args.authOptionKey);
|
|
3891
|
+
const inputSchema = (_b = (_a = authSpec === null || authSpec === void 0 ? void 0 : authSpec.ui) === null || _a === void 0 ? void 0 : _a.schema) !== null && _b !== void 0 ? _b : (_d = (_c = args.connectorSpec) === null || _c === void 0 ? void 0 : _c.ui) === null || _d === void 0 ? void 0 : _d.schema;
|
|
3887
3892
|
return {
|
|
3888
3893
|
type: 'object',
|
|
3889
3894
|
properties: {
|
|
3890
|
-
connectorParameters: (
|
|
3891
|
-
|
|
3895
|
+
connectorParameters: (_f = (_e = args.connectorSpec) === null || _e === void 0 ? void 0 : _e.parametersSchema) !== null && _f !== void 0 ? _f : {},
|
|
3896
|
+
connectionInput: inputSchema,
|
|
3892
3897
|
},
|
|
3893
3898
|
};
|
|
3894
3899
|
};
|
|
@@ -3989,7 +3994,7 @@ const ConnectorAuthMethodTypes = {
|
|
|
3989
3994
|
},
|
|
3990
3995
|
};
|
|
3991
3996
|
},
|
|
3992
|
-
getOutputSchema: () => REST_API_CLIENT_SCHEMA,
|
|
3997
|
+
getOutputSchema: () => REST_API_CLIENT_SCHEMA$1,
|
|
3993
3998
|
isRequired: true,
|
|
3994
3999
|
},
|
|
3995
4000
|
test: {
|
|
@@ -4144,7 +4149,7 @@ const REST_API_CLIENT_RESPONSE_HANDLERS_SCHEMA = {
|
|
|
4144
4149
|
},
|
|
4145
4150
|
},
|
|
4146
4151
|
};
|
|
4147
|
-
const REST_API_CLIENT_SCHEMA = {
|
|
4152
|
+
const REST_API_CLIENT_SCHEMA$1 = {
|
|
4148
4153
|
type: 'object',
|
|
4149
4154
|
properties: {
|
|
4150
4155
|
args: {
|
|
@@ -4182,11 +4187,6 @@ const CONNECTOR_DOCS_DIR = 'docs';
|
|
|
4182
4187
|
const CONNECTOR_GLOBAL_WEBHOOKS_DIR = 'global-webhooks';
|
|
4183
4188
|
const CONNECTOR_EVENTS_DIR = 'events';
|
|
4184
4189
|
|
|
4185
|
-
const ConnectorOperationMethodImplementationTypes = [
|
|
4186
|
-
ConnectorMethodImplementationType.restApiMapping,
|
|
4187
|
-
ConnectorMethodImplementationType.javascript,
|
|
4188
|
-
];
|
|
4189
|
-
|
|
4190
4190
|
var FunctionType;
|
|
4191
4191
|
(function (FunctionType) {
|
|
4192
4192
|
FunctionType["mapping"] = "mapping";
|
|
@@ -4206,10 +4206,157 @@ const BaseFunctionDefinition = z.object({
|
|
|
4206
4206
|
});
|
|
4207
4207
|
const GenericFunctionDefinition = z
|
|
4208
4208
|
.object({
|
|
4209
|
-
type: z.enum(['mapping', 'operation-mapping', 'rest-api-mapping', 'graphql-api-mapping', 'javascript']),
|
|
4209
|
+
type: z.enum(['mapping', 'operation-mapping', 'rest-api-mapping', 'graphql-api-mapping', 'javascript']).optional(),
|
|
4210
4210
|
})
|
|
4211
4211
|
.loose();
|
|
4212
4212
|
|
|
4213
|
+
function getEffectiveConnectorOption(connector, optionKey) {
|
|
4214
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4215
|
+
const option = (_a = connector.options) === null || _a === void 0 ? void 0 : _a[optionKey];
|
|
4216
|
+
const connectorInputSchema = (_b = connector.inputSchema) !== null && _b !== void 0 ? _b : (_c = connector.ui) === null || _c === void 0 ? void 0 : _c.schema;
|
|
4217
|
+
const optionInputSchema = (_d = option === null || option === void 0 ? void 0 : option.inputSchema) !== null && _d !== void 0 ? _d : (_e = option === null || option === void 0 ? void 0 : option.ui) === null || _e === void 0 ? void 0 : _e.schema;
|
|
4218
|
+
return {
|
|
4219
|
+
...connector,
|
|
4220
|
+
...option,
|
|
4221
|
+
inputSchema: mergeSchemas([connectorInputSchema, optionInputSchema]),
|
|
4222
|
+
parametersSchema: mergeSchemas([connector.parametersSchema, option === null || option === void 0 ? void 0 : option.parametersSchema]),
|
|
4223
|
+
credentialsSchema: mergeSchemas([connector.credentialsSchema, option === null || option === void 0 ? void 0 : option.credentialsSchema]),
|
|
4224
|
+
makeApiClient: (_f = option === null || option === void 0 ? void 0 : option.makeApiClient) !== null && _f !== void 0 ? _f : connector.makeApiClient,
|
|
4225
|
+
test: (_g = option === null || option === void 0 ? void 0 : option.test) !== null && _g !== void 0 ? _g : connector.test,
|
|
4226
|
+
};
|
|
4227
|
+
}
|
|
4228
|
+
const getDefaultInputSchema = (authConfig) => {
|
|
4229
|
+
var _a, _b, _c;
|
|
4230
|
+
const inputSchema = (_a = authConfig === null || authConfig === void 0 ? void 0 : authConfig.inputSchema) !== null && _a !== void 0 ? _a : (_b = authConfig === null || authConfig === void 0 ? void 0 : authConfig.ui) === null || _b === void 0 ? void 0 : _b.schema;
|
|
4231
|
+
return {
|
|
4232
|
+
type: 'object',
|
|
4233
|
+
properties: {
|
|
4234
|
+
connectorParameters: (_c = authConfig === null || authConfig === void 0 ? void 0 : authConfig.parametersSchema) !== null && _c !== void 0 ? _c : {},
|
|
4235
|
+
...(inputSchema && { connectionInput: inputSchema }),
|
|
4236
|
+
},
|
|
4237
|
+
};
|
|
4238
|
+
};
|
|
4239
|
+
const REST_API_CLIENT_SCHEMA = {
|
|
4240
|
+
type: 'object',
|
|
4241
|
+
properties: {
|
|
4242
|
+
args: {
|
|
4243
|
+
type: 'object',
|
|
4244
|
+
properties: {
|
|
4245
|
+
baseUri: {
|
|
4246
|
+
type: 'string',
|
|
4247
|
+
description: 'This prefix will be added to all relative API requests.',
|
|
4248
|
+
},
|
|
4249
|
+
query: {
|
|
4250
|
+
type: 'object',
|
|
4251
|
+
additionalProperties: true,
|
|
4252
|
+
},
|
|
4253
|
+
headers: {
|
|
4254
|
+
type: 'object',
|
|
4255
|
+
additionalProperties: true,
|
|
4256
|
+
},
|
|
4257
|
+
auth: {
|
|
4258
|
+
type: 'object',
|
|
4259
|
+
description: 'Basic authentication',
|
|
4260
|
+
properties: {
|
|
4261
|
+
username: { type: 'string' },
|
|
4262
|
+
password: { type: 'string' },
|
|
4263
|
+
},
|
|
4264
|
+
},
|
|
4265
|
+
},
|
|
4266
|
+
},
|
|
4267
|
+
},
|
|
4268
|
+
};
|
|
4269
|
+
const ConnectorFunctionSpecs = {
|
|
4270
|
+
getOAuthConfig: {
|
|
4271
|
+
authTypes: ['oauth2', 'oauth1'],
|
|
4272
|
+
supportedFunctionTypes: [FunctionType.mapping, FunctionType.javascript],
|
|
4273
|
+
getInputSchema: (authConfig) => {
|
|
4274
|
+
const schema = getDefaultInputSchema(authConfig);
|
|
4275
|
+
return {
|
|
4276
|
+
...schema,
|
|
4277
|
+
properties: {
|
|
4278
|
+
...schema.properties,
|
|
4279
|
+
redirectUri: { type: 'string' },
|
|
4280
|
+
state: { type: 'string' },
|
|
4281
|
+
},
|
|
4282
|
+
};
|
|
4283
|
+
},
|
|
4284
|
+
getOutputSchema: (authConfig) => {
|
|
4285
|
+
return (authConfig === null || authConfig === void 0 ? void 0 : authConfig.type) === 'oauth1' ? OAUTH1_CONFIG_SCHEMA : OAUTH_CONFIG_SCHEMA;
|
|
4286
|
+
},
|
|
4287
|
+
isRequired: true,
|
|
4288
|
+
},
|
|
4289
|
+
getTokenData: {
|
|
4290
|
+
authTypes: ['oauth2'],
|
|
4291
|
+
supportedFunctionTypes: [FunctionType.mapping, FunctionType.javascript],
|
|
4292
|
+
getInputSchema: getDefaultInputSchema,
|
|
4293
|
+
getOutputSchema: (authConfig) => {
|
|
4294
|
+
var _a;
|
|
4295
|
+
return (_a = authConfig === null || authConfig === void 0 ? void 0 : authConfig.customCredentialsSchema) !== null && _a !== void 0 ? _a : authConfig === null || authConfig === void 0 ? void 0 : authConfig.credentialsSchema;
|
|
4296
|
+
},
|
|
4297
|
+
isRequired: false,
|
|
4298
|
+
},
|
|
4299
|
+
getCredentialsFromAccessTokenResponse: {
|
|
4300
|
+
authTypes: ['oauth2'],
|
|
4301
|
+
supportedFunctionTypes: [FunctionType.mapping, FunctionType.javascript],
|
|
4302
|
+
isRequired: false,
|
|
4303
|
+
},
|
|
4304
|
+
getCredentialsFromRefreshTokenResponse: {
|
|
4305
|
+
authTypes: ['oauth2'],
|
|
4306
|
+
supportedFunctionTypes: [FunctionType.mapping, FunctionType.javascript],
|
|
4307
|
+
isRequired: false,
|
|
4308
|
+
},
|
|
4309
|
+
getCredentialsFromConnectionParameters: {
|
|
4310
|
+
authTypes: ['client-credentials', 'oauth2'],
|
|
4311
|
+
getInputSchema: getDefaultInputSchema,
|
|
4312
|
+
getOutputSchema: (authConfig) => {
|
|
4313
|
+
return authConfig === null || authConfig === void 0 ? void 0 : authConfig.credentialsSchema;
|
|
4314
|
+
},
|
|
4315
|
+
supportedFunctionTypes: [FunctionType.mapping, FunctionType.javascript],
|
|
4316
|
+
isRequired: false,
|
|
4317
|
+
},
|
|
4318
|
+
refreshCredentials: {
|
|
4319
|
+
authTypes: ['oauth2', 'oauth1', 'client-credentials'],
|
|
4320
|
+
getInputSchema: getDefaultInputSchema,
|
|
4321
|
+
getOutputSchema: (authConfig) => {
|
|
4322
|
+
return authConfig === null || authConfig === void 0 ? void 0 : authConfig.credentialsSchema;
|
|
4323
|
+
},
|
|
4324
|
+
supportedFunctionTypes: [FunctionType.javascript],
|
|
4325
|
+
isRequired: false,
|
|
4326
|
+
},
|
|
4327
|
+
makeApiClient: {
|
|
4328
|
+
supportedFunctionTypes: [FunctionType.mapping, FunctionType.javascript],
|
|
4329
|
+
getInputSchema: (authConfig) => {
|
|
4330
|
+
var _a, _b, _c;
|
|
4331
|
+
return {
|
|
4332
|
+
type: 'object',
|
|
4333
|
+
properties: {
|
|
4334
|
+
credentials: mergeSchemas([
|
|
4335
|
+
((_a = authConfig === null || authConfig === void 0 ? void 0 : authConfig.customCredentialsSchema) !== null && _a !== void 0 ? _a : authConfig === null || authConfig === void 0 ? void 0 : authConfig.credentialsSchema),
|
|
4336
|
+
(_b = authConfig === null || authConfig === void 0 ? void 0 : authConfig.inputSchema) !== null && _b !== void 0 ? _b : (_c = authConfig === null || authConfig === void 0 ? void 0 : authConfig.ui) === null || _c === void 0 ? void 0 : _c.schema,
|
|
4337
|
+
]),
|
|
4338
|
+
},
|
|
4339
|
+
};
|
|
4340
|
+
},
|
|
4341
|
+
getOutputSchema: () => REST_API_CLIENT_SCHEMA,
|
|
4342
|
+
isRequired: true,
|
|
4343
|
+
},
|
|
4344
|
+
test: {
|
|
4345
|
+
supportedFunctionTypes: [FunctionType.operationMapping, FunctionType.restApiMapping, FunctionType.javascript],
|
|
4346
|
+
getOutputSchema: () => ({
|
|
4347
|
+
title: 'Success Criteria',
|
|
4348
|
+
description: 'If this value is truthy, the test is considered a success.',
|
|
4349
|
+
type: 'boolean',
|
|
4350
|
+
}),
|
|
4351
|
+
isRequired: true,
|
|
4352
|
+
},
|
|
4353
|
+
};
|
|
4354
|
+
|
|
4355
|
+
const ConnectorOperationMethodImplementationTypes = [
|
|
4356
|
+
ConnectorMethodImplementationType.restApiMapping,
|
|
4357
|
+
ConnectorMethodImplementationType.javascript,
|
|
4358
|
+
];
|
|
4359
|
+
|
|
4213
4360
|
const GraphQLFieldMappingSchema = z.lazy(() => z.object({
|
|
4214
4361
|
field: z.string(),
|
|
4215
4362
|
args: z.record(z.string(), z.any()).optional(),
|
|
@@ -4319,7 +4466,8 @@ const ConnectorSpec = z.object({
|
|
|
4319
4466
|
type: z.enum(['openapi', 'graphql']),
|
|
4320
4467
|
})
|
|
4321
4468
|
.optional(),
|
|
4322
|
-
ui: ConnectorUiSpec.optional(),
|
|
4469
|
+
ui: ConnectorUiSpec.optional().describe('[INTERNAL] Deprecated: Use inputSchema instead'),
|
|
4470
|
+
inputSchema: DataSchema.optional(),
|
|
4323
4471
|
auth: ConnectorAuth.optional(),
|
|
4324
4472
|
parametersSchema: DataSchema.optional(),
|
|
4325
4473
|
udms: z.array(z.string()).optional(),
|
|
@@ -4342,14 +4490,10 @@ const ConnectorAuthWithFunctions = z.object({
|
|
|
4342
4490
|
type: z
|
|
4343
4491
|
.enum(['integration-app-token', 'membrane-token', 'oauth2', 'oauth1', 'client-credentials', 'proxy'])
|
|
4344
4492
|
.optional(),
|
|
4493
|
+
credentialsSchema: DataSchema.optional(),
|
|
4345
4494
|
customCredentialsSchema: DataSchema.optional(),
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
schema: DataSchema.optional(),
|
|
4349
|
-
description: z.string().optional(),
|
|
4350
|
-
helpUri: z.string().optional(),
|
|
4351
|
-
})
|
|
4352
|
-
.optional(),
|
|
4495
|
+
inputSchema: DataSchema.optional(),
|
|
4496
|
+
parametersSchema: DataSchema.optional(),
|
|
4353
4497
|
getCredentialsFromConnectionParameters: GenericFunctionDefinition.optional(),
|
|
4354
4498
|
refreshCredentials: GenericFunctionDefinition.optional(),
|
|
4355
4499
|
makeApiClient: GenericFunctionDefinition.optional(),
|
|
@@ -4357,18 +4501,40 @@ const ConnectorAuthWithFunctions = z.object({
|
|
|
4357
4501
|
getTokenData: GenericFunctionDefinition.optional(),
|
|
4358
4502
|
getCredentialsFromAccessTokenResponse: GenericFunctionDefinition.optional(),
|
|
4359
4503
|
getCredentialsFromRefreshTokenResponse: GenericFunctionDefinition.optional(),
|
|
4504
|
+
test: GenericFunctionDefinition.optional(),
|
|
4360
4505
|
proxyKey: z.string().optional(),
|
|
4506
|
+
ui: z
|
|
4507
|
+
.object({
|
|
4508
|
+
schema: DataSchema.optional(),
|
|
4509
|
+
description: z.string().optional(),
|
|
4510
|
+
helpUri: z.string().optional(),
|
|
4511
|
+
})
|
|
4512
|
+
.optional()
|
|
4513
|
+
.describe('[INTERNAL] Deprecated: Use inputSchema instead'),
|
|
4361
4514
|
});
|
|
4362
|
-
const
|
|
4515
|
+
const WriteableConnectorOption = ConnectorAuthWithFunctions.extend({
|
|
4363
4516
|
title: z.string().optional(),
|
|
4364
4517
|
description: z.string().optional(),
|
|
4365
4518
|
enabled: z.any().optional(),
|
|
4519
|
+
}).omit({
|
|
4520
|
+
credentialsSchema: true,
|
|
4521
|
+
});
|
|
4522
|
+
const ConnectorOption = WriteableConnectorOption.extend({
|
|
4523
|
+
credentialsSchema: DataSchema.optional(),
|
|
4524
|
+
});
|
|
4525
|
+
const GeneratedConnectorOption = z.object({
|
|
4526
|
+
key: z.string(),
|
|
4527
|
+
type: z.enum(CONNECTOR_AUTH_TYPES),
|
|
4528
|
+
title: z.string().optional(),
|
|
4529
|
+
description: z.string().optional(),
|
|
4530
|
+
inputSchema: DataSchema.optional(),
|
|
4366
4531
|
});
|
|
4367
4532
|
const ConnectorOptions = z.record(z.string(), ConnectorOption);
|
|
4368
4533
|
const WritableConnectorVersionData = ConnectorAuthWithFunctions.extend({
|
|
4369
4534
|
parametersSchema: DataSchema.optional(),
|
|
4370
|
-
|
|
4371
|
-
|
|
4535
|
+
options: z.record(z.string(), WriteableConnectorOption).optional(),
|
|
4536
|
+
}).omit({
|
|
4537
|
+
credentialsSchema: true,
|
|
4372
4538
|
});
|
|
4373
4539
|
const ConnectorVersionData = z
|
|
4374
4540
|
.object({
|
|
@@ -4386,7 +4552,10 @@ const ConnectorVersionData = z
|
|
|
4386
4552
|
version: z.string(),
|
|
4387
4553
|
credentialsSchema: DataSchema.optional(),
|
|
4388
4554
|
})
|
|
4389
|
-
.extend(WritableConnectorVersionData.shape)
|
|
4555
|
+
.extend(WritableConnectorVersionData.shape)
|
|
4556
|
+
.extend({
|
|
4557
|
+
options: ConnectorOptions.optional(),
|
|
4558
|
+
});
|
|
4390
4559
|
const ConnectorVersion = ConnectorVersionData.extend({
|
|
4391
4560
|
id: z.string(),
|
|
4392
4561
|
connectorId: z.string(),
|
|
@@ -4401,6 +4570,7 @@ const WriteableConnectorFields = z
|
|
|
4401
4570
|
categories: z.array(z.string()).optional(),
|
|
4402
4571
|
})
|
|
4403
4572
|
.extend(WritableConnectorVersionData.shape);
|
|
4573
|
+
const ConnectorExportProperties = WriteableConnectorFields;
|
|
4404
4574
|
const UpdateConnectorRequest = WriteableConnectorFields;
|
|
4405
4575
|
const CreateConnectorRequest = WriteableConnectorFields.extend({
|
|
4406
4576
|
name: z.string(),
|
|
@@ -4410,16 +4580,12 @@ const BaseConnector = z.object({
|
|
|
4410
4580
|
id: z.string(),
|
|
4411
4581
|
key: z.string(),
|
|
4412
4582
|
uuid: z.string(),
|
|
4583
|
+
appUuid: z.string().optional(),
|
|
4413
4584
|
name: z.string(),
|
|
4414
4585
|
logoUri: z.string(),
|
|
4415
|
-
appUri: z.string(),
|
|
4416
|
-
apiDocsUri: z.string(),
|
|
4417
|
-
hasReadme: z.boolean(),
|
|
4418
|
-
status: z.string().optional(),
|
|
4419
4586
|
categories: z.array(z.string()).optional(),
|
|
4420
4587
|
isPublic: z.boolean().optional(),
|
|
4421
4588
|
popularity: z.number().optional(),
|
|
4422
|
-
appUuid: z.string().optional(),
|
|
4423
4589
|
});
|
|
4424
4590
|
const Connector = z
|
|
4425
4591
|
.object({})
|
|
@@ -4483,8 +4649,8 @@ const DataCollectionMethodCreate = {
|
|
|
4483
4649
|
},
|
|
4484
4650
|
};
|
|
4485
4651
|
},
|
|
4486
|
-
getInputSchema: ({ collectionSpec, method,
|
|
4487
|
-
var _a
|
|
4652
|
+
getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
|
|
4653
|
+
var _a;
|
|
4488
4654
|
let fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
4489
4655
|
if (method === null || method === void 0 ? void 0 : method.fields) {
|
|
4490
4656
|
fieldsSchema = pickFieldsFromSchema(fieldsSchema, method.fields);
|
|
@@ -4494,12 +4660,12 @@ const DataCollectionMethodCreate = {
|
|
|
4494
4660
|
}
|
|
4495
4661
|
return {
|
|
4496
4662
|
type: 'object',
|
|
4497
|
-
properties: {
|
|
4663
|
+
properties: nonEmptyObjectProperties({
|
|
4498
4664
|
fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
|
|
4499
4665
|
type: 'object',
|
|
4500
4666
|
},
|
|
4501
|
-
credentials:
|
|
4502
|
-
},
|
|
4667
|
+
credentials: credentialsSchema,
|
|
4668
|
+
}),
|
|
4503
4669
|
};
|
|
4504
4670
|
},
|
|
4505
4671
|
getOutputSchema: ({}) => ({
|
|
@@ -4514,17 +4680,16 @@ const DataCollectionMethodCreate = {
|
|
|
4514
4680
|
const DataCollectionMethodDelete = {
|
|
4515
4681
|
name: 'Delete',
|
|
4516
4682
|
description: 'Delete a data record from the collection by id',
|
|
4517
|
-
getInputSchema: ({ collectionHandler, parameters,
|
|
4518
|
-
var _a;
|
|
4683
|
+
getInputSchema: ({ collectionHandler, parameters, credentialsSchema }) => {
|
|
4519
4684
|
return {
|
|
4520
4685
|
type: 'object',
|
|
4521
|
-
properties: {
|
|
4686
|
+
properties: nonEmptyObjectProperties({
|
|
4522
4687
|
id: {
|
|
4523
4688
|
type: 'string',
|
|
4524
4689
|
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
4525
4690
|
},
|
|
4526
|
-
credentials:
|
|
4527
|
-
},
|
|
4691
|
+
credentials: credentialsSchema,
|
|
4692
|
+
}),
|
|
4528
4693
|
};
|
|
4529
4694
|
},
|
|
4530
4695
|
getOutputSchema: () => null,
|
|
@@ -4548,15 +4713,14 @@ const DataCollectionMethodFind = {
|
|
|
4548
4713
|
},
|
|
4549
4714
|
};
|
|
4550
4715
|
},
|
|
4551
|
-
getInputSchema: ({ collectionSpec, method,
|
|
4552
|
-
var _a;
|
|
4716
|
+
getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
|
|
4553
4717
|
const queryFieldsSchema = pickFieldsFromSchema(collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema, method === null || method === void 0 ? void 0 : method.queryFields);
|
|
4554
4718
|
const schema = {
|
|
4555
4719
|
type: 'object',
|
|
4556
|
-
properties: {
|
|
4720
|
+
properties: nonEmptyObjectProperties({
|
|
4557
4721
|
cursor: { type: 'string' },
|
|
4558
|
-
credentials:
|
|
4559
|
-
},
|
|
4722
|
+
credentials: credentialsSchema,
|
|
4723
|
+
}),
|
|
4560
4724
|
};
|
|
4561
4725
|
if (queryFieldsSchema === null || queryFieldsSchema === void 0 ? void 0 : queryFieldsSchema.properties) {
|
|
4562
4726
|
schema.properties = {
|
|
@@ -4587,19 +4751,16 @@ const DataCollectionMethodFind = {
|
|
|
4587
4751
|
const DataCollectionMethodFindById = {
|
|
4588
4752
|
name: 'Find by ID',
|
|
4589
4753
|
description: 'Find a single data record in the collection by its id',
|
|
4590
|
-
getInputSchema: ({ collectionHandler, parameters,
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
type: 'string',
|
|
4597
|
-
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
4598
|
-
},
|
|
4599
|
-
credentials: (_a = connectorSpec === null || connectorSpec === void 0 ? void 0 : connectorSpec.auth) === null || _a === void 0 ? void 0 : _a.credentialsSchema,
|
|
4754
|
+
getInputSchema: ({ collectionHandler, parameters, credentialsSchema }) => ({
|
|
4755
|
+
type: 'object',
|
|
4756
|
+
properties: nonEmptyObjectProperties({
|
|
4757
|
+
id: {
|
|
4758
|
+
type: 'string',
|
|
4759
|
+
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
4600
4760
|
},
|
|
4601
|
-
|
|
4602
|
-
|
|
4761
|
+
credentials: credentialsSchema,
|
|
4762
|
+
}),
|
|
4763
|
+
}),
|
|
4603
4764
|
getOutputSchema: ({ collectionSpec }) => {
|
|
4604
4765
|
var _a;
|
|
4605
4766
|
return ({
|
|
@@ -4628,8 +4789,7 @@ const DataCollectionMethodList = {
|
|
|
4628
4789
|
},
|
|
4629
4790
|
};
|
|
4630
4791
|
},
|
|
4631
|
-
getInputSchema: ({ method, collectionSpec,
|
|
4632
|
-
var _a;
|
|
4792
|
+
getInputSchema: ({ method, collectionSpec, credentialsSchema }) => {
|
|
4633
4793
|
const fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
4634
4794
|
let filterSchema;
|
|
4635
4795
|
if (method === null || method === void 0 ? void 0 : method.filterFields) {
|
|
@@ -4643,7 +4803,7 @@ const DataCollectionMethodList = {
|
|
|
4643
4803
|
type: 'string',
|
|
4644
4804
|
description: 'Cursor returned in response to the previous "list" request',
|
|
4645
4805
|
},
|
|
4646
|
-
credentials:
|
|
4806
|
+
credentials: credentialsSchema,
|
|
4647
4807
|
}),
|
|
4648
4808
|
};
|
|
4649
4809
|
},
|
|
@@ -4682,15 +4842,14 @@ const DataCollectionMethodMatch = {
|
|
|
4682
4842
|
},
|
|
4683
4843
|
};
|
|
4684
4844
|
},
|
|
4685
|
-
getInputSchema: ({ collectionSpec, method,
|
|
4686
|
-
var _a;
|
|
4845
|
+
getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
|
|
4687
4846
|
const fieldsSchema = pickFieldsFromSchema(collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema, method === null || method === void 0 ? void 0 : method.fields);
|
|
4688
4847
|
return {
|
|
4689
4848
|
type: 'object',
|
|
4690
|
-
properties: {
|
|
4849
|
+
properties: nonEmptyObjectProperties({
|
|
4691
4850
|
query: transformVariablesWith(fieldsSchema !== null && fieldsSchema !== void 0 ? fieldsSchema : {}, (locator) => `query.${locatorToField(locator)}`),
|
|
4692
|
-
credentials:
|
|
4693
|
-
},
|
|
4851
|
+
credentials: credentialsSchema,
|
|
4852
|
+
}),
|
|
4694
4853
|
};
|
|
4695
4854
|
},
|
|
4696
4855
|
getOutputSchema: ({ collectionSpec }) => {
|
|
@@ -4708,17 +4867,14 @@ const DataCollectionMethodMatch = {
|
|
|
4708
4867
|
const DataCollectionMethodSearch = {
|
|
4709
4868
|
name: 'Search',
|
|
4710
4869
|
description: 'Find data records in a collection by a string query',
|
|
4711
|
-
getInputSchema: ({
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
type: '
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
},
|
|
4720
|
-
});
|
|
4721
|
-
},
|
|
4870
|
+
getInputSchema: ({ credentialsSchema }) => ({
|
|
4871
|
+
type: 'object',
|
|
4872
|
+
properties: nonEmptyObjectProperties({
|
|
4873
|
+
query: { type: 'string' },
|
|
4874
|
+
cursor: { type: 'string' },
|
|
4875
|
+
credentials: credentialsSchema,
|
|
4876
|
+
}),
|
|
4877
|
+
}),
|
|
4722
4878
|
getOutputSchema: ({ collectionSpec }) => {
|
|
4723
4879
|
var _a;
|
|
4724
4880
|
return ({
|
|
@@ -4755,8 +4911,8 @@ const DataCollectionMethodUpdate = {
|
|
|
4755
4911
|
},
|
|
4756
4912
|
};
|
|
4757
4913
|
},
|
|
4758
|
-
getInputSchema: ({ collectionSpec, collectionHandler,
|
|
4759
|
-
var _a
|
|
4914
|
+
getInputSchema: ({ collectionSpec, collectionHandler, credentialsSchema, method, parameters }) => {
|
|
4915
|
+
var _a;
|
|
4760
4916
|
let fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
|
|
4761
4917
|
if (method === null || method === void 0 ? void 0 : method.fields) {
|
|
4762
4918
|
fieldsSchema = pickFieldsFromSchema(fieldsSchema, method.fields);
|
|
@@ -4766,7 +4922,7 @@ const DataCollectionMethodUpdate = {
|
|
|
4766
4922
|
}
|
|
4767
4923
|
return {
|
|
4768
4924
|
type: 'object',
|
|
4769
|
-
properties: {
|
|
4925
|
+
properties: nonEmptyObjectProperties({
|
|
4770
4926
|
id: {
|
|
4771
4927
|
type: 'string',
|
|
4772
4928
|
referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
|
|
@@ -4774,8 +4930,8 @@ const DataCollectionMethodUpdate = {
|
|
|
4774
4930
|
fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
|
|
4775
4931
|
type: 'object',
|
|
4776
4932
|
},
|
|
4777
|
-
credentials:
|
|
4778
|
-
},
|
|
4933
|
+
credentials: credentialsSchema,
|
|
4934
|
+
}),
|
|
4779
4935
|
};
|
|
4780
4936
|
},
|
|
4781
4937
|
getOutputSchema: ({}) => ({
|
|
@@ -9341,7 +9497,6 @@ const BaseIntegration = BaseMembraneInterface.extend({
|
|
|
9341
9497
|
authType: z.enum(CONNECTOR_AUTH_TYPES).optional(),
|
|
9342
9498
|
});
|
|
9343
9499
|
const IntegrationEditableProperties = BaseMembraneInterfaceEditableProperties.extend({
|
|
9344
|
-
baseUri: z.string().optional(),
|
|
9345
9500
|
logoUri: z.string().optional(),
|
|
9346
9501
|
appUuid: z.string().optional(),
|
|
9347
9502
|
oAuthCallbackUri: z.url().or(z.literal('')).optional(),
|
|
@@ -9382,6 +9537,7 @@ const PackageCalculatedProperties = z.object({
|
|
|
9382
9537
|
key: z.string(),
|
|
9383
9538
|
name: z.string(),
|
|
9384
9539
|
isCustomized: z.boolean().optional(),
|
|
9540
|
+
isPublic: z.boolean().optional(),
|
|
9385
9541
|
});
|
|
9386
9542
|
const BasePackage = BaseMembraneInterface.merge(PackageEditableProperties).merge(PackageCalculatedProperties);
|
|
9387
9543
|
const WritablePackageVersionData = z.object({
|
|
@@ -9827,6 +9983,7 @@ const FindActionRunLogsResponse = createPaginationResponseSchema(ActionRunLogRec
|
|
|
9827
9983
|
|
|
9828
9984
|
const FindConnectionsQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchivedQuery).extend({
|
|
9829
9985
|
connectorId: z.string().optional(),
|
|
9986
|
+
connectorVersion: z.string().optional(),
|
|
9830
9987
|
id: z.string().optional(),
|
|
9831
9988
|
userId: z.string().optional(),
|
|
9832
9989
|
name: z.string().optional(),
|
|
@@ -9860,7 +10017,7 @@ const ConnectionApiResponse = BaseConnection.extend({
|
|
|
9860
10017
|
});
|
|
9861
10018
|
const ConnectionApiResponseWithSecrets = ConnectionApiResponse.extend({
|
|
9862
10019
|
credentials: z.unknown().optional(),
|
|
9863
|
-
|
|
10020
|
+
input: z.unknown().optional(),
|
|
9864
10021
|
connectorParameters: z.unknown().optional(),
|
|
9865
10022
|
});
|
|
9866
10023
|
const ConnectionMessagePayload = z.discriminatedUnion('type', [
|
|
@@ -9876,8 +10033,15 @@ const ConnectionMessagePayload = z.discriminatedUnion('type', [
|
|
|
9876
10033
|
type: z.literal('newConnectionFailure'),
|
|
9877
10034
|
error: z.string(),
|
|
9878
10035
|
errorData: ErrorDataSchema.optional(),
|
|
10036
|
+
connectionId: z.string().optional(),
|
|
9879
10037
|
}),
|
|
9880
10038
|
]);
|
|
10039
|
+
const GenerateOptionsRequest = z.object({
|
|
10040
|
+
integrationId: z.string().optional(),
|
|
10041
|
+
connectorId: z.string().optional(),
|
|
10042
|
+
connectorParameters: z.any().optional(),
|
|
10043
|
+
connectorVersion: z.string().optional(),
|
|
10044
|
+
});
|
|
9881
10045
|
|
|
9882
10046
|
const ListPublicConnectorsQuery = PaginationQuery.extend({
|
|
9883
10047
|
search: z.string().optional(),
|
|
@@ -10070,13 +10234,16 @@ const IntegrationAuthOption = z.object({
|
|
|
10070
10234
|
type: z.enum(CONNECTOR_AUTH_TYPES),
|
|
10071
10235
|
title: z.string().optional(),
|
|
10072
10236
|
description: z.string().optional(),
|
|
10073
|
-
|
|
10237
|
+
inputSchema: DataSchema.optional(),
|
|
10238
|
+
ui: IntegrationAuthUi.optional().describe('[INTERNAL] Deprecated: Use inputSchema instead'),
|
|
10074
10239
|
});
|
|
10075
10240
|
const IntegrationApiResponse = BaseIntegration.extend({
|
|
10076
10241
|
connection: BaseConnection.optional(),
|
|
10077
10242
|
spec: z.any().optional(),
|
|
10078
|
-
authOptions: z
|
|
10079
|
-
|
|
10243
|
+
authOptions: z
|
|
10244
|
+
.array(IntegrationAuthOption)
|
|
10245
|
+
.optional()
|
|
10246
|
+
.describe('[INTERNAL] Deprecated: Use POST /connectors/:id/generate-options instead'),
|
|
10080
10247
|
});
|
|
10081
10248
|
|
|
10082
10249
|
const PackageElementApi = z.object({
|
|
@@ -10416,6 +10583,107 @@ function hasCycles(nodes) {
|
|
|
10416
10583
|
return hasCycles;
|
|
10417
10584
|
}
|
|
10418
10585
|
|
|
10586
|
+
function addUndefinedWriteableProperties(value, schema) {
|
|
10587
|
+
if (!(schema instanceof z.ZodObject)) {
|
|
10588
|
+
return value;
|
|
10589
|
+
}
|
|
10590
|
+
const allProperties = Object.keys(schema.shape);
|
|
10591
|
+
for (const key of allProperties) {
|
|
10592
|
+
if (!(key in value)) {
|
|
10593
|
+
value[key] = undefined;
|
|
10594
|
+
}
|
|
10595
|
+
}
|
|
10596
|
+
return value;
|
|
10597
|
+
}
|
|
10598
|
+
function lenientParseWithSchema(data, schema) {
|
|
10599
|
+
if (data === undefined || data === null) {
|
|
10600
|
+
return data;
|
|
10601
|
+
}
|
|
10602
|
+
const def = schema._def;
|
|
10603
|
+
if (!def) {
|
|
10604
|
+
return data;
|
|
10605
|
+
}
|
|
10606
|
+
const typeName = def.typeName || def.type;
|
|
10607
|
+
if (typeName === 'ZodOptional' || typeName === 'optional') {
|
|
10608
|
+
if (data === undefined)
|
|
10609
|
+
return undefined;
|
|
10610
|
+
return lenientParseWithSchema(data, def.innerType);
|
|
10611
|
+
}
|
|
10612
|
+
if (typeName === 'ZodNullable' || typeName === 'nullable') {
|
|
10613
|
+
if (data === null)
|
|
10614
|
+
return null;
|
|
10615
|
+
return lenientParseWithSchema(data, def.innerType);
|
|
10616
|
+
}
|
|
10617
|
+
if (typeName === 'ZodObject' || typeName === 'object') {
|
|
10618
|
+
if (typeof data !== 'object' || Array.isArray(data)) {
|
|
10619
|
+
return data;
|
|
10620
|
+
}
|
|
10621
|
+
const shape = schema.shape;
|
|
10622
|
+
const result = {};
|
|
10623
|
+
if (shape) {
|
|
10624
|
+
for (const key in shape) {
|
|
10625
|
+
if (key in data) {
|
|
10626
|
+
result[key] = lenientParseWithSchema(data[key], shape[key]);
|
|
10627
|
+
}
|
|
10628
|
+
}
|
|
10629
|
+
}
|
|
10630
|
+
const catchall = def.catchall;
|
|
10631
|
+
if (catchall) {
|
|
10632
|
+
const catchallDef = catchall._def;
|
|
10633
|
+
if ((catchallDef === null || catchallDef === void 0 ? void 0 : catchallDef.typeName) === 'ZodNever' || (catchallDef === null || catchallDef === void 0 ? void 0 : catchallDef.type) === 'never') ;
|
|
10634
|
+
else if ((catchallDef === null || catchallDef === void 0 ? void 0 : catchallDef.typeName) === 'ZodAny' || (catchallDef === null || catchallDef === void 0 ? void 0 : catchallDef.type) === 'unknown' || (catchallDef === null || catchallDef === void 0 ? void 0 : catchallDef.type) === 'any') {
|
|
10635
|
+
for (const key in data) {
|
|
10636
|
+
if (!(key in result)) {
|
|
10637
|
+
result[key] = data[key];
|
|
10638
|
+
}
|
|
10639
|
+
}
|
|
10640
|
+
}
|
|
10641
|
+
else {
|
|
10642
|
+
for (const key in data) {
|
|
10643
|
+
if (shape && !(key in shape)) {
|
|
10644
|
+
result[key] = data[key];
|
|
10645
|
+
}
|
|
10646
|
+
}
|
|
10647
|
+
}
|
|
10648
|
+
}
|
|
10649
|
+
return result;
|
|
10650
|
+
}
|
|
10651
|
+
if (typeName === 'ZodArray' || typeName === 'array') {
|
|
10652
|
+
if (!Array.isArray(data)) {
|
|
10653
|
+
return data;
|
|
10654
|
+
}
|
|
10655
|
+
const elementSchema = def.element || def.type;
|
|
10656
|
+
if (!elementSchema) {
|
|
10657
|
+
return data;
|
|
10658
|
+
}
|
|
10659
|
+
return data.map((item) => lenientParseWithSchema(item, elementSchema));
|
|
10660
|
+
}
|
|
10661
|
+
if (typeName === 'ZodRecord' || typeName === 'record') {
|
|
10662
|
+
if (typeof data !== 'object' || data === null || Array.isArray(data)) {
|
|
10663
|
+
return data;
|
|
10664
|
+
}
|
|
10665
|
+
const valueSchema = def.valueType;
|
|
10666
|
+
if (!valueSchema) {
|
|
10667
|
+
return data;
|
|
10668
|
+
}
|
|
10669
|
+
const result = {};
|
|
10670
|
+
for (const key in data) {
|
|
10671
|
+
result[key] = lenientParseWithSchema(data[key], valueSchema);
|
|
10672
|
+
}
|
|
10673
|
+
return result;
|
|
10674
|
+
}
|
|
10675
|
+
return data;
|
|
10676
|
+
}
|
|
10677
|
+
|
|
10678
|
+
function setEditablePropertiesForWorkspaceElement(currentElement, newEditableFields, exportSchema) {
|
|
10679
|
+
const parsedNewFields = lenientParseWithSchema(newEditableFields, exportSchema);
|
|
10680
|
+
const normalizedFields = addUndefinedWriteableProperties(parsedNewFields, exportSchema);
|
|
10681
|
+
return {
|
|
10682
|
+
...currentElement,
|
|
10683
|
+
...normalizedFields,
|
|
10684
|
+
};
|
|
10685
|
+
}
|
|
10686
|
+
|
|
10419
10687
|
const WorkspaceElementSpecs = {
|
|
10420
10688
|
[WorkspaceElementType.Customer]: {
|
|
10421
10689
|
type: WorkspaceElementType.Customer,
|
|
@@ -10442,6 +10710,7 @@ const WorkspaceElementSpecs = {
|
|
|
10442
10710
|
apiPath: 'connectors',
|
|
10443
10711
|
name: 'Connector',
|
|
10444
10712
|
namePlural: 'Connectors',
|
|
10713
|
+
exportPropertiesSchema: ConnectorExportProperties,
|
|
10445
10714
|
},
|
|
10446
10715
|
[WorkspaceElementType.Connection]: {
|
|
10447
10716
|
type: WorkspaceElementType.Connection,
|
|
@@ -10742,6 +11011,26 @@ async function streamToString(stream) {
|
|
|
10742
11011
|
});
|
|
10743
11012
|
});
|
|
10744
11013
|
}
|
|
11014
|
+
function isBlob(value) {
|
|
11015
|
+
var _a;
|
|
11016
|
+
if (value === null || typeof value !== 'object') {
|
|
11017
|
+
return false;
|
|
11018
|
+
}
|
|
11019
|
+
if (typeof Blob !== 'undefined' && value instanceof Blob) {
|
|
11020
|
+
return true;
|
|
11021
|
+
}
|
|
11022
|
+
const obj = value;
|
|
11023
|
+
const hasRequiredProps = typeof obj.size === 'number' && typeof obj.type === 'string' && typeof obj.slice === 'function';
|
|
11024
|
+
if (!hasRequiredProps) {
|
|
11025
|
+
return false;
|
|
11026
|
+
}
|
|
11027
|
+
const hasBlobMethod = typeof obj.stream === 'function' || typeof obj.text === 'function' || typeof obj.arrayBuffer === 'function';
|
|
11028
|
+
if (hasBlobMethod) {
|
|
11029
|
+
return true;
|
|
11030
|
+
}
|
|
11031
|
+
const constructorName = (_a = obj.constructor) === null || _a === void 0 ? void 0 : _a.name;
|
|
11032
|
+
return constructorName === 'Blob' || constructorName === 'File';
|
|
11033
|
+
}
|
|
10745
11034
|
function truncateData(data, depth = 0) {
|
|
10746
11035
|
const maxArrayItems = 500;
|
|
10747
11036
|
const maxObjectKeys = 500;
|
|
@@ -10765,6 +11054,9 @@ function truncateData(data, depth = 0) {
|
|
|
10765
11054
|
else if (Buffer.isBuffer(data)) {
|
|
10766
11055
|
return data.toString('utf-8').slice(0, maxStringLength);
|
|
10767
11056
|
}
|
|
11057
|
+
else if (isBlob(data)) {
|
|
11058
|
+
return `<Blob: size=${data.size}, type=${data.type}>`;
|
|
11059
|
+
}
|
|
10768
11060
|
else if (typeof data === 'object') {
|
|
10769
11061
|
const keys = Object.keys(data);
|
|
10770
11062
|
const result = {};
|
|
@@ -10998,6 +11290,7 @@ var UsageType;
|
|
|
10998
11290
|
UsageType["EXTERNAL_EVENTS_PULL_DURATION"] = "external-events-pull-duration";
|
|
10999
11291
|
UsageType["EXTERNAL_EVENT_PULL_NUMBER"] = "external-event-pull-number";
|
|
11000
11292
|
UsageType["EXTERNAL_EVENT_PULL_LOG_SIZE"] = "external-event-pull-log-size";
|
|
11293
|
+
UsageType["EXTERNAL_EVENT_WEBHOOK_REFRESH_DURATION"] = "external-event-webhook-refresh-duration";
|
|
11001
11294
|
UsageType["APP_EVENTS_NUMBER"] = "app-events-number";
|
|
11002
11295
|
UsageType["APP_EVENTS_SIZE"] = "app-events-size";
|
|
11003
11296
|
UsageType["FILES_UPLOAD_NUMBER"] = "files-upload-number";
|
|
@@ -11112,6 +11405,144 @@ function getFlowRunVariableSchema() {
|
|
|
11112
11405
|
};
|
|
11113
11406
|
}
|
|
11114
11407
|
|
|
11408
|
+
var AlertStatus;
|
|
11409
|
+
(function (AlertStatus) {
|
|
11410
|
+
AlertStatus["ONGOING"] = "ongoing";
|
|
11411
|
+
AlertStatus["RESOLVED"] = "resolved";
|
|
11412
|
+
})(AlertStatus || (AlertStatus = {}));
|
|
11413
|
+
var AlertSeverity;
|
|
11414
|
+
(function (AlertSeverity) {
|
|
11415
|
+
AlertSeverity["CRITICAL"] = "critical";
|
|
11416
|
+
AlertSeverity["WARNING"] = "warning";
|
|
11417
|
+
})(AlertSeverity || (AlertSeverity = {}));
|
|
11418
|
+
var AlertType;
|
|
11419
|
+
(function (AlertType) {
|
|
11420
|
+
AlertType["fileUploadsMbPerHour"] = "fileUploadsMbPerHour";
|
|
11421
|
+
AlertType["apiRequestsPerSecond"] = "apiRequestsPerSecond";
|
|
11422
|
+
AlertType["apiRequestsPerHour"] = "apiRequestsPerHour";
|
|
11423
|
+
AlertType["webhookRequestsPerSecond"] = "webhookRequestsPerSecond";
|
|
11424
|
+
AlertType["webhookRequestsPerHour"] = "webhookRequestsPerHour";
|
|
11425
|
+
AlertType["workspaceElementCreationsPerSecond"] = "workspaceElementCreationsPerSecond";
|
|
11426
|
+
AlertType["workspaceElementCreationsPerHour"] = "workspaceElementCreationsPerHour";
|
|
11427
|
+
AlertType["externalEventsPerCustomerPerDay"] = "externalEventsPerCustomerPerDay";
|
|
11428
|
+
AlertType["totalUsagePerDay"] = "totalUsagePerDay";
|
|
11429
|
+
AlertType["totalUsagePer30Days"] = "totalUsagePer30Days";
|
|
11430
|
+
AlertType["testAlert"] = "testAlert";
|
|
11431
|
+
})(AlertType || (AlertType = {}));
|
|
11432
|
+
var AlertCategory;
|
|
11433
|
+
(function (AlertCategory) {
|
|
11434
|
+
AlertCategory["RATE_LIMIT"] = "rateLimit";
|
|
11435
|
+
AlertCategory["USAGE"] = "usage";
|
|
11436
|
+
AlertCategory["TEST"] = "test";
|
|
11437
|
+
})(AlertCategory || (AlertCategory = {}));
|
|
11438
|
+
const ALERT_TYPE_CATEGORIES = {
|
|
11439
|
+
[AlertType.fileUploadsMbPerHour]: AlertCategory.RATE_LIMIT,
|
|
11440
|
+
[AlertType.apiRequestsPerSecond]: AlertCategory.RATE_LIMIT,
|
|
11441
|
+
[AlertType.apiRequestsPerHour]: AlertCategory.RATE_LIMIT,
|
|
11442
|
+
[AlertType.webhookRequestsPerSecond]: AlertCategory.RATE_LIMIT,
|
|
11443
|
+
[AlertType.webhookRequestsPerHour]: AlertCategory.RATE_LIMIT,
|
|
11444
|
+
[AlertType.workspaceElementCreationsPerSecond]: AlertCategory.RATE_LIMIT,
|
|
11445
|
+
[AlertType.workspaceElementCreationsPerHour]: AlertCategory.RATE_LIMIT,
|
|
11446
|
+
[AlertType.externalEventsPerCustomerPerDay]: AlertCategory.RATE_LIMIT,
|
|
11447
|
+
[AlertType.totalUsagePerDay]: AlertCategory.USAGE,
|
|
11448
|
+
[AlertType.totalUsagePer30Days]: AlertCategory.USAGE,
|
|
11449
|
+
[AlertType.testAlert]: AlertCategory.TEST,
|
|
11450
|
+
};
|
|
11451
|
+
const AlertSchema = z.object({
|
|
11452
|
+
id: z.string(),
|
|
11453
|
+
description: z.string(),
|
|
11454
|
+
status: z.enum(Object.values(AlertStatus)),
|
|
11455
|
+
type: z.enum(Object.values(AlertType)),
|
|
11456
|
+
workspaceId: z.string(),
|
|
11457
|
+
createdAt: z.date(),
|
|
11458
|
+
updatedAt: z.date(),
|
|
11459
|
+
lastSeenAt: z.date(),
|
|
11460
|
+
resolvedAt: z.date().optional(),
|
|
11461
|
+
customerId: z.string().optional(),
|
|
11462
|
+
severity: z.enum(Object.values(AlertSeverity)),
|
|
11463
|
+
});
|
|
11464
|
+
const ALERT_DELIVERY_METHODS = ['internal', 'webhook', 'email'];
|
|
11465
|
+
const AlertTypeDeliverySettingsSchema = z.object({
|
|
11466
|
+
internal: z.literal(true),
|
|
11467
|
+
webhook: z
|
|
11468
|
+
.object({
|
|
11469
|
+
enabled: z.boolean(),
|
|
11470
|
+
})
|
|
11471
|
+
.optional(),
|
|
11472
|
+
email: z
|
|
11473
|
+
.object({
|
|
11474
|
+
enabled: z.boolean(),
|
|
11475
|
+
})
|
|
11476
|
+
.optional(),
|
|
11477
|
+
});
|
|
11478
|
+
const DEFAULT_ALERT_TYPE_DELIVERY_SETTINGS = {
|
|
11479
|
+
internal: true,
|
|
11480
|
+
webhook: {
|
|
11481
|
+
enabled: false,
|
|
11482
|
+
},
|
|
11483
|
+
email: {
|
|
11484
|
+
enabled: false,
|
|
11485
|
+
},
|
|
11486
|
+
};
|
|
11487
|
+
const AlertDeliverySettingsSchema = z.object({
|
|
11488
|
+
alertTypes: z.record(z.enum(Object.values(AlertType)), AlertTypeDeliverySettingsSchema.optional()).optional(),
|
|
11489
|
+
});
|
|
11490
|
+
const DEFAULT_ALERT_DELIVERY_SETTINGS = {
|
|
11491
|
+
alertTypes: undefined,
|
|
11492
|
+
};
|
|
11493
|
+
|
|
11494
|
+
function isValidAlertType(value) {
|
|
11495
|
+
return Object.values(AlertType).includes(value);
|
|
11496
|
+
}
|
|
11497
|
+
function getAlertTypeDisplayName(alertType) {
|
|
11498
|
+
const names = {
|
|
11499
|
+
[AlertType.fileUploadsMbPerHour]: 'File Uploads MB Per Hour',
|
|
11500
|
+
[AlertType.apiRequestsPerSecond]: 'API Requests Per Second',
|
|
11501
|
+
[AlertType.apiRequestsPerHour]: 'API Requests Per Hour',
|
|
11502
|
+
[AlertType.webhookRequestsPerSecond]: 'Webhook Requests Per Second',
|
|
11503
|
+
[AlertType.webhookRequestsPerHour]: 'Webhook Requests Per Hour',
|
|
11504
|
+
[AlertType.workspaceElementCreationsPerSecond]: 'Workspace Element Creations Per Second',
|
|
11505
|
+
[AlertType.workspaceElementCreationsPerHour]: 'Workspace Element Creations Per Hour',
|
|
11506
|
+
[AlertType.externalEventsPerCustomerPerDay]: 'External Events Per Customer Per Day',
|
|
11507
|
+
[AlertType.totalUsagePerDay]: 'Total Usage Per Day',
|
|
11508
|
+
[AlertType.totalUsagePer30Days]: 'Total Usage Per 30 Days',
|
|
11509
|
+
[AlertType.testAlert]: 'Test Alert',
|
|
11510
|
+
};
|
|
11511
|
+
return names[alertType] || alertType;
|
|
11512
|
+
}
|
|
11513
|
+
function getAlertDeliveryMethodLabel(method) {
|
|
11514
|
+
const labels = {
|
|
11515
|
+
internal: 'Internal Delivery',
|
|
11516
|
+
webhook: 'Webhook Delivery',
|
|
11517
|
+
email: 'Email Delivery',
|
|
11518
|
+
};
|
|
11519
|
+
return labels[method] || method;
|
|
11520
|
+
}
|
|
11521
|
+
function isDeliveryMethodEnabled(settings, method) {
|
|
11522
|
+
var _a;
|
|
11523
|
+
if (method === 'internal') {
|
|
11524
|
+
return true;
|
|
11525
|
+
}
|
|
11526
|
+
if (((_a = settings[method]) !== null && _a !== void 0 ? _a : DEFAULT_ALERT_TYPE_DELIVERY_SETTINGS[method]).enabled) {
|
|
11527
|
+
return true;
|
|
11528
|
+
}
|
|
11529
|
+
return false;
|
|
11530
|
+
}
|
|
11531
|
+
function getAlertCategoryDisplayName(category) {
|
|
11532
|
+
const names = {
|
|
11533
|
+
[AlertCategory.RATE_LIMIT]: 'Rate Limit Alerts',
|
|
11534
|
+
[AlertCategory.USAGE]: 'Usage Alerts',
|
|
11535
|
+
[AlertCategory.TEST]: 'Test',
|
|
11536
|
+
};
|
|
11537
|
+
return names[category] || category;
|
|
11538
|
+
}
|
|
11539
|
+
function getAlertTypesByCategory(category) {
|
|
11540
|
+
return Object.entries(ALERT_TYPE_CATEGORIES)
|
|
11541
|
+
.filter(([, alertCategory]) => alertCategory === category)
|
|
11542
|
+
.map(([alertType]) => alertType)
|
|
11543
|
+
.filter(isValidAlertType);
|
|
11544
|
+
}
|
|
11545
|
+
|
|
11115
11546
|
var WorkspaceType;
|
|
11116
11547
|
(function (WorkspaceType) {
|
|
11117
11548
|
WorkspaceType["PRODUCTION"] = "production";
|
|
@@ -11166,6 +11597,7 @@ const WorkspaceLimitsSchema = z$1.object({
|
|
|
11166
11597
|
totalNumberOfConnections: WorkspaceLimit.optional(),
|
|
11167
11598
|
totalNumberOfWorkspaceElements: WorkspaceLimit.optional(),
|
|
11168
11599
|
instantTasksQueueSize: WorkspaceLimit.optional(),
|
|
11600
|
+
QueuedTasksQueueSize: WorkspaceLimit.optional(),
|
|
11169
11601
|
parallelApiRequestsPerCustomer: WorkspaceLimit.optional(),
|
|
11170
11602
|
parallelBackgroundJobsPerCustomer: WorkspaceLimit.optional(),
|
|
11171
11603
|
apiRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
|
|
@@ -11182,6 +11614,7 @@ const EngineWorkspaceSettingsSchema = z$1.object({
|
|
|
11182
11614
|
enableWebhookLogs: z$1.boolean().optional(),
|
|
11183
11615
|
enableActionRunLogs: z$1.boolean().optional(),
|
|
11184
11616
|
disableSecretKeyAuth: z$1.boolean().optional(),
|
|
11617
|
+
useMembraneUniverse: z$1.boolean().optional(),
|
|
11185
11618
|
});
|
|
11186
11619
|
const WorkspacePublicKey = z$1.object({
|
|
11187
11620
|
name: z$1.string(),
|
|
@@ -11208,6 +11641,7 @@ const AppSchema = z$1.object({
|
|
|
11208
11641
|
featureFlags: z$1.array(z$1.string()).optional(),
|
|
11209
11642
|
limits: WorkspaceLimitsSchema.optional(),
|
|
11210
11643
|
settings: EngineWorkspaceSettingsSchema.optional(),
|
|
11644
|
+
alertDeliverySettings: AlertDeliverySettingsSchema.optional(),
|
|
11211
11645
|
type: z$1.nativeEnum(WorkspaceType).optional(),
|
|
11212
11646
|
jwksUri: z$1.string().nullable().optional(),
|
|
11213
11647
|
isTrial: z$1.boolean().optional(),
|
|
@@ -11385,13 +11819,14 @@ function buildIntegrationsMap(integrations) {
|
|
|
11385
11819
|
return map;
|
|
11386
11820
|
}
|
|
11387
11821
|
|
|
11822
|
+
const IneligibilityReasonSchema = z.enum(['disposable', 'blockedDomain', 'notCompanyEmail']);
|
|
11388
11823
|
const PlatformUserSchema = z.object({
|
|
11389
11824
|
id: z.string(),
|
|
11390
11825
|
email: z.string(),
|
|
11391
11826
|
name: z.string(),
|
|
11392
11827
|
trialRequested: z.boolean(),
|
|
11393
|
-
introVideoStatus: z.string().optional(),
|
|
11394
11828
|
isEligible: z.boolean().optional(),
|
|
11829
|
+
ineligibilityReason: IneligibilityReasonSchema.optional(),
|
|
11395
11830
|
emailVerified: z.boolean().optional(),
|
|
11396
11831
|
});
|
|
11397
11832
|
const FullPlatformUser = z.object({
|
|
@@ -11404,8 +11839,8 @@ const FullPlatformUser = z.object({
|
|
|
11404
11839
|
isAdmin: z.boolean().optional(),
|
|
11405
11840
|
trialRequested: z.boolean(),
|
|
11406
11841
|
pat: z.string().optional(),
|
|
11407
|
-
introVideoStatus: z.string().optional(),
|
|
11408
11842
|
isEligible: z.boolean().optional(),
|
|
11843
|
+
ineligibilityReason: IneligibilityReasonSchema.optional(),
|
|
11409
11844
|
emailVerified: z.boolean().optional(),
|
|
11410
11845
|
});
|
|
11411
11846
|
|
|
@@ -11416,6 +11851,12 @@ var OrgLimitsType;
|
|
|
11416
11851
|
OrgLimitsType["LAST_THIRTY_DAY_USAGE"] = "lastThirtyDayUsage";
|
|
11417
11852
|
OrgLimitsType["MEMBRANE_EXPERT_CREDITS_CAP"] = "membraneExpertCreditsCapPerMonth";
|
|
11418
11853
|
})(OrgLimitsType || (OrgLimitsType = {}));
|
|
11854
|
+
var OrgPlan;
|
|
11855
|
+
(function (OrgPlan) {
|
|
11856
|
+
OrgPlan["Core"] = "core";
|
|
11857
|
+
OrgPlan["Pro"] = "pro";
|
|
11858
|
+
OrgPlan["Ultimate"] = "ultimate";
|
|
11859
|
+
})(OrgPlan || (OrgPlan = {}));
|
|
11419
11860
|
var OrgUserRole;
|
|
11420
11861
|
(function (OrgUserRole) {
|
|
11421
11862
|
OrgUserRole["Admin"] = "admin";
|
|
@@ -11441,10 +11882,12 @@ const MembraneAgentKey = z
|
|
|
11441
11882
|
expiresAt: z.string().optional(),
|
|
11442
11883
|
})
|
|
11443
11884
|
.optional();
|
|
11885
|
+
const OrgFeatureFlagsSchema = z.record(z.string(), z.boolean());
|
|
11444
11886
|
const OrgSchema = z.object({
|
|
11445
11887
|
id: z.string(),
|
|
11446
11888
|
key: z.string(),
|
|
11447
11889
|
name: z.string(),
|
|
11890
|
+
plan: z.enum(OrgPlan).optional(),
|
|
11448
11891
|
createdAt: z.coerce.date(),
|
|
11449
11892
|
updatedAt: z.coerce.date(),
|
|
11450
11893
|
trialEndDate: z.string().optional(),
|
|
@@ -11463,6 +11906,14 @@ const OrgSchema = z.object({
|
|
|
11463
11906
|
autoChargeThreshold: z.number().optional(),
|
|
11464
11907
|
autoChargePurchaseAmount: z.number().optional(),
|
|
11465
11908
|
autoChargeMonthlyLimit: z.number().optional(),
|
|
11909
|
+
freeInfraCredits: z.number().optional(),
|
|
11910
|
+
paidInfraCredits: z.number().optional(),
|
|
11911
|
+
freeInfraMonthlyCredits: z.number().nullable().optional(),
|
|
11912
|
+
infraAutoChargeEnabled: z.boolean().optional(),
|
|
11913
|
+
infraAutoChargeThreshold: z.number().optional(),
|
|
11914
|
+
infraAutoChargePurchaseAmount: z.number().optional(),
|
|
11915
|
+
infraAutoChargeMonthlyLimit: z.number().optional(),
|
|
11916
|
+
effectiveFeatureFlags: OrgFeatureFlagsSchema.optional(),
|
|
11466
11917
|
});
|
|
11467
11918
|
const AccountResponse = z.object({
|
|
11468
11919
|
user: FullPlatformUser.optional(),
|
|
@@ -11490,27 +11941,10 @@ var WebhookTypeEnum;
|
|
|
11490
11941
|
WebhookTypeEnum["TASK_UPDATED"] = "task-updated";
|
|
11491
11942
|
WebhookTypeEnum["TASK_ACTIVITY_CREATED"] = "task-activity-created";
|
|
11492
11943
|
WebhookTypeEnum["CONNECTOR_VERSION_PUBLISHED"] = "connector-version-published";
|
|
11944
|
+
WebhookTypeEnum["AGENT_SESSION_FINISHED"] = "agent-session-finished";
|
|
11945
|
+
WebhookTypeEnum["SEND_ALERT_EMAIL"] = "send-alert-email";
|
|
11493
11946
|
})(WebhookTypeEnum || (WebhookTypeEnum = {}));
|
|
11494
11947
|
|
|
11495
|
-
var AlertStatus;
|
|
11496
|
-
(function (AlertStatus) {
|
|
11497
|
-
AlertStatus["ONGOING"] = "ongoing";
|
|
11498
|
-
AlertStatus["RESOLVED"] = "resolved";
|
|
11499
|
-
})(AlertStatus || (AlertStatus = {}));
|
|
11500
|
-
var AlertSeverity;
|
|
11501
|
-
(function (AlertSeverity) {
|
|
11502
|
-
AlertSeverity["CRITICAL"] = "critical";
|
|
11503
|
-
AlertSeverity["WARNING"] = "warning";
|
|
11504
|
-
})(AlertSeverity || (AlertSeverity = {}));
|
|
11505
|
-
var AlertType;
|
|
11506
|
-
(function (AlertType) {
|
|
11507
|
-
AlertType["externalEventsPerCustomerPerDay"] = "externalEventsPerCustomerPerDay";
|
|
11508
|
-
AlertType["totalUsagePerDay"] = "totalUsagePerDay";
|
|
11509
|
-
AlertType["totalUsagePer30Days"] = "totalUsagePer30Days";
|
|
11510
|
-
AlertType["membraneAgentUsagePer30Days"] = "membraneAgentUsagePer30Days";
|
|
11511
|
-
AlertType["testAlert"] = "testAlert";
|
|
11512
|
-
})(AlertType || (AlertType = {}));
|
|
11513
|
-
|
|
11514
11948
|
const IntegrationSpecificElementSelector = z$1.object({
|
|
11515
11949
|
id: z$1.string().optional(),
|
|
11516
11950
|
key: z$1.string().optional(),
|
|
@@ -12497,17 +12931,18 @@ class ConnectionAccessor {
|
|
|
12497
12931
|
dataCollection(key, parameters) {
|
|
12498
12932
|
return new ConnectionDataCollectionAccessor(this.client, this, key, parameters);
|
|
12499
12933
|
}
|
|
12500
|
-
async reconnect({ parameters, authOptionKey, connectorParameters, } = {}) {
|
|
12934
|
+
async reconnect({ parameters, authOptionKey, connectorParameters, onPopupClosed, } = {}) {
|
|
12501
12935
|
const connection = await this.get();
|
|
12502
12936
|
const connectorSpec = await this.client.get(`/integrations/${connection.integrationId}/connector-spec`);
|
|
12503
12937
|
return createOrUpdateConnection({
|
|
12504
12938
|
connectionId: connection.id,
|
|
12505
12939
|
connectorSpec,
|
|
12506
|
-
parameters,
|
|
12940
|
+
input: parameters,
|
|
12507
12941
|
authOptionKey,
|
|
12508
12942
|
connectorParameters,
|
|
12509
12943
|
apiUri: this.client.apiUri,
|
|
12510
12944
|
token: await this.client.getToken(),
|
|
12945
|
+
onPopupClosed,
|
|
12511
12946
|
});
|
|
12512
12947
|
}
|
|
12513
12948
|
async openReconnectUI({} = {}) {
|
|
@@ -12596,21 +13031,31 @@ class ConnectionProxy {
|
|
|
12596
13031
|
}
|
|
12597
13032
|
}
|
|
12598
13033
|
async function createOrUpdateConnection(options) {
|
|
12599
|
-
const { connectionId, integrationId, name,
|
|
13034
|
+
const { connectionId, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
|
|
12600
13035
|
const connectionType = getConnectionType({
|
|
12601
13036
|
connectorSpec,
|
|
12602
13037
|
authOptionKey,
|
|
12603
13038
|
redirectUri,
|
|
12604
13039
|
});
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
13040
|
+
let popupPath;
|
|
13041
|
+
if (connectionId) {
|
|
13042
|
+
popupPath = `connection-popup?connectionId=${connectionId}`;
|
|
13043
|
+
}
|
|
13044
|
+
else if (connectorId) {
|
|
13045
|
+
const versionParam = connectorVersion ? `&connectorVersion=${connectorVersion}` : '';
|
|
13046
|
+
popupPath = `connection-popup?connectorId=${connectorId}${versionParam}`;
|
|
13047
|
+
}
|
|
13048
|
+
else {
|
|
13049
|
+
popupPath = `connection-popup?integrationId=${integrationId}`;
|
|
13050
|
+
}
|
|
12608
13051
|
return new Promise((resolve, reject) => {
|
|
12609
13052
|
const requestId = simpleUniqueId() + simpleUniqueId();
|
|
12610
13053
|
const payload = {
|
|
12611
13054
|
token,
|
|
12612
|
-
|
|
13055
|
+
input,
|
|
12613
13056
|
connectorParameters,
|
|
13057
|
+
connectorId,
|
|
13058
|
+
connectorVersion,
|
|
12614
13059
|
name,
|
|
12615
13060
|
authOptionKey,
|
|
12616
13061
|
allowMultipleConnections,
|
|
@@ -12656,10 +13101,10 @@ async function createOrUpdateConnection(options) {
|
|
|
12656
13101
|
iframeElement.id = targetElementId;
|
|
12657
13102
|
iframeElement.name = targetElementId;
|
|
12658
13103
|
iframeElement.style.position = 'absolute';
|
|
12659
|
-
iframeElement.style.top = '-
|
|
12660
|
-
iframeElement.style.left = '-
|
|
12661
|
-
iframeElement.style.width = '
|
|
12662
|
-
iframeElement.style.height = '
|
|
13104
|
+
iframeElement.style.top = '-100px';
|
|
13105
|
+
iframeElement.style.left = '-100px';
|
|
13106
|
+
iframeElement.style.width = '1px';
|
|
13107
|
+
iframeElement.style.height = '1px';
|
|
12663
13108
|
iframeElement.style.border = 'none';
|
|
12664
13109
|
iframeElement.style.backgroundColor = 'transparent';
|
|
12665
13110
|
document.body.appendChild(iframeElement);
|
|
@@ -12693,6 +13138,7 @@ async function createOrUpdateConnection(options) {
|
|
|
12693
13138
|
cancelCheckInterval = setInterval(() => {
|
|
12694
13139
|
if (popup === null || popup === void 0 ? void 0 : popup.closed) {
|
|
12695
13140
|
cleanup();
|
|
13141
|
+
onPopupClosed === null || onPopupClosed === void 0 ? void 0 : onPopupClosed();
|
|
12696
13142
|
resolve(null);
|
|
12697
13143
|
}
|
|
12698
13144
|
}, 1000);
|
|
@@ -12724,6 +13170,9 @@ const createConnectionEventHandler = (requestId, onResolve, onReject, onFinally)
|
|
|
12724
13170
|
}
|
|
12725
13171
|
if (message.type == 'newConnectionFailure') {
|
|
12726
13172
|
const error = new MembraneError((_a = message.errorData) !== null && _a !== void 0 ? _a : message.error);
|
|
13173
|
+
if (message.connectionId) {
|
|
13174
|
+
error.data.data = { ...error.data.data, connectionId: message.connectionId };
|
|
13175
|
+
}
|
|
12727
13176
|
onReject(error);
|
|
12728
13177
|
}
|
|
12729
13178
|
onFinally();
|
|
@@ -12903,23 +13352,24 @@ class IntegrationAccessor extends ElementAccessor {
|
|
|
12903
13352
|
});
|
|
12904
13353
|
});
|
|
12905
13354
|
}
|
|
12906
|
-
async connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, } = {}) {
|
|
13355
|
+
async connect({ name, input, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, onPopupClosed, } = {}) {
|
|
12907
13356
|
const integration = await this.get();
|
|
12908
13357
|
const connectorSpec = await this.getConnectorSpec();
|
|
12909
13358
|
return createOrUpdateConnection({
|
|
12910
13359
|
integrationId: integration.id,
|
|
12911
13360
|
connectorSpec,
|
|
12912
13361
|
name,
|
|
12913
|
-
parameters,
|
|
13362
|
+
input: input !== null && input !== void 0 ? input : parameters,
|
|
12914
13363
|
connectorParameters,
|
|
12915
13364
|
authOptionKey,
|
|
12916
13365
|
allowMultipleConnections,
|
|
12917
13366
|
apiUri: this.client.apiUri,
|
|
12918
13367
|
token: await this.client.getToken(),
|
|
12919
13368
|
redirectUri: sameWindow ? redirectUri : undefined,
|
|
13369
|
+
onPopupClosed,
|
|
12920
13370
|
});
|
|
12921
13371
|
}
|
|
12922
|
-
async createConnection({ parameters, name }) {
|
|
13372
|
+
async createConnection({ parameters, name, }) {
|
|
12923
13373
|
return this.connect({ parameters, name });
|
|
12924
13374
|
}
|
|
12925
13375
|
async getOperations() {
|
|
@@ -13239,8 +13689,14 @@ var AgentSessionState;
|
|
|
13239
13689
|
AgentSessionState["BUSY"] = "busy";
|
|
13240
13690
|
AgentSessionState["IDLE"] = "idle";
|
|
13241
13691
|
})(AgentSessionState || (AgentSessionState = {}));
|
|
13692
|
+
var AgentName;
|
|
13693
|
+
(function (AgentName) {
|
|
13694
|
+
AgentName["MEMBRANE"] = "membrane";
|
|
13695
|
+
AgentName["SELF_INTEGRATING"] = "self-integrating";
|
|
13696
|
+
})(AgentName || (AgentName = {}));
|
|
13242
13697
|
const AgentSession = z.object({
|
|
13243
13698
|
id: z.string(),
|
|
13699
|
+
workspaceId: z.string(),
|
|
13244
13700
|
userId: z.string().optional(),
|
|
13245
13701
|
workspaceElementType: z.enum(WorkspaceElementType),
|
|
13246
13702
|
workspaceElementId: z.string(),
|
|
@@ -13255,6 +13711,8 @@ const AgentSession = z.object({
|
|
|
13255
13711
|
state: z.enum(AgentSessionState).default(AgentSessionState.BUSY),
|
|
13256
13712
|
usage: z.number().optional(),
|
|
13257
13713
|
hasWorker: z.boolean(),
|
|
13714
|
+
isExternal: z.boolean().optional(),
|
|
13715
|
+
agentName: z.enum(AgentName).optional(),
|
|
13258
13716
|
createdAt: z.iso.datetime(),
|
|
13259
13717
|
updatedAt: z.iso.datetime(),
|
|
13260
13718
|
});
|
|
@@ -13264,6 +13722,7 @@ const CreateAgentSession = z.object({
|
|
|
13264
13722
|
prompt: z.string().min(1),
|
|
13265
13723
|
testCustomerId: z.string().optional(),
|
|
13266
13724
|
isExternal: z.boolean().optional(),
|
|
13725
|
+
modelId: z.string().optional(),
|
|
13267
13726
|
});
|
|
13268
13727
|
const AgentSessionInputSchema = z.object({
|
|
13269
13728
|
input: z.string().min(1),
|
|
@@ -13275,6 +13734,8 @@ const PatchAgentSessionSchema = z.object({
|
|
|
13275
13734
|
title: z.string().optional(),
|
|
13276
13735
|
summary: z.string().optional(),
|
|
13277
13736
|
cost: z.number().optional(),
|
|
13737
|
+
error: ErrorDataSchema.optional(),
|
|
13738
|
+
opencodeSessionUuid: z.string().optional(),
|
|
13278
13739
|
status: z.enum(AgentSessionStatus).optional(),
|
|
13279
13740
|
});
|
|
13280
13741
|
|
|
@@ -13587,5 +14048,5 @@ class MembraneClient extends MembraneApiClient {
|
|
|
13587
14048
|
|
|
13588
14049
|
injectFormulaCatalog(getFormula, isFormula, hasFormulas);
|
|
13589
14050
|
|
|
13590
|
-
export { ACTIONS, AccessDeniedError, AccountResponse, ActionAccessor, ActionApiResponse, ActionDependency, ActionDependencyType, ActionEditableProperties, ActionExportProperties, ActionInstanceAccessor, ActionInstanceApiResponse, ActionInstanceSetupError, ActionInstancesAccessor, ActionRunError, ActionRunLogRecordApiResponse, ActionRunLogStatus, ActionRunResponse, ActionType, ActionsAccessor, AgentSession, AgentSessionInputSchema, AgentSessionState, AgentSessionStatus, AlertSeverity, AlertStatus, AlertType, ApiRequestSpec, AppDataSchemaAccessor, AppDataSchemaApiResponse, AppDataSchemaEditableProperties, AppDataSchemaExportProperties, AppDataSchemaInstanceAccessor, AppDataSchemaInstanceApiResponse, AppDataSchemaInstancesAccessor, AppDataSchemasAccessor, AppEventLogRecordApiResponse, AppEventSubscriptionAccessor, AppEventSubscriptionApiResponse, AppEventSubscriptionsAccessor, AppEventTypeAccessor, AppEventTypeApiResponse, AppEventTypeEditableProperties, AppEventTypeExportProperties, AppEventTypesAccessor, AppSchema, AppliedToIntegrations, BackwardCompatibleDataSourceEditableProperties, BadRequestError, BadRequestErrorKey, BaseAction, BaseActionInstance, BaseActionRunLogRecord, BaseAppDataSchema, BaseAppDataSchemaInstance, BaseAppEventSubscription, BaseAppEventType, BaseConnection, BaseConnector, BaseCustomer, BaseDataLinkTable, BaseDataLinkTableInstance, BaseDataSource, BaseDataSourceInstance, BaseExternalEvent, BaseExternalEventLogRecord, BaseExternalEventPull, BaseExternalEventSubscription, BaseFieldMapping, BaseFieldMappingInstance, BaseFlow, BaseFlowInstance, BaseFlowRun, BaseFunctionDefinition, BaseIntegration, BaseIntegrationLevelMembraneInterface, BaseIntegrationLevelMembraneInterfaceEditableProperties, BaseIntegrationLevelMembraneInterfaceExportProperties, BaseIntegrationLevelMembraneInterfaceReadOnlyProperties, BaseMembraneInterface, BaseMembraneInterfaceEditableProperties, BaseMembraneInterfaceReadOnlyProperties, BasePackage, BaseScreen, BaseWorkspaceElement, CONNECTOR_AUTH_TYPES, CONNECTOR_CATEGORIES, CONNECTOR_DATA_DIR, CONNECTOR_DOCS_DIR, CONNECTOR_EVENTS_DIR, CONNECTOR_GLOBAL_WEBHOOKS_DIR, CONNECTOR_METHOD_IMPLEMENTATION_SUFFIXES, CONNECTOR_OPERATIONS_DIR, CONNECTOR_VERSION_DEVELOPMENT, CONNECTOR_VERSION_LATEST, CommonFindElementsQuery, CommonFindInstancesQuery, CommonInstancesListQuery, CommonIntegrationOrConnectionQuery, CommonListElementsQuery, ConcurrencyError, ConcurrencyErrorKey, ConfigurationError, ConfigurationState, ConnectionAccessor, ConnectionApiResponse, ConnectionApiResponseWithSecrets, ConnectionDataCollectionAccessor, ConnectionError, ConnectionErrorKey, ConnectionLevelActionAccessor, ConnectionLevelActionsAccessor, ConnectionLevelDataSourceAccessor, ConnectionLevelDataSourcesAccessor, ConnectionLevelFieldMappingAccessor, ConnectionLevelFieldMappingsAccessor, ConnectionLevelFlowAccessor, ConnectionLevelFlowsAccessor, ConnectionMessagePayload, ConnectionOperationAccessor, ConnectionProxy, ConnectionRequest, ConnectionSelector, ConnectionSpec, ConnectionsAccessor, Connector, ConnectorAuth, ConnectorAuthClientCredentials, ConnectorAuthHandlerBase, ConnectorAuthIntegrationAppToken, ConnectorAuthMembraneToken, ConnectorAuthMethodTypes, ConnectorAuthOAuth1, ConnectorAuthOAuth2, ConnectorAuthProxy, ConnectorAuthSpec, ConnectorAuthWithFunctions, ConnectorDataCollectionEventImplementationType, ConnectorDataCollectionMethodKeys, ConnectorDataLocationTypes, ConnectorEventHandlerMethods, ConnectorEventImplementationType, ConnectorFileUpdateType, ConnectorMethodImplementation, ConnectorMethodImplementationBase, ConnectorMethodImplementationGraphqlApiMapping, ConnectorMethodImplementationJavascript, ConnectorMethodImplementationMapping, ConnectorMethodImplementationNotSupported, ConnectorMethodImplementationOperationMapping, ConnectorMethodImplementationRestApiMapping, ConnectorMethodImplementationType, ConnectorOperationMethodImplementationTypes, ConnectorOption, ConnectorOptions, ConnectorSpec, ConnectorStatus, ConnectorStatusValues, ConnectorUdmCollectionMapping, ConnectorUdmListItem, ConnectorUdmSpec, ConnectorUiSpec, ConnectorVersion, ConnectorVersionData, CreateActionInstanceRequest, CreateActionRequest, CreateAgentSession, CreateConnectionRequest, CreateConnectorRequest, CreateCustomerRequest, CreateDataLinkTableRequest, CreateDataSourceInstanceRequest, CreateDataSourceRequest, CreateFieldMappingRequest, CreateFlowNodeRequest, CreateFlowRequest, CreateFlowRunRequest, CreateIntegrationRequest, CreatePackageRequest, CustomCodeError, CustomerAccessor, CustomerApiResponse, CustomerSelector, CustomersAccessor, DATA_RECORD_SCHEMA, DEFAULT_FULL_SYNC_INTERVAL_SECONDS, DEFAULT_PULL_UPDATES_INTERVAL_SECONDS, DataBuilderFormulaType, DataCollectionCreateRequest, DataCollectionCreateResponse, DataCollectionCreateSpec, DataCollectionDeleteRequest, DataCollectionDeleteResponse, DataCollectionDeleteSpec, DataCollectionEventType, DataCollectionEventTypeSpec, DataCollectionEventsSpec, DataCollectionFindByIdRequest, DataCollectionFindByIdResponse, DataCollectionFindByIdSpec, DataCollectionFindRequest, DataCollectionFindResponse, DataCollectionFindSpec, DataCollectionListRequest, DataCollectionListResponse, DataCollectionListResponseDrilldown, DataCollectionListSpec, DataCollectionMatchRequest, DataCollectionMatchResponse, DataCollectionMatchSpec, DataCollectionMethodRequest, DataCollectionMethodSpec, DataCollectionSearchRequest, DataCollectionSearchResponse, DataCollectionSearchSpec, DataCollectionSpec, DataCollectionUdmSpec, DataCollectionUdmsSpec, DataCollectionUpdateRequest, DataCollectionUpdateResponse, DataCollectionUpdateSpec, DataFilterCondition, DataForm, DataLink, DataLinkDirection, DataLinkTableAccessor, DataLinkTableApiResponse, DataLinkTableConfig, DataLinkTableEditableProperties, DataLinkTableExportProperties, DataLinkTableInstanceAccessor, DataLinkTableInstanceApiResponse, DataLinkTableInstancesAccessor, DataLinkTablesAccessor, DataLocationMethodImplementationTypes, DataLocationPointer, DataLocationTypeCollection, DataLocatorStep, DataLocatorStepArrayItem, DataLocatorStepObjectProperty, DataLocatorStepType, DataRecordSchema, DataSchema, DataSourceAccessor, DataSourceApiResponse, DataSourceEditableProperties, DataSourceExportProperties, DataSourceInstanceAccessor, DataSourceInstanceApiResponse, DataSourceInstancesAccessor, DataSourceUnitConfig, DataSourcesAccessor, DependencyError, DownstreamFlowNodeRunSchema, EDITABLE_LIMITS, ElementAccessor, ElementInstanceAccessor, ElementInstanceListAccessor, ElementListAccessor, ElementsExportFields, EngineWorkspaceSettingsSchema, ErrorData, ErrorDataSchema, ErrorType, ExternalEvent, ExternalEventLogRecordApiResponse, ExternalEventLogStatus, ExternalEventPullApiResponse, ExternalEventPullStatus, ExternalEventSubscriptionAccessor, ExternalEventSubscriptionApiResponse, ExternalEventSubscriptionConfig, ExternalEventSubscriptionStatus, ExternalEventSubscriptionType, ExternalEventSubscriptionsAccessor, ExternalEventType, ExternalEventUnitConfig, FLOW_NODE_SPECS, FieldMappingAccessor, FieldMappingApiResponse, FieldMappingDirection, FieldMappingEditableProperties, FieldMappingExportProperties, FieldMappingInstanceAccessor, FieldMappingInstanceApiResponse, FieldMappingInstancesAccessor, FieldMappingUnitConfig, FieldMappingsAccessor, FindActionInstancesQuery, FindActionRunLogsQuery, FindActionRunLogsResponse, FindActionsQuery, FindAppEventSubscriptionsQuery, FindAppEventTypesQuery, FindAppEventsQuery, FindConnectionsQuery, FindConnectionsResponse, FindCustomersQuery, FindDataLinkTableInstanceLinksQuery, FindDataLinkTableInstancesQuery, FindDataLinkTablesQuery, FindDataLinksInTableQuery, FindDataLinksQuery, FindDataLinksResponse, FindDataSourceEventsQuery, FindDataSourceInstanceQuery, FindDataSourceInstanceSyncsQuery, FindDataSourceInstancesQuery, FindDataSourceSyncsQuery, FindDataSourcesQuery, FindExternalEventPullsQuery, FindFieldMappingsQuery, FindFlowInstancesQuery, FindFlowRunsQuery, FindFlowRunsResponse, FindFlowsQuery, FindIntegrationLevelMembraneInterfaceQuery, FindIntegrationsQuery, FindPackagesQuery, FindScreensQuery, FlowAccessor, FlowApiResponse, FlowEditableProperties, FlowExportProperties, FlowInstanceAccessor, FlowInstanceApiResponse, FlowInstanceNode, FlowInstanceNodeState, FlowInstanceSetupError, FlowInstancesAccessor, FlowNode, FlowNodeLink, FlowNodeRunOutputMetadataSchema, FlowNodeRunOutputSchema, FlowNodeRunOutputWithoutDownstreamRunsSchema, FlowNodeRunParametersSchema, FlowNodeRunRecordSchema, FlowNodeRunRecordWithoutOutputsDataSchema, FlowNodeRunResultSchema, FlowNodeRunStatus, FlowNodeSpec, FlowNodeType, FlowRunAccessor, FlowRunApiResponse, FlowRunError, FlowRunLaunchedBy, FlowRunLaunchedByApi, FlowRunLaunchedByTrigger, FlowRunNode, FlowRunNodeState, FlowRunState, FlowRunsAccessor, FlowsAccessor, Formula, FullPlatformUser, FunctionDefinition, FunctionType, GenericFunctionDefinition, GraphQLApiMappingSchema, GraphQLFieldMappingSchema, GraphqlApiMappingFunction, HTTP_REQUEST_SCHEMA, HandyScenarioTemplateElement, HttpRequestMethod, HttpRequestSpec, IncludeArchivedQuery, IncomingWebhooksState, InsufficientCreditsError, IntegrationAccessor, IntegrationApiResponse, MembraneClient as IntegrationAppClient, IntegrationAppError, IntegrationAuthOption, IntegrationAuthUi, IntegrationEditableProperties, IntegrationElementLevel, IntegrationElementType, IntegrationExportProperties, IntegrationLevelActionAccessor, IntegrationLevelActionsListAccessor, IntegrationLevelDataSourceAccessor, IntegrationLevelDataSourcesListAccessor, IntegrationLevelFieldMappingAccessor, IntegrationLevelFieldMappingsListAccessor, IntegrationLevelFlowAccessor, IntegrationLevelFlowsListAccessor, IntegrationLevelMembraneInterfaceSelectorQuery, IntegrationSpecificElementSelector, IntegrationsAccessor, InternalError, InvalidLocatorError, JavascriptFunction, LimitUnits, ListActionInstancesForConnectionQuery, ListDataSourceInstancesForConnectionQuery, ListExternalAppsQuery, ListExternalEventLogRecordsQuery, ListExternalEventPullsQuery, ListExternalEventSubscriptionsQuery, ListFlowInstancesForConnectionQuery, ListPublicConnectorsQuery, ListPublicPackagesQuery, LogRecordType, MEMBRANE_ELEMENT_CONFIG_FILE_NAME, MIN_FULL_SYNC_INTERVAL_SECONDS, MIN_PULL_UPDATES_INTERVAL_SECONDS, MappingFunction, MappingSchema, MembraneAgentKey, axios as MembraneAxiosInstance, MembraneClient, MembraneError, MinimalConnector, NotAuthenticatedError, NotFoundError, OAUTH1_CONFIG_SCHEMA, OAUTH_CONFIG_SCHEMA, OpenapiMappingSchema, OperationMappingFunction, OperationMappingSchema, OrgLimits, OrgLimitsType, OrgSchema, OrgUserRole, OrgUserStatus, OrgWorkspaceSchema, OrgWorkspaceUser, PACKAGE_VERSION_DEVELOPMENT, PACKAGE_VERSION_LATEST, PARALLEL_EXECUTION_LIMITS, PackageAccessor, PackageApiResponse, PackageCalculatedProperties, PackageEditableProperties, PackageElement, PackageElementApi, PackageElementExport, PackageExportProperties, PackageVersionData, PackageVersionListItem, PackagesAccessor, PaginationQuery, PaginationResponse, PatchAgentSessionSchema, PlatformUserSchema, RATE_LIMITS, RateLimitExceededError, RequestMappingSchema, ResetFlowInstanceOptions, RestApiMappingFunction, RestApiMappingSchema, RunActionRequest, RunFlowApiRequest, ScenarioAccessor, ScenarioTemplate, ScenarioTemplateCategory, ScenarioTemplateElements, ScenariosAccessor, ScreenAccessor, ScreenApiResponse, ScreenBlock, ScreenBlockType, ScreenType, ScreensAccessor, SearchQuery, SelfAccessor, UDM, UNIFIED_DATA_MODELS, UnitRunError, UpdateActionInstanceRequest, UpdateActionRequest, UpdateConnectionRequest, UpdateConnectorRequest, UpdateCustomerRequest, UpdateDataLinkTableRequest, UpdateDataSourceInstanceRequest, UpdateDataSourceRequest, UpdateFieldMappingRequest, UpdateFlowRequest, UpdateIntegrationRequest, UpdatePackageRequest, UpstreamFlowNodeRunSchema, UsageType, UserAccessor, UsersAccessor, WORKSPACE_SIZE_LIMITS, WebhookTypeEnum, WorkspaceElementChangeType, WorkspaceElementDependencyType, WorkspaceElementSearchQuery, WorkspaceElementSearchResult, WorkspaceElementSpecs, WorkspaceElementState, WorkspaceElementType, WorkspaceEventType, WorkspaceLimitsSchema, WorkspaceNotificationType, WorkspaceOnboardingStep, WorkspacePublicKey, WorkspaceSyncEventType, WorkspaceType, WritableConnectorVersionData, WritablePackageVersionData, WriteableConnectorFields, __resolveValue, addRequiredFieldsToSchema, addUdmFallbackFields, backwardCompatibleFilterMatch, buildData, buildDataSchema, buildValue, compareWorkspaceExports, compressDataSchema, createCompoundSchema, createFlowInstanceSchema, createObjectFromLocators, createOrUpdateConnection, createPaginationResponseSchema, createSchema, dataCollectionEventTypeToExternalEventType, dataLocationParametersMatch, doesMatchFilter, excludeFieldsFromSchema, excludeFieldsFromValue, excludeReadOnlyFieldsFromSchema, excludeWriteOnlyFieldsFromSchema, externalEventTypeToDataCollectionEventType, extractFieldLocator, extractMembraneErrorData, findUdmCollectionMapping, findUdmDefaultCollection, findUdmRootLocation, findValueLocators, generateExampleFromSchema, getActionInstanceVariableSchema, getActionRunTimeVariablesSchema, getAllEventMethodFilePaths, getBusinessDaysBetween, getChildNodeKeys, getDataCollectionCreateFields, getDataCollectionUpdateFields, getDataLocationMethodPath, getDownstreamNodeKeys, getElementSelector, getErrorFromData, getEventMethodFileKey, getFilterFieldValuesByLocator, getFlowInstanceNodeDependency, getFlowNode, getFlowNodeConfigTimeVariablesSchema, getFlowNodeDescription, getFlowNodeRunTimeVariablesSchema, getFlowNodeSpec, getFlowNodeTitle, getFormula$1 as getFormula, getFormulaLocators, getFormula as getFormula_internalDoNotUse, getFullNameForLocator, getFullTitleForLocator, getIconUriForLocator, getLocatorsFromData, getLocatorsFromSchema, getMembraneElementPath, getMissingRequiredFields, getNameComponentsForLocator, getNameForLocator, getNodeInputSchema, getOperatorsBySchema, getParentNodeKeys, getReferenceCollectionPathForSchema, getReferenceCollectionPointerForSchema, getRequiredFieldsFromSchema, getRootNodeKeys, getSchemaByLocator, getSchemaFromValue, getUpstreamNodeKeys, getValueAtLocator, getValueByLocator, getVariableLocators, getWritableFieldsSchema, hasCycles, hasFormulas$1 as hasFormulas, hasFormulas as hasFormulas_internalDoNotUse, injectFormulaCatalog, isBusinessDay, isDataActionType, isDataLocationMethodSupported, isFormula$1 as isFormula, isFormula as isFormula_internalDoNotUse, isMembraneError, isObject, isSameDataLocation, isSchemaEmpty, isStream, isValidLocator, locatorToField, locatorToSteps, locatorToString, makeDataLocationOperationPath, makeDataLocationPath, makeDataRecordSchema, makeObjectPropertyLocator, makeSchemaForLocator, mergeSchemas, mergeWithFormulas, nonEmptyObjectProperties, parseDataLocationPath, parseDate, parseMembraneElementPath, patchSchema, pickFieldsFromSchema, pickFieldsFromValue, populateSchemaTitles, processCopy, removeNonExistentVars, removeRequiredFieldsFromSchema, resolveFormulas, schemaAllowsCustomValue, schemaHasFixedValues, schemaHasProperties, schemaIsNumber, schemaIsScalar, schemaTypeFromValue, schemaWithTitle, setSchemaAtLocator, setValueAtLocator, stepsToLocator, streamToString, transformVariablesWith, transformVars, truncateData, unwrapSchema, unwrapSchemas, updateFlowInstanceSchema, updateImpliedSchema, valueToSchema, valueToString, walkSchema, wrapAnyOfSchema, zodBooleanCoercion };
|
|
14051
|
+
export { ACTIONS, ALERT_DELIVERY_METHODS, ALERT_TYPE_CATEGORIES, AccessDeniedError, AccountResponse, ActionAccessor, ActionApiResponse, ActionDependency, ActionDependencyType, ActionEditableProperties, ActionExportProperties, ActionInstanceAccessor, ActionInstanceApiResponse, ActionInstanceSetupError, ActionInstancesAccessor, ActionRunError, ActionRunLogRecordApiResponse, ActionRunLogStatus, ActionRunResponse, ActionType, ActionsAccessor, AgentName, AgentSession, AgentSessionInputSchema, AgentSessionState, AgentSessionStatus, AlertCategory, AlertDeliverySettingsSchema, AlertSchema, AlertSeverity, AlertStatus, AlertType, AlertTypeDeliverySettingsSchema, ApiRequestSpec, AppDataSchemaAccessor, AppDataSchemaApiResponse, AppDataSchemaEditableProperties, AppDataSchemaExportProperties, AppDataSchemaInstanceAccessor, AppDataSchemaInstanceApiResponse, AppDataSchemaInstancesAccessor, AppDataSchemasAccessor, AppEventLogRecordApiResponse, AppEventSubscriptionAccessor, AppEventSubscriptionApiResponse, AppEventSubscriptionsAccessor, AppEventTypeAccessor, AppEventTypeApiResponse, AppEventTypeEditableProperties, AppEventTypeExportProperties, AppEventTypesAccessor, AppSchema, AppliedToIntegrations, BackwardCompatibleDataSourceEditableProperties, BadRequestError, BadRequestErrorKey, BaseAction, BaseActionInstance, BaseActionRunLogRecord, BaseAppDataSchema, BaseAppDataSchemaInstance, BaseAppEventSubscription, BaseAppEventType, BaseConnection, BaseConnector, BaseCustomer, BaseDataLinkTable, BaseDataLinkTableInstance, BaseDataSource, BaseDataSourceInstance, BaseExternalEvent, BaseExternalEventLogRecord, BaseExternalEventPull, BaseExternalEventSubscription, BaseFieldMapping, BaseFieldMappingInstance, BaseFlow, BaseFlowInstance, BaseFlowRun, BaseFunctionDefinition, BaseIntegration, BaseIntegrationLevelMembraneInterface, BaseIntegrationLevelMembraneInterfaceEditableProperties, BaseIntegrationLevelMembraneInterfaceExportProperties, BaseIntegrationLevelMembraneInterfaceReadOnlyProperties, BaseMembraneInterface, BaseMembraneInterfaceEditableProperties, BaseMembraneInterfaceReadOnlyProperties, BasePackage, BaseScreen, BaseWorkspaceElement, CONNECTOR_AUTH_TYPES, CONNECTOR_CATEGORIES, CONNECTOR_DATA_DIR, CONNECTOR_DOCS_DIR, CONNECTOR_EVENTS_DIR, CONNECTOR_GLOBAL_WEBHOOKS_DIR, CONNECTOR_METHOD_IMPLEMENTATION_SUFFIXES, CONNECTOR_OPERATIONS_DIR, CONNECTOR_VERSION_DEVELOPMENT, CONNECTOR_VERSION_LATEST, CommonFindElementsQuery, CommonFindInstancesQuery, CommonInstancesListQuery, CommonIntegrationOrConnectionQuery, CommonListElementsQuery, ConcurrencyError, ConcurrencyErrorKey, ConfigurationError, ConfigurationState, ConnectionAccessor, ConnectionApiResponse, ConnectionApiResponseWithSecrets, ConnectionDataCollectionAccessor, ConnectionError, ConnectionErrorKey, ConnectionLevelActionAccessor, ConnectionLevelActionsAccessor, ConnectionLevelDataSourceAccessor, ConnectionLevelDataSourcesAccessor, ConnectionLevelFieldMappingAccessor, ConnectionLevelFieldMappingsAccessor, ConnectionLevelFlowAccessor, ConnectionLevelFlowsAccessor, ConnectionMessagePayload, ConnectionOperationAccessor, ConnectionProxy, ConnectionRequest, ConnectionSelector, ConnectionSpec, ConnectionsAccessor, Connector, ConnectorAuth, ConnectorAuthClientCredentials, ConnectorAuthHandlerBase, ConnectorAuthIntegrationAppToken, ConnectorAuthMembraneToken, ConnectorAuthMethodTypes, ConnectorAuthOAuth1, ConnectorAuthOAuth2, ConnectorAuthProxy, ConnectorAuthSpec, ConnectorAuthWithFunctions, ConnectorDataCollectionEventImplementationType, ConnectorDataCollectionMethodKeys, ConnectorDataLocationTypes, ConnectorEventHandlerMethods, ConnectorEventImplementationType, ConnectorExportProperties, ConnectorFileUpdateType, ConnectorFunctionSpecs, ConnectorMethodImplementation, ConnectorMethodImplementationBase, ConnectorMethodImplementationGraphqlApiMapping, ConnectorMethodImplementationJavascript, ConnectorMethodImplementationMapping, ConnectorMethodImplementationNotSupported, ConnectorMethodImplementationOperationMapping, ConnectorMethodImplementationRestApiMapping, ConnectorMethodImplementationType, ConnectorOperationMethodImplementationTypes, ConnectorOption, ConnectorOptions, ConnectorSpec, ConnectorStatus, ConnectorStatusValues, ConnectorUdmCollectionMapping, ConnectorUdmListItem, ConnectorUdmSpec, ConnectorUiSpec, ConnectorVersion, ConnectorVersionData, CreateActionInstanceRequest, CreateActionRequest, CreateAgentSession, CreateConnectionRequest, CreateConnectorRequest, CreateCustomerRequest, CreateDataLinkTableRequest, CreateDataSourceInstanceRequest, CreateDataSourceRequest, CreateFieldMappingRequest, CreateFlowNodeRequest, CreateFlowRequest, CreateFlowRunRequest, CreateIntegrationRequest, CreatePackageRequest, CustomCodeError, CustomerAccessor, CustomerApiResponse, CustomerSelector, CustomersAccessor, DATA_RECORD_SCHEMA, DEFAULT_ALERT_DELIVERY_SETTINGS, DEFAULT_ALERT_TYPE_DELIVERY_SETTINGS, DEFAULT_FULL_SYNC_INTERVAL_SECONDS, DEFAULT_PULL_UPDATES_INTERVAL_SECONDS, DataBuilderFormulaType, DataCollectionCreateRequest, DataCollectionCreateResponse, DataCollectionCreateSpec, DataCollectionDeleteRequest, DataCollectionDeleteResponse, DataCollectionDeleteSpec, DataCollectionEventType, DataCollectionEventTypeSpec, DataCollectionEventsSpec, DataCollectionFindByIdRequest, DataCollectionFindByIdResponse, DataCollectionFindByIdSpec, DataCollectionFindRequest, DataCollectionFindResponse, DataCollectionFindSpec, DataCollectionListRequest, DataCollectionListResponse, DataCollectionListResponseDrilldown, DataCollectionListSpec, DataCollectionMatchRequest, DataCollectionMatchResponse, DataCollectionMatchSpec, DataCollectionMethodRequest, DataCollectionMethodSpec, DataCollectionSearchRequest, DataCollectionSearchResponse, DataCollectionSearchSpec, DataCollectionSpec, DataCollectionUdmSpec, DataCollectionUdmsSpec, DataCollectionUpdateRequest, DataCollectionUpdateResponse, DataCollectionUpdateSpec, DataFilterCondition, DataForm, DataLink, DataLinkDirection, DataLinkTableAccessor, DataLinkTableApiResponse, DataLinkTableConfig, DataLinkTableEditableProperties, DataLinkTableExportProperties, DataLinkTableInstanceAccessor, DataLinkTableInstanceApiResponse, DataLinkTableInstancesAccessor, DataLinkTablesAccessor, DataLocationMethodImplementationTypes, DataLocationPointer, DataLocationTypeCollection, DataLocatorStep, DataLocatorStepArrayItem, DataLocatorStepObjectProperty, DataLocatorStepType, DataRecordSchema, DataSchema, DataSourceAccessor, DataSourceApiResponse, DataSourceEditableProperties, DataSourceExportProperties, DataSourceInstanceAccessor, DataSourceInstanceApiResponse, DataSourceInstancesAccessor, DataSourceUnitConfig, DataSourcesAccessor, DependencyError, DownstreamFlowNodeRunSchema, EDITABLE_LIMITS, ElementAccessor, ElementInstanceAccessor, ElementInstanceListAccessor, ElementListAccessor, ElementsExportFields, EngineWorkspaceSettingsSchema, ErrorData, ErrorDataSchema, ErrorType, ExternalEvent, ExternalEventLogRecordApiResponse, ExternalEventLogStatus, ExternalEventPullApiResponse, ExternalEventPullStatus, ExternalEventSubscriptionAccessor, ExternalEventSubscriptionApiResponse, ExternalEventSubscriptionConfig, ExternalEventSubscriptionStatus, ExternalEventSubscriptionType, ExternalEventSubscriptionsAccessor, ExternalEventType, ExternalEventUnitConfig, FLOW_NODE_SPECS, FieldMappingAccessor, FieldMappingApiResponse, FieldMappingDirection, FieldMappingEditableProperties, FieldMappingExportProperties, FieldMappingInstanceAccessor, FieldMappingInstanceApiResponse, FieldMappingInstancesAccessor, FieldMappingUnitConfig, FieldMappingsAccessor, FindActionInstancesQuery, FindActionRunLogsQuery, FindActionRunLogsResponse, FindActionsQuery, FindAppEventSubscriptionsQuery, FindAppEventTypesQuery, FindAppEventsQuery, FindConnectionsQuery, FindConnectionsResponse, FindCustomersQuery, FindDataLinkTableInstanceLinksQuery, FindDataLinkTableInstancesQuery, FindDataLinkTablesQuery, FindDataLinksInTableQuery, FindDataLinksQuery, FindDataLinksResponse, FindDataSourceEventsQuery, FindDataSourceInstanceQuery, FindDataSourceInstanceSyncsQuery, FindDataSourceInstancesQuery, FindDataSourceSyncsQuery, FindDataSourcesQuery, FindExternalEventPullsQuery, FindFieldMappingsQuery, FindFlowInstancesQuery, FindFlowRunsQuery, FindFlowRunsResponse, FindFlowsQuery, FindIntegrationLevelMembraneInterfaceQuery, FindIntegrationsQuery, FindPackagesQuery, FindScreensQuery, FlowAccessor, FlowApiResponse, FlowEditableProperties, FlowExportProperties, FlowInstanceAccessor, FlowInstanceApiResponse, FlowInstanceNode, FlowInstanceNodeState, FlowInstanceSetupError, FlowInstancesAccessor, FlowNode, FlowNodeLink, FlowNodeRunOutputMetadataSchema, FlowNodeRunOutputSchema, FlowNodeRunOutputWithoutDownstreamRunsSchema, FlowNodeRunParametersSchema, FlowNodeRunRecordSchema, FlowNodeRunRecordWithoutOutputsDataSchema, FlowNodeRunResultSchema, FlowNodeRunStatus, FlowNodeSpec, FlowNodeType, FlowRunAccessor, FlowRunApiResponse, FlowRunError, FlowRunLaunchedBy, FlowRunLaunchedByApi, FlowRunLaunchedByTrigger, FlowRunNode, FlowRunNodeState, FlowRunState, FlowRunsAccessor, FlowsAccessor, Formula, FullPlatformUser, FunctionDefinition, FunctionType, GenerateOptionsRequest, GeneratedConnectorOption, GenericFunctionDefinition, GraphQLApiMappingSchema, GraphQLFieldMappingSchema, GraphqlApiMappingFunction, HTTP_REQUEST_SCHEMA, HandyScenarioTemplateElement, HttpRequestMethod, HttpRequestSpec, IncludeArchivedQuery, IncomingWebhooksState, InsufficientCreditsError, IntegrationAccessor, IntegrationApiResponse, MembraneClient as IntegrationAppClient, IntegrationAppError, IntegrationAuthOption, IntegrationAuthUi, IntegrationEditableProperties, IntegrationElementLevel, IntegrationElementType, IntegrationExportProperties, IntegrationLevelActionAccessor, IntegrationLevelActionsListAccessor, IntegrationLevelDataSourceAccessor, IntegrationLevelDataSourcesListAccessor, IntegrationLevelFieldMappingAccessor, IntegrationLevelFieldMappingsListAccessor, IntegrationLevelFlowAccessor, IntegrationLevelFlowsListAccessor, IntegrationLevelMembraneInterfaceSelectorQuery, IntegrationSpecificElementSelector, IntegrationsAccessor, InternalError, InvalidLocatorError, JavascriptFunction, LimitUnits, ListActionInstancesForConnectionQuery, ListDataSourceInstancesForConnectionQuery, ListExternalAppsQuery, ListExternalEventLogRecordsQuery, ListExternalEventPullsQuery, ListExternalEventSubscriptionsQuery, ListFlowInstancesForConnectionQuery, ListPublicConnectorsQuery, ListPublicPackagesQuery, LogRecordType, MEMBRANE_ELEMENT_CONFIG_FILE_NAME, MIN_FULL_SYNC_INTERVAL_SECONDS, MIN_PULL_UPDATES_INTERVAL_SECONDS, MappingFunction, MappingSchema, MembraneAgentKey, axios as MembraneAxiosInstance, MembraneClient, MembraneElementLayer, MembraneError, MinimalConnector, NotAuthenticatedError, NotFoundError, OAUTH1_CONFIG_SCHEMA, OAUTH_CONFIG_SCHEMA, OpenapiMappingSchema, OperationMappingFunction, OperationMappingSchema, OrgFeatureFlagsSchema, OrgLimits, OrgLimitsType, OrgPlan, OrgSchema, OrgUserRole, OrgUserStatus, OrgWorkspaceSchema, OrgWorkspaceUser, PACKAGE_VERSION_DEVELOPMENT, PACKAGE_VERSION_LATEST, PARALLEL_EXECUTION_LIMITS, PackageAccessor, PackageApiResponse, PackageCalculatedProperties, PackageEditableProperties, PackageElement, PackageElementApi, PackageElementExport, PackageExportProperties, PackageVersionData, PackageVersionListItem, PackagesAccessor, PaginationQuery, PaginationResponse, PatchAgentSessionSchema, PlatformUserSchema, RATE_LIMITS, RateLimitExceededError, RequestMappingSchema, ResetFlowInstanceOptions, RestApiMappingFunction, RestApiMappingSchema, RunActionRequest, RunFlowApiRequest, ScenarioAccessor, ScenarioTemplate, ScenarioTemplateCategory, ScenarioTemplateElements, ScenariosAccessor, ScreenAccessor, ScreenApiResponse, ScreenBlock, ScreenBlockType, ScreenType, ScreensAccessor, SearchQuery, SelfAccessor, UDM, UNIFIED_DATA_MODELS, UnitRunError, UpdateActionInstanceRequest, UpdateActionRequest, UpdateConnectionRequest, UpdateConnectorRequest, UpdateCustomerRequest, UpdateDataLinkTableRequest, UpdateDataSourceInstanceRequest, UpdateDataSourceRequest, UpdateFieldMappingRequest, UpdateFlowRequest, UpdateIntegrationRequest, UpdatePackageRequest, UpstreamFlowNodeRunSchema, UsageType, UserAccessor, UsersAccessor, WORKSPACE_SIZE_LIMITS, WebhookTypeEnum, WorkspaceElementChangeType, WorkspaceElementDependencyType, WorkspaceElementSearchQuery, WorkspaceElementSearchResult, WorkspaceElementSpecs, WorkspaceElementState, WorkspaceElementType, WorkspaceEventType, WorkspaceLimitsSchema, WorkspaceNotificationType, WorkspaceOnboardingStep, WorkspacePublicKey, WorkspaceSyncEventType, WorkspaceType, WritableConnectorVersionData, WritablePackageVersionData, WriteableConnectorFields, WriteableConnectorOption, __resolveValue, addRequiredFieldsToSchema, addUdmFallbackFields, addUndefinedWriteableProperties, backwardCompatibleFilterMatch, buildData, buildDataSchema, buildValue, compareWorkspaceExports, compressDataSchema, createCompoundSchema, createFlowInstanceSchema, createObjectFromLocators, createOrUpdateConnection, createPaginationResponseSchema, createSchema, dataCollectionEventTypeToExternalEventType, dataLocationParametersMatch, doesMatchFilter, excludeFieldsFromSchema, excludeFieldsFromValue, excludeReadOnlyFieldsFromSchema, excludeWriteOnlyFieldsFromSchema, externalEventTypeToDataCollectionEventType, extractFieldLocator, extractMembraneErrorData, findUdmCollectionMapping, findUdmDefaultCollection, findUdmRootLocation, findValueLocators, generateExampleFromSchema, getActionInstanceVariableSchema, getActionRunTimeVariablesSchema, getAlertCategoryDisplayName, getAlertDeliveryMethodLabel, getAlertTypeDisplayName, getAlertTypesByCategory, getAllEventMethodFilePaths, getBusinessDaysBetween, getChildNodeKeys, getDataCollectionCreateFields, getDataCollectionUpdateFields, getDataLocationMethodPath, getDownstreamNodeKeys, getEffectiveConnectorOption, getElementSelector, getErrorFromData, getEventMethodFileKey, getFilterFieldValuesByLocator, getFlowInstanceNodeDependency, getFlowNode, getFlowNodeConfigTimeVariablesSchema, getFlowNodeDescription, getFlowNodeRunTimeVariablesSchema, getFlowNodeSpec, getFlowNodeTitle, getFormula$1 as getFormula, getFormulaLocators, getFormula as getFormula_internalDoNotUse, getFullNameForLocator, getFullTitleForLocator, getIconUriForLocator, getLocatorsFromData, getLocatorsFromSchema, getMembraneElementPath, getMissingRequiredFields, getNameComponentsForLocator, getNameForLocator, getNodeInputSchema, getOperatorsBySchema, getParentNodeKeys, getReferenceCollectionPathForSchema, getReferenceCollectionPointerForSchema, getRequiredFieldsFromSchema, getRootNodeKeys, getSchemaByLocator, getSchemaFromValue, getUpstreamNodeKeys, getValueAtLocator, getValueByLocator, getVariableLocators, getWritableFieldsSchema, hasCycles, hasFormulas$1 as hasFormulas, hasFormulas as hasFormulas_internalDoNotUse, injectFormulaCatalog, isBlob, isBusinessDay, isDataActionType, isDataLocationMethodSupported, isDeliveryMethodEnabled, isFormula$1 as isFormula, isFormula as isFormula_internalDoNotUse, isMembraneError, isObject, isSameDataLocation, isSchemaEmpty, isStream, isValidAlertType, isValidLocator, lenientParseWithSchema, locatorToField, locatorToSteps, locatorToString, makeDataLocationOperationPath, makeDataLocationPath, makeDataRecordSchema, makeObjectPropertyLocator, makeSchemaForLocator, mergeSchemas, mergeWithFormulas, nonEmptyObjectProperties, parseDataLocationPath, parseDate, parseMembraneElementPath, patchSchema, pickFieldsFromSchema, pickFieldsFromValue, populateSchemaTitles, processCopy, removeNonExistentVars, removeRequiredFieldsFromSchema, resolveFormulas, schemaAllowsCustomValue, schemaHasFixedValues, schemaHasProperties, schemaIsNumber, schemaIsScalar, schemaTypeFromValue, schemaWithTitle, setEditablePropertiesForWorkspaceElement, setSchemaAtLocator, setValueAtLocator, stepsToLocator, streamToString, transformVariablesWith, transformVars, truncateData, unwrapSchema, unwrapSchemas, updateFlowInstanceSchema, updateImpliedSchema, valueToSchema, valueToString, walkSchema, wrapAnyOfSchema, zodBooleanCoercion };
|
|
13591
14052
|
//# sourceMappingURL=index.browser.mjs.map
|