@membranehq/sdk 0.11.1 → 0.11.3

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 (31) hide show
  1. package/dist/bundle.d.ts +4492 -4487
  2. package/dist/bundle.js +1 -0
  3. package/dist/bundle.js.map +1 -1
  4. package/dist/dts/alerts/types.d.ts +0 -8
  5. package/dist/dts/async-requests/index.d.ts +1 -0
  6. package/dist/dts/async-requests/types.d.ts +20 -0
  7. package/dist/dts/index.browser.d.ts +1 -0
  8. package/dist/dts/orgs/types.d.ts +28 -2
  9. package/dist/dts/workspace-elements/api/actions-api.d.ts +19 -19
  10. package/dist/dts/workspace-elements/api/app-data-schema-instances-api.d.ts +12 -9
  11. package/dist/dts/workspace-elements/api/app-event-subscriptions-api.d.ts +3 -2
  12. package/dist/dts/workspace-elements/api/connections-api.d.ts +11 -12
  13. package/dist/dts/workspace-elements/api/data-link-table-instances-api.d.ts +5 -4
  14. package/dist/dts/workspace-elements/api/external-apps-api.d.ts +0 -2
  15. package/dist/dts/workspace-elements/api/external-event-subscriptions-api.d.ts +3 -2
  16. package/dist/dts/workspace-elements/api/packages-api.d.ts +5 -5
  17. package/dist/dts/workspace-elements/types.d.ts +5 -5
  18. package/dist/dts/workspaces/types.d.ts +33 -5
  19. package/dist/index.browser.d.mts +129 -60
  20. package/dist/index.browser.d.ts +129 -60
  21. package/dist/index.browser.js +158 -24
  22. package/dist/index.browser.js.map +1 -1
  23. package/dist/index.browser.mjs +156 -25
  24. package/dist/index.browser.mjs.map +1 -1
  25. package/dist/index.node.d.mts +129 -60
  26. package/dist/index.node.d.ts +129 -60
  27. package/dist/index.node.js +158 -24
  28. package/dist/index.node.js.map +1 -1
  29. package/dist/index.node.mjs +156 -25
  30. package/dist/index.node.mjs.map +1 -1
  31. package/package.json +1 -1
@@ -3616,6 +3616,7 @@ const FindIntegrationLevelMembraneInterfaceQuery = IntegrationLevelMembraneInter
3616
3616
  filterTitle: 'Is Universal',
3617
3617
  isFlag: true,
3618
3618
  }),
3619
+ layer: MembraneElementLayer.optional(),
3619
3620
  });
3620
3621
  const BaseIntegrationLevelMembraneInterface = BaseMembraneInterface.merge(BaseIntegrationLevelMembraneInterfaceEditableProperties).merge(BaseIntegrationLevelMembraneInterfaceReadOnlyProperties);
3621
3622
  const WorkspaceElementSearchQuery = z.z.object({
@@ -10035,6 +10036,12 @@ const ActionApiResponse = BaseAction.extend({
10035
10036
  dependencies: z.z.array(z.z.any()).optional(),
10036
10037
  });
10037
10038
  const FindActionsQuery = FindIntegrationLevelMembraneInterfaceQuery.extend({
10039
+ isUniversal: zodBooleanCoercion()
10040
+ .optional()
10041
+ .meta({
10042
+ filterTitle: 'Is Universal',
10043
+ isFlag: true,
10044
+ }),
10038
10045
  externalAppId: z.z
10039
10046
  .string()
10040
10047
  .optional()
@@ -10042,6 +10049,15 @@ const FindActionsQuery = FindIntegrationLevelMembraneInterfaceQuery.extend({
10042
10049
  filterTitle: 'External App',
10043
10050
  referenceElementType: exports.WorkspaceElementType.App,
10044
10051
  }),
10052
+ layer: MembraneElementLayer.optional(),
10053
+ parentId: z.z
10054
+ .string()
10055
+ .optional()
10056
+ .meta({ hidden: true }),
10057
+ universalParentId: z.z
10058
+ .string()
10059
+ .optional()
10060
+ .meta({ hidden: true }),
10045
10061
  });
10046
10062
  const CreateActionRequest = ActionEditableProperties;
10047
10063
  const UpdateActionRequest = CreateActionRequest.partial();
@@ -10076,17 +10092,56 @@ const FindActionRunLogsQuery = PaginationQuery.extend({
10076
10092
  });
10077
10093
  const FindActionRunLogsResponse = createPaginationResponseSchema(ActionRunLogRecordApiResponse);
10078
10094
 
10079
- const FindConnectionsQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchivedQuery).extend({
10080
- connectorId: z.z.string().optional(),
10081
- connectorVersion: z.z.string().optional(),
10082
- id: z.z.string().optional(),
10083
- userId: z.z.string().optional(),
10084
- name: z.z.string().optional(),
10085
- isTest: zodBooleanCoercion().optional(),
10086
- disconnected: zodBooleanCoercion().optional(),
10087
- integrationId: z.z.string().optional(),
10088
- integrationKey: z.z.string().optional(),
10089
- includeSecrets: zodBooleanCoercion().optional(),
10095
+ const FindConnectionsQuery = PaginationQuery.merge(SearchQuery)
10096
+ .merge(IncludeArchivedQuery)
10097
+ .extend({
10098
+ tenantId: z.z
10099
+ .string()
10100
+ .optional()
10101
+ .meta({
10102
+ filterTitle: 'Customer',
10103
+ referenceElementType: exports.WorkspaceElementType.Customer,
10104
+ }),
10105
+ integrationId: z.z
10106
+ .string()
10107
+ .optional()
10108
+ .meta({
10109
+ filterTitle: 'Integration',
10110
+ referenceElementType: exports.WorkspaceElementType.Integration,
10111
+ }),
10112
+ connectorId: z.z
10113
+ .string()
10114
+ .optional()
10115
+ .meta({
10116
+ filterTitle: 'Connector',
10117
+ }),
10118
+ disconnected: zodBooleanCoercion()
10119
+ .optional()
10120
+ .meta({
10121
+ filterTitle: 'Disconnected',
10122
+ isFlag: true,
10123
+ }),
10124
+ isTest: zodBooleanCoercion()
10125
+ .optional()
10126
+ .meta({
10127
+ filterTitle: 'Is Test',
10128
+ isFlag: true,
10129
+ }),
10130
+ userId: z.z
10131
+ .string()
10132
+ .optional()
10133
+ .meta({ hidden: true }),
10134
+ connectorVersion: z.z
10135
+ .string()
10136
+ .optional()
10137
+ .meta({ hidden: true }),
10138
+ integrationKey: z.z
10139
+ .string()
10140
+ .optional()
10141
+ .meta({ hidden: true }),
10142
+ includeSecrets: zodBooleanCoercion()
10143
+ .optional()
10144
+ .meta({ hidden: true }),
10090
10145
  });
10091
10146
  const CreateConnectionRequest = z.z.object({
10092
10147
  name: z.z.string(),
@@ -10236,8 +10291,6 @@ const DataSourceInstanceApiResponse = BaseDataSourceInstance.extend({
10236
10291
  const ListExternalAppsQuery = PaginationQuery.extend({
10237
10292
  search: z.z.string().optional(),
10238
10293
  category: z.z.string().optional(),
10239
- hasAuth: zodBooleanCoercion().optional(),
10240
- hasData: zodBooleanCoercion().optional(),
10241
10294
  });
10242
10295
 
10243
10296
  const ExternalEvent = BaseExternalEvent.extend({
@@ -10411,7 +10464,16 @@ const DataLinkTableApiResponse = BaseDataLinkTable;
10411
10464
 
10412
10465
  const FindDataLinkTableInstancesQuery = PaginationQuery.extend({
10413
10466
  id: z.z.string().optional(),
10414
- userId: z.z.string().optional(),
10467
+ tenantId: z.z
10468
+ .string()
10469
+ .optional()
10470
+ .meta({
10471
+ filterTitle: 'Customer',
10472
+ referenceElementType: exports.WorkspaceElementType.Customer,
10473
+ }),
10474
+ userId: z.z.string().optional().meta({
10475
+ hidden: true,
10476
+ }),
10415
10477
  dataLinkTableId: z.z.string().optional(),
10416
10478
  connectionId: z.z.string().optional(),
10417
10479
  integrationId: z.z.string().optional(),
@@ -10459,9 +10521,20 @@ const FindAppEventsQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchi
10459
10521
  });
10460
10522
  const AppEventTypeApiResponse = BaseAppEventType;
10461
10523
 
10462
- const FindAppEventSubscriptionsQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchivedQuery).extend({
10524
+ const FindAppEventSubscriptionsQuery = PaginationQuery.merge(SearchQuery)
10525
+ .merge(IncludeArchivedQuery)
10526
+ .extend({
10463
10527
  id: z.z.string().optional(),
10464
- userId: z.z.string().optional(),
10528
+ tenantId: z.z
10529
+ .string()
10530
+ .optional()
10531
+ .meta({
10532
+ filterTitle: 'Customer',
10533
+ referenceElementType: exports.WorkspaceElementType.Customer,
10534
+ }),
10535
+ userId: z.z.string().optional().meta({
10536
+ hidden: true,
10537
+ }),
10465
10538
  appEventTypeId: z.z.string().optional(),
10466
10539
  isSubscribed: zodBooleanCoercion().optional(),
10467
10540
  instanceKey: z.z.string().optional(),
@@ -10473,6 +10546,21 @@ const AppEventSubscriptionApiResponse = BaseAppEventSubscription.extend({
10473
10546
 
10474
10547
  const AppDataSchemaApiResponse = BaseAppDataSchema;
10475
10548
 
10549
+ const FindAppDataSchemaInstancesQuery = PaginationQuery.extend({
10550
+ id: z.z.string().optional(),
10551
+ tenantId: z.z
10552
+ .string()
10553
+ .optional()
10554
+ .meta({
10555
+ filterTitle: 'Customer',
10556
+ referenceElementType: exports.WorkspaceElementType.Customer,
10557
+ }),
10558
+ userId: z.z.string().optional().meta({
10559
+ hidden: true,
10560
+ }),
10561
+ appDataSchemaId: z.z.string().optional(),
10562
+ instanceKey: z.z.string().optional(),
10563
+ });
10476
10564
  const AppDataSchemaInstanceApiResponse = BaseAppDataSchemaInstance.extend({
10477
10565
  user: BaseCustomer.optional(),
10478
10566
  appDataSchema: BaseAppDataSchema.optional(),
@@ -10515,9 +10603,24 @@ const ExternalEventPullApiResponse = BaseExternalEventPull.extend({
10515
10603
  });
10516
10604
 
10517
10605
  const ListExternalEventSubscriptionsQuery = CommonListElementsQuery.extend({
10518
- userId: z.z.string().optional(),
10606
+ tenantId: z.z
10607
+ .string()
10608
+ .optional()
10609
+ .meta({
10610
+ filterTitle: 'Customer',
10611
+ referenceElementType: exports.WorkspaceElementType.Customer,
10612
+ }),
10613
+ userId: z.z.string().optional().meta({
10614
+ hidden: true,
10615
+ }),
10519
10616
  connectionId: z.z.string().optional(),
10520
- integrationId: z.z.string().optional(),
10617
+ integrationId: z.z
10618
+ .string()
10619
+ .optional()
10620
+ .meta({
10621
+ filterTitle: 'Integration',
10622
+ referenceElementType: exports.WorkspaceElementType.Integration,
10623
+ }),
10521
10624
  });
10522
10625
  const ExternalEventSubscriptionApiResponse = BaseExternalEventSubscription.extend({
10523
10626
  user: BaseCustomer.optional(),
@@ -11553,8 +11656,6 @@ exports.AlertType = void 0;
11553
11656
  AlertType["apiRequestsPerCustomerPerHour"] = "apiRequestsPerCustomerPerHour";
11554
11657
  AlertType["webhookRequestsPerCustomerPerSecond"] = "webhookRequestsPerCustomerPerSecond";
11555
11658
  AlertType["webhookRequestsPerCustomerPerHour"] = "webhookRequestsPerCustomerPerHour";
11556
- AlertType["totalUsagePerDay"] = "totalUsagePerDay";
11557
- AlertType["totalUsagePer30Days"] = "totalUsagePer30Days";
11558
11659
  AlertType["testAlert"] = "testAlert";
11559
11660
  })(exports.AlertType || (exports.AlertType = {}));
11560
11661
  exports.AlertCategory = void 0;
@@ -11577,8 +11678,6 @@ const ALERT_TYPE_CATEGORIES = {
11577
11678
  [exports.AlertType.apiRequestsPerCustomerPerHour]: exports.AlertCategory.CUSTOMER_RATE_LIMIT,
11578
11679
  [exports.AlertType.webhookRequestsPerCustomerPerSecond]: exports.AlertCategory.CUSTOMER_RATE_LIMIT,
11579
11680
  [exports.AlertType.webhookRequestsPerCustomerPerHour]: exports.AlertCategory.CUSTOMER_RATE_LIMIT,
11580
- [exports.AlertType.totalUsagePerDay]: exports.AlertCategory.USAGE,
11581
- [exports.AlertType.totalUsagePer30Days]: exports.AlertCategory.USAGE,
11582
11681
  [exports.AlertType.testAlert]: exports.AlertCategory.TEST,
11583
11682
  };
11584
11683
  const AlertSchema = z.z.object({
@@ -11641,8 +11740,6 @@ function getAlertTypeDisplayName(alertType) {
11641
11740
  [exports.AlertType.apiRequestsPerCustomerPerHour]: 'API Requests Per Customer Per Hour',
11642
11741
  [exports.AlertType.webhookRequestsPerCustomerPerSecond]: 'Webhook Requests Per Customer Per Second',
11643
11742
  [exports.AlertType.webhookRequestsPerCustomerPerHour]: 'Webhook Requests Per Customer Per Hour',
11644
- [exports.AlertType.totalUsagePerDay]: 'Total Usage Per Day',
11645
- [exports.AlertType.totalUsagePer30Days]: 'Total Usage Per 30 Days',
11646
11743
  [exports.AlertType.testAlert]: 'Test Alert',
11647
11744
  };
11648
11745
  return names[alertType] || alertType;
@@ -11713,6 +11810,7 @@ exports.ParallelExecutionLimits = void 0;
11713
11810
  ParallelExecutionLimits["ParallelEventLogsPerConnection"] = "parallelEventLogsPerConnection";
11714
11811
  ParallelExecutionLimits["ParallelPathfinderAgentSessions"] = "parallelPathfinderAgentSessions";
11715
11812
  ParallelExecutionLimits["ParallelInstantTasksActiveJobs"] = "parallelInstantTasksActiveJobs";
11813
+ ParallelExecutionLimits["ParallelCustomCodeRuns"] = "parallelCustomCodeRuns";
11716
11814
  })(exports.ParallelExecutionLimits || (exports.ParallelExecutionLimits = {}));
11717
11815
  exports.RateLimits = void 0;
11718
11816
  (function (RateLimits) {
@@ -11737,6 +11835,7 @@ exports.CustomerLimits = void 0;
11737
11835
  (function (CustomerLimits) {
11738
11836
  CustomerLimits["ParallelApiRequestsPerCustomer"] = "parallelApiRequestsPerCustomer";
11739
11837
  CustomerLimits["ParallelBackgroundJobsPerCustomer"] = "parallelBackgroundJobsPerCustomer";
11838
+ CustomerLimits["ParallelCustomCodeRunsPerCustomer"] = "parallelCustomCodeRunsPerCustomer";
11740
11839
  CustomerLimits["ApiRequestsPerCustomerPerSecond"] = "apiRequestsPerCustomerPerSecond";
11741
11840
  CustomerLimits["ApiRequestsPerCustomerPerHour"] = "apiRequestsPerCustomerPerHour";
11742
11841
  CustomerLimits["WebhookRequestsPerCustomerPerSecond"] = "webhookRequestsPerCustomerPerSecond";
@@ -11766,6 +11865,7 @@ const WorkspaceLimitsSchema = z.object({
11766
11865
  parallelEventLogsPerConnection: WorkspaceLimit.optional(),
11767
11866
  parallelInstantTasksActiveJobs: WorkspaceLimit.optional(),
11768
11867
  parallelPathfinderAgentSessions: WorkspaceLimit.optional(),
11868
+ parallelCustomCodeRuns: WorkspaceLimit.optional(),
11769
11869
  ParallelWriteDatabaseRequests: WorkspaceLimit.optional(),
11770
11870
  fileUploadsMbPerHour: WorkspaceLimit.optional(),
11771
11871
  apiRequestsPerSecond: WorkspaceLimit.optional(),
@@ -11782,6 +11882,7 @@ const WorkspaceLimitsSchema = z.object({
11782
11882
  QueuedTasksQueueSize: WorkspaceLimit.optional(),
11783
11883
  parallelApiRequestsPerCustomer: WorkspaceLimit.optional(),
11784
11884
  parallelBackgroundJobsPerCustomer: WorkspaceLimit.optional(),
11885
+ parallelCustomCodeRunsPerCustomer: WorkspaceLimit.optional(),
11785
11886
  apiRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
11786
11887
  apiRequestsPerCustomerPerHour: WorkspaceLimit.optional(),
11787
11888
  webhookRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
@@ -11846,6 +11947,7 @@ const PARALLEL_EXECUTION_LIMITS = [
11846
11947
  'parallelEventLogs',
11847
11948
  'parallelEventLogsPerConnection',
11848
11949
  'parallelPathfinderAgentSessions',
11950
+ 'parallelCustomCodeRuns',
11849
11951
  ];
11850
11952
  const RATE_LIMITS = [
11851
11953
  'fileUploadsMbPerHour',
@@ -12100,6 +12202,23 @@ const OrgSchema = z.z.object({
12100
12202
  infraAutoChargeMonthlyLimit: z.z.number().optional(),
12101
12203
  effectiveFeatureFlags: OrgFeatureFlagsSchema.optional(),
12102
12204
  });
12205
+ const EngineCreditsProjectionResponse = z.z.object({
12206
+ averageDailyUsage: z.z.number(),
12207
+ daysRemainingInMonth: z.z.number(),
12208
+ totalBudget: z.z.number(),
12209
+ budgetBreakdown: z.z.object({
12210
+ currentCredits: z.z.number(),
12211
+ freeMonthlyRefill: z.z.number(),
12212
+ autoPurchaseBudget: z.z.number(),
12213
+ }),
12214
+ dailyProjections: z.z.array(z.z.object({
12215
+ date: z.z.string(),
12216
+ projectedUsage: z.z.number(),
12217
+ projectedBalance: z.z.number(),
12218
+ })),
12219
+ daysUntilExhaustion: z.z.number().nullable(),
12220
+ willRunOut: z.z.boolean(),
12221
+ });
12103
12222
  const AccountResponse = z.z.object({
12104
12223
  user: FullPlatformUser.optional(),
12105
12224
  workspace: OrgWorkspaceSchema.optional(),
@@ -13924,6 +14043,18 @@ const PatchAgentSessionSchema = z.z.object({
13924
14043
  status: z.z.enum(exports.AgentSessionStatus).optional(),
13925
14044
  });
13926
14045
 
14046
+ exports.AsyncRequestStatus = void 0;
14047
+ (function (AsyncRequestStatus) {
14048
+ AsyncRequestStatus["PENDING"] = "pending";
14049
+ AsyncRequestStatus["ACTIVE"] = "active";
14050
+ AsyncRequestStatus["COMPLETED"] = "completed";
14051
+ AsyncRequestStatus["FAILED"] = "failed";
14052
+ })(exports.AsyncRequestStatus || (exports.AsyncRequestStatus = {}));
14053
+ const AsyncRequestTriggerResponse = z.z.object({
14054
+ jobId: z.z.string(),
14055
+ accessKey: z.z.string(),
14056
+ });
14057
+
13927
14058
  const API_VERSIONS = {
13928
14059
  LEGACY: 'legacy',
13929
14060
  '2025-10-21': '2025-10-21',
@@ -14458,6 +14589,7 @@ exports.AppEventTypeExportProperties = AppEventTypeExportProperties;
14458
14589
  exports.AppEventTypesAccessor = AppEventTypesAccessor;
14459
14590
  exports.AppSchema = AppSchema;
14460
14591
  exports.AppliedToIntegrations = AppliedToIntegrations;
14592
+ exports.AsyncRequestTriggerResponse = AsyncRequestTriggerResponse;
14461
14593
  exports.BackwardCompatibleDataSourceEditableProperties = BackwardCompatibleDataSourceEditableProperties;
14462
14594
  exports.BadRequestError = BadRequestError;
14463
14595
  exports.BaseAction = BaseAction;
@@ -14664,6 +14796,7 @@ exports.ElementInstanceAccessor = ElementInstanceAccessor;
14664
14796
  exports.ElementInstanceListAccessor = ElementInstanceListAccessor;
14665
14797
  exports.ElementListAccessor = ElementListAccessor;
14666
14798
  exports.ElementsExportFields = ElementsExportFields;
14799
+ exports.EngineCreditsProjectionResponse = EngineCreditsProjectionResponse;
14667
14800
  exports.EngineWorkspaceSettingsSchema = EngineWorkspaceSettingsSchema;
14668
14801
  exports.ErrorData = ErrorData;
14669
14802
  exports.ErrorDataSchema = ErrorDataSchema;
@@ -14689,6 +14822,7 @@ exports.FindActionInstancesQuery = FindActionInstancesQuery;
14689
14822
  exports.FindActionRunLogsQuery = FindActionRunLogsQuery;
14690
14823
  exports.FindActionRunLogsResponse = FindActionRunLogsResponse;
14691
14824
  exports.FindActionsQuery = FindActionsQuery;
14825
+ exports.FindAppDataSchemaInstancesQuery = FindAppDataSchemaInstancesQuery;
14692
14826
  exports.FindAppEventSubscriptionsQuery = FindAppEventSubscriptionsQuery;
14693
14827
  exports.FindAppEventTypesQuery = FindAppEventTypesQuery;
14694
14828
  exports.FindAppEventsQuery = FindAppEventsQuery;