@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
@@ -3592,6 +3592,7 @@ const FindIntegrationLevelMembraneInterfaceQuery = IntegrationLevelMembraneInter
3592
3592
  filterTitle: 'Is Universal',
3593
3593
  isFlag: true,
3594
3594
  }),
3595
+ layer: MembraneElementLayer.optional(),
3595
3596
  });
3596
3597
  const BaseIntegrationLevelMembraneInterface = BaseMembraneInterface.merge(BaseIntegrationLevelMembraneInterfaceEditableProperties).merge(BaseIntegrationLevelMembraneInterfaceReadOnlyProperties);
3597
3598
  const WorkspaceElementSearchQuery = z.z.object({
@@ -10011,6 +10012,12 @@ const ActionApiResponse = BaseAction.extend({
10011
10012
  dependencies: z.z.array(z.z.any()).optional(),
10012
10013
  });
10013
10014
  const FindActionsQuery = FindIntegrationLevelMembraneInterfaceQuery.extend({
10015
+ isUniversal: zodBooleanCoercion()
10016
+ .optional()
10017
+ .meta({
10018
+ filterTitle: 'Is Universal',
10019
+ isFlag: true,
10020
+ }),
10014
10021
  externalAppId: z.z
10015
10022
  .string()
10016
10023
  .optional()
@@ -10018,6 +10025,15 @@ const FindActionsQuery = FindIntegrationLevelMembraneInterfaceQuery.extend({
10018
10025
  filterTitle: 'External App',
10019
10026
  referenceElementType: exports.WorkspaceElementType.App,
10020
10027
  }),
10028
+ layer: MembraneElementLayer.optional(),
10029
+ parentId: z.z
10030
+ .string()
10031
+ .optional()
10032
+ .meta({ hidden: true }),
10033
+ universalParentId: z.z
10034
+ .string()
10035
+ .optional()
10036
+ .meta({ hidden: true }),
10021
10037
  });
10022
10038
  const CreateActionRequest = ActionEditableProperties;
10023
10039
  const UpdateActionRequest = CreateActionRequest.partial();
@@ -10052,17 +10068,56 @@ const FindActionRunLogsQuery = PaginationQuery.extend({
10052
10068
  });
10053
10069
  const FindActionRunLogsResponse = createPaginationResponseSchema(ActionRunLogRecordApiResponse);
10054
10070
 
10055
- const FindConnectionsQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchivedQuery).extend({
10056
- connectorId: z.z.string().optional(),
10057
- connectorVersion: z.z.string().optional(),
10058
- id: z.z.string().optional(),
10059
- userId: z.z.string().optional(),
10060
- name: z.z.string().optional(),
10061
- isTest: zodBooleanCoercion().optional(),
10062
- disconnected: zodBooleanCoercion().optional(),
10063
- integrationId: z.z.string().optional(),
10064
- integrationKey: z.z.string().optional(),
10065
- includeSecrets: zodBooleanCoercion().optional(),
10071
+ const FindConnectionsQuery = PaginationQuery.merge(SearchQuery)
10072
+ .merge(IncludeArchivedQuery)
10073
+ .extend({
10074
+ tenantId: z.z
10075
+ .string()
10076
+ .optional()
10077
+ .meta({
10078
+ filterTitle: 'Customer',
10079
+ referenceElementType: exports.WorkspaceElementType.Customer,
10080
+ }),
10081
+ integrationId: z.z
10082
+ .string()
10083
+ .optional()
10084
+ .meta({
10085
+ filterTitle: 'Integration',
10086
+ referenceElementType: exports.WorkspaceElementType.Integration,
10087
+ }),
10088
+ connectorId: z.z
10089
+ .string()
10090
+ .optional()
10091
+ .meta({
10092
+ filterTitle: 'Connector',
10093
+ }),
10094
+ disconnected: zodBooleanCoercion()
10095
+ .optional()
10096
+ .meta({
10097
+ filterTitle: 'Disconnected',
10098
+ isFlag: true,
10099
+ }),
10100
+ isTest: zodBooleanCoercion()
10101
+ .optional()
10102
+ .meta({
10103
+ filterTitle: 'Is Test',
10104
+ isFlag: true,
10105
+ }),
10106
+ userId: z.z
10107
+ .string()
10108
+ .optional()
10109
+ .meta({ hidden: true }),
10110
+ connectorVersion: z.z
10111
+ .string()
10112
+ .optional()
10113
+ .meta({ hidden: true }),
10114
+ integrationKey: z.z
10115
+ .string()
10116
+ .optional()
10117
+ .meta({ hidden: true }),
10118
+ includeSecrets: zodBooleanCoercion()
10119
+ .optional()
10120
+ .meta({ hidden: true }),
10066
10121
  });
10067
10122
  const CreateConnectionRequest = z.z.object({
10068
10123
  name: z.z.string(),
@@ -10212,8 +10267,6 @@ const DataSourceInstanceApiResponse = BaseDataSourceInstance.extend({
10212
10267
  const ListExternalAppsQuery = PaginationQuery.extend({
10213
10268
  search: z.z.string().optional(),
10214
10269
  category: z.z.string().optional(),
10215
- hasAuth: zodBooleanCoercion().optional(),
10216
- hasData: zodBooleanCoercion().optional(),
10217
10270
  });
10218
10271
 
10219
10272
  const ExternalEvent = BaseExternalEvent.extend({
@@ -10387,7 +10440,16 @@ const DataLinkTableApiResponse = BaseDataLinkTable;
10387
10440
 
10388
10441
  const FindDataLinkTableInstancesQuery = PaginationQuery.extend({
10389
10442
  id: z.z.string().optional(),
10390
- userId: z.z.string().optional(),
10443
+ tenantId: z.z
10444
+ .string()
10445
+ .optional()
10446
+ .meta({
10447
+ filterTitle: 'Customer',
10448
+ referenceElementType: exports.WorkspaceElementType.Customer,
10449
+ }),
10450
+ userId: z.z.string().optional().meta({
10451
+ hidden: true,
10452
+ }),
10391
10453
  dataLinkTableId: z.z.string().optional(),
10392
10454
  connectionId: z.z.string().optional(),
10393
10455
  integrationId: z.z.string().optional(),
@@ -10435,9 +10497,20 @@ const FindAppEventsQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchi
10435
10497
  });
10436
10498
  const AppEventTypeApiResponse = BaseAppEventType;
10437
10499
 
10438
- const FindAppEventSubscriptionsQuery = PaginationQuery.merge(SearchQuery).merge(IncludeArchivedQuery).extend({
10500
+ const FindAppEventSubscriptionsQuery = PaginationQuery.merge(SearchQuery)
10501
+ .merge(IncludeArchivedQuery)
10502
+ .extend({
10439
10503
  id: z.z.string().optional(),
10440
- userId: z.z.string().optional(),
10504
+ tenantId: z.z
10505
+ .string()
10506
+ .optional()
10507
+ .meta({
10508
+ filterTitle: 'Customer',
10509
+ referenceElementType: exports.WorkspaceElementType.Customer,
10510
+ }),
10511
+ userId: z.z.string().optional().meta({
10512
+ hidden: true,
10513
+ }),
10441
10514
  appEventTypeId: z.z.string().optional(),
10442
10515
  isSubscribed: zodBooleanCoercion().optional(),
10443
10516
  instanceKey: z.z.string().optional(),
@@ -10449,6 +10522,21 @@ const AppEventSubscriptionApiResponse = BaseAppEventSubscription.extend({
10449
10522
 
10450
10523
  const AppDataSchemaApiResponse = BaseAppDataSchema;
10451
10524
 
10525
+ const FindAppDataSchemaInstancesQuery = PaginationQuery.extend({
10526
+ id: z.z.string().optional(),
10527
+ tenantId: z.z
10528
+ .string()
10529
+ .optional()
10530
+ .meta({
10531
+ filterTitle: 'Customer',
10532
+ referenceElementType: exports.WorkspaceElementType.Customer,
10533
+ }),
10534
+ userId: z.z.string().optional().meta({
10535
+ hidden: true,
10536
+ }),
10537
+ appDataSchemaId: z.z.string().optional(),
10538
+ instanceKey: z.z.string().optional(),
10539
+ });
10452
10540
  const AppDataSchemaInstanceApiResponse = BaseAppDataSchemaInstance.extend({
10453
10541
  user: BaseCustomer.optional(),
10454
10542
  appDataSchema: BaseAppDataSchema.optional(),
@@ -10491,9 +10579,24 @@ const ExternalEventPullApiResponse = BaseExternalEventPull.extend({
10491
10579
  });
10492
10580
 
10493
10581
  const ListExternalEventSubscriptionsQuery = CommonListElementsQuery.extend({
10494
- userId: z.z.string().optional(),
10582
+ tenantId: z.z
10583
+ .string()
10584
+ .optional()
10585
+ .meta({
10586
+ filterTitle: 'Customer',
10587
+ referenceElementType: exports.WorkspaceElementType.Customer,
10588
+ }),
10589
+ userId: z.z.string().optional().meta({
10590
+ hidden: true,
10591
+ }),
10495
10592
  connectionId: z.z.string().optional(),
10496
- integrationId: z.z.string().optional(),
10593
+ integrationId: z.z
10594
+ .string()
10595
+ .optional()
10596
+ .meta({
10597
+ filterTitle: 'Integration',
10598
+ referenceElementType: exports.WorkspaceElementType.Integration,
10599
+ }),
10497
10600
  });
10498
10601
  const ExternalEventSubscriptionApiResponse = BaseExternalEventSubscription.extend({
10499
10602
  user: BaseCustomer.optional(),
@@ -11529,8 +11632,6 @@ exports.AlertType = void 0;
11529
11632
  AlertType["apiRequestsPerCustomerPerHour"] = "apiRequestsPerCustomerPerHour";
11530
11633
  AlertType["webhookRequestsPerCustomerPerSecond"] = "webhookRequestsPerCustomerPerSecond";
11531
11634
  AlertType["webhookRequestsPerCustomerPerHour"] = "webhookRequestsPerCustomerPerHour";
11532
- AlertType["totalUsagePerDay"] = "totalUsagePerDay";
11533
- AlertType["totalUsagePer30Days"] = "totalUsagePer30Days";
11534
11635
  AlertType["testAlert"] = "testAlert";
11535
11636
  })(exports.AlertType || (exports.AlertType = {}));
11536
11637
  exports.AlertCategory = void 0;
@@ -11553,8 +11654,6 @@ const ALERT_TYPE_CATEGORIES = {
11553
11654
  [exports.AlertType.apiRequestsPerCustomerPerHour]: exports.AlertCategory.CUSTOMER_RATE_LIMIT,
11554
11655
  [exports.AlertType.webhookRequestsPerCustomerPerSecond]: exports.AlertCategory.CUSTOMER_RATE_LIMIT,
11555
11656
  [exports.AlertType.webhookRequestsPerCustomerPerHour]: exports.AlertCategory.CUSTOMER_RATE_LIMIT,
11556
- [exports.AlertType.totalUsagePerDay]: exports.AlertCategory.USAGE,
11557
- [exports.AlertType.totalUsagePer30Days]: exports.AlertCategory.USAGE,
11558
11657
  [exports.AlertType.testAlert]: exports.AlertCategory.TEST,
11559
11658
  };
11560
11659
  const AlertSchema = z.z.object({
@@ -11617,8 +11716,6 @@ function getAlertTypeDisplayName(alertType) {
11617
11716
  [exports.AlertType.apiRequestsPerCustomerPerHour]: 'API Requests Per Customer Per Hour',
11618
11717
  [exports.AlertType.webhookRequestsPerCustomerPerSecond]: 'Webhook Requests Per Customer Per Second',
11619
11718
  [exports.AlertType.webhookRequestsPerCustomerPerHour]: 'Webhook Requests Per Customer Per Hour',
11620
- [exports.AlertType.totalUsagePerDay]: 'Total Usage Per Day',
11621
- [exports.AlertType.totalUsagePer30Days]: 'Total Usage Per 30 Days',
11622
11719
  [exports.AlertType.testAlert]: 'Test Alert',
11623
11720
  };
11624
11721
  return names[alertType] || alertType;
@@ -11689,6 +11786,7 @@ exports.ParallelExecutionLimits = void 0;
11689
11786
  ParallelExecutionLimits["ParallelEventLogsPerConnection"] = "parallelEventLogsPerConnection";
11690
11787
  ParallelExecutionLimits["ParallelPathfinderAgentSessions"] = "parallelPathfinderAgentSessions";
11691
11788
  ParallelExecutionLimits["ParallelInstantTasksActiveJobs"] = "parallelInstantTasksActiveJobs";
11789
+ ParallelExecutionLimits["ParallelCustomCodeRuns"] = "parallelCustomCodeRuns";
11692
11790
  })(exports.ParallelExecutionLimits || (exports.ParallelExecutionLimits = {}));
11693
11791
  exports.RateLimits = void 0;
11694
11792
  (function (RateLimits) {
@@ -11713,6 +11811,7 @@ exports.CustomerLimits = void 0;
11713
11811
  (function (CustomerLimits) {
11714
11812
  CustomerLimits["ParallelApiRequestsPerCustomer"] = "parallelApiRequestsPerCustomer";
11715
11813
  CustomerLimits["ParallelBackgroundJobsPerCustomer"] = "parallelBackgroundJobsPerCustomer";
11814
+ CustomerLimits["ParallelCustomCodeRunsPerCustomer"] = "parallelCustomCodeRunsPerCustomer";
11716
11815
  CustomerLimits["ApiRequestsPerCustomerPerSecond"] = "apiRequestsPerCustomerPerSecond";
11717
11816
  CustomerLimits["ApiRequestsPerCustomerPerHour"] = "apiRequestsPerCustomerPerHour";
11718
11817
  CustomerLimits["WebhookRequestsPerCustomerPerSecond"] = "webhookRequestsPerCustomerPerSecond";
@@ -11742,6 +11841,7 @@ const WorkspaceLimitsSchema = z.object({
11742
11841
  parallelEventLogsPerConnection: WorkspaceLimit.optional(),
11743
11842
  parallelInstantTasksActiveJobs: WorkspaceLimit.optional(),
11744
11843
  parallelPathfinderAgentSessions: WorkspaceLimit.optional(),
11844
+ parallelCustomCodeRuns: WorkspaceLimit.optional(),
11745
11845
  ParallelWriteDatabaseRequests: WorkspaceLimit.optional(),
11746
11846
  fileUploadsMbPerHour: WorkspaceLimit.optional(),
11747
11847
  apiRequestsPerSecond: WorkspaceLimit.optional(),
@@ -11758,6 +11858,7 @@ const WorkspaceLimitsSchema = z.object({
11758
11858
  QueuedTasksQueueSize: WorkspaceLimit.optional(),
11759
11859
  parallelApiRequestsPerCustomer: WorkspaceLimit.optional(),
11760
11860
  parallelBackgroundJobsPerCustomer: WorkspaceLimit.optional(),
11861
+ parallelCustomCodeRunsPerCustomer: WorkspaceLimit.optional(),
11761
11862
  apiRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
11762
11863
  apiRequestsPerCustomerPerHour: WorkspaceLimit.optional(),
11763
11864
  webhookRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
@@ -11822,6 +11923,7 @@ const PARALLEL_EXECUTION_LIMITS = [
11822
11923
  'parallelEventLogs',
11823
11924
  'parallelEventLogsPerConnection',
11824
11925
  'parallelPathfinderAgentSessions',
11926
+ 'parallelCustomCodeRuns',
11825
11927
  ];
11826
11928
  const RATE_LIMITS = [
11827
11929
  'fileUploadsMbPerHour',
@@ -12076,6 +12178,23 @@ const OrgSchema = z.z.object({
12076
12178
  infraAutoChargeMonthlyLimit: z.z.number().optional(),
12077
12179
  effectiveFeatureFlags: OrgFeatureFlagsSchema.optional(),
12078
12180
  });
12181
+ const EngineCreditsProjectionResponse = z.z.object({
12182
+ averageDailyUsage: z.z.number(),
12183
+ daysRemainingInMonth: z.z.number(),
12184
+ totalBudget: z.z.number(),
12185
+ budgetBreakdown: z.z.object({
12186
+ currentCredits: z.z.number(),
12187
+ freeMonthlyRefill: z.z.number(),
12188
+ autoPurchaseBudget: z.z.number(),
12189
+ }),
12190
+ dailyProjections: z.z.array(z.z.object({
12191
+ date: z.z.string(),
12192
+ projectedUsage: z.z.number(),
12193
+ projectedBalance: z.z.number(),
12194
+ })),
12195
+ daysUntilExhaustion: z.z.number().nullable(),
12196
+ willRunOut: z.z.boolean(),
12197
+ });
12079
12198
  const AccountResponse = z.z.object({
12080
12199
  user: FullPlatformUser.optional(),
12081
12200
  workspace: OrgWorkspaceSchema.optional(),
@@ -13900,6 +14019,18 @@ const PatchAgentSessionSchema = z.z.object({
13900
14019
  status: z.z.enum(exports.AgentSessionStatus).optional(),
13901
14020
  });
13902
14021
 
14022
+ exports.AsyncRequestStatus = void 0;
14023
+ (function (AsyncRequestStatus) {
14024
+ AsyncRequestStatus["PENDING"] = "pending";
14025
+ AsyncRequestStatus["ACTIVE"] = "active";
14026
+ AsyncRequestStatus["COMPLETED"] = "completed";
14027
+ AsyncRequestStatus["FAILED"] = "failed";
14028
+ })(exports.AsyncRequestStatus || (exports.AsyncRequestStatus = {}));
14029
+ const AsyncRequestTriggerResponse = z.z.object({
14030
+ jobId: z.z.string(),
14031
+ accessKey: z.z.string(),
14032
+ });
14033
+
13903
14034
  const API_VERSIONS = {
13904
14035
  LEGACY: 'legacy',
13905
14036
  '2025-10-21': '2025-10-21',
@@ -14254,6 +14385,7 @@ exports.AppEventTypeExportProperties = AppEventTypeExportProperties;
14254
14385
  exports.AppEventTypesAccessor = AppEventTypesAccessor;
14255
14386
  exports.AppSchema = AppSchema;
14256
14387
  exports.AppliedToIntegrations = AppliedToIntegrations;
14388
+ exports.AsyncRequestTriggerResponse = AsyncRequestTriggerResponse;
14257
14389
  exports.BackwardCompatibleDataSourceEditableProperties = BackwardCompatibleDataSourceEditableProperties;
14258
14390
  exports.BadRequestError = BadRequestError;
14259
14391
  exports.BaseAction = BaseAction;
@@ -14459,6 +14591,7 @@ exports.ElementInstanceAccessor = ElementInstanceAccessor;
14459
14591
  exports.ElementInstanceListAccessor = ElementInstanceListAccessor;
14460
14592
  exports.ElementListAccessor = ElementListAccessor;
14461
14593
  exports.ElementsExportFields = ElementsExportFields;
14594
+ exports.EngineCreditsProjectionResponse = EngineCreditsProjectionResponse;
14462
14595
  exports.EngineWorkspaceSettingsSchema = EngineWorkspaceSettingsSchema;
14463
14596
  exports.ErrorData = ErrorData;
14464
14597
  exports.ErrorDataSchema = ErrorDataSchema;
@@ -14484,6 +14617,7 @@ exports.FindActionInstancesQuery = FindActionInstancesQuery;
14484
14617
  exports.FindActionRunLogsQuery = FindActionRunLogsQuery;
14485
14618
  exports.FindActionRunLogsResponse = FindActionRunLogsResponse;
14486
14619
  exports.FindActionsQuery = FindActionsQuery;
14620
+ exports.FindAppDataSchemaInstancesQuery = FindAppDataSchemaInstancesQuery;
14487
14621
  exports.FindAppEventSubscriptionsQuery = FindAppEventSubscriptionsQuery;
14488
14622
  exports.FindAppEventTypesQuery = FindAppEventTypesQuery;
14489
14623
  exports.FindAppEventsQuery = FindAppEventsQuery;