@membranehq/sdk 0.17.6 → 0.18.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 (53) hide show
  1. package/dist/bundle.d.ts +17 -4
  2. package/dist/bundle.js +26 -5
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/agent/session.d.ts +2 -0
  5. package/dist/dts/alerts/types.d.ts +14 -0
  6. package/dist/dts/client-tokens/types.d.ts +5 -5
  7. package/dist/dts/orgs/types.d.ts +2 -0
  8. package/dist/dts/stats/index.d.ts +8 -5
  9. package/dist/dts/ui.d.ts +5 -0
  10. package/dist/dts/workspace-elements/api/action-run-log-records-api.d.ts +3 -0
  11. package/dist/dts/workspace-elements/api/connected-products-api.d.ts +2 -1
  12. package/dist/dts/workspace-elements/api/connections-api.d.ts +1 -2
  13. package/dist/dts/workspace-elements/api/connectors-api.d.ts +1 -0
  14. package/dist/dts/workspace-elements/api/customers-api.d.ts +1 -0
  15. package/dist/dts/workspace-elements/api/data-sources-api.d.ts +2 -2
  16. package/dist/dts/workspace-elements/api/external-api-logs-api.d.ts +2 -0
  17. package/dist/dts/workspace-elements/api/external-apps-api.d.ts +1 -0
  18. package/dist/dts/workspace-elements/api/external-event-log-records-api.d.ts +2 -0
  19. package/dist/dts/workspace-elements/api/external-event-pulls-api.d.ts +2 -0
  20. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +1 -0
  21. package/dist/dts/workspace-elements/api/external-events-api.d.ts +1 -0
  22. package/dist/dts/workspace-elements/api/field-mappings-api.d.ts +2 -2
  23. package/dist/dts/workspace-elements/api/flow-runs-api.d.ts +3 -0
  24. package/dist/dts/workspace-elements/api/flows-api.d.ts +1 -1
  25. package/dist/dts/workspace-elements/api/incoming-webhooks-api.d.ts +2 -0
  26. package/dist/dts/workspace-elements/api/integrations-api.d.ts +1 -0
  27. package/dist/dts/workspace-elements/base/action-run-log-records/index.d.ts +1 -0
  28. package/dist/dts/workspace-elements/base/app-data-schemas/index.d.ts +4 -5
  29. package/dist/dts/workspace-elements/base/connectors/index.d.ts +7 -7
  30. package/dist/dts/workspace-elements/base/data-link-tables/index.d.ts +0 -1
  31. package/dist/dts/workspace-elements/base/data-sources/index.d.ts +0 -2
  32. package/dist/dts/workspace-elements/base/external-event-log-records/index.d.ts +1 -0
  33. package/dist/dts/workspace-elements/base/external-event-pulls/index.d.ts +1 -0
  34. package/dist/dts/workspace-elements/base/field-mappings/index.d.ts +0 -3
  35. package/dist/dts/workspace-elements/base/flow-runs/index.d.ts +1 -0
  36. package/dist/dts/workspace-elements/base/flows/index.d.ts +0 -2
  37. package/dist/dts/workspace-elements/base/integrations/index.d.ts +8 -10
  38. package/dist/dts/workspace-elements/types.d.ts +3 -0
  39. package/dist/dts/workspace-elements-catalog/index.d.ts +3 -0
  40. package/dist/dts/workspaces/types.d.ts +7 -1
  41. package/dist/index.browser.d.mts +99 -49
  42. package/dist/index.browser.d.ts +99 -49
  43. package/dist/index.browser.js +214 -17
  44. package/dist/index.browser.js.map +1 -1
  45. package/dist/index.browser.mjs +214 -17
  46. package/dist/index.browser.mjs.map +1 -1
  47. package/dist/index.node.d.mts +99 -49
  48. package/dist/index.node.d.ts +99 -49
  49. package/dist/index.node.js +214 -17
  50. package/dist/index.node.js.map +1 -1
  51. package/dist/index.node.mjs +214 -17
  52. package/dist/index.node.mjs.map +1 -1
  53. package/package.json +1 -1
@@ -3496,6 +3496,8 @@ exports.WorkspaceElementType = void 0;
3496
3496
  WorkspaceElementType["ExternalEventPull"] = "external-event-pull";
3497
3497
  WorkspaceElementType["Screen"] = "screen";
3498
3498
  WorkspaceElementType["ActionRunLogRecord"] = "action-run-log-record";
3499
+ WorkspaceElementType["ExternalApiLogRecord"] = "external-api-log-record";
3500
+ WorkspaceElementType["IncomingWebhookLogRecord"] = "incoming-webhook-log-record";
3499
3501
  WorkspaceElementType["ConnectedProduct"] = "connected-product";
3500
3502
  })(exports.WorkspaceElementType || (exports.WorkspaceElementType = {}));
3501
3503
  exports.WorkspaceEventType = void 0;
@@ -3694,6 +3696,7 @@ const ActivityLogRecord = TenantLayerElement.extend({
3694
3696
  id: z.z.string(),
3695
3697
  integrationId: z.z.string().optional(),
3696
3698
  connectionId: z.z.string().optional(),
3699
+ externalAppId: z.z.string().optional(),
3697
3700
  });
3698
3701
  const WorkspaceElementSearchQuery = z.z.object({
3699
3702
  q: z.z.string().min(1).max(200),
@@ -3767,6 +3770,9 @@ const FieldMappingEditableProperties = BaseIntegrationLevelMembraneInterfaceEdit
3767
3770
  }).extend(FieldMappingSpecificProperties.shape);
3768
3771
  const FieldMappingExportProperties = BaseIntegrationLevelMembraneInterfaceExportProperties.extend(FieldMappingSpecificProperties.shape).omit({
3769
3772
  connectionId: true,
3773
+ fieldMappingId: true,
3774
+ universalFieldMappingId: true,
3775
+ dataSourceId: true,
3770
3776
  });
3771
3777
  const FieldMappingReadOnlyProperties = BaseIntegrationLevelMembraneInterfaceReadOnlyProperties.extend({
3772
3778
  ...TenantLayerElement.partial().shape,
@@ -9129,6 +9135,7 @@ const GeneratedConnectorOption = z.z.object({
9129
9135
  description: z.z.string().optional(),
9130
9136
  inputSchema: DataSchema.optional(),
9131
9137
  connectorParametersSchema: DataSchema.optional(),
9138
+ oAuthCallbackUri: z.z.string().optional(),
9132
9139
  });
9133
9140
  const ConnectorOptions = z.z.record(z.z.string(), ConnectorOption);
9134
9141
  const WritableConnectorVersionData = ConnectorAuthWithFunctions.extend({
@@ -9175,6 +9182,8 @@ const WriteableConnectorFields = z.z
9175
9182
  .extend(WritableConnectorVersionData.shape);
9176
9183
  const ConnectorExportProperties = WriteableConnectorFields.extend({
9177
9184
  uuid: z.z.string().optional(),
9185
+ }).omit({
9186
+ externalAppId: true,
9178
9187
  });
9179
9188
  const UpdateConnectorRequest = WriteableConnectorFields;
9180
9189
  const CreateConnectorRequest = WriteableConnectorFields.extend({
@@ -9236,6 +9245,8 @@ const DataSourceExportProperties = BaseIntegrationLevelMembraneInterfaceExportPr
9236
9245
  })
9237
9246
  .omit({
9238
9247
  connectionId: true,
9248
+ dataSourceId: true,
9249
+ universalDataSourceId: true,
9239
9250
  });
9240
9251
  const DataSourceReadOnlyProperties = BaseIntegrationLevelMembraneInterfaceReadOnlyProperties.extend({
9241
9252
  ...TenantLayerElement.partial().shape,
@@ -9726,6 +9737,8 @@ const FlowEditableProperties = BaseIntegrationLevelMembraneInterfaceEditableProp
9726
9737
  }).extend(FlowSpecificProperties.shape);
9727
9738
  const FlowExportProperties = BaseIntegrationLevelMembraneInterfaceExportProperties.extend(FlowSpecificProperties.shape).omit({
9728
9739
  connectionId: true,
9740
+ flowId: true,
9741
+ universalFlowId: true,
9729
9742
  });
9730
9743
  const FlowReadOnlyProperties = BaseIntegrationLevelMembraneInterfaceReadOnlyProperties.extend({
9731
9744
  ...TenantLayerElement.partial().shape,
@@ -9847,7 +9860,10 @@ const IntegrationEditableProperties = BaseMembraneInterfaceEditableProperties.ex
9847
9860
  parameters: z.z.record(z.z.string(), z.z.any()).optional(),
9848
9861
  optionsConfig: IntegrationOptions.optional(),
9849
9862
  });
9850
- const IntegrationExportProperties = IntegrationEditableProperties;
9863
+ const IntegrationExportProperties = IntegrationEditableProperties.omit({
9864
+ connectorId: true,
9865
+ externalAppId: true,
9866
+ });
9851
9867
  const AppliedToIntegrations = (elementSchema) => z.z.array(z.z.object({
9852
9868
  element: elementSchema,
9853
9869
  integration: BaseIntegration,
@@ -9946,6 +9962,7 @@ const DataLinkTableSpecificProperties = z.z.object({
9946
9962
  const DataLinkTableEditableProperties = BaseMembraneInterfaceEditableProperties.extend(DataLinkTableSpecificProperties.shape);
9947
9963
  const DataLinkTableExportProperties = BaseMembraneInterfaceEditableProperties.extend(DataLinkTableSpecificProperties.shape).omit({
9948
9964
  connectionId: true,
9965
+ dataLinkTableId: true,
9949
9966
  });
9950
9967
  const DataLinkTableReadOnlyProperties = BaseMembraneInterfaceReadOnlyProperties.extend({
9951
9968
  ...TenantLayerElement.partial().shape,
@@ -10043,7 +10060,9 @@ const AppDataSchemaSpecificProperties = z.z.object({
10043
10060
  code: z.z.string().optional(),
10044
10061
  });
10045
10062
  const AppDataSchemaEditableProperties = BaseMembraneInterfaceEditableProperties.extend(AppDataSchemaSpecificProperties.shape);
10046
- const AppDataSchemaExportProperties = AppDataSchemaEditableProperties.extend({});
10063
+ const AppDataSchemaExportProperties = AppDataSchemaEditableProperties.omit({
10064
+ appDataSchemaId: true,
10065
+ });
10047
10066
  const AppDataSchemaReadOnlyProperties = BaseMembraneInterfaceReadOnlyProperties.extend({
10048
10067
  ...TenantLayerElement.partial().shape,
10049
10068
  appDataSchemaRevision: z.z.string().optional(),
@@ -10281,6 +10300,9 @@ const FindActionRunLogsQuery = PaginationQuery.extend({
10281
10300
  .meta({
10282
10301
  filterTitle: 'Status',
10283
10302
  }),
10303
+ externalAppId: z.z.string().optional().meta({
10304
+ hidden: true,
10305
+ }),
10284
10306
  from: z.z
10285
10307
  .string()
10286
10308
  .optional()
@@ -10321,6 +10343,13 @@ const FindConnectionsQuery = PaginationQuery.merge(SearchQuery)
10321
10343
  .meta({
10322
10344
  filterTitle: 'Connector',
10323
10345
  }),
10346
+ externalAppId: z.z
10347
+ .string()
10348
+ .optional()
10349
+ .meta({
10350
+ filterTitle: 'External App',
10351
+ referenceElementType: exports.WorkspaceElementType.App,
10352
+ }),
10324
10353
  disconnected: zodBooleanCoercion()
10325
10354
  .optional()
10326
10355
  .meta({
@@ -10341,10 +10370,6 @@ const FindConnectionsQuery = PaginationQuery.merge(SearchQuery)
10341
10370
  .string()
10342
10371
  .optional()
10343
10372
  .meta({ hidden: true }),
10344
- externalAppId: z.z.string().optional().meta({
10345
- filterTitle: 'External App',
10346
- referenceElementType: exports.WorkspaceElementType.App,
10347
- }),
10348
10373
  integrationKey: z.z
10349
10374
  .string()
10350
10375
  .optional()
@@ -10367,6 +10392,7 @@ const ConnectionExportProperties = ConnectionEditableProperties.omit({
10367
10392
  credentials: true,
10368
10393
  connectorParameters: true,
10369
10394
  input: true,
10395
+ externalAppId: true,
10370
10396
  });
10371
10397
  const ConnectionTestResponse = z.z.object({
10372
10398
  success: z.z.boolean(),
@@ -10450,7 +10476,7 @@ const ConnectUIOptions = ConnectPayload.omit({ input: true, redirectUri: true })
10450
10476
  theme: z.z.enum(['light', 'dark', 'auto']).optional(),
10451
10477
  });
10452
10478
 
10453
- const ListPublicConnectorsQuery = PaginationQuery.extend({
10479
+ const ListPublicConnectorsQuery = PaginationQuery.merge(IncludeArchivedQuery).extend({
10454
10480
  search: z.z.string().optional(),
10455
10481
  });
10456
10482
 
@@ -10467,6 +10493,13 @@ const DataSourceInstanceApiResponse = DataSourceApiResponse;
10467
10493
  const FindDataSourcesQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
10468
10494
  dataSourceId: z.z.string().optional(),
10469
10495
  universalDataSourceId: z.z.string().optional(),
10496
+ externalAppId: z.z
10497
+ .string()
10498
+ .optional()
10499
+ .meta({
10500
+ filterTitle: 'External App',
10501
+ referenceElementType: exports.WorkspaceElementType.App,
10502
+ }),
10470
10503
  });
10471
10504
  const FindDataSourceInstancesQuery = FindDataSourcesQuery;
10472
10505
  const CreateDataSourceRequest = DataSourceEditableProperties;
@@ -10521,7 +10554,7 @@ const FindDataSourceInstanceSyncsQuery = ListDataSourceInstancesForConnectionQue
10521
10554
  dataSourceInstanceId: z.z.string().optional(),
10522
10555
  });
10523
10556
 
10524
- const ListExternalAppsQuery = PaginationQuery.extend({
10557
+ const ListExternalAppsQuery = PaginationQuery.merge(IncludeArchivedQuery).extend({
10525
10558
  search: z.z.string().optional(),
10526
10559
  category: z.z
10527
10560
  .string()
@@ -10550,6 +10583,13 @@ const FlowInstanceApiResponse = FlowApiResponse;
10550
10583
  const FindFlowsQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
10551
10584
  flowId: z.z.string().optional(),
10552
10585
  universalFlowId: z.z.string().optional(),
10586
+ externalAppId: z.z
10587
+ .string()
10588
+ .optional()
10589
+ .meta({
10590
+ filterTitle: 'External App',
10591
+ referenceElementType: exports.WorkspaceElementType.App,
10592
+ }),
10553
10593
  });
10554
10594
  const CreateFlowRequest = FlowEditableProperties;
10555
10595
  const UpdateFlowRequest = CreateFlowRequest.extend({}).partial();
@@ -10627,6 +10667,9 @@ const FindFlowRunsQuery = PaginationQuery.extend({
10627
10667
  filterTitle: 'Connection',
10628
10668
  referenceElementType: exports.WorkspaceElementType.Connection,
10629
10669
  }),
10670
+ externalAppId: z.z.string().optional().meta({
10671
+ hidden: true,
10672
+ }),
10630
10673
  from: z.z
10631
10674
  .string()
10632
10675
  .optional()
@@ -10664,7 +10707,8 @@ const FindIntegrationsQuery = z.z
10664
10707
  appUuid: z.z.string().optional(),
10665
10708
  })
10666
10709
  .merge(PaginationQuery)
10667
- .merge(SearchQuery);
10710
+ .merge(SearchQuery)
10711
+ .merge(IncludeArchivedQuery);
10668
10712
  const IntegrationAuthUi = z.z.object({
10669
10713
  schema: z.z.any().optional(),
10670
10714
  helpUri: z.z.string().optional(),
@@ -10771,7 +10815,8 @@ const FindCustomersQuery = z.z
10771
10815
  }),
10772
10816
  })
10773
10817
  .merge(PaginationQuery)
10774
- .merge(SearchQuery);
10818
+ .merge(SearchQuery)
10819
+ .merge(IncludeArchivedQuery);
10775
10820
  const CustomerSelector = z.z.object({ id: z.z.string() });
10776
10821
  const CustomerApiResponse = BaseCustomer;
10777
10822
  const TenantSelfResponse = BaseCustomer.extend({
@@ -10789,6 +10834,13 @@ const FieldMappingInstanceApiResponse = FieldMappingApiResponse;
10789
10834
  const FindFieldMappingsQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
10790
10835
  fieldMappingId: z.z.string().optional(),
10791
10836
  universalFieldMappingId: z.z.string().optional(),
10837
+ externalAppId: z.z
10838
+ .string()
10839
+ .optional()
10840
+ .meta({
10841
+ filterTitle: 'External App',
10842
+ referenceElementType: exports.WorkspaceElementType.App,
10843
+ }),
10792
10844
  });
10793
10845
  const FindFieldMappingInstancesQuery = FindFieldMappingsQuery;
10794
10846
  const CreateFieldMappingRequest = FieldMappingEditableProperties;
@@ -11060,6 +11112,9 @@ const ListExternalEventLogRecordsQuery = PaginationQuery.extend({
11060
11112
  .meta({
11061
11113
  filterTitle: 'Status',
11062
11114
  }),
11115
+ externalAppId: z.z.string().optional().meta({
11116
+ hidden: true,
11117
+ }),
11063
11118
  from: z.z
11064
11119
  .string()
11065
11120
  .optional()
@@ -11149,6 +11204,9 @@ const FindExternalEventPullsQuery = PaginationQuery.extend({
11149
11204
  .meta({
11150
11205
  filterTitle: 'Status',
11151
11206
  }),
11207
+ externalAppId: z.z.string().optional().meta({
11208
+ hidden: true,
11209
+ }),
11152
11210
  from: z.z
11153
11211
  .string()
11154
11212
  .optional()
@@ -11196,6 +11254,9 @@ const ListExternalEventSubscriptionsQuery = PaginationQuery.merge(IncludeArchive
11196
11254
  filterTitle: 'Integration',
11197
11255
  referenceElementType: exports.WorkspaceElementType.Integration,
11198
11256
  }),
11257
+ externalAppId: z.z.string().optional().meta({
11258
+ hidden: true,
11259
+ }),
11199
11260
  });
11200
11261
  const ExternalEventSubscriptionApiResponse = BaseExternalEventSubscription.extend({
11201
11262
  user: BaseCustomer.optional(),
@@ -11278,6 +11339,9 @@ const ListExternalApiLogsQuery = PaginationQuery.extend({
11278
11339
  filterTitle: 'Status',
11279
11340
  isFlag: true,
11280
11341
  }),
11342
+ externalAppId: z.z.string().optional().meta({
11343
+ hidden: true,
11344
+ }),
11281
11345
  from: z.z
11282
11346
  .string()
11283
11347
  .optional()
@@ -11302,6 +11366,7 @@ const ExternalApiLogApiResponse = z.z.object({
11302
11366
  customerId: z.z.string(),
11303
11367
  integrationId: z.z.string(),
11304
11368
  connectionId: z.z.string(),
11369
+ externalAppId: z.z.string().optional(),
11305
11370
  statusCode: z.z.number(),
11306
11371
  isSuccess: z.z.boolean(),
11307
11372
  s3Uri: z.z.string(),
@@ -11341,6 +11406,9 @@ const ListIncomingWebhooksQuery = PaginationQuery.extend({
11341
11406
  .meta({
11342
11407
  filterTitle: 'Status',
11343
11408
  }),
11409
+ externalAppId: z.z.string().optional().meta({
11410
+ hidden: true,
11411
+ }),
11344
11412
  from: z.z
11345
11413
  .string()
11346
11414
  .optional()
@@ -11363,6 +11431,7 @@ const IncomingWebhookApiResponse = z.z.object({
11363
11431
  customerId: z.z.string(),
11364
11432
  integrationId: z.z.string(),
11365
11433
  connectionId: z.z.string(),
11434
+ externalAppId: z.z.string().optional(),
11366
11435
  subscriptionId: z.z.string(),
11367
11436
  userId: z.z.string(),
11368
11437
  uuid: z.z.string(),
@@ -11376,12 +11445,14 @@ const IncomingWebhookApiResponse = z.z.object({
11376
11445
 
11377
11446
  const CreateConnectedProductRequest = z.z.object({
11378
11447
  name: z.z.string(),
11448
+ key: z.z.string().optional(),
11379
11449
  type: ConnectedProductType,
11380
11450
  audience: ConnectedProductAudience.optional(),
11381
11451
  parameters: AiAgentParameters.optional(),
11382
11452
  });
11383
11453
  const UpdateConnectedProductRequest = z.z.object({
11384
11454
  name: z.z.string().optional(),
11455
+ key: z.z.string().optional(),
11385
11456
  type: ConnectedProductType.optional(),
11386
11457
  audience: ConnectedProductAudience.optional(),
11387
11458
  parameters: AiAgentParameters.optional(),
@@ -11390,7 +11461,6 @@ const FindConnectedProductsQuery = z.z
11390
11461
  .object({
11391
11462
  type: ConnectedProductType.optional(),
11392
11463
  audience: ConnectedProductAudience.optional(),
11393
- key: z.z.string().optional(),
11394
11464
  })
11395
11465
  .merge(PaginationQuery)
11396
11466
  .merge(SearchQuery)
@@ -11716,6 +11786,26 @@ const WorkspaceElementSpecs = {
11716
11786
  apiPath: 'customers',
11717
11787
  name: 'Customer',
11718
11788
  namePlural: 'Customers',
11789
+ relatedIntegrationLayerElements: [
11790
+ exports.WorkspaceElementType.Connection,
11791
+ exports.WorkspaceElementType.Action,
11792
+ exports.WorkspaceElementType.Flow,
11793
+ exports.WorkspaceElementType.ExternalEventSubscription,
11794
+ exports.WorkspaceElementType.AppEventSubscription,
11795
+ exports.WorkspaceElementType.DataSource,
11796
+ exports.WorkspaceElementType.FieldMapping,
11797
+ exports.WorkspaceElementType.AppDataSchemaInstance,
11798
+ exports.WorkspaceElementType.DataLinkTableInstance,
11799
+ ],
11800
+ relatedActivityLogElements: [
11801
+ exports.WorkspaceElementType.FlowRun,
11802
+ exports.WorkspaceElementType.ActionRunLogRecord,
11803
+ exports.WorkspaceElementType.ExternalApiLogRecord,
11804
+ exports.WorkspaceElementType.IncomingWebhookLogRecord,
11805
+ exports.WorkspaceElementType.ExternalEventLogRecord,
11806
+ exports.WorkspaceElementType.ExternalEventPull,
11807
+ exports.WorkspaceElementType.AppEventLogRecord,
11808
+ ],
11719
11809
  },
11720
11810
  [exports.WorkspaceElementType.App]: {
11721
11811
  type: exports.WorkspaceElementType.App,
@@ -11724,6 +11814,21 @@ const WorkspaceElementSpecs = {
11724
11814
  namePlural: 'Apps',
11725
11815
  hasKey: true,
11726
11816
  hasPublicLayer: true,
11817
+ relatedIntegrationLayerElements: [
11818
+ exports.WorkspaceElementType.Connection,
11819
+ exports.WorkspaceElementType.Action,
11820
+ exports.WorkspaceElementType.Flow,
11821
+ exports.WorkspaceElementType.DataSource,
11822
+ exports.WorkspaceElementType.FieldMapping,
11823
+ ],
11824
+ relatedActivityLogElements: [
11825
+ exports.WorkspaceElementType.FlowRun,
11826
+ exports.WorkspaceElementType.ActionRunLogRecord,
11827
+ exports.WorkspaceElementType.ExternalApiLogRecord,
11828
+ exports.WorkspaceElementType.IncomingWebhookLogRecord,
11829
+ exports.WorkspaceElementType.ExternalEventLogRecord,
11830
+ exports.WorkspaceElementType.ExternalEventPull,
11831
+ ],
11727
11832
  },
11728
11833
  [exports.WorkspaceElementType.Integration]: {
11729
11834
  type: exports.WorkspaceElementType.Integration,
@@ -11733,6 +11838,27 @@ const WorkspaceElementSpecs = {
11733
11838
  editablePropertiesSchema: IntegrationEditableProperties,
11734
11839
  exportPropertiesSchema: IntegrationExportProperties,
11735
11840
  hasKey: true,
11841
+ relatedIntegrationLayerElements: [
11842
+ exports.WorkspaceElementType.Connection,
11843
+ exports.WorkspaceElementType.Package,
11844
+ exports.WorkspaceElementType.Action,
11845
+ exports.WorkspaceElementType.Flow,
11846
+ exports.WorkspaceElementType.ExternalEventSubscription,
11847
+ exports.WorkspaceElementType.AppEventSubscription,
11848
+ exports.WorkspaceElementType.DataSource,
11849
+ exports.WorkspaceElementType.FieldMapping,
11850
+ exports.WorkspaceElementType.AppDataSchemaInstance,
11851
+ exports.WorkspaceElementType.DataLinkTableInstance,
11852
+ ],
11853
+ relatedActivityLogElements: [
11854
+ exports.WorkspaceElementType.FlowRun,
11855
+ exports.WorkspaceElementType.ActionRunLogRecord,
11856
+ exports.WorkspaceElementType.ExternalApiLogRecord,
11857
+ exports.WorkspaceElementType.IncomingWebhookLogRecord,
11858
+ exports.WorkspaceElementType.ExternalEventLogRecord,
11859
+ exports.WorkspaceElementType.ExternalEventPull,
11860
+ exports.WorkspaceElementType.AppEventLogRecord,
11861
+ ],
11736
11862
  },
11737
11863
  [exports.WorkspaceElementType.Connector]: {
11738
11864
  type: exports.WorkspaceElementType.Connector,
@@ -11751,6 +11877,26 @@ const WorkspaceElementSpecs = {
11751
11877
  exportPropertiesSchema: ConnectionExportProperties,
11752
11878
  hasKey: false,
11753
11879
  hasUuid: false,
11880
+ statsKey: 'connections',
11881
+ relatedIntegrationLayerElements: [
11882
+ exports.WorkspaceElementType.Action,
11883
+ exports.WorkspaceElementType.Flow,
11884
+ exports.WorkspaceElementType.ExternalEventSubscription,
11885
+ exports.WorkspaceElementType.AppEventSubscription,
11886
+ exports.WorkspaceElementType.DataSource,
11887
+ exports.WorkspaceElementType.FieldMapping,
11888
+ exports.WorkspaceElementType.AppDataSchemaInstance,
11889
+ exports.WorkspaceElementType.DataLinkTableInstance,
11890
+ ],
11891
+ relatedActivityLogElements: [
11892
+ exports.WorkspaceElementType.FlowRun,
11893
+ exports.WorkspaceElementType.ActionRunLogRecord,
11894
+ exports.WorkspaceElementType.ExternalApiLogRecord,
11895
+ exports.WorkspaceElementType.IncomingWebhookLogRecord,
11896
+ exports.WorkspaceElementType.ExternalEventLogRecord,
11897
+ exports.WorkspaceElementType.ExternalEventPull,
11898
+ exports.WorkspaceElementType.AppEventLogRecord,
11899
+ ],
11754
11900
  },
11755
11901
  [exports.WorkspaceElementType.Package]: {
11756
11902
  type: exports.WorkspaceElementType.Package,
@@ -11767,6 +11913,7 @@ const WorkspaceElementSpecs = {
11767
11913
  hasParentChildRelationship: true,
11768
11914
  hasPublicLayer: true,
11769
11915
  isProOnly: true,
11916
+ statsKey: 'packages',
11770
11917
  },
11771
11918
  [exports.WorkspaceElementType.ActionInstance]: {
11772
11919
  type: exports.WorkspaceElementType.ActionInstance,
@@ -11793,12 +11940,14 @@ const WorkspaceElementSpecs = {
11793
11940
  hasParentChildRelationship: true,
11794
11941
  hasKey: true,
11795
11942
  hasPublicLayer: true,
11943
+ statsKey: 'actions',
11796
11944
  },
11797
11945
  [exports.WorkspaceElementType.ActionRunLogRecord]: {
11798
11946
  type: exports.WorkspaceElementType.ActionRunLogRecord,
11799
11947
  apiPath: 'action-run-logs',
11800
11948
  name: 'Action Run Log Record',
11801
11949
  namePlural: 'Action Run Log Records',
11950
+ statsKey: 'actionRunLogs',
11802
11951
  },
11803
11952
  [exports.WorkspaceElementType.Flow]: {
11804
11953
  type: exports.WorkspaceElementType.Flow,
@@ -11816,6 +11965,7 @@ const WorkspaceElementSpecs = {
11816
11965
  hasParentChildRelationship: true,
11817
11966
  hasKey: true,
11818
11967
  isProOnly: true,
11968
+ statsKey: 'flows',
11819
11969
  },
11820
11970
  [exports.WorkspaceElementType.FlowInstance]: {
11821
11971
  type: exports.WorkspaceElementType.FlowInstance,
@@ -11836,6 +11986,7 @@ const WorkspaceElementSpecs = {
11836
11986
  name: 'Flow run',
11837
11987
  namePlural: 'Flow runs',
11838
11988
  isProOnly: true,
11989
+ statsKey: 'flowRuns',
11839
11990
  },
11840
11991
  [exports.WorkspaceElementType.FieldMapping]: {
11841
11992
  type: exports.WorkspaceElementType.FieldMapping,
@@ -11853,6 +12004,7 @@ const WorkspaceElementSpecs = {
11853
12004
  hasParentChildRelationship: true,
11854
12005
  hasKey: true,
11855
12006
  isProOnly: true,
12007
+ statsKey: 'fieldMappings',
11856
12008
  },
11857
12009
  [exports.WorkspaceElementType.FieldMappingInstance]: {
11858
12010
  type: exports.WorkspaceElementType.FieldMappingInstance,
@@ -11882,6 +12034,7 @@ const WorkspaceElementSpecs = {
11882
12034
  hasParentChildRelationship: true,
11883
12035
  hasKey: true,
11884
12036
  isProOnly: true,
12037
+ statsKey: 'dataSources',
11885
12038
  },
11886
12039
  [exports.WorkspaceElementType.DataSourceInstance]: {
11887
12040
  type: exports.WorkspaceElementType.DataSourceInstance,
@@ -11916,6 +12069,7 @@ const WorkspaceElementSpecs = {
11916
12069
  parentFieldKey: 'dataLinkTableId',
11917
12070
  isMembraneInterface: true,
11918
12071
  isProOnly: true,
12072
+ statsKey: 'dataLinkTableInstances',
11919
12073
  },
11920
12074
  [exports.WorkspaceElementType.AppEventType]: {
11921
12075
  type: exports.WorkspaceElementType.AppEventType,
@@ -11936,6 +12090,7 @@ const WorkspaceElementSpecs = {
11936
12090
  namePlural: 'App Event Subscriptions',
11937
12091
  isMembraneInterface: true,
11938
12092
  isProOnly: true,
12093
+ statsKey: 'appEventSubscriptions',
11939
12094
  },
11940
12095
  [exports.WorkspaceElementType.AppEventLogRecord]: {
11941
12096
  type: exports.WorkspaceElementType.AppEventLogRecord,
@@ -11943,6 +12098,7 @@ const WorkspaceElementSpecs = {
11943
12098
  name: 'App Event Log Record',
11944
12099
  namePlural: 'App Event Log Records',
11945
12100
  isProOnly: true,
12101
+ statsKey: 'appEvents',
11946
12102
  },
11947
12103
  [exports.WorkspaceElementType.AppDataSchema]: {
11948
12104
  type: exports.WorkspaceElementType.AppDataSchema,
@@ -11964,6 +12120,7 @@ const WorkspaceElementSpecs = {
11964
12120
  parentFieldKey: 'appDataSchemaId',
11965
12121
  isMembraneInterface: true,
11966
12122
  isProOnly: true,
12123
+ statsKey: 'appDataSchemaInstances',
11967
12124
  },
11968
12125
  [exports.WorkspaceElementType.ExternalEventSubscription]: {
11969
12126
  type: exports.WorkspaceElementType.ExternalEventSubscription,
@@ -11972,6 +12129,7 @@ const WorkspaceElementSpecs = {
11972
12129
  namePlural: 'External Event Subscriptions',
11973
12130
  isMembraneInterface: true,
11974
12131
  isProOnly: true,
12132
+ statsKey: 'externalEventSubscriptions',
11975
12133
  },
11976
12134
  [exports.WorkspaceElementType.ExternalEventLogRecord]: {
11977
12135
  type: exports.WorkspaceElementType.ExternalEventLogRecord,
@@ -11979,6 +12137,7 @@ const WorkspaceElementSpecs = {
11979
12137
  name: 'External Event Log Record',
11980
12138
  namePlural: 'External Event Log Records',
11981
12139
  isProOnly: true,
12140
+ statsKey: 'externalEvents',
11982
12141
  },
11983
12142
  [exports.WorkspaceElementType.ExternalEventPull]: {
11984
12143
  type: exports.WorkspaceElementType.ExternalEventPull,
@@ -11986,6 +12145,21 @@ const WorkspaceElementSpecs = {
11986
12145
  name: 'External Event Pull',
11987
12146
  namePlural: 'External Event Pulls',
11988
12147
  isProOnly: true,
12148
+ statsKey: 'externalEventPulls',
12149
+ },
12150
+ [exports.WorkspaceElementType.ExternalApiLogRecord]: {
12151
+ type: exports.WorkspaceElementType.ExternalApiLogRecord,
12152
+ apiPath: 'external-api-logs',
12153
+ name: 'External API Log Record',
12154
+ namePlural: 'External API Log Records',
12155
+ statsKey: 'externalApiLogs',
12156
+ },
12157
+ [exports.WorkspaceElementType.IncomingWebhookLogRecord]: {
12158
+ type: exports.WorkspaceElementType.IncomingWebhookLogRecord,
12159
+ apiPath: 'incoming-webhooks',
12160
+ name: 'Incoming Webhook Log Record',
12161
+ namePlural: 'Incoming Webhook Log Records',
12162
+ statsKey: 'externalWebhookLogs',
11989
12163
  },
11990
12164
  [exports.WorkspaceElementType.Screen]: {
11991
12165
  type: exports.WorkspaceElementType.Screen,
@@ -12389,20 +12563,21 @@ const StatsFilterQuery = z.z.object({
12389
12563
  tenantId: z.z.string().optional(),
12390
12564
  integrationId: z.z.string().optional(),
12391
12565
  connectionId: z.z.string().optional(),
12566
+ externalAppId: z.z.string().optional(),
12392
12567
  });
12393
12568
  const ActivityStatsQuery = StatsFilterQuery.extend({
12394
12569
  startDatetime: z.z.string().datetime({ offset: true }),
12570
+ elementType: z.z.enum(exports.WorkspaceElementType).optional(),
12571
+ });
12572
+ const IntegrationLayerStatsQuery = StatsFilterQuery.extend({
12573
+ elementType: z.z.enum(exports.WorkspaceElementType).optional(),
12395
12574
  });
12396
- const IntegrationLayerStatsQuery = StatsFilterQuery;
12397
12575
  const ActionRunsStatsQuery = z.z.object({
12398
- actionId: z.z.string().optional(),
12399
- connectionActionId: z.z.string().optional(),
12576
+ actionId: z.z.string(),
12400
12577
  startDatetime: z.z.string().datetime({ offset: true }),
12401
12578
  });
12402
12579
  const FlowRunsStatsQuery = z.z.object({
12403
- integrationFlowId: z.z.string().optional(),
12404
- connectionFlowId: z.z.string().optional(),
12405
- universalFlowId: z.z.string().optional(),
12580
+ flowId: z.z.string(),
12406
12581
  startDatetime: z.z.string().datetime({ offset: true }),
12407
12582
  });
12408
12583
  const WORKSPACE_ELEMENTS_STATS_COLLECTIONS = [
@@ -12607,6 +12782,8 @@ exports.AlertType = void 0;
12607
12782
  AlertType["totalNumberOfWorkspaceElements"] = "totalNumberOfWorkspaceElements";
12608
12783
  AlertType["instantTasksQueueSize"] = "instantTasksQueueSize";
12609
12784
  AlertType["queuedTasksQueueSize"] = "queuedTasksQueueSize";
12785
+ AlertType["flowRunsQueueSizePerConnection"] = "flowRunsQueueSizePerConnection";
12786
+ AlertType["eventsProcessingQueueSizePerConnection"] = "eventsProcessingQueueSizePerConnection";
12610
12787
  AlertType["parallelApiRequests"] = "parallelApiRequests";
12611
12788
  AlertType["testAlert"] = "testAlert";
12612
12789
  })(exports.AlertType || (exports.AlertType = {}));
@@ -12642,6 +12819,8 @@ const ALERT_TYPE_CATEGORIES = {
12642
12819
  [exports.AlertType.totalNumberOfWorkspaceElements]: exports.AlertCategory.WORKSPACE_SIZE,
12643
12820
  [exports.AlertType.instantTasksQueueSize]: exports.AlertCategory.WORKSPACE_SIZE,
12644
12821
  [exports.AlertType.queuedTasksQueueSize]: exports.AlertCategory.WORKSPACE_SIZE,
12822
+ [exports.AlertType.flowRunsQueueSizePerConnection]: exports.AlertCategory.WORKSPACE_SIZE,
12823
+ [exports.AlertType.eventsProcessingQueueSizePerConnection]: exports.AlertCategory.WORKSPACE_SIZE,
12645
12824
  [exports.AlertType.parallelApiRequests]: exports.AlertCategory.RATE_LIMIT,
12646
12825
  };
12647
12826
  const Alert = z.z.object({
@@ -12739,6 +12918,8 @@ function getAlertTypeDisplayName(alertType) {
12739
12918
  [exports.AlertType.totalNumberOfWorkspaceElements]: 'Total Number of Workspace Elements',
12740
12919
  [exports.AlertType.instantTasksQueueSize]: 'Instant Tasks Queue Size',
12741
12920
  [exports.AlertType.queuedTasksQueueSize]: 'Queued Tasks Queue Size',
12921
+ [exports.AlertType.flowRunsQueueSizePerConnection]: 'Flow Runs Queue Size Per Connection',
12922
+ [exports.AlertType.eventsProcessingQueueSizePerConnection]: 'Events Processing Queue Size Per Connection',
12742
12923
  [exports.AlertType.parallelApiRequests]: 'Parallel API Requests',
12743
12924
  };
12744
12925
  return names[alertType] || alertType;
@@ -12826,6 +13007,8 @@ exports.WorkspaceSizeLimits = void 0;
12826
13007
  WorkspaceSizeLimits["TotalNumberOfWorkspaceElements"] = "totalNumberOfWorkspaceElements";
12827
13008
  WorkspaceSizeLimits["InstantTasksQueueSize"] = "instantTasksQueueSize";
12828
13009
  WorkspaceSizeLimits["QueuedTasksQueueSize"] = "queuedTasksQueueSize";
13010
+ WorkspaceSizeLimits["FlowRunsQueueSizePerConnection"] = "flowRunsQueueSizePerConnection";
13011
+ WorkspaceSizeLimits["EventsProcessingQueueSizePerConnection"] = "eventsProcessingQueueSizePerConnection";
12829
13012
  })(exports.WorkspaceSizeLimits || (exports.WorkspaceSizeLimits = {}));
12830
13013
  exports.CustomerLimits = void 0;
12831
13014
  (function (CustomerLimits) {
@@ -12963,6 +13146,7 @@ const WORKSPACE_SIZE_LIMITS = [
12963
13146
  const EDITABLE_LIMITS = [
12964
13147
  'parallelApiRequestsPerCustomer',
12965
13148
  'parallelBackgroundJobsPerCustomer',
13149
+ 'parallelCustomCodeRunsPerCustomer',
12966
13150
  'apiRequestsPerCustomerPerSecond',
12967
13151
  'apiRequestsPerCustomerPerHour',
12968
13152
  'externalEventsPerCustomerPerDay',
@@ -15336,6 +15520,7 @@ const AgentSession = z.z.object({
15336
15520
  hasWorker: z.z.boolean(),
15337
15521
  isExternal: z.z.boolean().optional(),
15338
15522
  agentName: z.z.enum(exports.AgentName).optional(),
15523
+ output: z.z.record(z.z.string(), z.z.unknown()).optional(),
15339
15524
  createdAt: z.z.iso.datetime(),
15340
15525
  updatedAt: z.z.iso.datetime(),
15341
15526
  });
@@ -15363,6 +15548,7 @@ const PatchAgentSessionSchema = z.z.object({
15363
15548
  cost: z.z.number().optional(),
15364
15549
  error: ErrorDataSchema.optional(),
15365
15550
  opencodeSessionUuid: z.z.string().optional(),
15551
+ output: z.z.record(z.z.string(), z.z.unknown()).optional(),
15366
15552
  status: z.z.enum(exports.AgentSessionStatus).optional(),
15367
15553
  });
15368
15554
 
@@ -15763,6 +15949,17 @@ class UI {
15763
15949
  });
15764
15950
  });
15765
15951
  }
15952
+ async UNSAFE_agentSession(options) {
15953
+ const { url, postData } = await this.client.getScreensPostData('agent-session', {
15954
+ sessionId: options.sessionId,
15955
+ theme: options.theme,
15956
+ });
15957
+ return new Promise((resolve) => {
15958
+ return openIframeWithPost(url, postData, {
15959
+ onClose: () => resolve(),
15960
+ });
15961
+ });
15962
+ }
15766
15963
  }
15767
15964
 
15768
15965
  class MembraneClient extends MembraneApiClient {