@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
@@ -3492,6 +3492,8 @@ exports.WorkspaceElementType = void 0;
3492
3492
  WorkspaceElementType["ExternalEventPull"] = "external-event-pull";
3493
3493
  WorkspaceElementType["Screen"] = "screen";
3494
3494
  WorkspaceElementType["ActionRunLogRecord"] = "action-run-log-record";
3495
+ WorkspaceElementType["ExternalApiLogRecord"] = "external-api-log-record";
3496
+ WorkspaceElementType["IncomingWebhookLogRecord"] = "incoming-webhook-log-record";
3495
3497
  WorkspaceElementType["ConnectedProduct"] = "connected-product";
3496
3498
  })(exports.WorkspaceElementType || (exports.WorkspaceElementType = {}));
3497
3499
  exports.WorkspaceEventType = void 0;
@@ -3690,6 +3692,7 @@ const ActivityLogRecord = TenantLayerElement.extend({
3690
3692
  id: z.z.string(),
3691
3693
  integrationId: z.z.string().optional(),
3692
3694
  connectionId: z.z.string().optional(),
3695
+ externalAppId: z.z.string().optional(),
3693
3696
  });
3694
3697
  const WorkspaceElementSearchQuery = z.z.object({
3695
3698
  q: z.z.string().min(1).max(200),
@@ -3763,6 +3766,9 @@ const FieldMappingEditableProperties = BaseIntegrationLevelMembraneInterfaceEdit
3763
3766
  }).extend(FieldMappingSpecificProperties.shape);
3764
3767
  const FieldMappingExportProperties = BaseIntegrationLevelMembraneInterfaceExportProperties.extend(FieldMappingSpecificProperties.shape).omit({
3765
3768
  connectionId: true,
3769
+ fieldMappingId: true,
3770
+ universalFieldMappingId: true,
3771
+ dataSourceId: true,
3766
3772
  });
3767
3773
  const FieldMappingReadOnlyProperties = BaseIntegrationLevelMembraneInterfaceReadOnlyProperties.extend({
3768
3774
  ...TenantLayerElement.partial().shape,
@@ -9125,6 +9131,7 @@ const GeneratedConnectorOption = z.z.object({
9125
9131
  description: z.z.string().optional(),
9126
9132
  inputSchema: DataSchema.optional(),
9127
9133
  connectorParametersSchema: DataSchema.optional(),
9134
+ oAuthCallbackUri: z.z.string().optional(),
9128
9135
  });
9129
9136
  const ConnectorOptions = z.z.record(z.z.string(), ConnectorOption);
9130
9137
  const WritableConnectorVersionData = ConnectorAuthWithFunctions.extend({
@@ -9171,6 +9178,8 @@ const WriteableConnectorFields = z.z
9171
9178
  .extend(WritableConnectorVersionData.shape);
9172
9179
  const ConnectorExportProperties = WriteableConnectorFields.extend({
9173
9180
  uuid: z.z.string().optional(),
9181
+ }).omit({
9182
+ externalAppId: true,
9174
9183
  });
9175
9184
  const UpdateConnectorRequest = WriteableConnectorFields;
9176
9185
  const CreateConnectorRequest = WriteableConnectorFields.extend({
@@ -9232,6 +9241,8 @@ const DataSourceExportProperties = BaseIntegrationLevelMembraneInterfaceExportPr
9232
9241
  })
9233
9242
  .omit({
9234
9243
  connectionId: true,
9244
+ dataSourceId: true,
9245
+ universalDataSourceId: true,
9235
9246
  });
9236
9247
  const DataSourceReadOnlyProperties = BaseIntegrationLevelMembraneInterfaceReadOnlyProperties.extend({
9237
9248
  ...TenantLayerElement.partial().shape,
@@ -9722,6 +9733,8 @@ const FlowEditableProperties = BaseIntegrationLevelMembraneInterfaceEditableProp
9722
9733
  }).extend(FlowSpecificProperties.shape);
9723
9734
  const FlowExportProperties = BaseIntegrationLevelMembraneInterfaceExportProperties.extend(FlowSpecificProperties.shape).omit({
9724
9735
  connectionId: true,
9736
+ flowId: true,
9737
+ universalFlowId: true,
9725
9738
  });
9726
9739
  const FlowReadOnlyProperties = BaseIntegrationLevelMembraneInterfaceReadOnlyProperties.extend({
9727
9740
  ...TenantLayerElement.partial().shape,
@@ -9843,7 +9856,10 @@ const IntegrationEditableProperties = BaseMembraneInterfaceEditableProperties.ex
9843
9856
  parameters: z.z.record(z.z.string(), z.z.any()).optional(),
9844
9857
  optionsConfig: IntegrationOptions.optional(),
9845
9858
  });
9846
- const IntegrationExportProperties = IntegrationEditableProperties;
9859
+ const IntegrationExportProperties = IntegrationEditableProperties.omit({
9860
+ connectorId: true,
9861
+ externalAppId: true,
9862
+ });
9847
9863
  const AppliedToIntegrations = (elementSchema) => z.z.array(z.z.object({
9848
9864
  element: elementSchema,
9849
9865
  integration: BaseIntegration,
@@ -9942,6 +9958,7 @@ const DataLinkTableSpecificProperties = z.z.object({
9942
9958
  const DataLinkTableEditableProperties = BaseMembraneInterfaceEditableProperties.extend(DataLinkTableSpecificProperties.shape);
9943
9959
  const DataLinkTableExportProperties = BaseMembraneInterfaceEditableProperties.extend(DataLinkTableSpecificProperties.shape).omit({
9944
9960
  connectionId: true,
9961
+ dataLinkTableId: true,
9945
9962
  });
9946
9963
  const DataLinkTableReadOnlyProperties = BaseMembraneInterfaceReadOnlyProperties.extend({
9947
9964
  ...TenantLayerElement.partial().shape,
@@ -10039,7 +10056,9 @@ const AppDataSchemaSpecificProperties = z.z.object({
10039
10056
  code: z.z.string().optional(),
10040
10057
  });
10041
10058
  const AppDataSchemaEditableProperties = BaseMembraneInterfaceEditableProperties.extend(AppDataSchemaSpecificProperties.shape);
10042
- const AppDataSchemaExportProperties = AppDataSchemaEditableProperties.extend({});
10059
+ const AppDataSchemaExportProperties = AppDataSchemaEditableProperties.omit({
10060
+ appDataSchemaId: true,
10061
+ });
10043
10062
  const AppDataSchemaReadOnlyProperties = BaseMembraneInterfaceReadOnlyProperties.extend({
10044
10063
  ...TenantLayerElement.partial().shape,
10045
10064
  appDataSchemaRevision: z.z.string().optional(),
@@ -10277,6 +10296,9 @@ const FindActionRunLogsQuery = PaginationQuery.extend({
10277
10296
  .meta({
10278
10297
  filterTitle: 'Status',
10279
10298
  }),
10299
+ externalAppId: z.z.string().optional().meta({
10300
+ hidden: true,
10301
+ }),
10280
10302
  from: z.z
10281
10303
  .string()
10282
10304
  .optional()
@@ -10317,6 +10339,13 @@ const FindConnectionsQuery = PaginationQuery.merge(SearchQuery)
10317
10339
  .meta({
10318
10340
  filterTitle: 'Connector',
10319
10341
  }),
10342
+ externalAppId: z.z
10343
+ .string()
10344
+ .optional()
10345
+ .meta({
10346
+ filterTitle: 'External App',
10347
+ referenceElementType: exports.WorkspaceElementType.App,
10348
+ }),
10320
10349
  disconnected: zodBooleanCoercion()
10321
10350
  .optional()
10322
10351
  .meta({
@@ -10337,10 +10366,6 @@ const FindConnectionsQuery = PaginationQuery.merge(SearchQuery)
10337
10366
  .string()
10338
10367
  .optional()
10339
10368
  .meta({ hidden: true }),
10340
- externalAppId: z.z.string().optional().meta({
10341
- filterTitle: 'External App',
10342
- referenceElementType: exports.WorkspaceElementType.App,
10343
- }),
10344
10369
  integrationKey: z.z
10345
10370
  .string()
10346
10371
  .optional()
@@ -10363,6 +10388,7 @@ const ConnectionExportProperties = ConnectionEditableProperties.omit({
10363
10388
  credentials: true,
10364
10389
  connectorParameters: true,
10365
10390
  input: true,
10391
+ externalAppId: true,
10366
10392
  });
10367
10393
  const ConnectionTestResponse = z.z.object({
10368
10394
  success: z.z.boolean(),
@@ -10446,7 +10472,7 @@ const ConnectUIOptions = ConnectPayload.omit({ input: true, redirectUri: true })
10446
10472
  theme: z.z.enum(['light', 'dark', 'auto']).optional(),
10447
10473
  });
10448
10474
 
10449
- const ListPublicConnectorsQuery = PaginationQuery.extend({
10475
+ const ListPublicConnectorsQuery = PaginationQuery.merge(IncludeArchivedQuery).extend({
10450
10476
  search: z.z.string().optional(),
10451
10477
  });
10452
10478
 
@@ -10463,6 +10489,13 @@ const DataSourceInstanceApiResponse = DataSourceApiResponse;
10463
10489
  const FindDataSourcesQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
10464
10490
  dataSourceId: z.z.string().optional(),
10465
10491
  universalDataSourceId: z.z.string().optional(),
10492
+ externalAppId: z.z
10493
+ .string()
10494
+ .optional()
10495
+ .meta({
10496
+ filterTitle: 'External App',
10497
+ referenceElementType: exports.WorkspaceElementType.App,
10498
+ }),
10466
10499
  });
10467
10500
  const FindDataSourceInstancesQuery = FindDataSourcesQuery;
10468
10501
  const CreateDataSourceRequest = DataSourceEditableProperties;
@@ -10517,7 +10550,7 @@ const FindDataSourceInstanceSyncsQuery = ListDataSourceInstancesForConnectionQue
10517
10550
  dataSourceInstanceId: z.z.string().optional(),
10518
10551
  });
10519
10552
 
10520
- const ListExternalAppsQuery = PaginationQuery.extend({
10553
+ const ListExternalAppsQuery = PaginationQuery.merge(IncludeArchivedQuery).extend({
10521
10554
  search: z.z.string().optional(),
10522
10555
  category: z.z
10523
10556
  .string()
@@ -10546,6 +10579,13 @@ const FlowInstanceApiResponse = FlowApiResponse;
10546
10579
  const FindFlowsQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
10547
10580
  flowId: z.z.string().optional(),
10548
10581
  universalFlowId: z.z.string().optional(),
10582
+ externalAppId: z.z
10583
+ .string()
10584
+ .optional()
10585
+ .meta({
10586
+ filterTitle: 'External App',
10587
+ referenceElementType: exports.WorkspaceElementType.App,
10588
+ }),
10549
10589
  });
10550
10590
  const CreateFlowRequest = FlowEditableProperties;
10551
10591
  const UpdateFlowRequest = CreateFlowRequest.extend({}).partial();
@@ -10623,6 +10663,9 @@ const FindFlowRunsQuery = PaginationQuery.extend({
10623
10663
  filterTitle: 'Connection',
10624
10664
  referenceElementType: exports.WorkspaceElementType.Connection,
10625
10665
  }),
10666
+ externalAppId: z.z.string().optional().meta({
10667
+ hidden: true,
10668
+ }),
10626
10669
  from: z.z
10627
10670
  .string()
10628
10671
  .optional()
@@ -10660,7 +10703,8 @@ const FindIntegrationsQuery = z.z
10660
10703
  appUuid: z.z.string().optional(),
10661
10704
  })
10662
10705
  .merge(PaginationQuery)
10663
- .merge(SearchQuery);
10706
+ .merge(SearchQuery)
10707
+ .merge(IncludeArchivedQuery);
10664
10708
  const IntegrationAuthUi = z.z.object({
10665
10709
  schema: z.z.any().optional(),
10666
10710
  helpUri: z.z.string().optional(),
@@ -10767,7 +10811,8 @@ const FindCustomersQuery = z.z
10767
10811
  }),
10768
10812
  })
10769
10813
  .merge(PaginationQuery)
10770
- .merge(SearchQuery);
10814
+ .merge(SearchQuery)
10815
+ .merge(IncludeArchivedQuery);
10771
10816
  const CustomerSelector = z.z.object({ id: z.z.string() });
10772
10817
  const CustomerApiResponse = BaseCustomer;
10773
10818
  const TenantSelfResponse = BaseCustomer.extend({
@@ -10785,6 +10830,13 @@ const FieldMappingInstanceApiResponse = FieldMappingApiResponse;
10785
10830
  const FindFieldMappingsQuery = FindIntegrationLevelMembraneInterfaceQuery.omit({ parentId: true }).extend({
10786
10831
  fieldMappingId: z.z.string().optional(),
10787
10832
  universalFieldMappingId: z.z.string().optional(),
10833
+ externalAppId: z.z
10834
+ .string()
10835
+ .optional()
10836
+ .meta({
10837
+ filterTitle: 'External App',
10838
+ referenceElementType: exports.WorkspaceElementType.App,
10839
+ }),
10788
10840
  });
10789
10841
  const FindFieldMappingInstancesQuery = FindFieldMappingsQuery;
10790
10842
  const CreateFieldMappingRequest = FieldMappingEditableProperties;
@@ -11056,6 +11108,9 @@ const ListExternalEventLogRecordsQuery = PaginationQuery.extend({
11056
11108
  .meta({
11057
11109
  filterTitle: 'Status',
11058
11110
  }),
11111
+ externalAppId: z.z.string().optional().meta({
11112
+ hidden: true,
11113
+ }),
11059
11114
  from: z.z
11060
11115
  .string()
11061
11116
  .optional()
@@ -11145,6 +11200,9 @@ const FindExternalEventPullsQuery = PaginationQuery.extend({
11145
11200
  .meta({
11146
11201
  filterTitle: 'Status',
11147
11202
  }),
11203
+ externalAppId: z.z.string().optional().meta({
11204
+ hidden: true,
11205
+ }),
11148
11206
  from: z.z
11149
11207
  .string()
11150
11208
  .optional()
@@ -11192,6 +11250,9 @@ const ListExternalEventSubscriptionsQuery = PaginationQuery.merge(IncludeArchive
11192
11250
  filterTitle: 'Integration',
11193
11251
  referenceElementType: exports.WorkspaceElementType.Integration,
11194
11252
  }),
11253
+ externalAppId: z.z.string().optional().meta({
11254
+ hidden: true,
11255
+ }),
11195
11256
  });
11196
11257
  const ExternalEventSubscriptionApiResponse = BaseExternalEventSubscription.extend({
11197
11258
  user: BaseCustomer.optional(),
@@ -11274,6 +11335,9 @@ const ListExternalApiLogsQuery = PaginationQuery.extend({
11274
11335
  filterTitle: 'Status',
11275
11336
  isFlag: true,
11276
11337
  }),
11338
+ externalAppId: z.z.string().optional().meta({
11339
+ hidden: true,
11340
+ }),
11277
11341
  from: z.z
11278
11342
  .string()
11279
11343
  .optional()
@@ -11298,6 +11362,7 @@ const ExternalApiLogApiResponse = z.z.object({
11298
11362
  customerId: z.z.string(),
11299
11363
  integrationId: z.z.string(),
11300
11364
  connectionId: z.z.string(),
11365
+ externalAppId: z.z.string().optional(),
11301
11366
  statusCode: z.z.number(),
11302
11367
  isSuccess: z.z.boolean(),
11303
11368
  s3Uri: z.z.string(),
@@ -11337,6 +11402,9 @@ const ListIncomingWebhooksQuery = PaginationQuery.extend({
11337
11402
  .meta({
11338
11403
  filterTitle: 'Status',
11339
11404
  }),
11405
+ externalAppId: z.z.string().optional().meta({
11406
+ hidden: true,
11407
+ }),
11340
11408
  from: z.z
11341
11409
  .string()
11342
11410
  .optional()
@@ -11359,6 +11427,7 @@ const IncomingWebhookApiResponse = z.z.object({
11359
11427
  customerId: z.z.string(),
11360
11428
  integrationId: z.z.string(),
11361
11429
  connectionId: z.z.string(),
11430
+ externalAppId: z.z.string().optional(),
11362
11431
  subscriptionId: z.z.string(),
11363
11432
  userId: z.z.string(),
11364
11433
  uuid: z.z.string(),
@@ -11372,12 +11441,14 @@ const IncomingWebhookApiResponse = z.z.object({
11372
11441
 
11373
11442
  const CreateConnectedProductRequest = z.z.object({
11374
11443
  name: z.z.string(),
11444
+ key: z.z.string().optional(),
11375
11445
  type: ConnectedProductType,
11376
11446
  audience: ConnectedProductAudience.optional(),
11377
11447
  parameters: AiAgentParameters.optional(),
11378
11448
  });
11379
11449
  const UpdateConnectedProductRequest = z.z.object({
11380
11450
  name: z.z.string().optional(),
11451
+ key: z.z.string().optional(),
11381
11452
  type: ConnectedProductType.optional(),
11382
11453
  audience: ConnectedProductAudience.optional(),
11383
11454
  parameters: AiAgentParameters.optional(),
@@ -11386,7 +11457,6 @@ const FindConnectedProductsQuery = z.z
11386
11457
  .object({
11387
11458
  type: ConnectedProductType.optional(),
11388
11459
  audience: ConnectedProductAudience.optional(),
11389
- key: z.z.string().optional(),
11390
11460
  })
11391
11461
  .merge(PaginationQuery)
11392
11462
  .merge(SearchQuery)
@@ -11712,6 +11782,26 @@ const WorkspaceElementSpecs = {
11712
11782
  apiPath: 'customers',
11713
11783
  name: 'Customer',
11714
11784
  namePlural: 'Customers',
11785
+ relatedIntegrationLayerElements: [
11786
+ exports.WorkspaceElementType.Connection,
11787
+ exports.WorkspaceElementType.Action,
11788
+ exports.WorkspaceElementType.Flow,
11789
+ exports.WorkspaceElementType.ExternalEventSubscription,
11790
+ exports.WorkspaceElementType.AppEventSubscription,
11791
+ exports.WorkspaceElementType.DataSource,
11792
+ exports.WorkspaceElementType.FieldMapping,
11793
+ exports.WorkspaceElementType.AppDataSchemaInstance,
11794
+ exports.WorkspaceElementType.DataLinkTableInstance,
11795
+ ],
11796
+ relatedActivityLogElements: [
11797
+ exports.WorkspaceElementType.FlowRun,
11798
+ exports.WorkspaceElementType.ActionRunLogRecord,
11799
+ exports.WorkspaceElementType.ExternalApiLogRecord,
11800
+ exports.WorkspaceElementType.IncomingWebhookLogRecord,
11801
+ exports.WorkspaceElementType.ExternalEventLogRecord,
11802
+ exports.WorkspaceElementType.ExternalEventPull,
11803
+ exports.WorkspaceElementType.AppEventLogRecord,
11804
+ ],
11715
11805
  },
11716
11806
  [exports.WorkspaceElementType.App]: {
11717
11807
  type: exports.WorkspaceElementType.App,
@@ -11720,6 +11810,21 @@ const WorkspaceElementSpecs = {
11720
11810
  namePlural: 'Apps',
11721
11811
  hasKey: true,
11722
11812
  hasPublicLayer: true,
11813
+ relatedIntegrationLayerElements: [
11814
+ exports.WorkspaceElementType.Connection,
11815
+ exports.WorkspaceElementType.Action,
11816
+ exports.WorkspaceElementType.Flow,
11817
+ exports.WorkspaceElementType.DataSource,
11818
+ exports.WorkspaceElementType.FieldMapping,
11819
+ ],
11820
+ relatedActivityLogElements: [
11821
+ exports.WorkspaceElementType.FlowRun,
11822
+ exports.WorkspaceElementType.ActionRunLogRecord,
11823
+ exports.WorkspaceElementType.ExternalApiLogRecord,
11824
+ exports.WorkspaceElementType.IncomingWebhookLogRecord,
11825
+ exports.WorkspaceElementType.ExternalEventLogRecord,
11826
+ exports.WorkspaceElementType.ExternalEventPull,
11827
+ ],
11723
11828
  },
11724
11829
  [exports.WorkspaceElementType.Integration]: {
11725
11830
  type: exports.WorkspaceElementType.Integration,
@@ -11729,6 +11834,27 @@ const WorkspaceElementSpecs = {
11729
11834
  editablePropertiesSchema: IntegrationEditableProperties,
11730
11835
  exportPropertiesSchema: IntegrationExportProperties,
11731
11836
  hasKey: true,
11837
+ relatedIntegrationLayerElements: [
11838
+ exports.WorkspaceElementType.Connection,
11839
+ exports.WorkspaceElementType.Package,
11840
+ exports.WorkspaceElementType.Action,
11841
+ exports.WorkspaceElementType.Flow,
11842
+ exports.WorkspaceElementType.ExternalEventSubscription,
11843
+ exports.WorkspaceElementType.AppEventSubscription,
11844
+ exports.WorkspaceElementType.DataSource,
11845
+ exports.WorkspaceElementType.FieldMapping,
11846
+ exports.WorkspaceElementType.AppDataSchemaInstance,
11847
+ exports.WorkspaceElementType.DataLinkTableInstance,
11848
+ ],
11849
+ relatedActivityLogElements: [
11850
+ exports.WorkspaceElementType.FlowRun,
11851
+ exports.WorkspaceElementType.ActionRunLogRecord,
11852
+ exports.WorkspaceElementType.ExternalApiLogRecord,
11853
+ exports.WorkspaceElementType.IncomingWebhookLogRecord,
11854
+ exports.WorkspaceElementType.ExternalEventLogRecord,
11855
+ exports.WorkspaceElementType.ExternalEventPull,
11856
+ exports.WorkspaceElementType.AppEventLogRecord,
11857
+ ],
11732
11858
  },
11733
11859
  [exports.WorkspaceElementType.Connector]: {
11734
11860
  type: exports.WorkspaceElementType.Connector,
@@ -11747,6 +11873,26 @@ const WorkspaceElementSpecs = {
11747
11873
  exportPropertiesSchema: ConnectionExportProperties,
11748
11874
  hasKey: false,
11749
11875
  hasUuid: false,
11876
+ statsKey: 'connections',
11877
+ relatedIntegrationLayerElements: [
11878
+ exports.WorkspaceElementType.Action,
11879
+ exports.WorkspaceElementType.Flow,
11880
+ exports.WorkspaceElementType.ExternalEventSubscription,
11881
+ exports.WorkspaceElementType.AppEventSubscription,
11882
+ exports.WorkspaceElementType.DataSource,
11883
+ exports.WorkspaceElementType.FieldMapping,
11884
+ exports.WorkspaceElementType.AppDataSchemaInstance,
11885
+ exports.WorkspaceElementType.DataLinkTableInstance,
11886
+ ],
11887
+ relatedActivityLogElements: [
11888
+ exports.WorkspaceElementType.FlowRun,
11889
+ exports.WorkspaceElementType.ActionRunLogRecord,
11890
+ exports.WorkspaceElementType.ExternalApiLogRecord,
11891
+ exports.WorkspaceElementType.IncomingWebhookLogRecord,
11892
+ exports.WorkspaceElementType.ExternalEventLogRecord,
11893
+ exports.WorkspaceElementType.ExternalEventPull,
11894
+ exports.WorkspaceElementType.AppEventLogRecord,
11895
+ ],
11750
11896
  },
11751
11897
  [exports.WorkspaceElementType.Package]: {
11752
11898
  type: exports.WorkspaceElementType.Package,
@@ -11763,6 +11909,7 @@ const WorkspaceElementSpecs = {
11763
11909
  hasParentChildRelationship: true,
11764
11910
  hasPublicLayer: true,
11765
11911
  isProOnly: true,
11912
+ statsKey: 'packages',
11766
11913
  },
11767
11914
  [exports.WorkspaceElementType.ActionInstance]: {
11768
11915
  type: exports.WorkspaceElementType.ActionInstance,
@@ -11789,12 +11936,14 @@ const WorkspaceElementSpecs = {
11789
11936
  hasParentChildRelationship: true,
11790
11937
  hasKey: true,
11791
11938
  hasPublicLayer: true,
11939
+ statsKey: 'actions',
11792
11940
  },
11793
11941
  [exports.WorkspaceElementType.ActionRunLogRecord]: {
11794
11942
  type: exports.WorkspaceElementType.ActionRunLogRecord,
11795
11943
  apiPath: 'action-run-logs',
11796
11944
  name: 'Action Run Log Record',
11797
11945
  namePlural: 'Action Run Log Records',
11946
+ statsKey: 'actionRunLogs',
11798
11947
  },
11799
11948
  [exports.WorkspaceElementType.Flow]: {
11800
11949
  type: exports.WorkspaceElementType.Flow,
@@ -11812,6 +11961,7 @@ const WorkspaceElementSpecs = {
11812
11961
  hasParentChildRelationship: true,
11813
11962
  hasKey: true,
11814
11963
  isProOnly: true,
11964
+ statsKey: 'flows',
11815
11965
  },
11816
11966
  [exports.WorkspaceElementType.FlowInstance]: {
11817
11967
  type: exports.WorkspaceElementType.FlowInstance,
@@ -11832,6 +11982,7 @@ const WorkspaceElementSpecs = {
11832
11982
  name: 'Flow run',
11833
11983
  namePlural: 'Flow runs',
11834
11984
  isProOnly: true,
11985
+ statsKey: 'flowRuns',
11835
11986
  },
11836
11987
  [exports.WorkspaceElementType.FieldMapping]: {
11837
11988
  type: exports.WorkspaceElementType.FieldMapping,
@@ -11849,6 +12000,7 @@ const WorkspaceElementSpecs = {
11849
12000
  hasParentChildRelationship: true,
11850
12001
  hasKey: true,
11851
12002
  isProOnly: true,
12003
+ statsKey: 'fieldMappings',
11852
12004
  },
11853
12005
  [exports.WorkspaceElementType.FieldMappingInstance]: {
11854
12006
  type: exports.WorkspaceElementType.FieldMappingInstance,
@@ -11878,6 +12030,7 @@ const WorkspaceElementSpecs = {
11878
12030
  hasParentChildRelationship: true,
11879
12031
  hasKey: true,
11880
12032
  isProOnly: true,
12033
+ statsKey: 'dataSources',
11881
12034
  },
11882
12035
  [exports.WorkspaceElementType.DataSourceInstance]: {
11883
12036
  type: exports.WorkspaceElementType.DataSourceInstance,
@@ -11912,6 +12065,7 @@ const WorkspaceElementSpecs = {
11912
12065
  parentFieldKey: 'dataLinkTableId',
11913
12066
  isMembraneInterface: true,
11914
12067
  isProOnly: true,
12068
+ statsKey: 'dataLinkTableInstances',
11915
12069
  },
11916
12070
  [exports.WorkspaceElementType.AppEventType]: {
11917
12071
  type: exports.WorkspaceElementType.AppEventType,
@@ -11932,6 +12086,7 @@ const WorkspaceElementSpecs = {
11932
12086
  namePlural: 'App Event Subscriptions',
11933
12087
  isMembraneInterface: true,
11934
12088
  isProOnly: true,
12089
+ statsKey: 'appEventSubscriptions',
11935
12090
  },
11936
12091
  [exports.WorkspaceElementType.AppEventLogRecord]: {
11937
12092
  type: exports.WorkspaceElementType.AppEventLogRecord,
@@ -11939,6 +12094,7 @@ const WorkspaceElementSpecs = {
11939
12094
  name: 'App Event Log Record',
11940
12095
  namePlural: 'App Event Log Records',
11941
12096
  isProOnly: true,
12097
+ statsKey: 'appEvents',
11942
12098
  },
11943
12099
  [exports.WorkspaceElementType.AppDataSchema]: {
11944
12100
  type: exports.WorkspaceElementType.AppDataSchema,
@@ -11960,6 +12116,7 @@ const WorkspaceElementSpecs = {
11960
12116
  parentFieldKey: 'appDataSchemaId',
11961
12117
  isMembraneInterface: true,
11962
12118
  isProOnly: true,
12119
+ statsKey: 'appDataSchemaInstances',
11963
12120
  },
11964
12121
  [exports.WorkspaceElementType.ExternalEventSubscription]: {
11965
12122
  type: exports.WorkspaceElementType.ExternalEventSubscription,
@@ -11968,6 +12125,7 @@ const WorkspaceElementSpecs = {
11968
12125
  namePlural: 'External Event Subscriptions',
11969
12126
  isMembraneInterface: true,
11970
12127
  isProOnly: true,
12128
+ statsKey: 'externalEventSubscriptions',
11971
12129
  },
11972
12130
  [exports.WorkspaceElementType.ExternalEventLogRecord]: {
11973
12131
  type: exports.WorkspaceElementType.ExternalEventLogRecord,
@@ -11975,6 +12133,7 @@ const WorkspaceElementSpecs = {
11975
12133
  name: 'External Event Log Record',
11976
12134
  namePlural: 'External Event Log Records',
11977
12135
  isProOnly: true,
12136
+ statsKey: 'externalEvents',
11978
12137
  },
11979
12138
  [exports.WorkspaceElementType.ExternalEventPull]: {
11980
12139
  type: exports.WorkspaceElementType.ExternalEventPull,
@@ -11982,6 +12141,21 @@ const WorkspaceElementSpecs = {
11982
12141
  name: 'External Event Pull',
11983
12142
  namePlural: 'External Event Pulls',
11984
12143
  isProOnly: true,
12144
+ statsKey: 'externalEventPulls',
12145
+ },
12146
+ [exports.WorkspaceElementType.ExternalApiLogRecord]: {
12147
+ type: exports.WorkspaceElementType.ExternalApiLogRecord,
12148
+ apiPath: 'external-api-logs',
12149
+ name: 'External API Log Record',
12150
+ namePlural: 'External API Log Records',
12151
+ statsKey: 'externalApiLogs',
12152
+ },
12153
+ [exports.WorkspaceElementType.IncomingWebhookLogRecord]: {
12154
+ type: exports.WorkspaceElementType.IncomingWebhookLogRecord,
12155
+ apiPath: 'incoming-webhooks',
12156
+ name: 'Incoming Webhook Log Record',
12157
+ namePlural: 'Incoming Webhook Log Records',
12158
+ statsKey: 'externalWebhookLogs',
11985
12159
  },
11986
12160
  [exports.WorkspaceElementType.Screen]: {
11987
12161
  type: exports.WorkspaceElementType.Screen,
@@ -12385,20 +12559,21 @@ const StatsFilterQuery = z.z.object({
12385
12559
  tenantId: z.z.string().optional(),
12386
12560
  integrationId: z.z.string().optional(),
12387
12561
  connectionId: z.z.string().optional(),
12562
+ externalAppId: z.z.string().optional(),
12388
12563
  });
12389
12564
  const ActivityStatsQuery = StatsFilterQuery.extend({
12390
12565
  startDatetime: z.z.string().datetime({ offset: true }),
12566
+ elementType: z.z.enum(exports.WorkspaceElementType).optional(),
12567
+ });
12568
+ const IntegrationLayerStatsQuery = StatsFilterQuery.extend({
12569
+ elementType: z.z.enum(exports.WorkspaceElementType).optional(),
12391
12570
  });
12392
- const IntegrationLayerStatsQuery = StatsFilterQuery;
12393
12571
  const ActionRunsStatsQuery = z.z.object({
12394
- actionId: z.z.string().optional(),
12395
- connectionActionId: z.z.string().optional(),
12572
+ actionId: z.z.string(),
12396
12573
  startDatetime: z.z.string().datetime({ offset: true }),
12397
12574
  });
12398
12575
  const FlowRunsStatsQuery = z.z.object({
12399
- integrationFlowId: z.z.string().optional(),
12400
- connectionFlowId: z.z.string().optional(),
12401
- universalFlowId: z.z.string().optional(),
12576
+ flowId: z.z.string(),
12402
12577
  startDatetime: z.z.string().datetime({ offset: true }),
12403
12578
  });
12404
12579
  const WORKSPACE_ELEMENTS_STATS_COLLECTIONS = [
@@ -12603,6 +12778,8 @@ exports.AlertType = void 0;
12603
12778
  AlertType["totalNumberOfWorkspaceElements"] = "totalNumberOfWorkspaceElements";
12604
12779
  AlertType["instantTasksQueueSize"] = "instantTasksQueueSize";
12605
12780
  AlertType["queuedTasksQueueSize"] = "queuedTasksQueueSize";
12781
+ AlertType["flowRunsQueueSizePerConnection"] = "flowRunsQueueSizePerConnection";
12782
+ AlertType["eventsProcessingQueueSizePerConnection"] = "eventsProcessingQueueSizePerConnection";
12606
12783
  AlertType["parallelApiRequests"] = "parallelApiRequests";
12607
12784
  AlertType["testAlert"] = "testAlert";
12608
12785
  })(exports.AlertType || (exports.AlertType = {}));
@@ -12638,6 +12815,8 @@ const ALERT_TYPE_CATEGORIES = {
12638
12815
  [exports.AlertType.totalNumberOfWorkspaceElements]: exports.AlertCategory.WORKSPACE_SIZE,
12639
12816
  [exports.AlertType.instantTasksQueueSize]: exports.AlertCategory.WORKSPACE_SIZE,
12640
12817
  [exports.AlertType.queuedTasksQueueSize]: exports.AlertCategory.WORKSPACE_SIZE,
12818
+ [exports.AlertType.flowRunsQueueSizePerConnection]: exports.AlertCategory.WORKSPACE_SIZE,
12819
+ [exports.AlertType.eventsProcessingQueueSizePerConnection]: exports.AlertCategory.WORKSPACE_SIZE,
12641
12820
  [exports.AlertType.parallelApiRequests]: exports.AlertCategory.RATE_LIMIT,
12642
12821
  };
12643
12822
  const Alert = z.z.object({
@@ -12735,6 +12914,8 @@ function getAlertTypeDisplayName(alertType) {
12735
12914
  [exports.AlertType.totalNumberOfWorkspaceElements]: 'Total Number of Workspace Elements',
12736
12915
  [exports.AlertType.instantTasksQueueSize]: 'Instant Tasks Queue Size',
12737
12916
  [exports.AlertType.queuedTasksQueueSize]: 'Queued Tasks Queue Size',
12917
+ [exports.AlertType.flowRunsQueueSizePerConnection]: 'Flow Runs Queue Size Per Connection',
12918
+ [exports.AlertType.eventsProcessingQueueSizePerConnection]: 'Events Processing Queue Size Per Connection',
12738
12919
  [exports.AlertType.parallelApiRequests]: 'Parallel API Requests',
12739
12920
  };
12740
12921
  return names[alertType] || alertType;
@@ -12822,6 +13003,8 @@ exports.WorkspaceSizeLimits = void 0;
12822
13003
  WorkspaceSizeLimits["TotalNumberOfWorkspaceElements"] = "totalNumberOfWorkspaceElements";
12823
13004
  WorkspaceSizeLimits["InstantTasksQueueSize"] = "instantTasksQueueSize";
12824
13005
  WorkspaceSizeLimits["QueuedTasksQueueSize"] = "queuedTasksQueueSize";
13006
+ WorkspaceSizeLimits["FlowRunsQueueSizePerConnection"] = "flowRunsQueueSizePerConnection";
13007
+ WorkspaceSizeLimits["EventsProcessingQueueSizePerConnection"] = "eventsProcessingQueueSizePerConnection";
12825
13008
  })(exports.WorkspaceSizeLimits || (exports.WorkspaceSizeLimits = {}));
12826
13009
  exports.CustomerLimits = void 0;
12827
13010
  (function (CustomerLimits) {
@@ -12959,6 +13142,7 @@ const WORKSPACE_SIZE_LIMITS = [
12959
13142
  const EDITABLE_LIMITS = [
12960
13143
  'parallelApiRequestsPerCustomer',
12961
13144
  'parallelBackgroundJobsPerCustomer',
13145
+ 'parallelCustomCodeRunsPerCustomer',
12962
13146
  'apiRequestsPerCustomerPerSecond',
12963
13147
  'apiRequestsPerCustomerPerHour',
12964
13148
  'externalEventsPerCustomerPerDay',
@@ -15332,6 +15516,7 @@ const AgentSession = z.z.object({
15332
15516
  hasWorker: z.z.boolean(),
15333
15517
  isExternal: z.z.boolean().optional(),
15334
15518
  agentName: z.z.enum(exports.AgentName).optional(),
15519
+ output: z.z.record(z.z.string(), z.z.unknown()).optional(),
15335
15520
  createdAt: z.z.iso.datetime(),
15336
15521
  updatedAt: z.z.iso.datetime(),
15337
15522
  });
@@ -15359,6 +15544,7 @@ const PatchAgentSessionSchema = z.z.object({
15359
15544
  cost: z.z.number().optional(),
15360
15545
  error: ErrorDataSchema.optional(),
15361
15546
  opencodeSessionUuid: z.z.string().optional(),
15547
+ output: z.z.record(z.z.string(), z.z.unknown()).optional(),
15362
15548
  status: z.z.enum(exports.AgentSessionStatus).optional(),
15363
15549
  });
15364
15550
 
@@ -15759,6 +15945,17 @@ class UI {
15759
15945
  });
15760
15946
  });
15761
15947
  }
15948
+ async UNSAFE_agentSession(options) {
15949
+ const { url, postData } = await this.client.getScreensPostData('agent-session', {
15950
+ sessionId: options.sessionId,
15951
+ theme: options.theme,
15952
+ });
15953
+ return new Promise((resolve) => {
15954
+ return openIframeWithPost(url, postData, {
15955
+ onClose: () => resolve(),
15956
+ });
15957
+ });
15958
+ }
15762
15959
  }
15763
15960
 
15764
15961
  class MembraneClient extends MembraneApiClient {