@membranehq/sdk 0.9.10 → 0.10.10

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.
Files changed (57) hide show
  1. package/dist/bundle.d.ts +74 -31
  2. package/dist/bundle.js +31 -14
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/accessors/connections-accessors.d.ts +17 -11
  5. package/dist/dts/accessors/integrations-accessors.d.ts +14 -11
  6. package/dist/dts/agent/session.d.ts +5 -0
  7. package/dist/dts/alerts/index.d.ts +1 -0
  8. package/dist/dts/alerts/types.d.ts +107 -13
  9. package/dist/dts/alerts/utils.d.ts +8 -0
  10. package/dist/dts/config/index.d.ts +1 -0
  11. package/dist/dts/dto/index.d.ts +3 -0
  12. package/dist/dts/functions/base.d.ts +2 -2
  13. package/dist/dts/index.browser.d.ts +1 -0
  14. package/dist/dts/logging/index.d.ts +9 -0
  15. package/dist/dts/orgs/types.d.ts +66 -1
  16. package/dist/dts/platform-users.d.ts +17 -2
  17. package/dist/dts/usage/types.d.ts +1 -0
  18. package/dist/dts/webhooks/types.d.ts +4 -2
  19. package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +6 -2
  20. package/dist/dts/workspace-elements/api/connections-api.d.ts +18 -3
  21. package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +3 -1
  22. package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +3 -1
  23. package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +3 -1
  24. package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +3 -1
  25. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +3 -1
  26. package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +6 -2
  27. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +6 -2
  28. package/dist/dts/workspace-elements/api/flows-api.d.ts +6 -2
  29. package/dist/dts/workspace-elements/api/integrations-api.d.ts +5 -1
  30. package/dist/dts/workspace-elements/api/packages-api.d.ts +2 -0
  31. package/dist/dts/workspace-elements/base/actions/index.d.ts +1 -1
  32. package/dist/dts/workspace-elements/base/connections/types.d.ts +3 -1
  33. package/dist/dts/workspace-elements/base/connectors/auth.d.ts +20 -0
  34. package/dist/dts/workspace-elements/base/connectors/functions.d.ts +12 -490
  35. package/dist/dts/workspace-elements/base/connectors/functions.test.d.ts +1 -0
  36. package/dist/dts/workspace-elements/base/connectors/index.d.ts +1 -0
  37. package/dist/dts/workspace-elements/base/connectors/types.d.ts +922 -478
  38. package/dist/dts/workspace-elements/base/data-collections/data-locations/collections/methods/base.d.ts +1 -2
  39. package/dist/dts/workspace-elements/base/packages/index.d.ts +2 -0
  40. package/dist/dts/workspace-elements/element-utils.d.ts +2 -0
  41. package/dist/dts/workspace-elements/element-utils.test.d.ts +1 -0
  42. package/dist/dts/workspace-elements/index.d.ts +1 -0
  43. package/dist/dts/workspace-elements/types.d.ts +9 -3
  44. package/dist/dts/workspaces/types.d.ts +39 -1
  45. package/dist/index.browser.d.mts +1360 -583
  46. package/dist/index.browser.d.ts +1360 -583
  47. package/dist/index.browser.js +593 -113
  48. package/dist/index.browser.js.map +1 -1
  49. package/dist/index.browser.mjs +570 -114
  50. package/dist/index.browser.mjs.map +1 -1
  51. package/dist/index.node.d.mts +1358 -580
  52. package/dist/index.node.d.ts +1358 -580
  53. package/dist/index.node.js +600 -113
  54. package/dist/index.node.js.map +1 -1
  55. package/dist/index.node.mjs +577 -114
  56. package/dist/index.node.mjs.map +1 -1
  57. package/package.json +2 -1
@@ -3501,6 +3501,7 @@ exports.WorkspaceEventType = void 0;
3501
3501
  WorkspaceEventType["FlowRunCompleted"] = "flowRun.completed";
3502
3502
  WorkspaceEventType["FlowRunFailed"] = "flowRun.failed";
3503
3503
  WorkspaceEventType["FlowRunStopped"] = "flowRun.stopped";
3504
+ WorkspaceEventType["AlertCreated"] = "alert.created";
3504
3505
  })(exports.WorkspaceEventType || (exports.WorkspaceEventType = {}));
3505
3506
  exports.WorkspaceElementState = void 0;
3506
3507
  (function (WorkspaceElementState) {
@@ -3551,8 +3552,9 @@ const BaseIntegrationLevelMembraneInterfaceExportProperties = BaseMembraneInterf
3551
3552
  parentUuid: z.z.string().optional(),
3552
3553
  isCustomized: z.z.boolean().optional(),
3553
3554
  });
3555
+ const MembraneElementLayer = z.z.enum(['universal', 'integration', 'connection']);
3554
3556
  const IntegrationLevelMembraneInterfaceSelectorQuery = z.z.object({
3555
- layer: z.z.enum(['universal', 'integration', 'connection']).optional(),
3557
+ layer: MembraneElementLayer.optional(),
3556
3558
  integrationKey: z.z.string().optional(),
3557
3559
  integrationId: z.z.string().optional(),
3558
3560
  connectionId: z.z.string().optional(),
@@ -3572,8 +3574,7 @@ const WorkspaceElementSearchQuery = z.z.object({
3572
3574
  });
3573
3575
  const WorkspaceElementSearchResult = z.z.object({
3574
3576
  elementType: z.z.enum(exports.WorkspaceElementType),
3575
- elementId: z.z.string(),
3576
- name: z.z.string(),
3577
+ element: z.z.any(),
3577
3578
  });
3578
3579
 
3579
3580
  function mergeWithFormulas(a, b) {
@@ -3795,7 +3796,9 @@ const BaseConnection = BaseWorkspaceElement.extend({
3795
3796
  isDefunct: z.z.boolean().optional(),
3796
3797
  state: z.z.enum(exports.WorkspaceElementState).optional(),
3797
3798
  error: ErrorDataSchema.optional(),
3798
- integrationId: z.z.string(),
3799
+ integrationId: z.z.string().optional(),
3800
+ connectorId: z.z.string().optional(),
3801
+ connectorVersion: z.z.string().optional(),
3799
3802
  authOptionKey: z.z.string().optional(),
3800
3803
  createdAt: z.z.string(),
3801
3804
  updatedAt: z.z.string(),
@@ -3881,6 +3884,7 @@ const ConnectorAuthSpec = z.z.object({
3881
3884
  title: z.z.string().optional(),
3882
3885
  description: z.z.string().optional(),
3883
3886
  type: z.z.enum(CONNECTOR_AUTH_TYPES),
3887
+ inputSchema: DataSchema.optional(),
3884
3888
  ui: z.z
3885
3889
  .object({
3886
3890
  schema: DataSchema.optional(),
@@ -4015,7 +4019,7 @@ const ConnectorAuthMethodTypes = {
4015
4019
  },
4016
4020
  };
4017
4021
  },
4018
- getOutputSchema: () => REST_API_CLIENT_SCHEMA,
4022
+ getOutputSchema: () => REST_API_CLIENT_SCHEMA$1,
4019
4023
  isRequired: true,
4020
4024
  },
4021
4025
  test: {
@@ -4170,7 +4174,7 @@ const REST_API_CLIENT_RESPONSE_HANDLERS_SCHEMA = {
4170
4174
  },
4171
4175
  },
4172
4176
  };
4173
- const REST_API_CLIENT_SCHEMA = {
4177
+ const REST_API_CLIENT_SCHEMA$1 = {
4174
4178
  type: 'object',
4175
4179
  properties: {
4176
4180
  args: {
@@ -4208,11 +4212,6 @@ const CONNECTOR_DOCS_DIR = 'docs';
4208
4212
  const CONNECTOR_GLOBAL_WEBHOOKS_DIR = 'global-webhooks';
4209
4213
  const CONNECTOR_EVENTS_DIR = 'events';
4210
4214
 
4211
- const ConnectorOperationMethodImplementationTypes = [
4212
- exports.ConnectorMethodImplementationType.restApiMapping,
4213
- exports.ConnectorMethodImplementationType.javascript,
4214
- ];
4215
-
4216
4215
  exports.FunctionType = void 0;
4217
4216
  (function (FunctionType) {
4218
4217
  FunctionType["mapping"] = "mapping";
@@ -4232,10 +4231,157 @@ const BaseFunctionDefinition = z.z.object({
4232
4231
  });
4233
4232
  const GenericFunctionDefinition = z.z
4234
4233
  .object({
4235
- type: z.z.enum(['mapping', 'operation-mapping', 'rest-api-mapping', 'graphql-api-mapping', 'javascript']),
4234
+ type: z.z.enum(['mapping', 'operation-mapping', 'rest-api-mapping', 'graphql-api-mapping', 'javascript']).optional(),
4236
4235
  })
4237
4236
  .loose();
4238
4237
 
4238
+ function getEffectiveConnectorOption(connector, optionKey) {
4239
+ var _a, _b, _c, _d, _e, _f, _g;
4240
+ const option = (_a = connector.options) === null || _a === void 0 ? void 0 : _a[optionKey];
4241
+ const connectorInputSchema = (_b = connector.inputSchema) !== null && _b !== void 0 ? _b : (_c = connector.ui) === null || _c === void 0 ? void 0 : _c.schema;
4242
+ 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;
4243
+ return {
4244
+ ...connector,
4245
+ ...option,
4246
+ inputSchema: mergeSchemas([connectorInputSchema, optionInputSchema]),
4247
+ parametersSchema: mergeSchemas([connector.parametersSchema, option === null || option === void 0 ? void 0 : option.parametersSchema]),
4248
+ credentialsSchema: mergeSchemas([connector.credentialsSchema, option === null || option === void 0 ? void 0 : option.credentialsSchema]),
4249
+ makeApiClient: (_f = option === null || option === void 0 ? void 0 : option.makeApiClient) !== null && _f !== void 0 ? _f : connector.makeApiClient,
4250
+ test: (_g = option === null || option === void 0 ? void 0 : option.test) !== null && _g !== void 0 ? _g : connector.test,
4251
+ };
4252
+ }
4253
+ const getDefaultInputSchema = (authConfig) => {
4254
+ var _a, _b, _c;
4255
+ const connectionParameters = (_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;
4256
+ return {
4257
+ type: 'object',
4258
+ properties: {
4259
+ connectorParameters: (_c = authConfig === null || authConfig === void 0 ? void 0 : authConfig.parametersSchema) !== null && _c !== void 0 ? _c : {},
4260
+ ...(connectionParameters && { connectionParameters }),
4261
+ },
4262
+ };
4263
+ };
4264
+ const REST_API_CLIENT_SCHEMA = {
4265
+ type: 'object',
4266
+ properties: {
4267
+ args: {
4268
+ type: 'object',
4269
+ properties: {
4270
+ baseUri: {
4271
+ type: 'string',
4272
+ description: 'This prefix will be added to all relative API requests.',
4273
+ },
4274
+ query: {
4275
+ type: 'object',
4276
+ additionalProperties: true,
4277
+ },
4278
+ headers: {
4279
+ type: 'object',
4280
+ additionalProperties: true,
4281
+ },
4282
+ auth: {
4283
+ type: 'object',
4284
+ description: 'Basic authentication',
4285
+ properties: {
4286
+ username: { type: 'string' },
4287
+ password: { type: 'string' },
4288
+ },
4289
+ },
4290
+ },
4291
+ },
4292
+ },
4293
+ };
4294
+ const ConnectorFunctionSpecs = {
4295
+ getOAuthConfig: {
4296
+ authTypes: ['oauth2', 'oauth1'],
4297
+ supportedFunctionTypes: [exports.FunctionType.mapping, exports.FunctionType.javascript],
4298
+ getInputSchema: (authConfig) => {
4299
+ const schema = getDefaultInputSchema(authConfig);
4300
+ return {
4301
+ ...schema,
4302
+ properties: {
4303
+ ...schema.properties,
4304
+ redirectUri: { type: 'string' },
4305
+ state: { type: 'string' },
4306
+ },
4307
+ };
4308
+ },
4309
+ getOutputSchema: (authConfig) => {
4310
+ return (authConfig === null || authConfig === void 0 ? void 0 : authConfig.type) === 'oauth1' ? OAUTH1_CONFIG_SCHEMA : OAUTH_CONFIG_SCHEMA;
4311
+ },
4312
+ isRequired: true,
4313
+ },
4314
+ getTokenData: {
4315
+ authTypes: ['oauth2'],
4316
+ supportedFunctionTypes: [exports.FunctionType.mapping, exports.FunctionType.javascript],
4317
+ getInputSchema: getDefaultInputSchema,
4318
+ getOutputSchema: (authConfig) => {
4319
+ var _a;
4320
+ 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;
4321
+ },
4322
+ isRequired: false,
4323
+ },
4324
+ getCredentialsFromAccessTokenResponse: {
4325
+ authTypes: ['oauth2'],
4326
+ supportedFunctionTypes: [exports.FunctionType.mapping, exports.FunctionType.javascript],
4327
+ isRequired: false,
4328
+ },
4329
+ getCredentialsFromRefreshTokenResponse: {
4330
+ authTypes: ['oauth2'],
4331
+ supportedFunctionTypes: [exports.FunctionType.mapping, exports.FunctionType.javascript],
4332
+ isRequired: false,
4333
+ },
4334
+ getCredentialsFromConnectionParameters: {
4335
+ authTypes: ['client-credentials', 'oauth2'],
4336
+ getInputSchema: getDefaultInputSchema,
4337
+ getOutputSchema: (authConfig) => {
4338
+ return authConfig === null || authConfig === void 0 ? void 0 : authConfig.credentialsSchema;
4339
+ },
4340
+ supportedFunctionTypes: [exports.FunctionType.mapping, exports.FunctionType.javascript],
4341
+ isRequired: false,
4342
+ },
4343
+ refreshCredentials: {
4344
+ authTypes: ['oauth2', 'oauth1', 'client-credentials'],
4345
+ getInputSchema: getDefaultInputSchema,
4346
+ getOutputSchema: (authConfig) => {
4347
+ return authConfig === null || authConfig === void 0 ? void 0 : authConfig.credentialsSchema;
4348
+ },
4349
+ supportedFunctionTypes: [exports.FunctionType.javascript],
4350
+ isRequired: false,
4351
+ },
4352
+ makeApiClient: {
4353
+ supportedFunctionTypes: [exports.FunctionType.mapping, exports.FunctionType.javascript],
4354
+ getInputSchema: (authConfig) => {
4355
+ var _a, _b, _c;
4356
+ return {
4357
+ type: 'object',
4358
+ properties: {
4359
+ credentials: mergeSchemas([
4360
+ ((_a = authConfig === null || authConfig === void 0 ? void 0 : authConfig.customCredentialsSchema) !== null && _a !== void 0 ? _a : authConfig === null || authConfig === void 0 ? void 0 : authConfig.credentialsSchema),
4361
+ (_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,
4362
+ ]),
4363
+ },
4364
+ };
4365
+ },
4366
+ getOutputSchema: () => REST_API_CLIENT_SCHEMA,
4367
+ isRequired: true,
4368
+ },
4369
+ test: {
4370
+ supportedFunctionTypes: [exports.FunctionType.operationMapping, exports.FunctionType.restApiMapping, exports.FunctionType.javascript],
4371
+ getOutputSchema: () => ({
4372
+ title: 'Success Criteria',
4373
+ description: 'If this value is truthy, the test is considered a success.',
4374
+ type: 'boolean',
4375
+ }),
4376
+ isRequired: true,
4377
+ },
4378
+ };
4379
+
4380
+ const ConnectorOperationMethodImplementationTypes = [
4381
+ exports.ConnectorMethodImplementationType.restApiMapping,
4382
+ exports.ConnectorMethodImplementationType.javascript,
4383
+ ];
4384
+
4239
4385
  const GraphQLFieldMappingSchema = z.z.lazy(() => z.z.object({
4240
4386
  field: z.z.string(),
4241
4387
  args: z.z.record(z.z.string(), z.z.any()).optional(),
@@ -4345,7 +4491,8 @@ const ConnectorSpec = z.z.object({
4345
4491
  type: z.z.enum(['openapi', 'graphql']),
4346
4492
  })
4347
4493
  .optional(),
4348
- ui: ConnectorUiSpec.optional(),
4494
+ ui: ConnectorUiSpec.optional().describe('[INTERNAL] Deprecated: Use inputSchema instead'),
4495
+ inputSchema: DataSchema.optional(),
4349
4496
  auth: ConnectorAuth.optional(),
4350
4497
  parametersSchema: DataSchema.optional(),
4351
4498
  udms: z.z.array(z.z.string()).optional(),
@@ -4368,14 +4515,10 @@ const ConnectorAuthWithFunctions = z.z.object({
4368
4515
  type: z.z
4369
4516
  .enum(['integration-app-token', 'membrane-token', 'oauth2', 'oauth1', 'client-credentials', 'proxy'])
4370
4517
  .optional(),
4518
+ credentialsSchema: DataSchema.optional(),
4371
4519
  customCredentialsSchema: DataSchema.optional(),
4372
- ui: z.z
4373
- .object({
4374
- schema: DataSchema.optional(),
4375
- description: z.z.string().optional(),
4376
- helpUri: z.z.string().optional(),
4377
- })
4378
- .optional(),
4520
+ inputSchema: DataSchema.optional(),
4521
+ parametersSchema: DataSchema.optional(),
4379
4522
  getCredentialsFromConnectionParameters: GenericFunctionDefinition.optional(),
4380
4523
  refreshCredentials: GenericFunctionDefinition.optional(),
4381
4524
  makeApiClient: GenericFunctionDefinition.optional(),
@@ -4383,18 +4526,40 @@ const ConnectorAuthWithFunctions = z.z.object({
4383
4526
  getTokenData: GenericFunctionDefinition.optional(),
4384
4527
  getCredentialsFromAccessTokenResponse: GenericFunctionDefinition.optional(),
4385
4528
  getCredentialsFromRefreshTokenResponse: GenericFunctionDefinition.optional(),
4529
+ test: GenericFunctionDefinition.optional(),
4386
4530
  proxyKey: z.z.string().optional(),
4531
+ ui: z.z
4532
+ .object({
4533
+ schema: DataSchema.optional(),
4534
+ description: z.z.string().optional(),
4535
+ helpUri: z.z.string().optional(),
4536
+ })
4537
+ .optional()
4538
+ .describe('[INTERNAL] Deprecated: Use inputSchema instead'),
4387
4539
  });
4388
- const ConnectorOption = ConnectorAuthWithFunctions.extend({
4540
+ const WriteableConnectorOption = ConnectorAuthWithFunctions.extend({
4389
4541
  title: z.z.string().optional(),
4390
4542
  description: z.z.string().optional(),
4391
4543
  enabled: z.z.any().optional(),
4544
+ }).omit({
4545
+ credentialsSchema: true,
4546
+ });
4547
+ const ConnectorOption = WriteableConnectorOption.extend({
4548
+ credentialsSchema: DataSchema.optional(),
4549
+ });
4550
+ const GeneratedConnectorOption = z.z.object({
4551
+ key: z.z.string(),
4552
+ type: z.z.enum(CONNECTOR_AUTH_TYPES),
4553
+ title: z.z.string().optional(),
4554
+ description: z.z.string().optional(),
4555
+ inputSchema: DataSchema.optional(),
4392
4556
  });
4393
4557
  const ConnectorOptions = z.z.record(z.z.string(), ConnectorOption);
4394
4558
  const WritableConnectorVersionData = ConnectorAuthWithFunctions.extend({
4395
4559
  parametersSchema: DataSchema.optional(),
4396
- test: GenericFunctionDefinition.optional(),
4397
- options: ConnectorOptions.optional(),
4560
+ options: z.z.record(z.z.string(), WriteableConnectorOption).optional(),
4561
+ }).omit({
4562
+ credentialsSchema: true,
4398
4563
  });
4399
4564
  const ConnectorVersionData = z.z
4400
4565
  .object({
@@ -4412,7 +4577,10 @@ const ConnectorVersionData = z.z
4412
4577
  version: z.z.string(),
4413
4578
  credentialsSchema: DataSchema.optional(),
4414
4579
  })
4415
- .extend(WritableConnectorVersionData.shape);
4580
+ .extend(WritableConnectorVersionData.shape)
4581
+ .extend({
4582
+ options: ConnectorOptions.optional(),
4583
+ });
4416
4584
  const ConnectorVersion = ConnectorVersionData.extend({
4417
4585
  id: z.z.string(),
4418
4586
  connectorId: z.z.string(),
@@ -4427,6 +4595,7 @@ const WriteableConnectorFields = z.z
4427
4595
  categories: z.z.array(z.z.string()).optional(),
4428
4596
  })
4429
4597
  .extend(WritableConnectorVersionData.shape);
4598
+ const ConnectorExportProperties = WriteableConnectorFields;
4430
4599
  const UpdateConnectorRequest = WriteableConnectorFields;
4431
4600
  const CreateConnectorRequest = WriteableConnectorFields.extend({
4432
4601
  name: z.z.string(),
@@ -4436,16 +4605,12 @@ const BaseConnector = z.z.object({
4436
4605
  id: z.z.string(),
4437
4606
  key: z.z.string(),
4438
4607
  uuid: z.z.string(),
4608
+ appUuid: z.z.string().optional(),
4439
4609
  name: z.z.string(),
4440
4610
  logoUri: z.z.string(),
4441
- appUri: z.z.string(),
4442
- apiDocsUri: z.z.string(),
4443
- hasReadme: z.z.boolean(),
4444
- status: z.z.string().optional(),
4445
4611
  categories: z.z.array(z.z.string()).optional(),
4446
4612
  isPublic: z.z.boolean().optional(),
4447
4613
  popularity: z.z.number().optional(),
4448
- appUuid: z.z.string().optional(),
4449
4614
  });
4450
4615
  const Connector = z.z
4451
4616
  .object({})
@@ -4509,8 +4674,8 @@ const DataCollectionMethodCreate = {
4509
4674
  },
4510
4675
  };
4511
4676
  },
4512
- getInputSchema: ({ collectionSpec, method, connectorSpec }) => {
4513
- var _a, _b;
4677
+ getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
4678
+ var _a;
4514
4679
  let fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
4515
4680
  if (method === null || method === void 0 ? void 0 : method.fields) {
4516
4681
  fieldsSchema = pickFieldsFromSchema(fieldsSchema, method.fields);
@@ -4520,12 +4685,12 @@ const DataCollectionMethodCreate = {
4520
4685
  }
4521
4686
  return {
4522
4687
  type: 'object',
4523
- properties: {
4688
+ properties: nonEmptyObjectProperties({
4524
4689
  fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
4525
4690
  type: 'object',
4526
4691
  },
4527
- credentials: (_b = connectorSpec === null || connectorSpec === void 0 ? void 0 : connectorSpec.auth) === null || _b === void 0 ? void 0 : _b.credentialsSchema,
4528
- },
4692
+ credentials: credentialsSchema,
4693
+ }),
4529
4694
  };
4530
4695
  },
4531
4696
  getOutputSchema: ({}) => ({
@@ -4540,17 +4705,16 @@ const DataCollectionMethodCreate = {
4540
4705
  const DataCollectionMethodDelete = {
4541
4706
  name: 'Delete',
4542
4707
  description: 'Delete a data record from the collection by id',
4543
- getInputSchema: ({ collectionHandler, parameters, connectorSpec }) => {
4544
- var _a;
4708
+ getInputSchema: ({ collectionHandler, parameters, credentialsSchema }) => {
4545
4709
  return {
4546
4710
  type: 'object',
4547
- properties: {
4711
+ properties: nonEmptyObjectProperties({
4548
4712
  id: {
4549
4713
  type: 'string',
4550
4714
  referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
4551
4715
  },
4552
- credentials: (_a = connectorSpec === null || connectorSpec === void 0 ? void 0 : connectorSpec.auth) === null || _a === void 0 ? void 0 : _a.credentialsSchema,
4553
- },
4716
+ credentials: credentialsSchema,
4717
+ }),
4554
4718
  };
4555
4719
  },
4556
4720
  getOutputSchema: () => null,
@@ -4574,15 +4738,14 @@ const DataCollectionMethodFind = {
4574
4738
  },
4575
4739
  };
4576
4740
  },
4577
- getInputSchema: ({ collectionSpec, method, connectorSpec }) => {
4578
- var _a;
4741
+ getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
4579
4742
  const queryFieldsSchema = pickFieldsFromSchema(collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema, method === null || method === void 0 ? void 0 : method.queryFields);
4580
4743
  const schema = {
4581
4744
  type: 'object',
4582
- properties: {
4745
+ properties: nonEmptyObjectProperties({
4583
4746
  cursor: { type: 'string' },
4584
- credentials: (_a = connectorSpec === null || connectorSpec === void 0 ? void 0 : connectorSpec.auth) === null || _a === void 0 ? void 0 : _a.credentialsSchema,
4585
- },
4747
+ credentials: credentialsSchema,
4748
+ }),
4586
4749
  };
4587
4750
  if (queryFieldsSchema === null || queryFieldsSchema === void 0 ? void 0 : queryFieldsSchema.properties) {
4588
4751
  schema.properties = {
@@ -4613,19 +4776,16 @@ const DataCollectionMethodFind = {
4613
4776
  const DataCollectionMethodFindById = {
4614
4777
  name: 'Find by ID',
4615
4778
  description: 'Find a single data record in the collection by its id',
4616
- getInputSchema: ({ collectionHandler, parameters, connectorSpec }) => {
4617
- var _a;
4618
- return ({
4619
- type: 'object',
4620
- properties: {
4621
- id: {
4622
- type: 'string',
4623
- referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
4624
- },
4625
- credentials: (_a = connectorSpec === null || connectorSpec === void 0 ? void 0 : connectorSpec.auth) === null || _a === void 0 ? void 0 : _a.credentialsSchema,
4779
+ getInputSchema: ({ collectionHandler, parameters, credentialsSchema }) => ({
4780
+ type: 'object',
4781
+ properties: nonEmptyObjectProperties({
4782
+ id: {
4783
+ type: 'string',
4784
+ referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
4626
4785
  },
4627
- });
4628
- },
4786
+ credentials: credentialsSchema,
4787
+ }),
4788
+ }),
4629
4789
  getOutputSchema: ({ collectionSpec }) => {
4630
4790
  var _a;
4631
4791
  return ({
@@ -4654,8 +4814,7 @@ const DataCollectionMethodList = {
4654
4814
  },
4655
4815
  };
4656
4816
  },
4657
- getInputSchema: ({ method, collectionSpec, connectorSpec }) => {
4658
- var _a;
4817
+ getInputSchema: ({ method, collectionSpec, credentialsSchema }) => {
4659
4818
  const fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
4660
4819
  let filterSchema;
4661
4820
  if (method === null || method === void 0 ? void 0 : method.filterFields) {
@@ -4669,7 +4828,7 @@ const DataCollectionMethodList = {
4669
4828
  type: 'string',
4670
4829
  description: 'Cursor returned in response to the previous "list" request',
4671
4830
  },
4672
- credentials: (_a = connectorSpec === null || connectorSpec === void 0 ? void 0 : connectorSpec.auth) === null || _a === void 0 ? void 0 : _a.credentialsSchema,
4831
+ credentials: credentialsSchema,
4673
4832
  }),
4674
4833
  };
4675
4834
  },
@@ -4708,15 +4867,14 @@ const DataCollectionMethodMatch = {
4708
4867
  },
4709
4868
  };
4710
4869
  },
4711
- getInputSchema: ({ collectionSpec, method, connectorSpec }) => {
4712
- var _a;
4870
+ getInputSchema: ({ collectionSpec, method, credentialsSchema }) => {
4713
4871
  const fieldsSchema = pickFieldsFromSchema(collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema, method === null || method === void 0 ? void 0 : method.fields);
4714
4872
  return {
4715
4873
  type: 'object',
4716
- properties: {
4874
+ properties: nonEmptyObjectProperties({
4717
4875
  query: transformVariablesWith(fieldsSchema !== null && fieldsSchema !== void 0 ? fieldsSchema : {}, (locator) => `query.${locatorToField(locator)}`),
4718
- credentials: (_a = connectorSpec === null || connectorSpec === void 0 ? void 0 : connectorSpec.auth) === null || _a === void 0 ? void 0 : _a.credentialsSchema,
4719
- },
4876
+ credentials: credentialsSchema,
4877
+ }),
4720
4878
  };
4721
4879
  },
4722
4880
  getOutputSchema: ({ collectionSpec }) => {
@@ -4734,17 +4892,14 @@ const DataCollectionMethodMatch = {
4734
4892
  const DataCollectionMethodSearch = {
4735
4893
  name: 'Search',
4736
4894
  description: 'Find data records in a collection by a string query',
4737
- getInputSchema: ({ connectorSpec }) => {
4738
- var _a;
4739
- return ({
4740
- type: 'object',
4741
- properties: {
4742
- query: { type: 'string' },
4743
- cursor: { type: 'string' },
4744
- credentials: (_a = connectorSpec === null || connectorSpec === void 0 ? void 0 : connectorSpec.auth) === null || _a === void 0 ? void 0 : _a.credentialsSchema,
4745
- },
4746
- });
4747
- },
4895
+ getInputSchema: ({ credentialsSchema }) => ({
4896
+ type: 'object',
4897
+ properties: nonEmptyObjectProperties({
4898
+ query: { type: 'string' },
4899
+ cursor: { type: 'string' },
4900
+ credentials: credentialsSchema,
4901
+ }),
4902
+ }),
4748
4903
  getOutputSchema: ({ collectionSpec }) => {
4749
4904
  var _a;
4750
4905
  return ({
@@ -4781,8 +4936,8 @@ const DataCollectionMethodUpdate = {
4781
4936
  },
4782
4937
  };
4783
4938
  },
4784
- getInputSchema: ({ collectionSpec, collectionHandler, connectorSpec, method, parameters }) => {
4785
- var _a, _b;
4939
+ getInputSchema: ({ collectionSpec, collectionHandler, credentialsSchema, method, parameters }) => {
4940
+ var _a;
4786
4941
  let fieldsSchema = collectionSpec === null || collectionSpec === void 0 ? void 0 : collectionSpec.fieldsSchema;
4787
4942
  if (method === null || method === void 0 ? void 0 : method.fields) {
4788
4943
  fieldsSchema = pickFieldsFromSchema(fieldsSchema, method.fields);
@@ -4792,7 +4947,7 @@ const DataCollectionMethodUpdate = {
4792
4947
  }
4793
4948
  return {
4794
4949
  type: 'object',
4795
- properties: {
4950
+ properties: nonEmptyObjectProperties({
4796
4951
  id: {
4797
4952
  type: 'string',
4798
4953
  referenceCollection: { key: collectionHandler === null || collectionHandler === void 0 ? void 0 : collectionHandler.key, parameters },
@@ -4800,8 +4955,8 @@ const DataCollectionMethodUpdate = {
4800
4955
  fields: (_a = transformVariablesWith(fieldsSchema, (locator) => `fields.${locatorToField(locator)}`)) !== null && _a !== void 0 ? _a : {
4801
4956
  type: 'object',
4802
4957
  },
4803
- credentials: (_b = connectorSpec === null || connectorSpec === void 0 ? void 0 : connectorSpec.auth) === null || _b === void 0 ? void 0 : _b.credentialsSchema,
4804
- },
4958
+ credentials: credentialsSchema,
4959
+ }),
4805
4960
  };
4806
4961
  },
4807
4962
  getOutputSchema: ({}) => ({
@@ -9408,6 +9563,7 @@ const PackageCalculatedProperties = z.z.object({
9408
9563
  key: z.z.string(),
9409
9564
  name: z.z.string(),
9410
9565
  isCustomized: z.z.boolean().optional(),
9566
+ isPublic: z.z.boolean().optional(),
9411
9567
  });
9412
9568
  const BasePackage = BaseMembraneInterface.merge(PackageEditableProperties).merge(PackageCalculatedProperties);
9413
9569
  const WritablePackageVersionData = z.z.object({
@@ -9853,6 +10009,7 @@ const FindActionRunLogsResponse = createPaginationResponseSchema(ActionRunLogRec
9853
10009
 
9854
10010
  const FindConnectionsQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchivedQuery).extend({
9855
10011
  connectorId: z.z.string().optional(),
10012
+ connectorVersion: z.z.string().optional(),
9856
10013
  id: z.z.string().optional(),
9857
10014
  userId: z.z.string().optional(),
9858
10015
  name: z.z.string().optional(),
@@ -9902,8 +10059,15 @@ const ConnectionMessagePayload = z.z.discriminatedUnion('type', [
9902
10059
  type: z.z.literal('newConnectionFailure'),
9903
10060
  error: z.z.string(),
9904
10061
  errorData: ErrorDataSchema.optional(),
10062
+ connectionId: z.z.string().optional(),
9905
10063
  }),
9906
10064
  ]);
10065
+ const GenerateOptionsRequest = z.z.object({
10066
+ integrationId: z.z.string().optional(),
10067
+ connectorId: z.z.string().optional(),
10068
+ connectorParameters: z.z.any().optional(),
10069
+ connectorVersion: z.z.string().optional(),
10070
+ });
9907
10071
 
9908
10072
  const ListPublicConnectorsQuery = PaginationQuery.extend({
9909
10073
  search: z.z.string().optional(),
@@ -10096,12 +10260,16 @@ const IntegrationAuthOption = z.z.object({
10096
10260
  type: z.z.enum(CONNECTOR_AUTH_TYPES),
10097
10261
  title: z.z.string().optional(),
10098
10262
  description: z.z.string().optional(),
10099
- ui: IntegrationAuthUi.optional(),
10263
+ inputSchema: DataSchema.optional(),
10264
+ ui: IntegrationAuthUi.optional().describe('[INTERNAL] Deprecated: Use inputSchema instead'),
10100
10265
  });
10101
10266
  const IntegrationApiResponse = BaseIntegration.extend({
10102
10267
  connection: BaseConnection.optional(),
10103
10268
  spec: z.z.any().optional(),
10104
- authOptions: z.z.array(IntegrationAuthOption).optional(),
10269
+ authOptions: z.z
10270
+ .array(IntegrationAuthOption)
10271
+ .optional()
10272
+ .describe('[INTERNAL] Deprecated: Use POST /connectors/:id/generate-options instead'),
10105
10273
  parametersSchema: DataSchema.optional(),
10106
10274
  });
10107
10275
 
@@ -10442,6 +10610,107 @@ function hasCycles(nodes) {
10442
10610
  return hasCycles;
10443
10611
  }
10444
10612
 
10613
+ function addUndefinedWriteableProperties(value, schema) {
10614
+ if (!(schema instanceof z.z.ZodObject)) {
10615
+ return value;
10616
+ }
10617
+ const allProperties = Object.keys(schema.shape);
10618
+ for (const key of allProperties) {
10619
+ if (!(key in value)) {
10620
+ value[key] = undefined;
10621
+ }
10622
+ }
10623
+ return value;
10624
+ }
10625
+ function lenientParseWithSchema(data, schema) {
10626
+ if (data === undefined || data === null) {
10627
+ return data;
10628
+ }
10629
+ const def = schema._def;
10630
+ if (!def) {
10631
+ return data;
10632
+ }
10633
+ const typeName = def.typeName || def.type;
10634
+ if (typeName === 'ZodOptional' || typeName === 'optional') {
10635
+ if (data === undefined)
10636
+ return undefined;
10637
+ return lenientParseWithSchema(data, def.innerType);
10638
+ }
10639
+ if (typeName === 'ZodNullable' || typeName === 'nullable') {
10640
+ if (data === null)
10641
+ return null;
10642
+ return lenientParseWithSchema(data, def.innerType);
10643
+ }
10644
+ if (typeName === 'ZodObject' || typeName === 'object') {
10645
+ if (typeof data !== 'object' || Array.isArray(data)) {
10646
+ return data;
10647
+ }
10648
+ const shape = schema.shape;
10649
+ const result = {};
10650
+ if (shape) {
10651
+ for (const key in shape) {
10652
+ if (key in data) {
10653
+ result[key] = lenientParseWithSchema(data[key], shape[key]);
10654
+ }
10655
+ }
10656
+ }
10657
+ const catchall = def.catchall;
10658
+ if (catchall) {
10659
+ const catchallDef = catchall._def;
10660
+ if ((catchallDef === null || catchallDef === void 0 ? void 0 : catchallDef.typeName) === 'ZodNever' || (catchallDef === null || catchallDef === void 0 ? void 0 : catchallDef.type) === 'never') ;
10661
+ 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') {
10662
+ for (const key in data) {
10663
+ if (!(key in result)) {
10664
+ result[key] = data[key];
10665
+ }
10666
+ }
10667
+ }
10668
+ else {
10669
+ for (const key in data) {
10670
+ if (shape && !(key in shape)) {
10671
+ result[key] = data[key];
10672
+ }
10673
+ }
10674
+ }
10675
+ }
10676
+ return result;
10677
+ }
10678
+ if (typeName === 'ZodArray' || typeName === 'array') {
10679
+ if (!Array.isArray(data)) {
10680
+ return data;
10681
+ }
10682
+ const elementSchema = def.element || def.type;
10683
+ if (!elementSchema) {
10684
+ return data;
10685
+ }
10686
+ return data.map((item) => lenientParseWithSchema(item, elementSchema));
10687
+ }
10688
+ if (typeName === 'ZodRecord' || typeName === 'record') {
10689
+ if (typeof data !== 'object' || data === null || Array.isArray(data)) {
10690
+ return data;
10691
+ }
10692
+ const valueSchema = def.valueType;
10693
+ if (!valueSchema) {
10694
+ return data;
10695
+ }
10696
+ const result = {};
10697
+ for (const key in data) {
10698
+ result[key] = lenientParseWithSchema(data[key], valueSchema);
10699
+ }
10700
+ return result;
10701
+ }
10702
+ return data;
10703
+ }
10704
+
10705
+ function setEditablePropertiesForWorkspaceElement(currentElement, newEditableFields, exportSchema) {
10706
+ const parsedNewFields = lenientParseWithSchema(newEditableFields, exportSchema);
10707
+ const normalizedFields = addUndefinedWriteableProperties(parsedNewFields, exportSchema);
10708
+ return {
10709
+ ...currentElement,
10710
+ ...normalizedFields,
10711
+ };
10712
+ }
10713
+
10445
10714
  const WorkspaceElementSpecs = {
10446
10715
  [exports.WorkspaceElementType.Customer]: {
10447
10716
  type: exports.WorkspaceElementType.Customer,
@@ -10468,6 +10737,7 @@ const WorkspaceElementSpecs = {
10468
10737
  apiPath: 'connectors',
10469
10738
  name: 'Connector',
10470
10739
  namePlural: 'Connectors',
10740
+ exportPropertiesSchema: ConnectorExportProperties,
10471
10741
  },
10472
10742
  [exports.WorkspaceElementType.Connection]: {
10473
10743
  type: exports.WorkspaceElementType.Connection,
@@ -10768,6 +11038,26 @@ async function streamToString(stream) {
10768
11038
  });
10769
11039
  });
10770
11040
  }
11041
+ function isBlob(value) {
11042
+ var _a;
11043
+ if (value === null || typeof value !== 'object') {
11044
+ return false;
11045
+ }
11046
+ if (typeof Blob !== 'undefined' && value instanceof Blob) {
11047
+ return true;
11048
+ }
11049
+ const obj = value;
11050
+ const hasRequiredProps = typeof obj.size === 'number' && typeof obj.type === 'string' && typeof obj.slice === 'function';
11051
+ if (!hasRequiredProps) {
11052
+ return false;
11053
+ }
11054
+ const hasBlobMethod = typeof obj.stream === 'function' || typeof obj.text === 'function' || typeof obj.arrayBuffer === 'function';
11055
+ if (hasBlobMethod) {
11056
+ return true;
11057
+ }
11058
+ const constructorName = (_a = obj.constructor) === null || _a === void 0 ? void 0 : _a.name;
11059
+ return constructorName === 'Blob' || constructorName === 'File';
11060
+ }
10771
11061
  function truncateData(data, depth = 0) {
10772
11062
  const maxArrayItems = 500;
10773
11063
  const maxObjectKeys = 500;
@@ -10791,6 +11081,9 @@ function truncateData(data, depth = 0) {
10791
11081
  else if (Buffer.isBuffer(data)) {
10792
11082
  return data.toString('utf-8').slice(0, maxStringLength);
10793
11083
  }
11084
+ else if (isBlob(data)) {
11085
+ return `<Blob: size=${data.size}, type=${data.type}>`;
11086
+ }
10794
11087
  else if (typeof data === 'object') {
10795
11088
  const keys = Object.keys(data);
10796
11089
  const result = {};
@@ -11024,6 +11317,7 @@ exports.UsageType = void 0;
11024
11317
  UsageType["EXTERNAL_EVENTS_PULL_DURATION"] = "external-events-pull-duration";
11025
11318
  UsageType["EXTERNAL_EVENT_PULL_NUMBER"] = "external-event-pull-number";
11026
11319
  UsageType["EXTERNAL_EVENT_PULL_LOG_SIZE"] = "external-event-pull-log-size";
11320
+ UsageType["EXTERNAL_EVENT_WEBHOOK_REFRESH_DURATION"] = "external-event-webhook-refresh-duration";
11027
11321
  UsageType["APP_EVENTS_NUMBER"] = "app-events-number";
11028
11322
  UsageType["APP_EVENTS_SIZE"] = "app-events-size";
11029
11323
  UsageType["FILES_UPLOAD_NUMBER"] = "files-upload-number";
@@ -11138,6 +11432,144 @@ function getFlowRunVariableSchema() {
11138
11432
  };
11139
11433
  }
11140
11434
 
11435
+ exports.AlertStatus = void 0;
11436
+ (function (AlertStatus) {
11437
+ AlertStatus["ONGOING"] = "ongoing";
11438
+ AlertStatus["RESOLVED"] = "resolved";
11439
+ })(exports.AlertStatus || (exports.AlertStatus = {}));
11440
+ exports.AlertSeverity = void 0;
11441
+ (function (AlertSeverity) {
11442
+ AlertSeverity["CRITICAL"] = "critical";
11443
+ AlertSeverity["WARNING"] = "warning";
11444
+ })(exports.AlertSeverity || (exports.AlertSeverity = {}));
11445
+ exports.AlertType = void 0;
11446
+ (function (AlertType) {
11447
+ AlertType["fileUploadsMbPerHour"] = "fileUploadsMbPerHour";
11448
+ AlertType["apiRequestsPerSecond"] = "apiRequestsPerSecond";
11449
+ AlertType["apiRequestsPerHour"] = "apiRequestsPerHour";
11450
+ AlertType["webhookRequestsPerSecond"] = "webhookRequestsPerSecond";
11451
+ AlertType["webhookRequestsPerHour"] = "webhookRequestsPerHour";
11452
+ AlertType["workspaceElementCreationsPerSecond"] = "workspaceElementCreationsPerSecond";
11453
+ AlertType["workspaceElementCreationsPerHour"] = "workspaceElementCreationsPerHour";
11454
+ AlertType["externalEventsPerCustomerPerDay"] = "externalEventsPerCustomerPerDay";
11455
+ AlertType["totalUsagePerDay"] = "totalUsagePerDay";
11456
+ AlertType["totalUsagePer30Days"] = "totalUsagePer30Days";
11457
+ AlertType["testAlert"] = "testAlert";
11458
+ })(exports.AlertType || (exports.AlertType = {}));
11459
+ exports.AlertCategory = void 0;
11460
+ (function (AlertCategory) {
11461
+ AlertCategory["RATE_LIMIT"] = "rateLimit";
11462
+ AlertCategory["USAGE"] = "usage";
11463
+ AlertCategory["TEST"] = "test";
11464
+ })(exports.AlertCategory || (exports.AlertCategory = {}));
11465
+ const ALERT_TYPE_CATEGORIES = {
11466
+ [exports.AlertType.fileUploadsMbPerHour]: exports.AlertCategory.RATE_LIMIT,
11467
+ [exports.AlertType.apiRequestsPerSecond]: exports.AlertCategory.RATE_LIMIT,
11468
+ [exports.AlertType.apiRequestsPerHour]: exports.AlertCategory.RATE_LIMIT,
11469
+ [exports.AlertType.webhookRequestsPerSecond]: exports.AlertCategory.RATE_LIMIT,
11470
+ [exports.AlertType.webhookRequestsPerHour]: exports.AlertCategory.RATE_LIMIT,
11471
+ [exports.AlertType.workspaceElementCreationsPerSecond]: exports.AlertCategory.RATE_LIMIT,
11472
+ [exports.AlertType.workspaceElementCreationsPerHour]: exports.AlertCategory.RATE_LIMIT,
11473
+ [exports.AlertType.externalEventsPerCustomerPerDay]: exports.AlertCategory.RATE_LIMIT,
11474
+ [exports.AlertType.totalUsagePerDay]: exports.AlertCategory.USAGE,
11475
+ [exports.AlertType.totalUsagePer30Days]: exports.AlertCategory.USAGE,
11476
+ [exports.AlertType.testAlert]: exports.AlertCategory.TEST,
11477
+ };
11478
+ const AlertSchema = z.z.object({
11479
+ id: z.z.string(),
11480
+ description: z.z.string(),
11481
+ status: z.z.enum(Object.values(exports.AlertStatus)),
11482
+ type: z.z.enum(Object.values(exports.AlertType)),
11483
+ workspaceId: z.z.string(),
11484
+ createdAt: z.z.date(),
11485
+ updatedAt: z.z.date(),
11486
+ lastSeenAt: z.z.date(),
11487
+ resolvedAt: z.z.date().optional(),
11488
+ customerId: z.z.string().optional(),
11489
+ severity: z.z.enum(Object.values(exports.AlertSeverity)),
11490
+ });
11491
+ const ALERT_DELIVERY_METHODS = ['internal', 'webhook', 'email'];
11492
+ const AlertTypeDeliverySettingsSchema = z.z.object({
11493
+ internal: z.z.literal(true),
11494
+ webhook: z.z
11495
+ .object({
11496
+ enabled: z.z.boolean(),
11497
+ })
11498
+ .optional(),
11499
+ email: z.z
11500
+ .object({
11501
+ enabled: z.z.boolean(),
11502
+ })
11503
+ .optional(),
11504
+ });
11505
+ const DEFAULT_ALERT_TYPE_DELIVERY_SETTINGS = {
11506
+ internal: true,
11507
+ webhook: {
11508
+ enabled: false,
11509
+ },
11510
+ email: {
11511
+ enabled: false,
11512
+ },
11513
+ };
11514
+ const AlertDeliverySettingsSchema = z.z.object({
11515
+ alertTypes: z.z.record(z.z.enum(Object.values(exports.AlertType)), AlertTypeDeliverySettingsSchema.optional()).optional(),
11516
+ });
11517
+ const DEFAULT_ALERT_DELIVERY_SETTINGS = {
11518
+ alertTypes: undefined,
11519
+ };
11520
+
11521
+ function isValidAlertType(value) {
11522
+ return Object.values(exports.AlertType).includes(value);
11523
+ }
11524
+ function getAlertTypeDisplayName(alertType) {
11525
+ const names = {
11526
+ [exports.AlertType.fileUploadsMbPerHour]: 'File Uploads MB Per Hour',
11527
+ [exports.AlertType.apiRequestsPerSecond]: 'API Requests Per Second',
11528
+ [exports.AlertType.apiRequestsPerHour]: 'API Requests Per Hour',
11529
+ [exports.AlertType.webhookRequestsPerSecond]: 'Webhook Requests Per Second',
11530
+ [exports.AlertType.webhookRequestsPerHour]: 'Webhook Requests Per Hour',
11531
+ [exports.AlertType.workspaceElementCreationsPerSecond]: 'Workspace Element Creations Per Second',
11532
+ [exports.AlertType.workspaceElementCreationsPerHour]: 'Workspace Element Creations Per Hour',
11533
+ [exports.AlertType.externalEventsPerCustomerPerDay]: 'External Events Per Customer Per Day',
11534
+ [exports.AlertType.totalUsagePerDay]: 'Total Usage Per Day',
11535
+ [exports.AlertType.totalUsagePer30Days]: 'Total Usage Per 30 Days',
11536
+ [exports.AlertType.testAlert]: 'Test Alert',
11537
+ };
11538
+ return names[alertType] || alertType;
11539
+ }
11540
+ function getAlertDeliveryMethodLabel(method) {
11541
+ const labels = {
11542
+ internal: 'Internal Delivery',
11543
+ webhook: 'Webhook Delivery',
11544
+ email: 'Email Delivery',
11545
+ };
11546
+ return labels[method] || method;
11547
+ }
11548
+ function isDeliveryMethodEnabled(settings, method) {
11549
+ var _a;
11550
+ if (method === 'internal') {
11551
+ return true;
11552
+ }
11553
+ if (((_a = settings[method]) !== null && _a !== void 0 ? _a : DEFAULT_ALERT_TYPE_DELIVERY_SETTINGS[method]).enabled) {
11554
+ return true;
11555
+ }
11556
+ return false;
11557
+ }
11558
+ function getAlertCategoryDisplayName(category) {
11559
+ const names = {
11560
+ [exports.AlertCategory.RATE_LIMIT]: 'Rate Limit Alerts',
11561
+ [exports.AlertCategory.USAGE]: 'Usage Alerts',
11562
+ [exports.AlertCategory.TEST]: 'Test',
11563
+ };
11564
+ return names[category] || category;
11565
+ }
11566
+ function getAlertTypesByCategory(category) {
11567
+ return Object.entries(ALERT_TYPE_CATEGORIES)
11568
+ .filter(([, alertCategory]) => alertCategory === category)
11569
+ .map(([alertType]) => alertType)
11570
+ .filter(isValidAlertType);
11571
+ }
11572
+
11141
11573
  exports.WorkspaceType = void 0;
11142
11574
  (function (WorkspaceType) {
11143
11575
  WorkspaceType["PRODUCTION"] = "production";
@@ -11192,6 +11624,7 @@ const WorkspaceLimitsSchema = z.object({
11192
11624
  totalNumberOfConnections: WorkspaceLimit.optional(),
11193
11625
  totalNumberOfWorkspaceElements: WorkspaceLimit.optional(),
11194
11626
  instantTasksQueueSize: WorkspaceLimit.optional(),
11627
+ QueuedTasksQueueSize: WorkspaceLimit.optional(),
11195
11628
  parallelApiRequestsPerCustomer: WorkspaceLimit.optional(),
11196
11629
  parallelBackgroundJobsPerCustomer: WorkspaceLimit.optional(),
11197
11630
  apiRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
@@ -11208,6 +11641,7 @@ const EngineWorkspaceSettingsSchema = z.object({
11208
11641
  enableWebhookLogs: z.boolean().optional(),
11209
11642
  enableActionRunLogs: z.boolean().optional(),
11210
11643
  disableSecretKeyAuth: z.boolean().optional(),
11644
+ useMembraneUniverse: z.boolean().optional(),
11211
11645
  });
11212
11646
  const WorkspacePublicKey = z.object({
11213
11647
  name: z.string(),
@@ -11234,6 +11668,7 @@ const AppSchema = z.object({
11234
11668
  featureFlags: z.array(z.string()).optional(),
11235
11669
  limits: WorkspaceLimitsSchema.optional(),
11236
11670
  settings: EngineWorkspaceSettingsSchema.optional(),
11671
+ alertDeliverySettings: AlertDeliverySettingsSchema.optional(),
11237
11672
  type: z.nativeEnum(exports.WorkspaceType).optional(),
11238
11673
  jwksUri: z.string().nullable().optional(),
11239
11674
  isTrial: z.boolean().optional(),
@@ -11411,13 +11846,14 @@ function buildIntegrationsMap(integrations) {
11411
11846
  return map;
11412
11847
  }
11413
11848
 
11849
+ const IneligibilityReasonSchema = z.z.enum(['disposable', 'blockedDomain', 'notCompanyEmail']);
11414
11850
  const PlatformUserSchema = z.z.object({
11415
11851
  id: z.z.string(),
11416
11852
  email: z.z.string(),
11417
11853
  name: z.z.string(),
11418
11854
  trialRequested: z.z.boolean(),
11419
- introVideoStatus: z.z.string().optional(),
11420
11855
  isEligible: z.z.boolean().optional(),
11856
+ ineligibilityReason: IneligibilityReasonSchema.optional(),
11421
11857
  emailVerified: z.z.boolean().optional(),
11422
11858
  });
11423
11859
  const FullPlatformUser = z.z.object({
@@ -11430,8 +11866,8 @@ const FullPlatformUser = z.z.object({
11430
11866
  isAdmin: z.z.boolean().optional(),
11431
11867
  trialRequested: z.z.boolean(),
11432
11868
  pat: z.z.string().optional(),
11433
- introVideoStatus: z.z.string().optional(),
11434
11869
  isEligible: z.z.boolean().optional(),
11870
+ ineligibilityReason: IneligibilityReasonSchema.optional(),
11435
11871
  emailVerified: z.z.boolean().optional(),
11436
11872
  });
11437
11873
 
@@ -11442,6 +11878,12 @@ exports.OrgLimitsType = void 0;
11442
11878
  OrgLimitsType["LAST_THIRTY_DAY_USAGE"] = "lastThirtyDayUsage";
11443
11879
  OrgLimitsType["MEMBRANE_EXPERT_CREDITS_CAP"] = "membraneExpertCreditsCapPerMonth";
11444
11880
  })(exports.OrgLimitsType || (exports.OrgLimitsType = {}));
11881
+ exports.OrgPlan = void 0;
11882
+ (function (OrgPlan) {
11883
+ OrgPlan["Core"] = "core";
11884
+ OrgPlan["Pro"] = "pro";
11885
+ OrgPlan["Ultimate"] = "ultimate";
11886
+ })(exports.OrgPlan || (exports.OrgPlan = {}));
11445
11887
  exports.OrgUserRole = void 0;
11446
11888
  (function (OrgUserRole) {
11447
11889
  OrgUserRole["Admin"] = "admin";
@@ -11471,6 +11913,7 @@ const OrgSchema = z.z.object({
11471
11913
  id: z.z.string(),
11472
11914
  key: z.z.string(),
11473
11915
  name: z.z.string(),
11916
+ plan: z.z.enum(exports.OrgPlan).optional(),
11474
11917
  createdAt: z.z.coerce.date(),
11475
11918
  updatedAt: z.z.coerce.date(),
11476
11919
  trialEndDate: z.z.string().optional(),
@@ -11483,11 +11926,19 @@ const OrgSchema = z.z.object({
11483
11926
  featureFlags: z.z.array(z.z.string()).optional(),
11484
11927
  freeAiCredits: z.z.number().optional(),
11485
11928
  paidAiCredits: z.z.number().optional(),
11929
+ freeAiMonthlyCredits: z.z.number().nullable().optional(),
11486
11930
  stripeCustomerId: z.z.string().optional(),
11487
11931
  autoChargeEnabled: z.z.boolean().optional(),
11488
11932
  autoChargeThreshold: z.z.number().optional(),
11489
11933
  autoChargePurchaseAmount: z.z.number().optional(),
11490
11934
  autoChargeMonthlyLimit: z.z.number().optional(),
11935
+ freeInfraCredits: z.z.number().optional(),
11936
+ paidInfraCredits: z.z.number().optional(),
11937
+ freeInfraMonthlyCredits: z.z.number().nullable().optional(),
11938
+ infraAutoChargeEnabled: z.z.boolean().optional(),
11939
+ infraAutoChargeThreshold: z.z.number().optional(),
11940
+ infraAutoChargePurchaseAmount: z.z.number().optional(),
11941
+ infraAutoChargeMonthlyLimit: z.z.number().optional(),
11491
11942
  });
11492
11943
  const AccountResponse = z.z.object({
11493
11944
  user: FullPlatformUser.optional(),
@@ -11515,26 +11966,10 @@ exports.WebhookTypeEnum = void 0;
11515
11966
  WebhookTypeEnum["TASK_UPDATED"] = "task-updated";
11516
11967
  WebhookTypeEnum["TASK_ACTIVITY_CREATED"] = "task-activity-created";
11517
11968
  WebhookTypeEnum["CONNECTOR_VERSION_PUBLISHED"] = "connector-version-published";
11969
+ WebhookTypeEnum["AGENT_SESSION_FINISHED"] = "agent-session-finished";
11970
+ WebhookTypeEnum["SEND_ALERT_EMAIL"] = "send-alert-email";
11518
11971
  })(exports.WebhookTypeEnum || (exports.WebhookTypeEnum = {}));
11519
11972
 
11520
- exports.AlertStatus = void 0;
11521
- (function (AlertStatus) {
11522
- AlertStatus["ONGOING"] = "ongoing";
11523
- AlertStatus["RESOLVED"] = "resolved";
11524
- })(exports.AlertStatus || (exports.AlertStatus = {}));
11525
- exports.AlertSeverity = void 0;
11526
- (function (AlertSeverity) {
11527
- AlertSeverity["CRITICAL"] = "critical";
11528
- AlertSeverity["WARNING"] = "warning";
11529
- })(exports.AlertSeverity || (exports.AlertSeverity = {}));
11530
- exports.AlertType = void 0;
11531
- (function (AlertType) {
11532
- AlertType["externalEventsPerCustomerPerDay"] = "externalEventsPerCustomerPerDay";
11533
- AlertType["totalUsagePerDay"] = "totalUsagePerDay";
11534
- AlertType["totalUsagePer30Days"] = "totalUsagePer30Days";
11535
- AlertType["membraneAgentUsagePer30Days"] = "membraneAgentUsagePer30Days";
11536
- })(exports.AlertType || (exports.AlertType = {}));
11537
-
11538
11973
  const IntegrationSpecificElementSelector = z.object({
11539
11974
  id: z.string().optional(),
11540
11975
  key: z.string().optional(),
@@ -12521,7 +12956,7 @@ class ConnectionAccessor {
12521
12956
  dataCollection(key, parameters) {
12522
12957
  return new ConnectionDataCollectionAccessor(this.client, this, key, parameters);
12523
12958
  }
12524
- async reconnect({ parameters, authOptionKey, connectorParameters, } = {}) {
12959
+ async reconnect({ parameters, authOptionKey, connectorParameters, onPopupClosed, } = {}) {
12525
12960
  const connection = await this.get();
12526
12961
  const connectorSpec = await this.client.get(`/integrations/${connection.integrationId}/connector-spec`);
12527
12962
  return createOrUpdateConnection({
@@ -12532,6 +12967,7 @@ class ConnectionAccessor {
12532
12967
  connectorParameters,
12533
12968
  apiUri: this.client.apiUri,
12534
12969
  token: await this.client.getToken(),
12970
+ onPopupClosed,
12535
12971
  });
12536
12972
  }
12537
12973
  async openReconnectUI({} = {}) {
@@ -12620,21 +13056,31 @@ class ConnectionProxy {
12620
13056
  }
12621
13057
  }
12622
13058
  async function createOrUpdateConnection(options) {
12623
- const { connectionId, integrationId, name, parameters, connectorParameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, } = options !== null && options !== void 0 ? options : {};
13059
+ const { connectionId, integrationId, connectorId, connectorVersion, name, parameters, connectorParameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
12624
13060
  const connectionType = getConnectionType({
12625
13061
  connectorSpec,
12626
13062
  authOptionKey,
12627
13063
  redirectUri,
12628
13064
  });
12629
- const popupPath = connectionId
12630
- ? `connection-popup?connectionId=${connectionId}`
12631
- : `connection-popup?integrationId=${integrationId}`;
13065
+ let popupPath;
13066
+ if (connectionId) {
13067
+ popupPath = `connection-popup?connectionId=${connectionId}`;
13068
+ }
13069
+ else if (connectorId) {
13070
+ const versionParam = connectorVersion ? `&connectorVersion=${connectorVersion}` : '';
13071
+ popupPath = `connection-popup?connectorId=${connectorId}${versionParam}`;
13072
+ }
13073
+ else {
13074
+ popupPath = `connection-popup?integrationId=${integrationId}`;
13075
+ }
12632
13076
  return new Promise((resolve, reject) => {
12633
13077
  const requestId = simpleUniqueId() + simpleUniqueId();
12634
13078
  const payload = {
12635
13079
  token,
12636
13080
  connectionParameters: parameters,
12637
13081
  connectorParameters,
13082
+ connectorId,
13083
+ connectorVersion,
12638
13084
  name,
12639
13085
  authOptionKey,
12640
13086
  allowMultipleConnections,
@@ -12680,10 +13126,10 @@ async function createOrUpdateConnection(options) {
12680
13126
  iframeElement.id = targetElementId;
12681
13127
  iframeElement.name = targetElementId;
12682
13128
  iframeElement.style.position = 'absolute';
12683
- iframeElement.style.top = '-100';
12684
- iframeElement.style.left = '-100';
12685
- iframeElement.style.width = '1';
12686
- iframeElement.style.height = '1';
13129
+ iframeElement.style.top = '-100px';
13130
+ iframeElement.style.left = '-100px';
13131
+ iframeElement.style.width = '1px';
13132
+ iframeElement.style.height = '1px';
12687
13133
  iframeElement.style.border = 'none';
12688
13134
  iframeElement.style.backgroundColor = 'transparent';
12689
13135
  document.body.appendChild(iframeElement);
@@ -12717,6 +13163,7 @@ async function createOrUpdateConnection(options) {
12717
13163
  cancelCheckInterval = setInterval(() => {
12718
13164
  if (popup === null || popup === void 0 ? void 0 : popup.closed) {
12719
13165
  cleanup();
13166
+ onPopupClosed === null || onPopupClosed === void 0 ? void 0 : onPopupClosed();
12720
13167
  resolve(null);
12721
13168
  }
12722
13169
  }, 1000);
@@ -12748,6 +13195,9 @@ const createConnectionEventHandler = (requestId, onResolve, onReject, onFinally)
12748
13195
  }
12749
13196
  if (message.type == 'newConnectionFailure') {
12750
13197
  const error = new MembraneError((_a = message.errorData) !== null && _a !== void 0 ? _a : message.error);
13198
+ if (message.connectionId) {
13199
+ error.data.data = { ...error.data.data, connectionId: message.connectionId };
13200
+ }
12751
13201
  onReject(error);
12752
13202
  }
12753
13203
  onFinally();
@@ -12927,7 +13377,7 @@ class IntegrationAccessor extends ElementAccessor {
12927
13377
  });
12928
13378
  });
12929
13379
  }
12930
- async connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, } = {}) {
13380
+ async connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, onPopupClosed, } = {}) {
12931
13381
  const integration = await this.get();
12932
13382
  const connectorSpec = await this.getConnectorSpec();
12933
13383
  return createOrUpdateConnection({
@@ -12941,9 +13391,10 @@ class IntegrationAccessor extends ElementAccessor {
12941
13391
  apiUri: this.client.apiUri,
12942
13392
  token: await this.client.getToken(),
12943
13393
  redirectUri: sameWindow ? redirectUri : undefined,
13394
+ onPopupClosed,
12944
13395
  });
12945
13396
  }
12946
- async createConnection({ parameters, name }) {
13397
+ async createConnection({ parameters, name, }) {
12947
13398
  return this.connect({ parameters, name });
12948
13399
  }
12949
13400
  async getOperations() {
@@ -13265,6 +13716,7 @@ exports.AgentSessionState = void 0;
13265
13716
  })(exports.AgentSessionState || (exports.AgentSessionState = {}));
13266
13717
  const AgentSession = z.z.object({
13267
13718
  id: z.z.string(),
13719
+ workspaceId: z.z.string(),
13268
13720
  userId: z.z.string().optional(),
13269
13721
  workspaceElementType: z.z.enum(exports.WorkspaceElementType),
13270
13722
  workspaceElementId: z.z.string(),
@@ -13279,6 +13731,7 @@ const AgentSession = z.z.object({
13279
13731
  state: z.z.enum(exports.AgentSessionState).default(exports.AgentSessionState.BUSY),
13280
13732
  usage: z.z.number().optional(),
13281
13733
  hasWorker: z.z.boolean(),
13734
+ isExternal: z.z.boolean().optional(),
13282
13735
  createdAt: z.z.iso.datetime(),
13283
13736
  updatedAt: z.z.iso.datetime(),
13284
13737
  });
@@ -13288,6 +13741,7 @@ const CreateAgentSession = z.z.object({
13288
13741
  prompt: z.z.string().min(1),
13289
13742
  testCustomerId: z.z.string().optional(),
13290
13743
  isExternal: z.z.boolean().optional(),
13744
+ modelId: z.z.string().optional(),
13291
13745
  });
13292
13746
  const AgentSessionInputSchema = z.z.object({
13293
13747
  input: z.z.string().min(1),
@@ -13299,6 +13753,8 @@ const PatchAgentSessionSchema = z.z.object({
13299
13753
  title: z.z.string().optional(),
13300
13754
  summary: z.z.string().optional(),
13301
13755
  cost: z.z.number().optional(),
13756
+ error: ErrorDataSchema.optional(),
13757
+ opencodeSessionUuid: z.z.string().optional(),
13302
13758
  status: z.z.enum(exports.AgentSessionStatus).optional(),
13303
13759
  });
13304
13760
 
@@ -13618,6 +14074,7 @@ const membraneConfigSchema = z.z.object({
13618
14074
  apiUri: z.z.string().optional(),
13619
14075
  consoleUri: z.z.string().optional(),
13620
14076
  testCustomerId: z.z.string().optional(),
14077
+ accessToken: z.z.string().optional(),
13621
14078
  });
13622
14079
  class MembraneConfigLoader {
13623
14080
  constructor(cwd = process.cwd()) {
@@ -13725,6 +14182,9 @@ class MembraneConfigLoader {
13725
14182
  throw new Error(`Failed to parse ${CONFIG_FILE_NAME}: ${yamlError.message}`);
13726
14183
  }
13727
14184
  const config = {};
14185
+ if (parsedConfig === null || parsedConfig === void 0 ? void 0 : parsedConfig.accessToken) {
14186
+ config.accessToken = String(parsedConfig.accessToken);
14187
+ }
13728
14188
  if (parsedConfig === null || parsedConfig === void 0 ? void 0 : parsedConfig.workspaceKey) {
13729
14189
  config.workspaceKey = String(parsedConfig.workspaceKey);
13730
14190
  }
@@ -13744,6 +14204,9 @@ class MembraneConfigLoader {
13744
14204
  }
13745
14205
  loadFromEnv() {
13746
14206
  const config = {};
14207
+ if (process.env.MEMBRANE_ACCESS_TOKEN) {
14208
+ config.accessToken = process.env.MEMBRANE_ACCESS_TOKEN;
14209
+ }
13747
14210
  if (process.env.MEMBRANE_WORKSPACE_KEY) {
13748
14211
  config.workspaceKey = process.env.MEMBRANE_WORKSPACE_KEY;
13749
14212
  }
@@ -13785,6 +14248,8 @@ function hasMembraneCredentials(cwd) {
13785
14248
  }
13786
14249
 
13787
14250
  exports.ACTIONS = ACTIONS;
14251
+ exports.ALERT_DELIVERY_METHODS = ALERT_DELIVERY_METHODS;
14252
+ exports.ALERT_TYPE_CATEGORIES = ALERT_TYPE_CATEGORIES;
13788
14253
  exports.AccessDeniedError = AccessDeniedError;
13789
14254
  exports.AccountResponse = AccountResponse;
13790
14255
  exports.ActionAccessor = ActionAccessor;
@@ -13802,6 +14267,9 @@ exports.ActionRunResponse = ActionRunResponse;
13802
14267
  exports.ActionsAccessor = ActionsAccessor;
13803
14268
  exports.AgentSession = AgentSession;
13804
14269
  exports.AgentSessionInputSchema = AgentSessionInputSchema;
14270
+ exports.AlertDeliverySettingsSchema = AlertDeliverySettingsSchema;
14271
+ exports.AlertSchema = AlertSchema;
14272
+ exports.AlertTypeDeliverySettingsSchema = AlertTypeDeliverySettingsSchema;
13805
14273
  exports.ApiRequestSpec = ApiRequestSpec;
13806
14274
  exports.AppDataSchemaAccessor = AppDataSchemaAccessor;
13807
14275
  exports.AppDataSchemaApiResponse = AppDataSchemaApiResponse;
@@ -13913,6 +14381,8 @@ exports.ConnectorDataCollectionEventImplementationType = ConnectorDataCollection
13913
14381
  exports.ConnectorDataCollectionMethodKeys = ConnectorDataCollectionMethodKeys;
13914
14382
  exports.ConnectorDataLocationTypes = ConnectorDataLocationTypes;
13915
14383
  exports.ConnectorEventHandlerMethods = ConnectorEventHandlerMethods;
14384
+ exports.ConnectorExportProperties = ConnectorExportProperties;
14385
+ exports.ConnectorFunctionSpecs = ConnectorFunctionSpecs;
13916
14386
  exports.ConnectorMethodImplementation = ConnectorMethodImplementation;
13917
14387
  exports.ConnectorMethodImplementationBase = ConnectorMethodImplementationBase;
13918
14388
  exports.ConnectorMethodImplementationGraphqlApiMapping = ConnectorMethodImplementationGraphqlApiMapping;
@@ -13953,6 +14423,8 @@ exports.CustomerApiResponse = CustomerApiResponse;
13953
14423
  exports.CustomerSelector = CustomerSelector;
13954
14424
  exports.CustomersAccessor = CustomersAccessor;
13955
14425
  exports.DATA_RECORD_SCHEMA = DATA_RECORD_SCHEMA;
14426
+ exports.DEFAULT_ALERT_DELIVERY_SETTINGS = DEFAULT_ALERT_DELIVERY_SETTINGS;
14427
+ exports.DEFAULT_ALERT_TYPE_DELIVERY_SETTINGS = DEFAULT_ALERT_TYPE_DELIVERY_SETTINGS;
13956
14428
  exports.DEFAULT_FULL_SYNC_INTERVAL_SECONDS = DEFAULT_FULL_SYNC_INTERVAL_SECONDS;
13957
14429
  exports.DEFAULT_PULL_UPDATES_INTERVAL_SECONDS = DEFAULT_PULL_UPDATES_INTERVAL_SECONDS;
13958
14430
  exports.DataCollectionCreateRequest = DataCollectionCreateRequest;
@@ -14107,6 +14579,8 @@ exports.FlowsAccessor = FlowsAccessor;
14107
14579
  exports.Formula = Formula;
14108
14580
  exports.FullPlatformUser = FullPlatformUser;
14109
14581
  exports.FunctionDefinition = FunctionDefinition;
14582
+ exports.GenerateOptionsRequest = GenerateOptionsRequest;
14583
+ exports.GeneratedConnectorOption = GeneratedConnectorOption;
14110
14584
  exports.GenericFunctionDefinition = GenericFunctionDefinition;
14111
14585
  exports.GraphQLApiMappingSchema = GraphQLApiMappingSchema;
14112
14586
  exports.GraphQLFieldMappingSchema = GraphQLFieldMappingSchema;
@@ -14156,6 +14630,7 @@ exports.MembraneAgentKey = MembraneAgentKey;
14156
14630
  exports.MembraneAxiosInstance = axios;
14157
14631
  exports.MembraneClient = MembraneClient;
14158
14632
  exports.MembraneConfigLoader = MembraneConfigLoader;
14633
+ exports.MembraneElementLayer = MembraneElementLayer;
14159
14634
  exports.MembraneError = MembraneError;
14160
14635
  exports.MinimalConnector = MinimalConnector;
14161
14636
  exports.NotAuthenticatedError = NotAuthenticatedError;
@@ -14231,9 +14706,11 @@ exports.WorkspacePublicKey = WorkspacePublicKey;
14231
14706
  exports.WritableConnectorVersionData = WritableConnectorVersionData;
14232
14707
  exports.WritablePackageVersionData = WritablePackageVersionData;
14233
14708
  exports.WriteableConnectorFields = WriteableConnectorFields;
14709
+ exports.WriteableConnectorOption = WriteableConnectorOption;
14234
14710
  exports.__resolveValue = __resolveValue;
14235
14711
  exports.addRequiredFieldsToSchema = addRequiredFieldsToSchema;
14236
14712
  exports.addUdmFallbackFields = addUdmFallbackFields;
14713
+ exports.addUndefinedWriteableProperties = addUndefinedWriteableProperties;
14237
14714
  exports.backwardCompatibleFilterMatch = backwardCompatibleFilterMatch;
14238
14715
  exports.buildData = buildData;
14239
14716
  exports.buildDataSchema = buildDataSchema;
@@ -14263,6 +14740,10 @@ exports.findValueLocators = findValueLocators;
14263
14740
  exports.generateExampleFromSchema = generateExampleFromSchema;
14264
14741
  exports.getActionInstanceVariableSchema = getActionInstanceVariableSchema;
14265
14742
  exports.getActionRunTimeVariablesSchema = getActionRunTimeVariablesSchema;
14743
+ exports.getAlertCategoryDisplayName = getAlertCategoryDisplayName;
14744
+ exports.getAlertDeliveryMethodLabel = getAlertDeliveryMethodLabel;
14745
+ exports.getAlertTypeDisplayName = getAlertTypeDisplayName;
14746
+ exports.getAlertTypesByCategory = getAlertTypesByCategory;
14266
14747
  exports.getAllEventMethodFilePaths = getAllEventMethodFilePaths;
14267
14748
  exports.getBusinessDaysBetween = getBusinessDaysBetween;
14268
14749
  exports.getChildNodeKeys = getChildNodeKeys;
@@ -14271,6 +14752,7 @@ exports.getDataCollectionUpdateFields = getDataCollectionUpdateFields;
14271
14752
  exports.getDataLocationMethodPath = getDataLocationMethodPath;
14272
14753
  exports.getDefaultMembraneConfigLoader = getDefaultMembraneConfigLoader;
14273
14754
  exports.getDownstreamNodeKeys = getDownstreamNodeKeys;
14755
+ exports.getEffectiveConnectorOption = getEffectiveConnectorOption;
14274
14756
  exports.getElementSelector = getElementSelector;
14275
14757
  exports.getErrorFromData = getErrorFromData;
14276
14758
  exports.getEventMethodFileKey = getEventMethodFileKey;
@@ -14311,16 +14793,20 @@ exports.hasCycles = hasCycles;
14311
14793
  exports.hasFormulas_internalDoNotUse = hasFormulas;
14312
14794
  exports.hasMembraneCredentials = hasMembraneCredentials;
14313
14795
  exports.injectFormulaCatalog = injectFormulaCatalog;
14796
+ exports.isBlob = isBlob;
14314
14797
  exports.isBusinessDay = isBusinessDay;
14315
14798
  exports.isDataActionType = isDataActionType;
14316
14799
  exports.isDataLocationMethodSupported = isDataLocationMethodSupported;
14800
+ exports.isDeliveryMethodEnabled = isDeliveryMethodEnabled;
14317
14801
  exports.isFormula_internalDoNotUse = isFormula;
14318
14802
  exports.isMembraneError = isMembraneError;
14319
14803
  exports.isObject = isObject;
14320
14804
  exports.isSameDataLocation = isSameDataLocation;
14321
14805
  exports.isSchemaEmpty = isSchemaEmpty;
14322
14806
  exports.isStream = isStream;
14807
+ exports.isValidAlertType = isValidAlertType;
14323
14808
  exports.isValidLocator = isValidLocator;
14809
+ exports.lenientParseWithSchema = lenientParseWithSchema;
14324
14810
  exports.loadMembraneConfig = loadMembraneConfig;
14325
14811
  exports.locatorToField = locatorToField;
14326
14812
  exports.locatorToSteps = locatorToSteps;
@@ -14352,6 +14838,7 @@ exports.schemaIsNumber = schemaIsNumber;
14352
14838
  exports.schemaIsScalar = schemaIsScalar;
14353
14839
  exports.schemaTypeFromValue = schemaTypeFromValue;
14354
14840
  exports.schemaWithTitle = schemaWithTitle;
14841
+ exports.setEditablePropertiesForWorkspaceElement = setEditablePropertiesForWorkspaceElement;
14355
14842
  exports.setSchemaAtLocator = setSchemaAtLocator;
14356
14843
  exports.setValueAtLocator = setValueAtLocator;
14357
14844
  exports.stepsToLocator = stepsToLocator;