@membranehq/sdk 0.10.10 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/bundle.d.ts +201 -4
  2. package/dist/bundle.js +182 -53
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/accessors/connections-accessors.d.ts +8 -1
  5. package/dist/dts/accessors/integrations-accessors.d.ts +9 -1
  6. package/dist/dts/agent/session.d.ts +5 -0
  7. package/dist/dts/alerts/types.d.ts +18 -0
  8. package/dist/dts/index.browser.d.ts +1 -0
  9. package/dist/dts/orgs/types.d.ts +17 -0
  10. package/dist/dts/stats/index.d.ts +33 -0
  11. package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +18 -0
  12. package/dist/dts/workspace-elements/api/actions-api.d.ts +34 -0
  13. package/dist/dts/workspace-elements/api/app-data-schema-instances-api.d.ts +1 -0
  14. package/dist/dts/workspace-elements/api/app-event-log-records-api.d.ts +1 -0
  15. package/dist/dts/workspace-elements/api/app-event-subscriptions-api.d.ts +1 -0
  16. package/dist/dts/workspace-elements/api/connections-api.d.ts +22 -1
  17. package/dist/dts/workspace-elements/api/customers-api.d.ts +1 -0
  18. package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +7 -0
  19. package/dist/dts/workspace-elements/api/data-source-instances-api.d.ts +8 -0
  20. package/dist/dts/workspace-elements/api/data-sources-api.d.ts +14 -0
  21. package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +7 -0
  22. package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +7 -0
  23. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +7 -0
  24. package/dist/dts/workspace-elements/api/external-events-api.d.ts +4 -0
  25. package/dist/dts/workspace-elements/api/field-mapping-instances-api.d.ts +16 -0
  26. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +14 -0
  27. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +14 -0
  28. package/dist/dts/workspace-elements/api/flows-api.d.ts +38 -0
  29. package/dist/dts/workspace-elements/api/integrations-api.d.ts +16 -3
  30. package/dist/dts/workspace-elements/api/packages-api.d.ts +10 -0
  31. package/dist/dts/workspace-elements/base/action-instances/types.d.ts +1 -0
  32. package/dist/dts/workspace-elements/base/actions/index.d.ts +3 -0
  33. package/dist/dts/workspace-elements/base/connections/types.d.ts +2 -0
  34. package/dist/dts/workspace-elements/base/customers/index.d.ts +1 -0
  35. package/dist/dts/workspace-elements/base/data-sources/index.d.ts +3 -0
  36. package/dist/dts/workspace-elements/base/external-apps/index.d.ts +1 -0
  37. package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +2 -0
  38. package/dist/dts/workspace-elements/base/flows/index.d.ts +2 -0
  39. package/dist/dts/workspace-elements/base/integrations/index.d.ts +28 -2
  40. package/dist/dts/workspace-elements/base/packages/index.d.ts +2 -0
  41. package/dist/dts/workspace-elements/filter-meta.d.ts +9 -0
  42. package/dist/dts/workspace-elements/index.d.ts +1 -0
  43. package/dist/dts/workspace-elements/types.d.ts +4 -0
  44. package/dist/dts/workspaces/types.d.ts +276 -34
  45. package/dist/index.browser.d.mts +665 -41
  46. package/dist/index.browser.d.ts +665 -41
  47. package/dist/index.browser.js +202 -24
  48. package/dist/index.browser.js.map +1 -1
  49. package/dist/index.browser.mjs +191 -25
  50. package/dist/index.browser.mjs.map +1 -1
  51. package/dist/index.node.d.mts +665 -41
  52. package/dist/index.node.d.ts +665 -41
  53. package/dist/index.node.js +202 -24
  54. package/dist/index.node.js.map +1 -1
  55. package/dist/index.node.mjs +191 -25
  56. package/dist/index.node.mjs.map +1 -1
  57. package/package.json +2 -2
@@ -3543,6 +3543,7 @@ const BaseIntegrationLevelMembraneInterfaceEditableProperties = BaseMembraneInte
3543
3543
  parentUuid: z.z.string().optional(),
3544
3544
  connectionId: z.z.string().optional(),
3545
3545
  instanceKey: z.z.string().optional(),
3546
+ isUniversal: z.z.boolean().optional(),
3546
3547
  });
3547
3548
  const BaseIntegrationLevelMembraneInterfaceReadOnlyProperties = BaseMembraneInterfaceReadOnlyProperties.extend({
3548
3549
  isCustomized: z.z.boolean().optional(),
@@ -3554,16 +3555,67 @@ const BaseIntegrationLevelMembraneInterfaceExportProperties = BaseMembraneInterf
3554
3555
  });
3555
3556
  const MembraneElementLayer = z.z.enum(['universal', 'integration', 'connection']);
3556
3557
  const IntegrationLevelMembraneInterfaceSelectorQuery = z.z.object({
3557
- layer: MembraneElementLayer.optional(),
3558
- integrationKey: z.z.string().optional(),
3559
- integrationId: z.z.string().optional(),
3560
- connectionId: z.z.string().optional(),
3561
- instanceKey: z.z.string().optional(),
3558
+ layer: MembraneElementLayer.optional().meta({
3559
+ filterTitle: 'Layer',
3560
+ }),
3561
+ integrationKey: z.z
3562
+ .string()
3563
+ .optional()
3564
+ .meta({
3565
+ hidden: true,
3566
+ }),
3567
+ integrationId: z.z
3568
+ .string()
3569
+ .optional()
3570
+ .meta({
3571
+ filterTitle: 'Integration',
3572
+ referenceElementType: exports.WorkspaceElementType.Integration,
3573
+ }),
3574
+ connectionId: z.z
3575
+ .string()
3576
+ .optional()
3577
+ .meta({
3578
+ filterTitle: 'Connection',
3579
+ referenceElementType: exports.WorkspaceElementType.Connection,
3580
+ }),
3581
+ instanceKey: z.z
3582
+ .string()
3583
+ .optional()
3584
+ .meta({
3585
+ filterTitle: 'Instance Key',
3586
+ }),
3562
3587
  });
3563
3588
  const FindIntegrationLevelMembraneInterfaceQuery = IntegrationLevelMembraneInterfaceSelectorQuery.extend(CommonListElementsQuery.shape).extend({
3564
- parentId: z.z.string().optional(),
3565
- universalParentId: z.z.string().optional(),
3566
- userId: z.z.string().optional(),
3589
+ parentId: z.z
3590
+ .string()
3591
+ .optional()
3592
+ .meta({
3593
+ filterTitle: 'Parent',
3594
+ referenceElementType: 'self',
3595
+ }),
3596
+ universalParentId: z.z
3597
+ .string()
3598
+ .optional()
3599
+ .meta({
3600
+ filterTitle: 'Universal Parent',
3601
+ referenceElementType: 'self',
3602
+ }),
3603
+ tenantId: z.z
3604
+ .string()
3605
+ .optional()
3606
+ .meta({
3607
+ filterTitle: 'Customer',
3608
+ referenceElementType: exports.WorkspaceElementType.Customer,
3609
+ }),
3610
+ userId: z.z.string().optional().meta({
3611
+ hidden: true,
3612
+ }),
3613
+ isUniversal: zodBooleanCoercion()
3614
+ .optional()
3615
+ .meta({
3616
+ filterTitle: 'Is Universal',
3617
+ isFlag: true,
3618
+ }),
3567
3619
  });
3568
3620
  const BaseIntegrationLevelMembraneInterface = BaseMembraneInterface.merge(BaseIntegrationLevelMembraneInterfaceEditableProperties).merge(BaseIntegrationLevelMembraneInterfaceReadOnlyProperties);
3569
3621
  const WorkspaceElementSearchQuery = z.z.object({
@@ -3806,6 +3858,8 @@ const BaseConnection = BaseWorkspaceElement.extend({
3806
3858
  nextCredentialsRefreshAt: z.z.string().optional(),
3807
3859
  nextRetryTimestamp: z.z.string().optional(),
3808
3860
  retryAttempts: z.z.number().optional(),
3861
+ canTest: z.z.boolean().optional(),
3862
+ canRefreshCredentials: z.z.boolean().optional(),
3809
3863
  archivedAt: z.z.string().optional(),
3810
3864
  isDeactivated: z.z.boolean().optional(),
3811
3865
  meta: z.z.record(z.z.string(), z.z.any()).optional(),
@@ -3914,11 +3968,12 @@ function getAuthSpec(spec, authOptionKey) {
3914
3968
  const getDefaultAuthInputSchema = (args) => {
3915
3969
  var _a, _b, _c, _d, _e, _f;
3916
3970
  const authSpec = getAuthSpec(args.connectorSpec, args.authOptionKey);
3971
+ 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;
3917
3972
  return {
3918
3973
  type: 'object',
3919
3974
  properties: {
3920
- connectorParameters: (_b = (_a = args.connectorSpec) === null || _a === void 0 ? void 0 : _a.parametersSchema) !== null && _b !== void 0 ? _b : {},
3921
- connectionParameters: (_d = (_c = authSpec === null || authSpec === void 0 ? void 0 : authSpec.ui) === null || _c === void 0 ? void 0 : _c.schema) !== null && _d !== void 0 ? _d : (_f = (_e = args.connectorSpec) === null || _e === void 0 ? void 0 : _e.ui) === null || _f === void 0 ? void 0 : _f.schema,
3975
+ connectorParameters: (_f = (_e = args.connectorSpec) === null || _e === void 0 ? void 0 : _e.parametersSchema) !== null && _f !== void 0 ? _f : {},
3976
+ connectionInput: inputSchema,
3922
3977
  },
3923
3978
  };
3924
3979
  };
@@ -4252,12 +4307,12 @@ function getEffectiveConnectorOption(connector, optionKey) {
4252
4307
  }
4253
4308
  const getDefaultInputSchema = (authConfig) => {
4254
4309
  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;
4310
+ 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;
4256
4311
  return {
4257
4312
  type: 'object',
4258
4313
  properties: {
4259
4314
  connectorParameters: (_c = authConfig === null || authConfig === void 0 ? void 0 : authConfig.parametersSchema) !== null && _c !== void 0 ? _c : {},
4260
- ...(connectionParameters && { connectionParameters }),
4315
+ ...(inputSchema && { connectionInput: inputSchema }),
4261
4316
  },
4262
4317
  };
4263
4318
  };
@@ -9499,6 +9554,11 @@ const FlowReadOnlyProperties = BaseIntegrationLevelMembraneInterfaceReadOnlyProp
9499
9554
  });
9500
9555
  const BaseFlow = BaseMembraneInterface.merge(FlowEditableProperties).merge(FlowReadOnlyProperties);
9501
9556
 
9557
+ const IntegrationOptionConfig = z.z.object({
9558
+ disabled: z.z.boolean().optional(),
9559
+ parameters: z.z.record(z.z.string(), z.z.any()).optional(),
9560
+ });
9561
+ const IntegrationOptions = z.z.record(z.z.string(), IntegrationOptionConfig);
9502
9562
  const BaseIntegration = BaseMembraneInterface.extend({
9503
9563
  logoUri: z.z.string(),
9504
9564
  connectorId: z.z.string().optional(),
@@ -9520,9 +9580,9 @@ const BaseIntegration = BaseMembraneInterface.extend({
9520
9580
  appUuid: z.z.string().optional(),
9521
9581
  isDeactivated: z.z.boolean().optional(),
9522
9582
  authType: z.z.enum(CONNECTOR_AUTH_TYPES).optional(),
9583
+ optionsConfig: IntegrationOptions.optional(),
9523
9584
  });
9524
9585
  const IntegrationEditableProperties = BaseMembraneInterfaceEditableProperties.extend({
9525
- baseUri: z.z.string().optional(),
9526
9586
  logoUri: z.z.string().optional(),
9527
9587
  appUuid: z.z.string().optional(),
9528
9588
  oAuthCallbackUri: z.z.url().or(z.z.literal('')).optional(),
@@ -9530,6 +9590,8 @@ const IntegrationEditableProperties = BaseMembraneInterfaceEditableProperties.ex
9530
9590
  connectorVersion: z.z.string().optional(),
9531
9591
  connectorId: z.z.string().optional(),
9532
9592
  connectorUuid: z.z.string().optional(),
9593
+ parameters: z.z.record(z.z.string(), z.z.any()).optional(),
9594
+ optionsConfig: IntegrationOptions.optional(),
9533
9595
  });
9534
9596
  const IntegrationExportProperties = IntegrationEditableProperties.extend({
9535
9597
  connectorUuid: z.z.string().optional(),
@@ -9613,6 +9675,7 @@ const BaseCustomer = z.z.object({
9613
9675
  lastActiveAt: z.z.string().optional(),
9614
9676
  isTest: z.z.boolean().optional(),
9615
9677
  isBillable: z.z.boolean().optional(),
9678
+ isActive: z.z.boolean().optional(),
9616
9679
  createdAt: z.z.string().optional(),
9617
9680
  archivedAt: z.z.string().optional(),
9618
9681
  });
@@ -9972,7 +10035,13 @@ const ActionApiResponse = BaseAction.extend({
9972
10035
  dependencies: z.z.array(z.z.any()).optional(),
9973
10036
  });
9974
10037
  const FindActionsQuery = FindIntegrationLevelMembraneInterfaceQuery.extend({
9975
- externalAppId: z.z.string().optional(),
10038
+ externalAppId: z.z
10039
+ .string()
10040
+ .optional()
10041
+ .meta({
10042
+ filterTitle: 'External App',
10043
+ referenceElementType: exports.WorkspaceElementType.App,
10044
+ }),
9976
10045
  });
9977
10046
  const CreateActionRequest = ActionEditableProperties;
9978
10047
  const UpdateActionRequest = CreateActionRequest.partial();
@@ -10043,7 +10112,7 @@ const ConnectionApiResponse = BaseConnection.extend({
10043
10112
  });
10044
10113
  const ConnectionApiResponseWithSecrets = ConnectionApiResponse.extend({
10045
10114
  credentials: z.z.unknown().optional(),
10046
- parameters: z.z.unknown().optional(),
10115
+ input: z.z.unknown().optional(),
10047
10116
  connectorParameters: z.z.unknown().optional(),
10048
10117
  });
10049
10118
  const ConnectionMessagePayload = z.z.discriminatedUnion('type', [
@@ -10270,7 +10339,6 @@ const IntegrationApiResponse = BaseIntegration.extend({
10270
10339
  .array(IntegrationAuthOption)
10271
10340
  .optional()
10272
10341
  .describe('[INTERNAL] Deprecated: Use POST /connectors/:id/generate-options instead'),
10273
- parametersSchema: DataSchema.optional(),
10274
10342
  });
10275
10343
 
10276
10344
  const PackageElementApi = z.z.object({
@@ -10711,6 +10779,14 @@ function setEditablePropertiesForWorkspaceElement(currentElement, newEditableFie
10711
10779
  };
10712
10780
  }
10713
10781
 
10782
+ const REFERENCE_ELEMENT_TYPE_SELF = 'self';
10783
+ function getFilterFieldMeta(meta) {
10784
+ if (meta && typeof meta === 'object' && !Array.isArray(meta)) {
10785
+ return meta;
10786
+ }
10787
+ return undefined;
10788
+ }
10789
+
10714
10790
  const WorkspaceElementSpecs = {
10715
10791
  [exports.WorkspaceElementType.Customer]: {
10716
10792
  type: exports.WorkspaceElementType.Customer,
@@ -11282,6 +11358,27 @@ function getBusinessDaysBetween(startDate, endDate) {
11282
11358
  return businessDays;
11283
11359
  }
11284
11360
 
11361
+ const StatsFilterQuery = z.z.object({
11362
+ tenantId: z.z.string().optional(),
11363
+ integrationId: z.z.string().optional(),
11364
+ connectionId: z.z.string().optional(),
11365
+ });
11366
+ const ActivityStatsQuery = StatsFilterQuery.extend({
11367
+ startDatetime: z.z.string().datetime({ offset: true }),
11368
+ });
11369
+ const IntegrationLayerStatsQuery = StatsFilterQuery;
11370
+ const ActionRunsStatsQuery = z.z.object({
11371
+ actionId: z.z.string().optional(),
11372
+ actionInstanceId: z.z.string().optional(),
11373
+ startDatetime: z.z.string().datetime({ offset: true }),
11374
+ });
11375
+ const FlowRunsStatsQuery = z.z.object({
11376
+ flowId: z.z.string().optional(),
11377
+ flowInstanceId: z.z.string().optional(),
11378
+ universalFlowId: z.z.string().optional(),
11379
+ startDatetime: z.z.string().datetime({ offset: true }),
11380
+ });
11381
+
11285
11382
  exports.IntegrationElementLevel = void 0;
11286
11383
  (function (IntegrationElementLevel) {
11287
11384
  IntegrationElementLevel["UNIVERSAL"] = "universal";
@@ -11452,6 +11549,10 @@ exports.AlertType = void 0;
11452
11549
  AlertType["workspaceElementCreationsPerSecond"] = "workspaceElementCreationsPerSecond";
11453
11550
  AlertType["workspaceElementCreationsPerHour"] = "workspaceElementCreationsPerHour";
11454
11551
  AlertType["externalEventsPerCustomerPerDay"] = "externalEventsPerCustomerPerDay";
11552
+ AlertType["apiRequestsPerCustomerPerSecond"] = "apiRequestsPerCustomerPerSecond";
11553
+ AlertType["apiRequestsPerCustomerPerHour"] = "apiRequestsPerCustomerPerHour";
11554
+ AlertType["webhookRequestsPerCustomerPerSecond"] = "webhookRequestsPerCustomerPerSecond";
11555
+ AlertType["webhookRequestsPerCustomerPerHour"] = "webhookRequestsPerCustomerPerHour";
11455
11556
  AlertType["totalUsagePerDay"] = "totalUsagePerDay";
11456
11557
  AlertType["totalUsagePer30Days"] = "totalUsagePer30Days";
11457
11558
  AlertType["testAlert"] = "testAlert";
@@ -11459,6 +11560,7 @@ exports.AlertType = void 0;
11459
11560
  exports.AlertCategory = void 0;
11460
11561
  (function (AlertCategory) {
11461
11562
  AlertCategory["RATE_LIMIT"] = "rateLimit";
11563
+ AlertCategory["CUSTOMER_RATE_LIMIT"] = "customerRateLimit";
11462
11564
  AlertCategory["USAGE"] = "usage";
11463
11565
  AlertCategory["TEST"] = "test";
11464
11566
  })(exports.AlertCategory || (exports.AlertCategory = {}));
@@ -11471,6 +11573,10 @@ const ALERT_TYPE_CATEGORIES = {
11471
11573
  [exports.AlertType.workspaceElementCreationsPerSecond]: exports.AlertCategory.RATE_LIMIT,
11472
11574
  [exports.AlertType.workspaceElementCreationsPerHour]: exports.AlertCategory.RATE_LIMIT,
11473
11575
  [exports.AlertType.externalEventsPerCustomerPerDay]: exports.AlertCategory.RATE_LIMIT,
11576
+ [exports.AlertType.apiRequestsPerCustomerPerSecond]: exports.AlertCategory.CUSTOMER_RATE_LIMIT,
11577
+ [exports.AlertType.apiRequestsPerCustomerPerHour]: exports.AlertCategory.CUSTOMER_RATE_LIMIT,
11578
+ [exports.AlertType.webhookRequestsPerCustomerPerSecond]: exports.AlertCategory.CUSTOMER_RATE_LIMIT,
11579
+ [exports.AlertType.webhookRequestsPerCustomerPerHour]: exports.AlertCategory.CUSTOMER_RATE_LIMIT,
11474
11580
  [exports.AlertType.totalUsagePerDay]: exports.AlertCategory.USAGE,
11475
11581
  [exports.AlertType.totalUsagePer30Days]: exports.AlertCategory.USAGE,
11476
11582
  [exports.AlertType.testAlert]: exports.AlertCategory.TEST,
@@ -11531,6 +11637,10 @@ function getAlertTypeDisplayName(alertType) {
11531
11637
  [exports.AlertType.workspaceElementCreationsPerSecond]: 'Workspace Element Creations Per Second',
11532
11638
  [exports.AlertType.workspaceElementCreationsPerHour]: 'Workspace Element Creations Per Hour',
11533
11639
  [exports.AlertType.externalEventsPerCustomerPerDay]: 'External Events Per Customer Per Day',
11640
+ [exports.AlertType.apiRequestsPerCustomerPerSecond]: 'API Requests Per Customer Per Second',
11641
+ [exports.AlertType.apiRequestsPerCustomerPerHour]: 'API Requests Per Customer Per Hour',
11642
+ [exports.AlertType.webhookRequestsPerCustomerPerSecond]: 'Webhook Requests Per Customer Per Second',
11643
+ [exports.AlertType.webhookRequestsPerCustomerPerHour]: 'Webhook Requests Per Customer Per Hour',
11534
11644
  [exports.AlertType.totalUsagePerDay]: 'Total Usage Per Day',
11535
11645
  [exports.AlertType.totalUsagePer30Days]: 'Total Usage Per 30 Days',
11536
11646
  [exports.AlertType.testAlert]: 'Test Alert',
@@ -11558,6 +11668,7 @@ function isDeliveryMethodEnabled(settings, method) {
11558
11668
  function getAlertCategoryDisplayName(category) {
11559
11669
  const names = {
11560
11670
  [exports.AlertCategory.RATE_LIMIT]: 'Rate Limit Alerts',
11671
+ [exports.AlertCategory.CUSTOMER_RATE_LIMIT]: 'Customer Rate Limit Alerts',
11561
11672
  [exports.AlertCategory.USAGE]: 'Usage Alerts',
11562
11673
  [exports.AlertCategory.TEST]: 'Test',
11563
11674
  };
@@ -11588,6 +11699,49 @@ exports.WorkspaceNotificationType = void 0;
11588
11699
  WorkspaceNotificationType["CopilotActivity"] = "copilot-activity";
11589
11700
  WorkspaceNotificationType["LocalClientUpdate"] = "local-client-update";
11590
11701
  })(exports.WorkspaceNotificationType || (exports.WorkspaceNotificationType = {}));
11702
+ exports.ParallelExecutionLimits = void 0;
11703
+ (function (ParallelExecutionLimits) {
11704
+ ParallelExecutionLimits["ParallelEventPulls"] = "parallelEventPulls";
11705
+ ParallelExecutionLimits["ParallelIncrementalEventPullsPerConnection"] = "parallelIncrementalEventPullsPerConnection";
11706
+ ParallelExecutionLimits["ParallelFullSyncEventPullsPerConnection"] = "parallelFullSyncEventPullsPerConnection";
11707
+ ParallelExecutionLimits["ParallelFlowRuns"] = "parallelFlowRuns";
11708
+ ParallelExecutionLimits["ParallelFlowRunsPerConnection"] = "parallelFlowRunsPerConnection";
11709
+ ParallelExecutionLimits["ParallelApiRequests"] = "parallelApiRequests";
11710
+ ParallelExecutionLimits["ParallelSseRequests"] = "parallelSseRequests";
11711
+ ParallelExecutionLimits["ParallelBackgroundJobs"] = "parallelBackgroundJobs";
11712
+ ParallelExecutionLimits["ParallelEventLogs"] = "parallelEventLogs";
11713
+ ParallelExecutionLimits["ParallelEventLogsPerConnection"] = "parallelEventLogsPerConnection";
11714
+ ParallelExecutionLimits["ParallelPathfinderAgentSessions"] = "parallelPathfinderAgentSessions";
11715
+ ParallelExecutionLimits["ParallelInstantTasksActiveJobs"] = "parallelInstantTasksActiveJobs";
11716
+ })(exports.ParallelExecutionLimits || (exports.ParallelExecutionLimits = {}));
11717
+ exports.RateLimits = void 0;
11718
+ (function (RateLimits) {
11719
+ RateLimits["fileUploadsMbPerHour"] = "fileUploadsMbPerHour";
11720
+ RateLimits["ApiRequestsPerSecond"] = "apiRequestsPerSecond";
11721
+ RateLimits["ApiRequestsPerHour"] = "apiRequestsPerHour";
11722
+ RateLimits["WebhookRequestsPerSecond"] = "webhookRequestsPerSecond";
11723
+ RateLimits["WebhookRequestsPerHour"] = "webhookRequestsPerHour";
11724
+ RateLimits["WorkspaceElementCreationsPerSecond"] = "workspaceElementCreationsPerSecond";
11725
+ RateLimits["WorkspaceElementCreationsPerHour"] = "workspaceElementCreationsPerHour";
11726
+ RateLimits["ExternalEventsPerCustomerPerDay"] = "externalEventsPerCustomerPerDay";
11727
+ })(exports.RateLimits || (exports.RateLimits = {}));
11728
+ exports.WorkspaceSizeLimits = void 0;
11729
+ (function (WorkspaceSizeLimits) {
11730
+ WorkspaceSizeLimits["TotalNumberOfCustomers"] = "totalNumberOfCustomers";
11731
+ WorkspaceSizeLimits["TotalNumberOfConnections"] = "totalNumberOfConnections";
11732
+ WorkspaceSizeLimits["TotalNumberOfWorkspaceElements"] = "totalNumberOfWorkspaceElements";
11733
+ WorkspaceSizeLimits["InstantTasksQueueSize"] = "instantTasksQueueSize";
11734
+ WorkspaceSizeLimits["QueuedTasksQueueSize"] = "queuedTasksQueueSize";
11735
+ })(exports.WorkspaceSizeLimits || (exports.WorkspaceSizeLimits = {}));
11736
+ exports.CustomerLimits = void 0;
11737
+ (function (CustomerLimits) {
11738
+ CustomerLimits["ParallelApiRequestsPerCustomer"] = "parallelApiRequestsPerCustomer";
11739
+ CustomerLimits["ParallelBackgroundJobsPerCustomer"] = "parallelBackgroundJobsPerCustomer";
11740
+ CustomerLimits["ApiRequestsPerCustomerPerSecond"] = "apiRequestsPerCustomerPerSecond";
11741
+ CustomerLimits["ApiRequestsPerCustomerPerHour"] = "apiRequestsPerCustomerPerHour";
11742
+ CustomerLimits["WebhookRequestsPerCustomerPerSecond"] = "webhookRequestsPerCustomerPerSecond";
11743
+ CustomerLimits["WebhookRequestsPerCustomerPerHour"] = "webhookRequestsPerCustomerPerHour";
11744
+ })(exports.CustomerLimits || (exports.CustomerLimits = {}));
11591
11745
  exports.LimitUnits = void 0;
11592
11746
  (function (LimitUnits) {
11593
11747
  LimitUnits["Number"] = "number";
@@ -11611,6 +11765,7 @@ const WorkspaceLimitsSchema = z.object({
11611
11765
  parallelEventLogs: WorkspaceLimit.optional(),
11612
11766
  parallelEventLogsPerConnection: WorkspaceLimit.optional(),
11613
11767
  parallelInstantTasksActiveJobs: WorkspaceLimit.optional(),
11768
+ parallelPathfinderAgentSessions: WorkspaceLimit.optional(),
11614
11769
  ParallelWriteDatabaseRequests: WorkspaceLimit.optional(),
11615
11770
  fileUploadsMbPerHour: WorkspaceLimit.optional(),
11616
11771
  apiRequestsPerSecond: WorkspaceLimit.optional(),
@@ -11636,18 +11791,19 @@ const WorkspaceLimitsSchema = z.object({
11636
11791
  updateDatabaseRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
11637
11792
  parallelWriteDatabaseRequestsPerCustomer: WorkspaceLimit.optional(),
11638
11793
  });
11639
- const EngineWorkspaceSettingsSchema = z.object({
11794
+ const WorkspaceSettingsSchema = z.object({
11640
11795
  enableApiLogs: z.boolean().optional(),
11641
11796
  enableWebhookLogs: z.boolean().optional(),
11642
11797
  enableActionRunLogs: z.boolean().optional(),
11643
11798
  disableSecretKeyAuth: z.boolean().optional(),
11644
11799
  useMembraneUniverse: z.boolean().optional(),
11645
11800
  });
11801
+ const EngineWorkspaceSettingsSchema = WorkspaceSettingsSchema;
11646
11802
  const WorkspacePublicKey = z.object({
11647
11803
  name: z.string(),
11648
11804
  publicKey: z.string(),
11649
11805
  });
11650
- const AppSchema = z.object({
11806
+ const Workspace = z.object({
11651
11807
  id: z.string(),
11652
11808
  key: z.string(),
11653
11809
  logoUri: z.string().optional(),
@@ -11667,7 +11823,7 @@ const AppSchema = z.object({
11667
11823
  connectorRevision: z.string().optional(),
11668
11824
  featureFlags: z.array(z.string()).optional(),
11669
11825
  limits: WorkspaceLimitsSchema.optional(),
11670
- settings: EngineWorkspaceSettingsSchema.optional(),
11826
+ settings: WorkspaceSettingsSchema.optional(),
11671
11827
  alertDeliverySettings: AlertDeliverySettingsSchema.optional(),
11672
11828
  type: z.nativeEnum(exports.WorkspaceType).optional(),
11673
11829
  jwksUri: z.string().nullable().optional(),
@@ -11675,7 +11831,9 @@ const AppSchema = z.object({
11675
11831
  isThrottled: z.boolean().optional(),
11676
11832
  isDisabled: z.boolean().optional(),
11677
11833
  isBackgroundJobsDisabled: z.boolean().optional(),
11834
+ lastExternalApiRequestDate: z.string().nullable().optional(),
11678
11835
  });
11836
+ const AppSchema = Workspace;
11679
11837
 
11680
11838
  const PARALLEL_EXECUTION_LIMITS = [
11681
11839
  'parallelEventPulls',
@@ -11909,6 +12067,7 @@ const MembraneAgentKey = z.z
11909
12067
  expiresAt: z.z.string().optional(),
11910
12068
  })
11911
12069
  .optional();
12070
+ const OrgFeatureFlagsSchema = z.z.record(z.z.string(), z.z.boolean());
11912
12071
  const OrgSchema = z.z.object({
11913
12072
  id: z.z.string(),
11914
12073
  key: z.z.string(),
@@ -11939,6 +12098,7 @@ const OrgSchema = z.z.object({
11939
12098
  infraAutoChargeThreshold: z.z.number().optional(),
11940
12099
  infraAutoChargePurchaseAmount: z.z.number().optional(),
11941
12100
  infraAutoChargeMonthlyLimit: z.z.number().optional(),
12101
+ effectiveFeatureFlags: OrgFeatureFlagsSchema.optional(),
11942
12102
  });
11943
12103
  const AccountResponse = z.z.object({
11944
12104
  user: FullPlatformUser.optional(),
@@ -12962,7 +13122,7 @@ class ConnectionAccessor {
12962
13122
  return createOrUpdateConnection({
12963
13123
  connectionId: connection.id,
12964
13124
  connectorSpec,
12965
- parameters,
13125
+ input: parameters,
12966
13126
  authOptionKey,
12967
13127
  connectorParameters,
12968
13128
  apiUri: this.client.apiUri,
@@ -13056,7 +13216,7 @@ class ConnectionProxy {
13056
13216
  }
13057
13217
  }
13058
13218
  async function createOrUpdateConnection(options) {
13059
- const { connectionId, integrationId, connectorId, connectorVersion, name, parameters, connectorParameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
13219
+ const { connectionId, integrationId, connectorId, connectorVersion, name, input, connectorParameters, allowMultipleConnections, authOptionKey, connectorSpec, apiUri, token, redirectUri, onPopupClosed, } = options !== null && options !== void 0 ? options : {};
13060
13220
  const connectionType = getConnectionType({
13061
13221
  connectorSpec,
13062
13222
  authOptionKey,
@@ -13077,7 +13237,7 @@ async function createOrUpdateConnection(options) {
13077
13237
  const requestId = simpleUniqueId() + simpleUniqueId();
13078
13238
  const payload = {
13079
13239
  token,
13080
- connectionParameters: parameters,
13240
+ input,
13081
13241
  connectorParameters,
13082
13242
  connectorId,
13083
13243
  connectorVersion,
@@ -13377,14 +13537,14 @@ class IntegrationAccessor extends ElementAccessor {
13377
13537
  });
13378
13538
  });
13379
13539
  }
13380
- async connect({ name, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, onPopupClosed, } = {}) {
13540
+ async connect({ name, input, parameters, connectorParameters, authOptionKey, allowMultipleConnections, redirectUri, sameWindow, onPopupClosed, } = {}) {
13381
13541
  const integration = await this.get();
13382
13542
  const connectorSpec = await this.getConnectorSpec();
13383
13543
  return createOrUpdateConnection({
13384
13544
  integrationId: integration.id,
13385
13545
  connectorSpec,
13386
13546
  name,
13387
- parameters,
13547
+ input: input !== null && input !== void 0 ? input : parameters,
13388
13548
  connectorParameters,
13389
13549
  authOptionKey,
13390
13550
  allowMultipleConnections,
@@ -13714,6 +13874,11 @@ exports.AgentSessionState = void 0;
13714
13874
  AgentSessionState["BUSY"] = "busy";
13715
13875
  AgentSessionState["IDLE"] = "idle";
13716
13876
  })(exports.AgentSessionState || (exports.AgentSessionState = {}));
13877
+ exports.AgentName = void 0;
13878
+ (function (AgentName) {
13879
+ AgentName["MEMBRANE"] = "membrane";
13880
+ AgentName["SELF_INTEGRATING"] = "self-integrating";
13881
+ })(exports.AgentName || (exports.AgentName = {}));
13717
13882
  const AgentSession = z.z.object({
13718
13883
  id: z.z.string(),
13719
13884
  workspaceId: z.z.string(),
@@ -13732,6 +13897,7 @@ const AgentSession = z.z.object({
13732
13897
  usage: z.z.number().optional(),
13733
13898
  hasWorker: z.z.boolean(),
13734
13899
  isExternal: z.z.boolean().optional(),
13900
+ agentName: z.z.enum(exports.AgentName).optional(),
13735
13901
  createdAt: z.z.iso.datetime(),
13736
13902
  updatedAt: z.z.iso.datetime(),
13737
13903
  });
@@ -14264,7 +14430,9 @@ exports.ActionInstancesAccessor = ActionInstancesAccessor;
14264
14430
  exports.ActionRunError = ActionRunError;
14265
14431
  exports.ActionRunLogRecordApiResponse = ActionRunLogRecordApiResponse;
14266
14432
  exports.ActionRunResponse = ActionRunResponse;
14433
+ exports.ActionRunsStatsQuery = ActionRunsStatsQuery;
14267
14434
  exports.ActionsAccessor = ActionsAccessor;
14435
+ exports.ActivityStatsQuery = ActivityStatsQuery;
14268
14436
  exports.AgentSession = AgentSession;
14269
14437
  exports.AgentSessionInputSchema = AgentSessionInputSchema;
14270
14438
  exports.AlertDeliverySettingsSchema = AlertDeliverySettingsSchema;
@@ -14575,6 +14743,7 @@ exports.FlowRunLaunchedBy = FlowRunLaunchedBy;
14575
14743
  exports.FlowRunLaunchedByApi = FlowRunLaunchedByApi;
14576
14744
  exports.FlowRunNode = FlowRunNode;
14577
14745
  exports.FlowRunsAccessor = FlowRunsAccessor;
14746
+ exports.FlowRunsStatsQuery = FlowRunsStatsQuery;
14578
14747
  exports.FlowsAccessor = FlowsAccessor;
14579
14748
  exports.Formula = Formula;
14580
14749
  exports.FullPlatformUser = FullPlatformUser;
@@ -14598,6 +14767,7 @@ exports.IntegrationAuthOption = IntegrationAuthOption;
14598
14767
  exports.IntegrationAuthUi = IntegrationAuthUi;
14599
14768
  exports.IntegrationEditableProperties = IntegrationEditableProperties;
14600
14769
  exports.IntegrationExportProperties = IntegrationExportProperties;
14770
+ exports.IntegrationLayerStatsQuery = IntegrationLayerStatsQuery;
14601
14771
  exports.IntegrationLevelActionAccessor = IntegrationLevelActionAccessor;
14602
14772
  exports.IntegrationLevelActionsListAccessor = IntegrationLevelActionsListAccessor;
14603
14773
  exports.IntegrationLevelDataSourceAccessor = IntegrationLevelDataSourceAccessor;
@@ -14607,6 +14777,8 @@ exports.IntegrationLevelFieldMappingsListAccessor = IntegrationLevelFieldMapping
14607
14777
  exports.IntegrationLevelFlowAccessor = IntegrationLevelFlowAccessor;
14608
14778
  exports.IntegrationLevelFlowsListAccessor = IntegrationLevelFlowsListAccessor;
14609
14779
  exports.IntegrationLevelMembraneInterfaceSelectorQuery = IntegrationLevelMembraneInterfaceSelectorQuery;
14780
+ exports.IntegrationOptionConfig = IntegrationOptionConfig;
14781
+ exports.IntegrationOptions = IntegrationOptions;
14610
14782
  exports.IntegrationSpecificElementSelector = IntegrationSpecificElementSelector;
14611
14783
  exports.IntegrationsAccessor = IntegrationsAccessor;
14612
14784
  exports.InternalError = InternalError;
@@ -14640,6 +14812,7 @@ exports.OAUTH_CONFIG_SCHEMA = OAUTH_CONFIG_SCHEMA;
14640
14812
  exports.OpenapiMappingSchema = OpenapiMappingSchema;
14641
14813
  exports.OperationMappingFunction = OperationMappingFunction;
14642
14814
  exports.OperationMappingSchema = OperationMappingSchema;
14815
+ exports.OrgFeatureFlagsSchema = OrgFeatureFlagsSchema;
14643
14816
  exports.OrgLimits = OrgLimits;
14644
14817
  exports.OrgSchema = OrgSchema;
14645
14818
  exports.OrgWorkspaceSchema = OrgWorkspaceSchema;
@@ -14663,6 +14836,7 @@ exports.PaginationResponse = PaginationResponse;
14663
14836
  exports.PatchAgentSessionSchema = PatchAgentSessionSchema;
14664
14837
  exports.PlatformUserSchema = PlatformUserSchema;
14665
14838
  exports.RATE_LIMITS = RATE_LIMITS;
14839
+ exports.REFERENCE_ELEMENT_TYPE_SELF = REFERENCE_ELEMENT_TYPE_SELF;
14666
14840
  exports.RateLimitExceededError = RateLimitExceededError;
14667
14841
  exports.RequestMappingSchema = RequestMappingSchema;
14668
14842
  exports.ResetFlowInstanceOptions = ResetFlowInstanceOptions;
@@ -14680,6 +14854,7 @@ exports.ScreenBlock = ScreenBlock;
14680
14854
  exports.ScreensAccessor = ScreensAccessor;
14681
14855
  exports.SearchQuery = SearchQuery;
14682
14856
  exports.SelfAccessor = SelfAccessor;
14857
+ exports.StatsFilterQuery = StatsFilterQuery;
14683
14858
  exports.UNIFIED_DATA_MODELS = UNIFIED_DATA_MODELS;
14684
14859
  exports.UnitRunError = UnitRunError;
14685
14860
  exports.UpdateActionInstanceRequest = UpdateActionInstanceRequest;
@@ -14698,11 +14873,13 @@ exports.UpstreamFlowNodeRunSchema = UpstreamFlowNodeRunSchema;
14698
14873
  exports.UserAccessor = UserAccessor;
14699
14874
  exports.UsersAccessor = UsersAccessor;
14700
14875
  exports.WORKSPACE_SIZE_LIMITS = WORKSPACE_SIZE_LIMITS;
14876
+ exports.Workspace = Workspace;
14701
14877
  exports.WorkspaceElementSearchQuery = WorkspaceElementSearchQuery;
14702
14878
  exports.WorkspaceElementSearchResult = WorkspaceElementSearchResult;
14703
14879
  exports.WorkspaceElementSpecs = WorkspaceElementSpecs;
14704
14880
  exports.WorkspaceLimitsSchema = WorkspaceLimitsSchema;
14705
14881
  exports.WorkspacePublicKey = WorkspacePublicKey;
14882
+ exports.WorkspaceSettingsSchema = WorkspaceSettingsSchema;
14706
14883
  exports.WritableConnectorVersionData = WritableConnectorVersionData;
14707
14884
  exports.WritablePackageVersionData = WritablePackageVersionData;
14708
14885
  exports.WriteableConnectorFields = WriteableConnectorFields;
@@ -14756,6 +14933,7 @@ exports.getEffectiveConnectorOption = getEffectiveConnectorOption;
14756
14933
  exports.getElementSelector = getElementSelector;
14757
14934
  exports.getErrorFromData = getErrorFromData;
14758
14935
  exports.getEventMethodFileKey = getEventMethodFileKey;
14936
+ exports.getFilterFieldMeta = getFilterFieldMeta;
14759
14937
  exports.getFilterFieldValuesByLocator = getFilterFieldValuesByLocator;
14760
14938
  exports.getFlowInstanceNodeDependency = getFlowInstanceNodeDependency;
14761
14939
  exports.getFlowNode = getFlowNode;