@iblai/data-layer 1.12.6 → 1.12.106

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.
package/dist/index.js CHANGED
@@ -39055,6 +39055,86 @@ exports.SERVICES = void 0;
39055
39055
  SERVICES["STUDIO"] = "STUDIO";
39056
39056
  })(exports.SERVICES || (exports.SERVICES = {}));
39057
39057
 
39058
+ // Backend contract: ibl_ai_mentor/views/spend_cap_views.py.
39059
+ // Spend caps exist at three scopes, all under /api/ai-mentor/orgs/{org}/:
39060
+ // 1. Tenant singleton — spend-caps/tenant/
39061
+ // 2. Agent singleton — agents/{mentor_unique_id}/spend-cap/
39062
+ // 3. Per-user-per-agent — agents/{mentor_unique_id}/spend-caps/users/{username}/
39063
+ // A read-only learner-safe status summary lives at spend-caps/status/{user_id}/.
39064
+ // The `mentors/` spellings are deprecated aliases; only `agents/` is used here.
39065
+ const SPEND_CAPS_REDUCER_PATH = 'spendCapsApiSlice';
39066
+ /**
39067
+ * Error code returned (HTTP 429 body / WebSocket frame) when a hard-block
39068
+ * spend cap is exceeded. Distinguishes a spend-cap block from a genuine
39069
+ * provider rate limit, which also uses status 429.
39070
+ */
39071
+ const SPEND_CAP_EXCEEDED_ERROR_CODE = 'spend_cap_exceeded';
39072
+ const encodePathSegment$1 = (value) => encodeURIComponent(value);
39073
+ const tenantSpendCapPath = (org) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/spend-caps/tenant/`;
39074
+ const agentSpendCapPath = (org, mentorId) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/agents/${encodePathSegment$1(mentorId)}/spend-cap/`;
39075
+ const agentUserSpendCapsPath = (org, mentorId) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/agents/${encodePathSegment$1(mentorId)}/spend-caps/users/`;
39076
+ const userSpendCapPath = (org, mentorId, username) => `${agentUserSpendCapsPath(org, mentorId)}${encodePathSegment$1(username)}/`;
39077
+ const spendCapStatusPath = (org, userId) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/spend-caps/status/${encodePathSegment$1(userId)}/`;
39078
+ const agentSpendCapsListPath = (org) => `/api/ai-mentor/orgs/${encodePathSegment$1(org)}/spend-caps/agents/`;
39079
+ const SPEND_CAPS_ENDPOINTS = {
39080
+ GET_TENANT_SPEND_CAP: {
39081
+ service: exports.SERVICES.DM,
39082
+ path: tenantSpendCapPath,
39083
+ },
39084
+ UPSERT_TENANT_SPEND_CAP: {
39085
+ service: exports.SERVICES.DM,
39086
+ path: tenantSpendCapPath,
39087
+ },
39088
+ DELETE_TENANT_SPEND_CAP: {
39089
+ service: exports.SERVICES.DM,
39090
+ path: tenantSpendCapPath,
39091
+ },
39092
+ LIST_AGENT_SPEND_CAPS: {
39093
+ service: exports.SERVICES.DM,
39094
+ path: agentSpendCapsListPath,
39095
+ },
39096
+ GET_AGENT_SPEND_CAP: {
39097
+ service: exports.SERVICES.DM,
39098
+ path: agentSpendCapPath,
39099
+ },
39100
+ UPSERT_AGENT_SPEND_CAP: {
39101
+ service: exports.SERVICES.DM,
39102
+ path: agentSpendCapPath,
39103
+ },
39104
+ DELETE_AGENT_SPEND_CAP: {
39105
+ service: exports.SERVICES.DM,
39106
+ path: agentSpendCapPath,
39107
+ },
39108
+ LIST_AGENT_USER_SPEND_CAPS: {
39109
+ service: exports.SERVICES.DM,
39110
+ path: agentUserSpendCapsPath,
39111
+ },
39112
+ GET_USER_SPEND_CAP: {
39113
+ service: exports.SERVICES.DM,
39114
+ path: userSpendCapPath,
39115
+ },
39116
+ UPSERT_USER_SPEND_CAP: {
39117
+ service: exports.SERVICES.DM,
39118
+ path: userSpendCapPath,
39119
+ },
39120
+ DELETE_USER_SPEND_CAP: {
39121
+ service: exports.SERVICES.DM,
39122
+ path: userSpendCapPath,
39123
+ },
39124
+ GET_SPEND_CAP_STATUS: {
39125
+ service: exports.SERVICES.DM,
39126
+ path: spendCapStatusPath,
39127
+ },
39128
+ };
39129
+ const SPEND_CAPS_QUERY_KEYS = {
39130
+ TENANT_SPEND_CAP: 'TENANT_SPEND_CAP',
39131
+ AGENT_SPEND_CAP: 'AGENT_SPEND_CAP',
39132
+ AGENT_SPEND_CAPS_LIST: 'AGENT_SPEND_CAPS_LIST',
39133
+ AGENT_USER_SPEND_CAPS: 'AGENT_USER_SPEND_CAPS',
39134
+ USER_SPEND_CAP: 'USER_SPEND_CAP',
39135
+ SPEND_CAP_STATUS: 'SPEND_CAP_STATUS',
39136
+ };
39137
+
39058
39138
  class Config {
39059
39139
  }
39060
39140
  Config.legacyLmsUrl = 'https://learn.iblai.app';
@@ -39185,6 +39265,16 @@ const getHeaders = async (service) => {
39185
39265
  };
39186
39266
  /** Status codes that should not be retried for queryFn endpoints. */
39187
39267
  const QUERYFN_NON_RETRYABLE_STATUSES = [401, 403, 500];
39268
+ /**
39269
+ * True when an error body carries the spend-cap `spend_cap_exceeded` code.
39270
+ * A spend-cap block returns HTTP 429, but unlike a genuine provider rate
39271
+ * limit (also 429) it will not clear on its own within a retry window, so
39272
+ * retrying only wastes ~30s of backoff. Keyed on the body's error_code —
39273
+ * NOT on status 429 alone — so real rate limits keep retrying.
39274
+ */
39275
+ const hasSpendCapExceededErrorCode = (body) => typeof body === 'object' &&
39276
+ body !== null &&
39277
+ body.error_code === SPEND_CAP_EXCEEDED_ERROR_CODE;
39188
39278
  /** Default max retries for queryFn endpoints. */
39189
39279
  const QUERYFN_MAX_RETRIES = 5;
39190
39280
  /** Base delay in ms for exponential backoff. */
@@ -39200,6 +39290,7 @@ const buildEndpointFromService = (service, serviceFn, options) => {
39200
39290
  const expectedErrorStatuses = (_b = options === null || options === void 0 ? void 0 : options.expectedErrorStatuses) !== null && _b !== void 0 ? _b : [];
39201
39291
  return {
39202
39292
  async queryFn(args) {
39293
+ var _a;
39203
39294
  let lastError;
39204
39295
  for (let attempt = 0; attempt <= maxRetries; attempt++) {
39205
39296
  try {
@@ -39212,10 +39303,11 @@ const buildEndpointFromService = (service, serviceFn, options) => {
39212
39303
  catch (err) {
39213
39304
  lastError = err;
39214
39305
  const status = err === null || err === void 0 ? void 0 : err.status;
39215
- // Don't retry auth errors or statuses the endpoint expects as an
39216
- // empty state (fail fast — no retry storm).
39306
+ // Don't retry auth errors, statuses the endpoint expects as an
39307
+ // empty state, or a spend-cap block (fail fast — no retry storm).
39217
39308
  if (QUERYFN_NON_RETRYABLE_STATUSES.includes(status) ||
39218
- expectedErrorStatuses.includes(status)) {
39309
+ expectedErrorStatuses.includes(status) ||
39310
+ hasSpendCapExceededErrorCode((_a = err === null || err === void 0 ? void 0 : err.body) !== null && _a !== void 0 ? _a : err === null || err === void 0 ? void 0 : err.data)) {
39219
39311
  break;
39220
39312
  }
39221
39313
  // If we have retries left, wait with exponential backoff
@@ -39354,7 +39446,10 @@ const withNonRetryableErrors = (query$1) => async (args, api, extraOptions) => {
39354
39446
  },
39355
39447
  };
39356
39448
  }
39357
- if (result.error && NON_RETRYABLE_STATUS_CODES.includes(result.error.status)) {
39449
+ if (result.error &&
39450
+ (NON_RETRYABLE_STATUS_CODES.includes(result.error.status) ||
39451
+ // A 429 spend-cap block is a hard stop, not a transient rate limit.
39452
+ hasSpendCapExceededErrorCode(result.error.data))) {
39358
39453
  query.retry.fail(result.error);
39359
39454
  }
39360
39455
  return result;
@@ -41351,11 +41446,20 @@ const coreApiSlice = react.createApi({
41351
41446
  providesTags: ['LtiMentors'],
41352
41447
  }),
41353
41448
  getLtiMentorDetail: builder.query({
41354
- ...buildEndpointFromDmService(CoreService.coreLti1P3ProviderLtiMentorsRetrieve),
41449
+ // Cast to LtiAgentLink: the response carries the async-create `status`
41450
+ // fields the pinned generated client doesn't know about, and consumers
41451
+ // poll this endpoint to track link creation.
41452
+ ...buildEndpointFromDmService((args) => CoreService.coreLti1P3ProviderLtiMentorsRetrieve(args)),
41355
41453
  providesTags: ['LtiMentors'],
41356
41454
  }),
41357
41455
  createLtiMentor: builder.mutation({
41358
- ...buildEndpointFromDmService(CoreService.coreLti1P3ProviderLtiMentorsCreate),
41456
+ // Synchronous creation builds an edX course and regularly outlives the
41457
+ // 20s DM→edX proxy timeout. `async_create: true` makes the backend
41458
+ // return 202 immediately with `{ id, status: 'pending' }`; poll
41459
+ // getLtiMentorDetail with that id until status is 'ready' or 'failed'.
41460
+ ...buildEndpointFromDmService((args) => CoreService.coreLti1P3ProviderLtiMentorsCreate({
41461
+ requestBody: { ...args.requestBody, async_create: true },
41462
+ })),
41359
41463
  invalidatesTags: ['LtiMentors'],
41360
41464
  }),
41361
41465
  updateLtiMentor: builder.mutation({
@@ -41978,6 +42082,10 @@ const BILLING_CUSTOM_ENDPOINTS = {
41978
42082
  path: '/api/billing/account/',
41979
42083
  service: exports.SERVICES.DM,
41980
42084
  },
42085
+ GET_CREDIT_TRANSACTIONS: {
42086
+ path: '/api/billing/transactions/',
42087
+ service: exports.SERVICES.DM,
42088
+ },
41981
42089
  TRIGGER_AUTO_RECHARGE: {
41982
42090
  path: '/api/billing/auto-recharge/trigger/',
41983
42091
  service: exports.SERVICES.DM,
@@ -42018,9 +42126,26 @@ const billingCustomSlice = react.createApi({
42018
42126
  }),
42019
42127
  providesTags: ['accountBillingInfo', 'autoRecharge', 'triggerAutoRecharge'],
42020
42128
  }),
42129
+ getCreditTransactions: builder.query({
42130
+ query: ({ platform_key, transaction_type, from_date, to_date }) => ({
42131
+ url: BILLING_CUSTOM_ENDPOINTS.GET_CREDIT_TRANSACTIONS.path,
42132
+ service: BILLING_CUSTOM_ENDPOINTS.GET_CREDIT_TRANSACTIONS.service,
42133
+ method: 'GET',
42134
+ params: {
42135
+ platform_key,
42136
+ ...(transaction_type ? { transaction_type } : {}),
42137
+ ...(from_date ? { from_date } : {}),
42138
+ ...(to_date ? { to_date } : {}),
42139
+ },
42140
+ }),
42141
+ // The endpoint is paginated (DRF envelope) but may also return a bare
42142
+ // array — normalize both to the rows.
42143
+ transformResponse: (response) => { var _a; return Array.isArray(response) ? response : ((_a = response === null || response === void 0 ? void 0 : response.results) !== null && _a !== void 0 ? _a : []); },
42144
+ providesTags: ['accountBillingInfo', 'triggerAutoRecharge'],
42145
+ }),
42021
42146
  }),
42022
42147
  });
42023
- const { useUpdateAutoRechargeInfoMutation, useGetAccountBillingInfoQuery, useLazyGetAccountBillingInfoQuery, useTriggerAutoRechargeMutation, } = billingCustomSlice;
42148
+ const { useUpdateAutoRechargeInfoMutation, useGetAccountBillingInfoQuery, useLazyGetAccountBillingInfoQuery, useGetCreditTransactionsQuery, useTriggerAutoRechargeMutation, } = billingCustomSlice;
42024
42149
 
42025
42150
  const MONETIZATION_REDUCER_PATH = 'monetizationApiSlice';
42026
42151
  const SERVICE_BASE = '/api/service/platforms';
@@ -44441,6 +44566,10 @@ const MEMSEARCH_ENDPOINTS = {
44441
44566
  service: exports.SERVICES.AXD,
44442
44567
  path: (org, userId) => `/api/ai-mentor/orgs/${org}/users/${userId}/global-memories/`,
44443
44568
  },
44569
+ UPDATE_GLOBAL_MEMORY: {
44570
+ service: exports.SERVICES.AXD,
44571
+ path: (org, userId, memoryId) => `/api/ai-mentor/orgs/${org}/users/${userId}/global-memories/${memoryId}/`,
44572
+ },
44444
44573
  DELETE_GLOBAL_MEMORY: {
44445
44574
  service: exports.SERVICES.AXD,
44446
44575
  path: (org, userId, memoryId) => `/api/ai-mentor/orgs/${org}/users/${userId}/global-memories/${memoryId}/`,
@@ -44551,6 +44680,15 @@ const memoryApiSlice = react.createApi({
44551
44680
  }),
44552
44681
  invalidatesTags: MEMORY_QUERY_KEYS.MEMSEARCH_GLOBAL_MEMORIES(),
44553
44682
  }),
44683
+ updateGlobalMemory: builder.mutation({
44684
+ query: (args) => ({
44685
+ url: MEMSEARCH_ENDPOINTS.UPDATE_GLOBAL_MEMORY.path(args.org, args.userId, args.memoryId),
44686
+ service: MEMSEARCH_ENDPOINTS.UPDATE_GLOBAL_MEMORY.service,
44687
+ method: 'PATCH',
44688
+ body: { content: args.content },
44689
+ }),
44690
+ invalidatesTags: MEMORY_QUERY_KEYS.MEMSEARCH_GLOBAL_MEMORIES(),
44691
+ }),
44554
44692
  deleteGlobalMemory: builder.mutation({
44555
44693
  query: (args) => ({
44556
44694
  url: MEMSEARCH_ENDPOINTS.DELETE_GLOBAL_MEMORY.path(args.org, args.userId, args.memoryId),
@@ -44671,7 +44809,7 @@ const memoryApiSlice = react.createApi({
44671
44809
  }),
44672
44810
  }),
44673
44811
  });
44674
- const { useGetUserMemorySettingsQuery, useLazyGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useLazyGetGlobalMemoriesQuery, useCreateGlobalMemoryMutation, useDeleteGlobalMemoryMutation, useGetMentorMemoriesQuery, useLazyGetMentorMemoriesQuery, useGetMentorMemoriesListQuery, useLazyGetMentorMemoriesListQuery, useGetAllMentorMemoriesQuery, useLazyGetAllMentorMemoriesQuery, useCreateMentorMemoryMutation, useUpdateMentorMemoryMutation, useDeleteMentorMemoryMutation, useGetMemoryCategoriesAdminQuery, useLazyGetMemoryCategoriesAdminQuery, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useGetMemsearchConfigQuery, useLazyGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetMemsearchStatusQuery, useLazyGetMemsearchStatusQuery, } = memoryApiSlice;
44812
+ const { useGetUserMemorySettingsQuery, useLazyGetUserMemorySettingsQuery, useUpdateUserMemorySettingsMutation, useGetGlobalMemoriesQuery, useLazyGetGlobalMemoriesQuery, useCreateGlobalMemoryMutation, useUpdateGlobalMemoryMutation, useDeleteGlobalMemoryMutation, useGetMentorMemoriesQuery, useLazyGetMentorMemoriesQuery, useGetMentorMemoriesListQuery, useLazyGetMentorMemoriesListQuery, useGetAllMentorMemoriesQuery, useLazyGetAllMentorMemoriesQuery, useCreateMentorMemoryMutation, useUpdateMentorMemoryMutation, useDeleteMentorMemoryMutation, useGetMemoryCategoriesAdminQuery, useLazyGetMemoryCategoriesAdminQuery, useCreateMemoryCategoryMutation, useUpdateMemoryCategoryMutation, useDeleteMemoryCategoryMutation, useGetMemsearchConfigQuery, useLazyGetMemsearchConfigQuery, useUpdateMemsearchConfigMutation, useGetMemsearchStatusQuery, useLazyGetMemsearchStatusQuery, } = memoryApiSlice;
44675
44813
 
44676
44814
  const MCP_REDUCER_PATH = 'mcpApiSlice';
44677
44815
  const MCP_ENDPOINTS = {
@@ -44981,7 +45119,7 @@ const CLAW_ENDPOINTS = {
44981
45119
  * Normalize API responses that may return either a plain array or a
44982
45120
  * paginated envelope `{ results: T[] }`.
44983
45121
  */
44984
- function normalizeList$1(response) {
45122
+ function normalizeList(response) {
44985
45123
  return Array.isArray(response) ? response : response.results;
44986
45124
  }
44987
45125
  const clawApiSlice = react.createApi({
@@ -45079,7 +45217,7 @@ const clawApiSlice = react.createApi({
45079
45217
  url: CLAW_ENDPOINTS.GET_INSTANCES.path(args.org),
45080
45218
  service: CLAW_ENDPOINTS.GET_INSTANCES.service,
45081
45219
  }),
45082
- transformResponse: (response) => normalizeList$1(response),
45220
+ transformResponse: (response) => normalizeList(response),
45083
45221
  providesTags: ['ClawInstances'],
45084
45222
  }),
45085
45223
  getClawInstance: builder.query({
@@ -45304,13 +45442,6 @@ const AGENT_SKILLS_ENDPOINTS = {
45304
45442
  },
45305
45443
  };
45306
45444
 
45307
- /**
45308
- * Normalize API responses that may return either a plain array or a
45309
- * paginated envelope `{ results: T[] }`.
45310
- */
45311
- function normalizeList(response) {
45312
- return Array.isArray(response) ? response : response.results;
45313
- }
45314
45445
  const agentSkillsApiSlice = react.createApi({
45315
45446
  reducerPath: AGENT_SKILLS_REDUCER_PATH,
45316
45447
  baseQuery: iblFetchBaseQuery,
@@ -45482,6 +45613,8 @@ const agentSkillsApiSlice = react.createApi({
45482
45613
  invalidatesTags: ['AgentSkillResources'],
45483
45614
  }),
45484
45615
  // ── Mentor Skill Assignments (nested under mentor) ────────────────────
45616
+ // Returns the paginated envelope so list UIs can page on `count`;
45617
+ // bare-array responses are normalized into a single-page envelope.
45485
45618
  getMentorSkillAssignments: builder.query({
45486
45619
  query: (args) => ({
45487
45620
  url: AGENT_SKILLS_ENDPOINTS.GET_MENTOR_SKILL_ASSIGNMENTS.path(args.org, args.mentorUniqueId),
@@ -45492,7 +45625,9 @@ const agentSkillsApiSlice = react.createApi({
45492
45625
  ...(args.offset !== undefined && { offset: args.offset }),
45493
45626
  },
45494
45627
  }),
45495
- transformResponse: (response) => normalizeList(response),
45628
+ transformResponse: (response) => Array.isArray(response)
45629
+ ? { count: response.length, next: null, previous: null, results: response }
45630
+ : response,
45496
45631
  providesTags: (_result, _error, args) => [
45497
45632
  { type: 'MentorSkillAssignments', id: args.mentorUniqueId },
45498
45633
  ],
@@ -46311,6 +46446,175 @@ const gradingApiSlice = react.createApi({
46311
46446
  });
46312
46447
  const { useGetMentorGraderConfigurationQuery, useLazyGetMentorGraderConfigurationQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useListGraderCriteriaQuery, useLazyListGraderCriteriaQuery, useGetGraderCriterionQuery, useLazyGetGraderCriterionQuery, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useListGradeResultsQuery, useLazyListGradeResultsQuery, useGetGradeResultQuery, useLazyGetGradeResultQuery, useOverrideGradeResultMutation, } = gradingApiSlice;
46313
46448
 
46449
+ const spendCapsApiSlice = react.createApi({
46450
+ reducerPath: SPEND_CAPS_REDUCER_PATH,
46451
+ tagTypes: [
46452
+ SPEND_CAPS_QUERY_KEYS.TENANT_SPEND_CAP,
46453
+ SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAP,
46454
+ SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAPS_LIST,
46455
+ SPEND_CAPS_QUERY_KEYS.AGENT_USER_SPEND_CAPS,
46456
+ SPEND_CAPS_QUERY_KEYS.USER_SPEND_CAP,
46457
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46458
+ ],
46459
+ baseQuery: iblFetchBaseQuery,
46460
+ endpoints: (builder) => ({
46461
+ getTenantSpendCap: builder.query({
46462
+ query: (args) => ({
46463
+ url: SPEND_CAPS_ENDPOINTS.GET_TENANT_SPEND_CAP.path(args.org),
46464
+ service: SPEND_CAPS_ENDPOINTS.GET_TENANT_SPEND_CAP.service,
46465
+ }),
46466
+ providesTags: [SPEND_CAPS_QUERY_KEYS.TENANT_SPEND_CAP],
46467
+ }),
46468
+ // The backend PUT is an upsert: 201 on first write, 200 on update.
46469
+ upsertTenantSpendCap: builder.mutation({
46470
+ query: (args) => ({
46471
+ url: SPEND_CAPS_ENDPOINTS.UPSERT_TENANT_SPEND_CAP.path(args.org),
46472
+ method: 'PUT',
46473
+ body: args.formData,
46474
+ service: SPEND_CAPS_ENDPOINTS.UPSERT_TENANT_SPEND_CAP.service,
46475
+ }),
46476
+ invalidatesTags: [
46477
+ SPEND_CAPS_QUERY_KEYS.TENANT_SPEND_CAP,
46478
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46479
+ ],
46480
+ }),
46481
+ deleteTenantSpendCap: builder.mutation({
46482
+ query: (args) => ({
46483
+ url: SPEND_CAPS_ENDPOINTS.DELETE_TENANT_SPEND_CAP.path(args.org),
46484
+ method: 'DELETE',
46485
+ service: SPEND_CAPS_ENDPOINTS.DELETE_TENANT_SPEND_CAP.service,
46486
+ }),
46487
+ invalidatesTags: [
46488
+ SPEND_CAPS_QUERY_KEYS.TENANT_SPEND_CAP,
46489
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46490
+ ],
46491
+ }),
46492
+ getAgentSpendCap: builder.query({
46493
+ query: (args) => ({
46494
+ url: SPEND_CAPS_ENDPOINTS.GET_AGENT_SPEND_CAP.path(args.org, args.mentorId),
46495
+ service: SPEND_CAPS_ENDPOINTS.GET_AGENT_SPEND_CAP.service,
46496
+ }),
46497
+ providesTags: (result, error, args) => [
46498
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAP, id: args.mentorId },
46499
+ ],
46500
+ }),
46501
+ upsertAgentSpendCap: builder.mutation({
46502
+ query: (args) => ({
46503
+ url: SPEND_CAPS_ENDPOINTS.UPSERT_AGENT_SPEND_CAP.path(args.org, args.mentorId),
46504
+ method: 'PUT',
46505
+ body: args.formData,
46506
+ service: SPEND_CAPS_ENDPOINTS.UPSERT_AGENT_SPEND_CAP.service,
46507
+ }),
46508
+ invalidatesTags: (result, error, args) => [
46509
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAP, id: args.mentorId },
46510
+ SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAPS_LIST,
46511
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46512
+ ],
46513
+ }),
46514
+ deleteAgentSpendCap: builder.mutation({
46515
+ query: (args) => ({
46516
+ url: SPEND_CAPS_ENDPOINTS.DELETE_AGENT_SPEND_CAP.path(args.org, args.mentorId),
46517
+ method: 'DELETE',
46518
+ service: SPEND_CAPS_ENDPOINTS.DELETE_AGENT_SPEND_CAP.service,
46519
+ }),
46520
+ invalidatesTags: (result, error, args) => [
46521
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAP, id: args.mentorId },
46522
+ SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAPS_LIST,
46523
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46524
+ ],
46525
+ }),
46526
+ // Tenant-wide listing of every agent-scoped cap (no per-agent fan-out).
46527
+ // Items carry `mentor_name`/`mentor_unique_id` for display.
46528
+ listAgentSpendCaps: builder.query({
46529
+ query: (args) => ({
46530
+ url: SPEND_CAPS_ENDPOINTS.LIST_AGENT_SPEND_CAPS.path(args.org),
46531
+ params: args.mentor ? { mentor: args.mentor } : undefined,
46532
+ service: SPEND_CAPS_ENDPOINTS.LIST_AGENT_SPEND_CAPS.service,
46533
+ }),
46534
+ transformResponse: (response) => { var _a; return Array.isArray(response) ? response : ((_a = response === null || response === void 0 ? void 0 : response.results) !== null && _a !== void 0 ? _a : []); },
46535
+ providesTags: [SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAPS_LIST],
46536
+ }),
46537
+ listAgentUserSpendCaps: builder.query({
46538
+ query: (args) => ({
46539
+ url: SPEND_CAPS_ENDPOINTS.LIST_AGENT_USER_SPEND_CAPS.path(args.org, args.mentorId),
46540
+ service: SPEND_CAPS_ENDPOINTS.LIST_AGENT_USER_SPEND_CAPS.service,
46541
+ }),
46542
+ transformResponse: (response) => { var _a; return Array.isArray(response) ? response : ((_a = response === null || response === void 0 ? void 0 : response.results) !== null && _a !== void 0 ? _a : []); },
46543
+ providesTags: (result, error, args) => [
46544
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_USER_SPEND_CAPS, id: args.mentorId },
46545
+ ],
46546
+ }),
46547
+ getUserSpendCap: builder.query({
46548
+ query: (args) => ({
46549
+ url: SPEND_CAPS_ENDPOINTS.GET_USER_SPEND_CAP.path(args.org, args.mentorId, args.username),
46550
+ service: SPEND_CAPS_ENDPOINTS.GET_USER_SPEND_CAP.service,
46551
+ }),
46552
+ providesTags: (result, error, args) => [
46553
+ { type: SPEND_CAPS_QUERY_KEYS.USER_SPEND_CAP, id: `${args.mentorId}-${args.username}` },
46554
+ ],
46555
+ }),
46556
+ upsertUserSpendCap: builder.mutation({
46557
+ query: (args) => ({
46558
+ url: SPEND_CAPS_ENDPOINTS.UPSERT_USER_SPEND_CAP.path(args.org, args.mentorId, args.username),
46559
+ method: 'PUT',
46560
+ body: args.formData,
46561
+ service: SPEND_CAPS_ENDPOINTS.UPSERT_USER_SPEND_CAP.service,
46562
+ }),
46563
+ invalidatesTags: (result, error, args) => [
46564
+ { type: SPEND_CAPS_QUERY_KEYS.USER_SPEND_CAP, id: `${args.mentorId}-${args.username}` },
46565
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_USER_SPEND_CAPS, id: args.mentorId },
46566
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46567
+ ],
46568
+ }),
46569
+ deleteUserSpendCap: builder.mutation({
46570
+ query: (args) => ({
46571
+ url: SPEND_CAPS_ENDPOINTS.DELETE_USER_SPEND_CAP.path(args.org, args.mentorId, args.username),
46572
+ method: 'DELETE',
46573
+ service: SPEND_CAPS_ENDPOINTS.DELETE_USER_SPEND_CAP.service,
46574
+ }),
46575
+ invalidatesTags: (result, error, args) => [
46576
+ { type: SPEND_CAPS_QUERY_KEYS.USER_SPEND_CAP, id: `${args.mentorId}-${args.username}` },
46577
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_USER_SPEND_CAPS, id: args.mentorId },
46578
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46579
+ ],
46580
+ }),
46581
+ getSpendCapStatus: builder.query({
46582
+ query: (args) => ({
46583
+ url: SPEND_CAPS_ENDPOINTS.GET_SPEND_CAP_STATUS.path(args.org, args.userId),
46584
+ params: args.mentor ? { mentor: args.mentor } : undefined,
46585
+ service: SPEND_CAPS_ENDPOINTS.GET_SPEND_CAP_STATUS.service,
46586
+ }),
46587
+ providesTags: [SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS],
46588
+ }),
46589
+ }),
46590
+ });
46591
+ const { useGetTenantSpendCapQuery, useLazyGetTenantSpendCapQuery, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useGetAgentSpendCapQuery, useLazyGetAgentSpendCapQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useListAgentSpendCapsQuery, useLazyListAgentSpendCapsQuery, useListAgentUserSpendCapsQuery, useLazyListAgentUserSpendCapsQuery, useGetUserSpendCapQuery, useLazyGetUserSpendCapQuery, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetSpendCapStatusQuery, useLazyGetSpendCapStatusQuery, } = spendCapsApiSlice;
46592
+
46593
+ /**
46594
+ * True when `body` is a spend-cap-exceeded error body — an object whose
46595
+ * `error_code` is `'spend_cap_exceeded'`. Works for HTTP 429 bodies and
46596
+ * WebSocket error frames alike.
46597
+ */
46598
+ const isSpendCapExceededErrorBody = (body) => typeof body === 'object' &&
46599
+ body !== null &&
46600
+ body.error_code === SPEND_CAP_EXCEEDED_ERROR_CODE;
46601
+ /**
46602
+ * Extract the spend-cap-exceeded body from either a raw error body or an RTK
46603
+ * Query error shape (`{ status, data }`). Returns null for anything else.
46604
+ */
46605
+ const getSpendCapExceededError = (error) => {
46606
+ if (isSpendCapExceededErrorBody(error)) {
46607
+ return error;
46608
+ }
46609
+ if (typeof error === 'object' && error !== null && 'data' in error) {
46610
+ const data = error.data;
46611
+ if (isSpendCapExceededErrorBody(data)) {
46612
+ return data;
46613
+ }
46614
+ }
46615
+ return null;
46616
+ };
46617
+
46314
46618
  exports.recommendationPromptTypeEnum = void 0;
46315
46619
  (function (recommendationPromptTypeEnum) {
46316
46620
  recommendationPromptTypeEnum["mentors"] = "mentors";
@@ -47557,6 +47861,7 @@ const mentorReducer = {
47557
47861
  [skillsApiSlice.reducerPath]: skillsApiSlice.reducer,
47558
47862
  [supportTicketsApiSlice.reducerPath]: supportTicketsApiSlice.reducer,
47559
47863
  [gradingApiSlice.reducerPath]: gradingApiSlice.reducer,
47864
+ [spendCapsApiSlice.reducerPath]: spendCapsApiSlice.reducer,
47560
47865
  };
47561
47866
  const mentorMiddleware = [
47562
47867
  mentorApiSlice.middleware,
@@ -47618,6 +47923,7 @@ const mentorMiddleware = [
47618
47923
  skillsApiSlice.middleware,
47619
47924
  supportTicketsApiSlice.middleware,
47620
47925
  gradingApiSlice.middleware,
47926
+ spendCapsApiSlice.middleware,
47621
47927
  ];
47622
47928
 
47623
47929
  const skillsReducer = {
@@ -47660,6 +47966,7 @@ const skillsReducer = {
47660
47966
  [edxSsoApiSlice.reducerPath]: edxSsoApiSlice.reducer,
47661
47967
  [studioAuthoringApiSlice.reducerPath]: studioAuthoringApiSlice.reducer,
47662
47968
  [watchedGroupsApiSlice.reducerPath]: watchedGroupsApiSlice.reducer,
47969
+ [spendCapsApiSlice.reducerPath]: spendCapsApiSlice.reducer,
47663
47970
  [chatPrivacyApiSlice.reducerPath]: chatPrivacyApiSlice.reducer,
47664
47971
  [agentSkillsApiSlice.reducerPath]: agentSkillsApiSlice.reducer,
47665
47972
  };
@@ -47703,6 +48010,7 @@ const skillsMiddleware = [
47703
48010
  edxSsoApiSlice.middleware,
47704
48011
  studioAuthoringApiSlice.middleware,
47705
48012
  watchedGroupsApiSlice.middleware,
48013
+ spendCapsApiSlice.middleware,
47706
48014
  chatPrivacyApiSlice.middleware,
47707
48015
  agentSkillsApiSlice.middleware,
47708
48016
  ];
@@ -47793,6 +48101,10 @@ exports.PROJECTS_CUSTOM_REDUCER_PATH = PROJECTS_CUSTOM_REDUCER_PATH;
47793
48101
  exports.PROJECTS_QUERY_KEYS = PROJECTS_QUERY_KEYS;
47794
48102
  exports.QUERY_PARAMS = QUERY_PARAMS;
47795
48103
  exports.RETIREMENT_ENDPOINTS = RETIREMENT_ENDPOINTS;
48104
+ exports.SPEND_CAPS_ENDPOINTS = SPEND_CAPS_ENDPOINTS;
48105
+ exports.SPEND_CAPS_QUERY_KEYS = SPEND_CAPS_QUERY_KEYS;
48106
+ exports.SPEND_CAPS_REDUCER_PATH = SPEND_CAPS_REDUCER_PATH;
48107
+ exports.SPEND_CAP_EXCEEDED_ERROR_CODE = SPEND_CAP_EXCEEDED_ERROR_CODE;
47796
48108
  exports.STORAGE_KEYS = STORAGE_KEYS;
47797
48109
  exports.STUDIO_AUTHORING_ENDPOINTS = STUDIO_AUTHORING_ENDPOINTS;
47798
48110
  exports.SUGGESTED_PRIVACY_ENTITIES = SUGGESTED_PRIVACY_ENTITIES;
@@ -47858,12 +48170,14 @@ exports.fakeBaseQueryWithLogging = fakeBaseQueryWithLogging;
47858
48170
  exports.featureTags = featureTags;
47859
48171
  exports.filterSlashSkills = filterSlashSkills;
47860
48172
  exports.getNextRecentMessagesPageParam = getNextRecentMessagesPageParam;
48173
+ exports.getSpendCapExceededError = getSpendCapExceededError;
47861
48174
  exports.gradingApiSlice = gradingApiSlice;
47862
48175
  exports.iblFakeBaseQuery = iblFakeBaseQuery;
47863
48176
  exports.initializeDataLayer = initializeDataLayer;
47864
48177
  exports.isBaseAgentMentor = isBaseAgentMentor;
47865
48178
  exports.isPoliciesResponse = isPoliciesResponse;
47866
48179
  exports.isPrivacyBlockedError = isPrivacyBlockedError;
48180
+ exports.isSpendCapExceededErrorBody = isSpendCapExceededErrorBody;
47867
48181
  exports.llmsApiSlice = llmsApiSlice;
47868
48182
  exports.mcpApiSlice = mcpApiSlice;
47869
48183
  exports.memoryApiSlice = memoryApiSlice;
@@ -47893,6 +48207,7 @@ exports.sessionApiSlice = sessionApiSlice;
47893
48207
  exports.skillsApiSlice = skillsApiSlice;
47894
48208
  exports.skillsMiddleware = skillsMiddleware;
47895
48209
  exports.skillsReducer = skillsReducer;
48210
+ exports.spendCapsApiSlice = spendCapsApiSlice;
47896
48211
  exports.stripeApiSlice = stripeApiSlice;
47897
48212
  exports.studioAuthoringApiSlice = studioAuthoringApiSlice;
47898
48213
  exports.supportTicketsApiSlice = supportTicketsApiSlice;
@@ -48003,6 +48318,7 @@ exports.useDeactivateWorkflowMutation = useDeactivateWorkflowMutation;
48003
48318
  exports.useDeleteAdminProjectMutation = useDeleteAdminProjectMutation;
48004
48319
  exports.useDeleteAgentSkillMutation = useDeleteAgentSkillMutation;
48005
48320
  exports.useDeleteAgentSkillResourceMutation = useDeleteAgentSkillResourceMutation;
48321
+ exports.useDeleteAgentSpendCapMutation = useDeleteAgentSpendCapMutation;
48006
48322
  exports.useDeleteApiKeyMutation = useDeleteApiKeyMutation;
48007
48323
  exports.useDeleteApplicationAttachmentMutation = useDeleteApplicationAttachmentMutation;
48008
48324
  exports.useDeleteApplicationBlockMutation = useDeleteApplicationBlockMutation;
@@ -48046,10 +48362,12 @@ exports.useDeleteRecommendedPromptMutation = useDeleteRecommendedPromptMutation;
48046
48362
  exports.useDeleteStudioCourseMutation = useDeleteStudioCourseMutation;
48047
48363
  exports.useDeleteSupportTicketMessageMutation = useDeleteSupportTicketMessageMutation;
48048
48364
  exports.useDeleteSupportTicketMutation = useDeleteSupportTicketMutation;
48365
+ exports.useDeleteTenantSpendCapMutation = useDeleteTenantSpendCapMutation;
48049
48366
  exports.useDeleteTrainingDocumentMutation = useDeleteTrainingDocumentMutation;
48050
48367
  exports.useDeleteUserEducationMutation = useDeleteUserEducationMutation;
48051
48368
  exports.useDeleteUserExperienceMutation = useDeleteUserExperienceMutation;
48052
48369
  exports.useDeleteUserProjectMutation = useDeleteUserProjectMutation;
48370
+ exports.useDeleteUserSpendCapMutation = useDeleteUserSpendCapMutation;
48053
48371
  exports.useDeleteWatchedGroupMutation = useDeleteWatchedGroupMutation;
48054
48372
  exports.useDeleteWatcherMutation = useDeleteWatcherMutation;
48055
48373
  exports.useDeleteWorkflowMutation = useDeleteWorkflowMutation;
@@ -48076,6 +48394,7 @@ exports.useGetAgentSkillQuery = useGetAgentSkillQuery;
48076
48394
  exports.useGetAgentSkillResourceQuery = useGetAgentSkillResourceQuery;
48077
48395
  exports.useGetAgentSkillResourcesQuery = useGetAgentSkillResourcesQuery;
48078
48396
  exports.useGetAgentSkillsQuery = useGetAgentSkillsQuery;
48397
+ exports.useGetAgentSpendCapQuery = useGetAgentSpendCapQuery;
48079
48398
  exports.useGetAiSearchMentorsQuery = useGetAiSearchMentorsQuery;
48080
48399
  exports.useGetAllMentorMemoriesQuery = useGetAllMentorMemoriesQuery;
48081
48400
  exports.useGetApiKeyFieldPermissionsQuery = useGetApiKeyFieldPermissionsQuery;
@@ -48127,6 +48446,7 @@ exports.useGetCourseProgressQuery = useGetCourseProgressQuery;
48127
48446
  exports.useGetCredentialsListQuery = useGetCredentialsListQuery;
48128
48447
  exports.useGetCredentialsQuery = useGetCredentialsQuery;
48129
48448
  exports.useGetCredentialsSchemaQuery = useGetCredentialsSchemaQuery;
48449
+ exports.useGetCreditTransactionsQuery = useGetCreditTransactionsQuery;
48130
48450
  exports.useGetCustomDomainsQuery = useGetCustomDomainsQuery;
48131
48451
  exports.useGetCustomMentorsQuery = useGetCustomMentorsQuery;
48132
48452
  exports.useGetDatasetsQuery = useGetDatasetsQuery;
@@ -48251,6 +48571,7 @@ exports.useGetShareableLinkPublicQuery = useGetShareableLinkPublicQuery;
48251
48571
  exports.useGetShareableLinkQuery = useGetShareableLinkQuery;
48252
48572
  exports.useGetSharedSessionIdQuery = useGetSharedSessionIdQuery;
48253
48573
  exports.useGetSkillsPointsPercentileQuery = useGetSkillsPointsPercentileQuery;
48574
+ exports.useGetSpendCapStatusQuery = useGetSpendCapStatusQuery;
48254
48575
  exports.useGetStripeConnectDashboardQuery = useGetStripeConnectDashboardQuery;
48255
48576
  exports.useGetStripeConnectStatusQuery = useGetStripeConnectStatusQuery;
48256
48577
  exports.useGetStripeContextQuery = useGetStripeContextQuery;
@@ -48264,6 +48585,7 @@ exports.useGetTemplateDetailsQuery = useGetTemplateDetailsQuery;
48264
48585
  exports.useGetTemplatesQuery = useGetTemplatesQuery;
48265
48586
  exports.useGetTenantChatPrivacyConfigQuery = useGetTenantChatPrivacyConfigQuery;
48266
48587
  exports.useGetTenantMetadataQuery = useGetTenantMetadataQuery;
48588
+ exports.useGetTenantSpendCapQuery = useGetTenantSpendCapQuery;
48267
48589
  exports.useGetToolsQuery = useGetToolsQuery;
48268
48590
  exports.useGetTopStudentsByChatMessagesQuery = useGetTopStudentsByChatMessagesQuery;
48269
48591
  exports.useGetTopicOverviewQuery = useGetTopicOverviewQuery;
@@ -48305,6 +48627,7 @@ exports.useGetUserProjectsQuery = useGetUserProjectsQuery;
48305
48627
  exports.useGetUserReportedSkillsQuery = useGetUserReportedSkillsQuery;
48306
48628
  exports.useGetUserResumeQuery = useGetUserResumeQuery;
48307
48629
  exports.useGetUserSkillsPointsQuery = useGetUserSkillsPointsQuery;
48630
+ exports.useGetUserSpendCapQuery = useGetUserSpendCapQuery;
48308
48631
  exports.useGetUserTenantsQuery = useGetUserTenantsQuery;
48309
48632
  exports.useGetUsersAsAssertionsQuery = useGetUsersAsAssertionsQuery;
48310
48633
  exports.useGetUsersStatsQuery = useGetUsersStatsQuery;
@@ -48332,6 +48655,7 @@ exports.useLazyGetAdminProjectsQuery = useLazyGetAdminProjectsQuery;
48332
48655
  exports.useLazyGetAgentConfigQuery = useLazyGetAgentConfigQuery;
48333
48656
  exports.useLazyGetAgentSkillResourcesQuery = useLazyGetAgentSkillResourcesQuery;
48334
48657
  exports.useLazyGetAgentSkillsQuery = useLazyGetAgentSkillsQuery;
48658
+ exports.useLazyGetAgentSpendCapQuery = useLazyGetAgentSpendCapQuery;
48335
48659
  exports.useLazyGetAllMentorMemoriesQuery = useLazyGetAllMentorMemoriesQuery;
48336
48660
  exports.useLazyGetApiKeyQuery = useLazyGetApiKeyQuery;
48337
48661
  exports.useLazyGetApiKeysQuery = useLazyGetApiKeysQuery;
@@ -48465,6 +48789,7 @@ exports.useLazyGetShareableLinkPublicQuery = useLazyGetShareableLinkPublicQuery;
48465
48789
  exports.useLazyGetShareableLinkQuery = useLazyGetShareableLinkQuery;
48466
48790
  exports.useLazyGetSharedSessionIdQuery = useLazyGetSharedSessionIdQuery;
48467
48791
  exports.useLazyGetSkillsPointsPercentileQuery = useLazyGetSkillsPointsPercentileQuery;
48792
+ exports.useLazyGetSpendCapStatusQuery = useLazyGetSpendCapStatusQuery;
48468
48793
  exports.useLazyGetStripeConnectDashboardQuery = useLazyGetStripeConnectDashboardQuery;
48469
48794
  exports.useLazyGetStripeConnectStatusQuery = useLazyGetStripeConnectStatusQuery;
48470
48795
  exports.useLazyGetStripeContextQuery = useLazyGetStripeContextQuery;
@@ -48477,6 +48802,7 @@ exports.useLazyGetTemplateDetailsQuery = useLazyGetTemplateDetailsQuery;
48477
48802
  exports.useLazyGetTemplatesQuery = useLazyGetTemplatesQuery;
48478
48803
  exports.useLazyGetTenantChatPrivacyConfigQuery = useLazyGetTenantChatPrivacyConfigQuery;
48479
48804
  exports.useLazyGetTenantMetadataQuery = useLazyGetTenantMetadataQuery;
48805
+ exports.useLazyGetTenantSpendCapQuery = useLazyGetTenantSpendCapQuery;
48480
48806
  exports.useLazyGetToolsQuery = useLazyGetToolsQuery;
48481
48807
  exports.useLazyGetTrainingDocumentRetrainScheduleQuery = useLazyGetTrainingDocumentRetrainScheduleQuery;
48482
48808
  exports.useLazyGetTrainingDocumentsQuery = useLazyGetTrainingDocumentsQuery;
@@ -48505,6 +48831,7 @@ exports.useLazyGetUserProjectsQuery = useLazyGetUserProjectsQuery;
48505
48831
  exports.useLazyGetUserReportedSkillsQuery = useLazyGetUserReportedSkillsQuery;
48506
48832
  exports.useLazyGetUserResumeQuery = useLazyGetUserResumeQuery;
48507
48833
  exports.useLazyGetUserSkillsPointsQuery = useLazyGetUserSkillsPointsQuery;
48834
+ exports.useLazyGetUserSpendCapQuery = useLazyGetUserSpendCapQuery;
48508
48835
  exports.useLazyGetUserTenantsQuery = useLazyGetUserTenantsQuery;
48509
48836
  exports.useLazyGetUsersAsAssertionsQuery = useLazyGetUsersAsAssertionsQuery;
48510
48837
  exports.useLazyGetVectorDocumentsQuery = useLazyGetVectorDocumentsQuery;
@@ -48516,6 +48843,8 @@ exports.useLazyGetWatchedUsersQuery = useLazyGetWatchedUsersQuery;
48516
48843
  exports.useLazyGetWatchersQuery = useLazyGetWatchersQuery;
48517
48844
  exports.useLazyGetWorkflowQuery = useLazyGetWorkflowQuery;
48518
48845
  exports.useLazyGetWorkflowsQuery = useLazyGetWorkflowsQuery;
48846
+ exports.useLazyListAgentSpendCapsQuery = useLazyListAgentSpendCapsQuery;
48847
+ exports.useLazyListAgentUserSpendCapsQuery = useLazyListAgentUserSpendCapsQuery;
48519
48848
  exports.useLazyListArtifactVersionsQuery = useLazyListArtifactVersionsQuery;
48520
48849
  exports.useLazyListArtifactsQuery = useLazyListArtifactsQuery;
48521
48850
  exports.useLazyListEvalDatasetItemsQuery = useLazyListEvalDatasetItemsQuery;
@@ -48538,6 +48867,8 @@ exports.useLazySeedMentorsQuery = useLazySeedMentorsQuery;
48538
48867
  exports.useLazyStarredMentorsQuery = useLazyStarredMentorsQuery;
48539
48868
  exports.useLazyStartOAuthFlowQuery = useLazyStartOAuthFlowQuery;
48540
48869
  exports.useLinkApplicationCandidateMutation = useLinkApplicationCandidateMutation;
48870
+ exports.useListAgentSpendCapsQuery = useListAgentSpendCapsQuery;
48871
+ exports.useListAgentUserSpendCapsQuery = useListAgentUserSpendCapsQuery;
48541
48872
  exports.useListArtifactVersionsQuery = useListArtifactVersionsQuery;
48542
48873
  exports.useListArtifactsQuery = useListArtifactsQuery;
48543
48874
  exports.useListEvalDatasetItemsQuery = useListEvalDatasetItemsQuery;
@@ -48620,6 +48951,7 @@ exports.useUpdateCredentialMutation = useUpdateCredentialMutation;
48620
48951
  exports.useUpdateDisclaimerMutation = useUpdateDisclaimerMutation;
48621
48952
  exports.useUpdateEvalDatasetItemMutation = useUpdateEvalDatasetItemMutation;
48622
48953
  exports.useUpdateExamAttemptMutation = useUpdateExamAttemptMutation;
48954
+ exports.useUpdateGlobalMemoryMutation = useUpdateGlobalMemoryMutation;
48623
48955
  exports.useUpdateGraderCriterionMutation = useUpdateGraderCriterionMutation;
48624
48956
  exports.useUpdateIntegrationCredentialMutation = useUpdateIntegrationCredentialMutation;
48625
48957
  exports.useUpdateLtiKeyMutation = useUpdateLtiKeyMutation;
@@ -48681,6 +49013,9 @@ exports.useUploadProfileImageMutation = useUploadProfileImageMutation;
48681
49013
  exports.useUploadStudioCourseAssetMutation = useUploadStudioCourseAssetMutation;
48682
49014
  exports.useUploadStudioCourseVideoMutation = useUploadStudioCourseVideoMutation;
48683
49015
  exports.useUploadStudioScormPackageMutation = useUploadStudioScormPackageMutation;
49016
+ exports.useUpsertAgentSpendCapMutation = useUpsertAgentSpendCapMutation;
49017
+ exports.useUpsertTenantSpendCapMutation = useUpsertTenantSpendCapMutation;
49018
+ exports.useUpsertUserSpendCapMutation = useUpsertUserSpendCapMutation;
48684
49019
  exports.useUsersGradesPassedQuery = useUsersGradesPassedQuery;
48685
49020
  exports.useValidateWorkflowMutation = useValidateWorkflowMutation;
48686
49021
  exports.useWithdrawApplicationMutation = useWithdrawApplicationMutation;