@membranehq/sdk 1.0.0 → 1.0.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.
@@ -11447,7 +11447,6 @@ const ListExternalApiLogsQuery = PaginationQuery.extend({
11447
11447
  .optional()
11448
11448
  .meta({
11449
11449
  filterTitle: 'Status',
11450
- isFlag: true,
11451
11450
  }),
11452
11451
  externalAppId: z.z.string().optional().meta({
11453
11452
  hidden: true,
@@ -13214,9 +13213,9 @@ exports.ParallelExecutionLimits = void 0;
13214
13213
  ParallelExecutionLimits["ParallelApiRequests"] = "parallelApiRequests";
13215
13214
  ParallelExecutionLimits["ParallelSseRequests"] = "parallelSseRequests";
13216
13215
  ParallelExecutionLimits["ParallelBackgroundJobs"] = "parallelBackgroundJobs";
13217
- ParallelExecutionLimits["ParallelEventLogs"] = "parallelEventLogs";
13218
- ParallelExecutionLimits["ParallelEventLogsPerConnection"] = "parallelEventLogsPerConnection";
13219
- ParallelExecutionLimits["ParallelPathfinderAgentSessions"] = "parallelPathfinderAgentSessions";
13216
+ ParallelExecutionLimits["ParallelEventProcessingJobs"] = "parallelEventProcessingJobs";
13217
+ ParallelExecutionLimits["ParallelEventProcessingJobsPerConnection"] = "parallelEventProcessingJobsPerConnection";
13218
+ ParallelExecutionLimits["ParallelAgentSessions"] = "parallelAgentSessions";
13220
13219
  ParallelExecutionLimits["ParallelInstantTasksActiveJobs"] = "parallelInstantTasksActiveJobs";
13221
13220
  ParallelExecutionLimits["ParallelCustomCodeRuns"] = "parallelCustomCodeRuns";
13222
13221
  })(exports.ParallelExecutionLimits || (exports.ParallelExecutionLimits = {}));
@@ -13256,6 +13255,10 @@ exports.CustomerLimits = void 0;
13256
13255
  CustomerLimits["WebhookRequestsPerCustomerPerHour"] = "webhookRequestsPerCustomerPerHour";
13257
13256
  CustomerLimits["TotalNumberOfDatabaseEntitiesPerCustomer"] = "totalNumberOfDatabaseEntitiesPerCustomer";
13258
13257
  })(exports.CustomerLimits || (exports.CustomerLimits = {}));
13258
+ exports.WorkspaceAiCreditLimits = void 0;
13259
+ (function (WorkspaceAiCreditLimits) {
13260
+ WorkspaceAiCreditLimits["DefaultTenantAiCreditsRolling30DayLimit"] = "defaultTenantAiCreditsRolling30DayLimit";
13261
+ })(exports.WorkspaceAiCreditLimits || (exports.WorkspaceAiCreditLimits = {}));
13259
13262
  exports.LimitUnits = void 0;
13260
13263
  (function (LimitUnits) {
13261
13264
  LimitUnits["Number"] = "number";
@@ -13276,10 +13279,10 @@ const WorkspaceLimitsSchema = z.object({
13276
13279
  parallelApiRequests: WorkspaceLimit.optional(),
13277
13280
  parallelSseRequests: WorkspaceLimit.optional(),
13278
13281
  parallelBackgroundJobs: WorkspaceLimit.optional(),
13279
- parallelEventLogs: WorkspaceLimit.optional(),
13280
- parallelEventLogsPerConnection: WorkspaceLimit.optional(),
13282
+ parallelEventProcessingJobs: WorkspaceLimit.optional(),
13283
+ parallelEventProcessingJobsPerConnection: WorkspaceLimit.optional(),
13281
13284
  parallelInstantTasksActiveJobs: WorkspaceLimit.optional(),
13282
- parallelPathfinderAgentSessions: WorkspaceLimit.optional(),
13285
+ parallelAgentSessions: WorkspaceLimit.optional(),
13283
13286
  parallelCustomCodeRuns: WorkspaceLimit.optional(),
13284
13287
  ParallelWriteDatabaseRequests: WorkspaceLimit.optional(),
13285
13288
  fileUploadsMbPerHour: WorkspaceLimit.optional(),
@@ -13307,6 +13310,7 @@ const WorkspaceLimitsSchema = z.object({
13307
13310
  webhookRequestsPerCustomerPerSecond: WorkspaceLimit.optional(),
13308
13311
  webhookRequestsPerCustomerPerHour: WorkspaceLimit.optional(),
13309
13312
  externalEventsPerCustomerPerDay: WorkspaceLimit.optional(),
13313
+ [exports.WorkspaceAiCreditLimits.DefaultTenantAiCreditsRolling30DayLimit]: WorkspaceLimit.optional(),
13310
13314
  });
13311
13315
  const WorkspaceSettingsSchema = z.object({
13312
13316
  enableApiLogs: z.boolean().optional(),
@@ -13410,9 +13414,9 @@ const PARALLEL_EXECUTION_LIMITS = [
13410
13414
  'parallelApiRequests',
13411
13415
  'parallelSseRequests',
13412
13416
  'parallelBackgroundJobs',
13413
- 'parallelEventLogs',
13414
- 'parallelEventLogsPerConnection',
13415
- 'parallelPathfinderAgentSessions',
13417
+ 'parallelEventProcessingJobs',
13418
+ 'parallelEventProcessingJobsPerConnection',
13419
+ 'parallelAgentSessions',
13416
13420
  'parallelCustomCodeRuns',
13417
13421
  ];
13418
13422
  const RATE_LIMITS = [
@@ -13596,6 +13600,7 @@ exports.OrgLimitsType = void 0;
13596
13600
  OrgLimitsType["TODAY_USAGE"] = "todayUsage";
13597
13601
  OrgLimitsType["LAST_THIRTY_DAY_USAGE"] = "lastThirtyDayUsage";
13598
13602
  OrgLimitsType["MEMBRANE_EXPERT_CREDITS_CAP"] = "membraneExpertCreditsCapPerMonth";
13603
+ OrgLimitsType["DEFAULT_TENANT_AI_CREDITS_ROLLING_30_DAY_LIMIT"] = "defaultTenantAiCreditsRolling30DayLimit";
13599
13604
  })(exports.OrgLimitsType || (exports.OrgLimitsType = {}));
13600
13605
  exports.OrgPlan = void 0;
13601
13606
  (function (OrgPlan) {
@@ -13614,15 +13619,19 @@ exports.OrgUserStatus = void 0;
13614
13619
  OrgUserStatus["Invited"] = "invited";
13615
13620
  OrgUserStatus["Active"] = "active";
13616
13621
  })(exports.OrgUserStatus || (exports.OrgUserStatus = {}));
13617
- const OrgLimits = z.z
13618
- .object({
13622
+ const OrgLimits = z.z.object({
13619
13623
  numberOfWorkspaces: z.z.number().optional(),
13620
13624
  todayUsage: z.z.number().optional(),
13621
13625
  lastThirtyDayUsage: z.z.number().optional(),
13622
13626
  membraneAgentLastThirtyDaysUsage: z.z.number().optional(),
13623
13627
  membraneExpertCreditsCapPerMonth: z.z.number().nullable().optional(),
13624
- })
13625
- .optional();
13628
+ defaultTenantAiCreditsRolling30DayLimit: z.z
13629
+ .number()
13630
+ .min(0)
13631
+ .nullable()
13632
+ .optional()
13633
+ .describe('[INTERNAL] Default AI credits rolling 30-day limit per tenant'),
13634
+ });
13626
13635
  const MembraneAgentKey = z.z
13627
13636
  .object({
13628
13637
  key: z.z.string().optional(),
@@ -13638,7 +13647,7 @@ const Org = z.z.object({
13638
13647
  updatedAt: z.z.coerce.date(),
13639
13648
  trialEndDate: z.z.string().optional(),
13640
13649
  lastTrialExtensionDate: z.z.string().optional(),
13641
- limits: OrgLimits,
13650
+ limits: OrgLimits.optional(),
13642
13651
  thirtyDayTotalCredits: z.z.number().optional(),
13643
13652
  lastThirtyDayUsagePercent: z.z.number().optional(),
13644
13653
  todayUsagePercent: z.z.number().optional(),
@@ -13647,7 +13656,6 @@ const Org = z.z.object({
13647
13656
  freeAiCredits: z.z.number().optional(),
13648
13657
  paidAiCredits: z.z.number().optional(),
13649
13658
  freeAiMonthlyCredits: z.z.number().nullable().optional(),
13650
- defaultTenantAiCreditsRolling30DayLimit: z.z.number().min(0).nullable().optional(),
13651
13659
  stripeCustomerId: z.z.string().optional(),
13652
13660
  autoChargeEnabled: z.z.boolean().optional(),
13653
13661
  autoChargeThreshold: z.z.number().optional(),
@@ -13678,7 +13686,19 @@ const EngineCreditsProjectionResponse = z.z.object({
13678
13686
  daysUntilExhaustion: z.z.number().nullable(),
13679
13687
  willRunOut: z.z.boolean(),
13680
13688
  });
13681
- const OrgWorkspace = z.z.object({
13689
+ const WorkspaceEditableFields = z.z.object({
13690
+ limits: WorkspaceLimitsSchema.optional(),
13691
+ settings: WorkspaceSettingsSchema.optional(),
13692
+ publicKeys: z.z.array(WorkspacePublicKey).optional(),
13693
+ userFieldsSchema: z.z.any().optional(),
13694
+ webhookUri: z.z.string().optional(),
13695
+ enabledWebhookEvents: z.z.array(z.z.string()).optional(),
13696
+ alertDeliverySettings: AlertDeliverySettingsSchema.optional(),
13697
+ jwksUri: z.z.string().nullable().optional(),
13698
+ type: z.z.enum(exports.WorkspaceType).optional().describe('Workspace type (production or development)'),
13699
+ });
13700
+ const OrgWorkspace = z.z
13701
+ .object({
13682
13702
  id: z.z.string(),
13683
13703
  name: z.z.string(),
13684
13704
  orgId: z.z.string(),
@@ -13691,24 +13711,13 @@ const OrgWorkspace = z.z.object({
13691
13711
  trialEndDate: z.z.string().optional().describe('[INTERNAL] Trial end date'),
13692
13712
  featureFlags: z.z.array(z.z.string()).optional().describe('[INTERNAL] Feature flags'),
13693
13713
  logoUri: z.z.string().optional().describe('URI for the workspace logo'),
13694
- defaultTenantAiCreditsRolling30DayLimit: z.z.number().min(0).nullable().optional(),
13695
13714
  membraneInstanceId: z.z.string().optional().describe('[INTERNAL] Membrane instance ID'),
13696
- });
13697
- const WorkspaceEditableFields = z.z.object({
13698
- settings: WorkspaceSettingsSchema.optional(),
13699
- publicKeys: z.z.array(WorkspacePublicKey).optional(),
13700
- userFieldsSchema: z.z.any().optional(),
13701
- webhookUri: z.z.string().optional(),
13702
- enabledWebhookEvents: z.z.array(z.z.string()).optional(),
13703
- alertDeliverySettings: AlertDeliverySettingsSchema.optional(),
13704
- jwksUri: z.z.string().nullable().optional(),
13705
- type: z.z.enum(exports.WorkspaceType).optional(),
13706
- });
13715
+ })
13716
+ .merge(WorkspaceEditableFields);
13707
13717
  const OrgWorkspaceUpdateRequest = z.z
13708
13718
  .object({
13709
13719
  name: z.z.string().min(1).optional(),
13710
13720
  logoUri: z.z.string().optional(),
13711
- defaultTenantAiCreditsRolling30DayLimit: z.z.number().min(0).nullable().optional(),
13712
13721
  })
13713
13722
  .merge(WorkspaceEditableFields);
13714
13723
  const OrgWorkspaceUser = z.z.object({
@@ -13734,7 +13743,6 @@ const CreateOrgRequest = z.z.object({
13734
13743
  const UpdateOrgRequest = z.z.object({
13735
13744
  name: z.z.string().min(1).optional(),
13736
13745
  domains: z.z.array(z.z.string()).optional(),
13737
- defaultTenantAiCreditsRolling30DayLimit: z.z.number().min(0).nullable().optional(),
13738
13746
  });
13739
13747
  const BaseOrgUser = z.z.object({
13740
13748
  id: z.z.string(),
@@ -15934,6 +15942,7 @@ const MembraneInstance = z.z.object({
15934
15942
  apiBaseUri: z.z.string(),
15935
15943
  consoleBaseUri: z.z.string().optional(),
15936
15944
  orgId: z.z.string().optional(),
15945
+ type: z.z.string().optional(),
15937
15946
  engineVersion: z.z.string().optional(),
15938
15947
  commitSHA: z.z.string().optional(),
15939
15948
  buildDate: z.z.string().optional(),