@iblai/data-layer 1.12.5 → 1.12.7

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;
@@ -41978,6 +42073,10 @@ const BILLING_CUSTOM_ENDPOINTS = {
41978
42073
  path: '/api/billing/account/',
41979
42074
  service: exports.SERVICES.DM,
41980
42075
  },
42076
+ GET_CREDIT_TRANSACTIONS: {
42077
+ path: '/api/billing/transactions/',
42078
+ service: exports.SERVICES.DM,
42079
+ },
41981
42080
  TRIGGER_AUTO_RECHARGE: {
41982
42081
  path: '/api/billing/auto-recharge/trigger/',
41983
42082
  service: exports.SERVICES.DM,
@@ -42018,9 +42117,26 @@ const billingCustomSlice = react.createApi({
42018
42117
  }),
42019
42118
  providesTags: ['accountBillingInfo', 'autoRecharge', 'triggerAutoRecharge'],
42020
42119
  }),
42120
+ getCreditTransactions: builder.query({
42121
+ query: ({ platform_key, transaction_type, from_date, to_date }) => ({
42122
+ url: BILLING_CUSTOM_ENDPOINTS.GET_CREDIT_TRANSACTIONS.path,
42123
+ service: BILLING_CUSTOM_ENDPOINTS.GET_CREDIT_TRANSACTIONS.service,
42124
+ method: 'GET',
42125
+ params: {
42126
+ platform_key,
42127
+ ...(transaction_type ? { transaction_type } : {}),
42128
+ ...(from_date ? { from_date } : {}),
42129
+ ...(to_date ? { to_date } : {}),
42130
+ },
42131
+ }),
42132
+ // The endpoint is paginated (DRF envelope) but may also return a bare
42133
+ // array — normalize both to the rows.
42134
+ transformResponse: (response) => { var _a; return Array.isArray(response) ? response : ((_a = response === null || response === void 0 ? void 0 : response.results) !== null && _a !== void 0 ? _a : []); },
42135
+ providesTags: ['accountBillingInfo', 'triggerAutoRecharge'],
42136
+ }),
42021
42137
  }),
42022
42138
  });
42023
- const { useUpdateAutoRechargeInfoMutation, useGetAccountBillingInfoQuery, useLazyGetAccountBillingInfoQuery, useTriggerAutoRechargeMutation, } = billingCustomSlice;
42139
+ const { useUpdateAutoRechargeInfoMutation, useGetAccountBillingInfoQuery, useLazyGetAccountBillingInfoQuery, useGetCreditTransactionsQuery, useTriggerAutoRechargeMutation, } = billingCustomSlice;
42024
42140
 
42025
42141
  const MONETIZATION_REDUCER_PATH = 'monetizationApiSlice';
42026
42142
  const SERVICE_BASE = '/api/service/platforms';
@@ -43839,6 +43955,7 @@ const NOTIFICATIONS_CUSTOM_TAGS = {
43839
43955
  TEMPLATE_DETAILS: 'NOTIFICATIONS_CUSTOM_TEMPLATE_DETAILS',
43840
43956
  UPDATE_TEMPLATE: 'NOTIFICATIONS_CUSTOM_UPDATE_TEMPLATE',
43841
43957
  TOGGLE_TEMPLATE: 'NOTIFICATIONS_CUSTOM_TOGGLE_TEMPLATE',
43958
+ RESET_TEMPLATE: 'NOTIFICATIONS_CUSTOM_RESET_TEMPLATE',
43842
43959
  };
43843
43960
  const NOTIFICATIONS_CUSTOM_ENDPOINTS = {
43844
43961
  GET_TEMPLATES: {
@@ -43857,6 +43974,14 @@ const NOTIFICATIONS_CUSTOM_ENDPOINTS = {
43857
43974
  service: exports.SERVICES.DM,
43858
43975
  path: (platformKey, notificationType) => `/api/notification/v1/platforms/${platformKey}/templates/${notificationType}/toggle/`,
43859
43976
  },
43977
+ RESET_TEMPLATE: {
43978
+ service: exports.SERVICES.DM,
43979
+ path: (platformKey, notificationType) => `/api/notification/v1/platforms/${platformKey}/templates/${notificationType}/reset/`,
43980
+ },
43981
+ TEST_TEMPLATE: {
43982
+ service: exports.SERVICES.DM,
43983
+ path: (platformKey, notificationType) => `/api/notification/v1/platforms/${platformKey}/templates/${notificationType}/test/`,
43984
+ },
43860
43985
  };
43861
43986
 
43862
43987
  const notificationsCustomApiSlice = react.createApi({
@@ -43906,9 +44031,50 @@ const notificationsCustomApiSlice = react.createApi({
43906
44031
  },
43907
44032
  invalidatesTags: [NOTIFICATIONS_CUSTOM_TAGS.TEMPLATES],
43908
44033
  }),
44034
+ /**
44035
+ * Discards the platform-specific copy of the template and reverts to the
44036
+ * platform default.
44037
+ */
44038
+ resetTemplate: builder.mutation({
44039
+ query: (args) => {
44040
+ return {
44041
+ url: NOTIFICATIONS_CUSTOM_ENDPOINTS.RESET_TEMPLATE.path(args.platformKey, args.notificationType),
44042
+ service: NOTIFICATIONS_CUSTOM_ENDPOINTS.RESET_TEMPLATE.service,
44043
+ method: 'POST',
44044
+ };
44045
+ },
44046
+ invalidatesTags: [
44047
+ NOTIFICATIONS_CUSTOM_TAGS.TEMPLATES,
44048
+ NOTIFICATIONS_CUSTOM_TAGS.TEMPLATE_DETAILS,
44049
+ ],
44050
+ }),
44051
+ /** Sends a one-off rendering of the template to `testEmail`. */
44052
+ sendTestTemplateEmail: builder.mutation({
44053
+ query: (args) => {
44054
+ return {
44055
+ url: NOTIFICATIONS_CUSTOM_ENDPOINTS.TEST_TEMPLATE.path(args.platformKey, args.notificationType),
44056
+ service: NOTIFICATIONS_CUSTOM_ENDPOINTS.TEST_TEMPLATE.service,
44057
+ method: 'POST',
44058
+ body: {
44059
+ test_email: args.testEmail,
44060
+ },
44061
+ };
44062
+ },
44063
+ }),
43909
44064
  }),
43910
44065
  });
43911
- const { useGetTemplatesQuery, useLazyGetTemplatesQuery, useGetTemplateDetailsQuery, useLazyGetTemplateDetailsQuery, useUpdateTemplateMutation, useToggleTemplateMutation, } = notificationsCustomApiSlice;
44066
+ const { useGetTemplatesQuery, useLazyGetTemplatesQuery, useGetTemplateDetailsQuery, useLazyGetTemplateDetailsQuery, useUpdateTemplateMutation, useToggleTemplateMutation, useResetTemplateMutation, useSendTestTemplateEmailMutation, } = notificationsCustomApiSlice;
44067
+
44068
+ /** Notification type of the "User Progress Summary" template. */
44069
+ const USER_PROGRESS_SUMMARY_TYPE = 'COURSES_PROGRESS_SUMMARY';
44070
+ const USER_PROGRESS_DATA_POINTS = [
44071
+ 'courses_progressed',
44072
+ 'courses_completed',
44073
+ 'credentials_earned',
44074
+ 'time_spent',
44075
+ 'active_days',
44076
+ 'mentors_accessed',
44077
+ ];
43912
44078
 
43913
44079
  const SUPPORT_TICKETS_REDUCER_PATH = 'supportTicketsApiSlice';
43914
44080
  const SUPPORT_TICKETS_TAGS = {
@@ -44931,7 +45097,7 @@ const CLAW_ENDPOINTS = {
44931
45097
  * Normalize API responses that may return either a plain array or a
44932
45098
  * paginated envelope `{ results: T[] }`.
44933
45099
  */
44934
- function normalizeList$1(response) {
45100
+ function normalizeList(response) {
44935
45101
  return Array.isArray(response) ? response : response.results;
44936
45102
  }
44937
45103
  const clawApiSlice = react.createApi({
@@ -45029,7 +45195,7 @@ const clawApiSlice = react.createApi({
45029
45195
  url: CLAW_ENDPOINTS.GET_INSTANCES.path(args.org),
45030
45196
  service: CLAW_ENDPOINTS.GET_INSTANCES.service,
45031
45197
  }),
45032
- transformResponse: (response) => normalizeList$1(response),
45198
+ transformResponse: (response) => normalizeList(response),
45033
45199
  providesTags: ['ClawInstances'],
45034
45200
  }),
45035
45201
  getClawInstance: builder.query({
@@ -45254,13 +45420,6 @@ const AGENT_SKILLS_ENDPOINTS = {
45254
45420
  },
45255
45421
  };
45256
45422
 
45257
- /**
45258
- * Normalize API responses that may return either a plain array or a
45259
- * paginated envelope `{ results: T[] }`.
45260
- */
45261
- function normalizeList(response) {
45262
- return Array.isArray(response) ? response : response.results;
45263
- }
45264
45423
  const agentSkillsApiSlice = react.createApi({
45265
45424
  reducerPath: AGENT_SKILLS_REDUCER_PATH,
45266
45425
  baseQuery: iblFetchBaseQuery,
@@ -45432,6 +45591,8 @@ const agentSkillsApiSlice = react.createApi({
45432
45591
  invalidatesTags: ['AgentSkillResources'],
45433
45592
  }),
45434
45593
  // ── Mentor Skill Assignments (nested under mentor) ────────────────────
45594
+ // Returns the paginated envelope so list UIs can page on `count`;
45595
+ // bare-array responses are normalized into a single-page envelope.
45435
45596
  getMentorSkillAssignments: builder.query({
45436
45597
  query: (args) => ({
45437
45598
  url: AGENT_SKILLS_ENDPOINTS.GET_MENTOR_SKILL_ASSIGNMENTS.path(args.org, args.mentorUniqueId),
@@ -45442,7 +45603,9 @@ const agentSkillsApiSlice = react.createApi({
45442
45603
  ...(args.offset !== undefined && { offset: args.offset }),
45443
45604
  },
45444
45605
  }),
45445
- transformResponse: (response) => normalizeList(response),
45606
+ transformResponse: (response) => Array.isArray(response)
45607
+ ? { count: response.length, next: null, previous: null, results: response }
45608
+ : response,
45446
45609
  providesTags: (_result, _error, args) => [
45447
45610
  { type: 'MentorSkillAssignments', id: args.mentorUniqueId },
45448
45611
  ],
@@ -46261,6 +46424,175 @@ const gradingApiSlice = react.createApi({
46261
46424
  });
46262
46425
  const { useGetMentorGraderConfigurationQuery, useLazyGetMentorGraderConfigurationQuery, useCreateMentorGraderConfigurationMutation, useUpdateMentorGraderConfigurationMutation, useListGraderCriteriaQuery, useLazyListGraderCriteriaQuery, useGetGraderCriterionQuery, useLazyGetGraderCriterionQuery, useCreateGraderCriterionMutation, useUpdateGraderCriterionMutation, useDeleteGraderCriterionMutation, useListGradeResultsQuery, useLazyListGradeResultsQuery, useGetGradeResultQuery, useLazyGetGradeResultQuery, useOverrideGradeResultMutation, } = gradingApiSlice;
46263
46426
 
46427
+ const spendCapsApiSlice = react.createApi({
46428
+ reducerPath: SPEND_CAPS_REDUCER_PATH,
46429
+ tagTypes: [
46430
+ SPEND_CAPS_QUERY_KEYS.TENANT_SPEND_CAP,
46431
+ SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAP,
46432
+ SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAPS_LIST,
46433
+ SPEND_CAPS_QUERY_KEYS.AGENT_USER_SPEND_CAPS,
46434
+ SPEND_CAPS_QUERY_KEYS.USER_SPEND_CAP,
46435
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46436
+ ],
46437
+ baseQuery: iblFetchBaseQuery,
46438
+ endpoints: (builder) => ({
46439
+ getTenantSpendCap: builder.query({
46440
+ query: (args) => ({
46441
+ url: SPEND_CAPS_ENDPOINTS.GET_TENANT_SPEND_CAP.path(args.org),
46442
+ service: SPEND_CAPS_ENDPOINTS.GET_TENANT_SPEND_CAP.service,
46443
+ }),
46444
+ providesTags: [SPEND_CAPS_QUERY_KEYS.TENANT_SPEND_CAP],
46445
+ }),
46446
+ // The backend PUT is an upsert: 201 on first write, 200 on update.
46447
+ upsertTenantSpendCap: builder.mutation({
46448
+ query: (args) => ({
46449
+ url: SPEND_CAPS_ENDPOINTS.UPSERT_TENANT_SPEND_CAP.path(args.org),
46450
+ method: 'PUT',
46451
+ body: args.formData,
46452
+ service: SPEND_CAPS_ENDPOINTS.UPSERT_TENANT_SPEND_CAP.service,
46453
+ }),
46454
+ invalidatesTags: [
46455
+ SPEND_CAPS_QUERY_KEYS.TENANT_SPEND_CAP,
46456
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46457
+ ],
46458
+ }),
46459
+ deleteTenantSpendCap: builder.mutation({
46460
+ query: (args) => ({
46461
+ url: SPEND_CAPS_ENDPOINTS.DELETE_TENANT_SPEND_CAP.path(args.org),
46462
+ method: 'DELETE',
46463
+ service: SPEND_CAPS_ENDPOINTS.DELETE_TENANT_SPEND_CAP.service,
46464
+ }),
46465
+ invalidatesTags: [
46466
+ SPEND_CAPS_QUERY_KEYS.TENANT_SPEND_CAP,
46467
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46468
+ ],
46469
+ }),
46470
+ getAgentSpendCap: builder.query({
46471
+ query: (args) => ({
46472
+ url: SPEND_CAPS_ENDPOINTS.GET_AGENT_SPEND_CAP.path(args.org, args.mentorId),
46473
+ service: SPEND_CAPS_ENDPOINTS.GET_AGENT_SPEND_CAP.service,
46474
+ }),
46475
+ providesTags: (result, error, args) => [
46476
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAP, id: args.mentorId },
46477
+ ],
46478
+ }),
46479
+ upsertAgentSpendCap: builder.mutation({
46480
+ query: (args) => ({
46481
+ url: SPEND_CAPS_ENDPOINTS.UPSERT_AGENT_SPEND_CAP.path(args.org, args.mentorId),
46482
+ method: 'PUT',
46483
+ body: args.formData,
46484
+ service: SPEND_CAPS_ENDPOINTS.UPSERT_AGENT_SPEND_CAP.service,
46485
+ }),
46486
+ invalidatesTags: (result, error, args) => [
46487
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAP, id: args.mentorId },
46488
+ SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAPS_LIST,
46489
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46490
+ ],
46491
+ }),
46492
+ deleteAgentSpendCap: builder.mutation({
46493
+ query: (args) => ({
46494
+ url: SPEND_CAPS_ENDPOINTS.DELETE_AGENT_SPEND_CAP.path(args.org, args.mentorId),
46495
+ method: 'DELETE',
46496
+ service: SPEND_CAPS_ENDPOINTS.DELETE_AGENT_SPEND_CAP.service,
46497
+ }),
46498
+ invalidatesTags: (result, error, args) => [
46499
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAP, id: args.mentorId },
46500
+ SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAPS_LIST,
46501
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46502
+ ],
46503
+ }),
46504
+ // Tenant-wide listing of every agent-scoped cap (no per-agent fan-out).
46505
+ // Items carry `mentor_name`/`mentor_unique_id` for display.
46506
+ listAgentSpendCaps: builder.query({
46507
+ query: (args) => ({
46508
+ url: SPEND_CAPS_ENDPOINTS.LIST_AGENT_SPEND_CAPS.path(args.org),
46509
+ params: args.mentor ? { mentor: args.mentor } : undefined,
46510
+ service: SPEND_CAPS_ENDPOINTS.LIST_AGENT_SPEND_CAPS.service,
46511
+ }),
46512
+ transformResponse: (response) => { var _a; return Array.isArray(response) ? response : ((_a = response === null || response === void 0 ? void 0 : response.results) !== null && _a !== void 0 ? _a : []); },
46513
+ providesTags: [SPEND_CAPS_QUERY_KEYS.AGENT_SPEND_CAPS_LIST],
46514
+ }),
46515
+ listAgentUserSpendCaps: builder.query({
46516
+ query: (args) => ({
46517
+ url: SPEND_CAPS_ENDPOINTS.LIST_AGENT_USER_SPEND_CAPS.path(args.org, args.mentorId),
46518
+ service: SPEND_CAPS_ENDPOINTS.LIST_AGENT_USER_SPEND_CAPS.service,
46519
+ }),
46520
+ transformResponse: (response) => { var _a; return Array.isArray(response) ? response : ((_a = response === null || response === void 0 ? void 0 : response.results) !== null && _a !== void 0 ? _a : []); },
46521
+ providesTags: (result, error, args) => [
46522
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_USER_SPEND_CAPS, id: args.mentorId },
46523
+ ],
46524
+ }),
46525
+ getUserSpendCap: builder.query({
46526
+ query: (args) => ({
46527
+ url: SPEND_CAPS_ENDPOINTS.GET_USER_SPEND_CAP.path(args.org, args.mentorId, args.username),
46528
+ service: SPEND_CAPS_ENDPOINTS.GET_USER_SPEND_CAP.service,
46529
+ }),
46530
+ providesTags: (result, error, args) => [
46531
+ { type: SPEND_CAPS_QUERY_KEYS.USER_SPEND_CAP, id: `${args.mentorId}-${args.username}` },
46532
+ ],
46533
+ }),
46534
+ upsertUserSpendCap: builder.mutation({
46535
+ query: (args) => ({
46536
+ url: SPEND_CAPS_ENDPOINTS.UPSERT_USER_SPEND_CAP.path(args.org, args.mentorId, args.username),
46537
+ method: 'PUT',
46538
+ body: args.formData,
46539
+ service: SPEND_CAPS_ENDPOINTS.UPSERT_USER_SPEND_CAP.service,
46540
+ }),
46541
+ invalidatesTags: (result, error, args) => [
46542
+ { type: SPEND_CAPS_QUERY_KEYS.USER_SPEND_CAP, id: `${args.mentorId}-${args.username}` },
46543
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_USER_SPEND_CAPS, id: args.mentorId },
46544
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46545
+ ],
46546
+ }),
46547
+ deleteUserSpendCap: builder.mutation({
46548
+ query: (args) => ({
46549
+ url: SPEND_CAPS_ENDPOINTS.DELETE_USER_SPEND_CAP.path(args.org, args.mentorId, args.username),
46550
+ method: 'DELETE',
46551
+ service: SPEND_CAPS_ENDPOINTS.DELETE_USER_SPEND_CAP.service,
46552
+ }),
46553
+ invalidatesTags: (result, error, args) => [
46554
+ { type: SPEND_CAPS_QUERY_KEYS.USER_SPEND_CAP, id: `${args.mentorId}-${args.username}` },
46555
+ { type: SPEND_CAPS_QUERY_KEYS.AGENT_USER_SPEND_CAPS, id: args.mentorId },
46556
+ SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS,
46557
+ ],
46558
+ }),
46559
+ getSpendCapStatus: builder.query({
46560
+ query: (args) => ({
46561
+ url: SPEND_CAPS_ENDPOINTS.GET_SPEND_CAP_STATUS.path(args.org, args.userId),
46562
+ params: args.mentor ? { mentor: args.mentor } : undefined,
46563
+ service: SPEND_CAPS_ENDPOINTS.GET_SPEND_CAP_STATUS.service,
46564
+ }),
46565
+ providesTags: [SPEND_CAPS_QUERY_KEYS.SPEND_CAP_STATUS],
46566
+ }),
46567
+ }),
46568
+ });
46569
+ const { useGetTenantSpendCapQuery, useLazyGetTenantSpendCapQuery, useUpsertTenantSpendCapMutation, useDeleteTenantSpendCapMutation, useGetAgentSpendCapQuery, useLazyGetAgentSpendCapQuery, useUpsertAgentSpendCapMutation, useDeleteAgentSpendCapMutation, useListAgentSpendCapsQuery, useLazyListAgentSpendCapsQuery, useListAgentUserSpendCapsQuery, useLazyListAgentUserSpendCapsQuery, useGetUserSpendCapQuery, useLazyGetUserSpendCapQuery, useUpsertUserSpendCapMutation, useDeleteUserSpendCapMutation, useGetSpendCapStatusQuery, useLazyGetSpendCapStatusQuery, } = spendCapsApiSlice;
46570
+
46571
+ /**
46572
+ * True when `body` is a spend-cap-exceeded error body — an object whose
46573
+ * `error_code` is `'spend_cap_exceeded'`. Works for HTTP 429 bodies and
46574
+ * WebSocket error frames alike.
46575
+ */
46576
+ const isSpendCapExceededErrorBody = (body) => typeof body === 'object' &&
46577
+ body !== null &&
46578
+ body.error_code === SPEND_CAP_EXCEEDED_ERROR_CODE;
46579
+ /**
46580
+ * Extract the spend-cap-exceeded body from either a raw error body or an RTK
46581
+ * Query error shape (`{ status, data }`). Returns null for anything else.
46582
+ */
46583
+ const getSpendCapExceededError = (error) => {
46584
+ if (isSpendCapExceededErrorBody(error)) {
46585
+ return error;
46586
+ }
46587
+ if (typeof error === 'object' && error !== null && 'data' in error) {
46588
+ const data = error.data;
46589
+ if (isSpendCapExceededErrorBody(data)) {
46590
+ return data;
46591
+ }
46592
+ }
46593
+ return null;
46594
+ };
46595
+
46264
46596
  exports.recommendationPromptTypeEnum = void 0;
46265
46597
  (function (recommendationPromptTypeEnum) {
46266
46598
  recommendationPromptTypeEnum["mentors"] = "mentors";
@@ -47507,6 +47839,7 @@ const mentorReducer = {
47507
47839
  [skillsApiSlice.reducerPath]: skillsApiSlice.reducer,
47508
47840
  [supportTicketsApiSlice.reducerPath]: supportTicketsApiSlice.reducer,
47509
47841
  [gradingApiSlice.reducerPath]: gradingApiSlice.reducer,
47842
+ [spendCapsApiSlice.reducerPath]: spendCapsApiSlice.reducer,
47510
47843
  };
47511
47844
  const mentorMiddleware = [
47512
47845
  mentorApiSlice.middleware,
@@ -47568,6 +47901,7 @@ const mentorMiddleware = [
47568
47901
  skillsApiSlice.middleware,
47569
47902
  supportTicketsApiSlice.middleware,
47570
47903
  gradingApiSlice.middleware,
47904
+ spendCapsApiSlice.middleware,
47571
47905
  ];
47572
47906
 
47573
47907
  const skillsReducer = {
@@ -47610,6 +47944,7 @@ const skillsReducer = {
47610
47944
  [edxSsoApiSlice.reducerPath]: edxSsoApiSlice.reducer,
47611
47945
  [studioAuthoringApiSlice.reducerPath]: studioAuthoringApiSlice.reducer,
47612
47946
  [watchedGroupsApiSlice.reducerPath]: watchedGroupsApiSlice.reducer,
47947
+ [spendCapsApiSlice.reducerPath]: spendCapsApiSlice.reducer,
47613
47948
  [chatPrivacyApiSlice.reducerPath]: chatPrivacyApiSlice.reducer,
47614
47949
  [agentSkillsApiSlice.reducerPath]: agentSkillsApiSlice.reducer,
47615
47950
  };
@@ -47653,6 +47988,7 @@ const skillsMiddleware = [
47653
47988
  edxSsoApiSlice.middleware,
47654
47989
  studioAuthoringApiSlice.middleware,
47655
47990
  watchedGroupsApiSlice.middleware,
47991
+ spendCapsApiSlice.middleware,
47656
47992
  chatPrivacyApiSlice.middleware,
47657
47993
  agentSkillsApiSlice.middleware,
47658
47994
  ];
@@ -47743,6 +48079,10 @@ exports.PROJECTS_CUSTOM_REDUCER_PATH = PROJECTS_CUSTOM_REDUCER_PATH;
47743
48079
  exports.PROJECTS_QUERY_KEYS = PROJECTS_QUERY_KEYS;
47744
48080
  exports.QUERY_PARAMS = QUERY_PARAMS;
47745
48081
  exports.RETIREMENT_ENDPOINTS = RETIREMENT_ENDPOINTS;
48082
+ exports.SPEND_CAPS_ENDPOINTS = SPEND_CAPS_ENDPOINTS;
48083
+ exports.SPEND_CAPS_QUERY_KEYS = SPEND_CAPS_QUERY_KEYS;
48084
+ exports.SPEND_CAPS_REDUCER_PATH = SPEND_CAPS_REDUCER_PATH;
48085
+ exports.SPEND_CAP_EXCEEDED_ERROR_CODE = SPEND_CAP_EXCEEDED_ERROR_CODE;
47746
48086
  exports.STORAGE_KEYS = STORAGE_KEYS;
47747
48087
  exports.STUDIO_AUTHORING_ENDPOINTS = STUDIO_AUTHORING_ENDPOINTS;
47748
48088
  exports.SUGGESTED_PRIVACY_ENTITIES = SUGGESTED_PRIVACY_ENTITIES;
@@ -47754,6 +48094,8 @@ exports.TENANT_LOGO_ENDPOINTS = TENANT_LOGO_ENDPOINTS;
47754
48094
  exports.TENANT_LOGO_QUERY_KEYS = TENANT_LOGO_QUERY_KEYS;
47755
48095
  exports.TENANT_LOGO_REDUCER_PATH = TENANT_LOGO_REDUCER_PATH;
47756
48096
  exports.URL_PATTERNS = URL_PATTERNS;
48097
+ exports.USER_PROGRESS_DATA_POINTS = USER_PROGRESS_DATA_POINTS;
48098
+ exports.USER_PROGRESS_SUMMARY_TYPE = USER_PROGRESS_SUMMARY_TYPE;
47757
48099
  exports.WATCHED_GROUPS_ENDPOINTS = WATCHED_GROUPS_ENDPOINTS;
47758
48100
  exports.WATCHED_GROUPS_QUERY_KEYS = WATCHED_GROUPS_QUERY_KEYS;
47759
48101
  exports.WATCHED_GROUPS_REDUCER_PATH = WATCHED_GROUPS_REDUCER_PATH;
@@ -47806,12 +48148,14 @@ exports.fakeBaseQueryWithLogging = fakeBaseQueryWithLogging;
47806
48148
  exports.featureTags = featureTags;
47807
48149
  exports.filterSlashSkills = filterSlashSkills;
47808
48150
  exports.getNextRecentMessagesPageParam = getNextRecentMessagesPageParam;
48151
+ exports.getSpendCapExceededError = getSpendCapExceededError;
47809
48152
  exports.gradingApiSlice = gradingApiSlice;
47810
48153
  exports.iblFakeBaseQuery = iblFakeBaseQuery;
47811
48154
  exports.initializeDataLayer = initializeDataLayer;
47812
48155
  exports.isBaseAgentMentor = isBaseAgentMentor;
47813
48156
  exports.isPoliciesResponse = isPoliciesResponse;
47814
48157
  exports.isPrivacyBlockedError = isPrivacyBlockedError;
48158
+ exports.isSpendCapExceededErrorBody = isSpendCapExceededErrorBody;
47815
48159
  exports.llmsApiSlice = llmsApiSlice;
47816
48160
  exports.mcpApiSlice = mcpApiSlice;
47817
48161
  exports.memoryApiSlice = memoryApiSlice;
@@ -47841,6 +48185,7 @@ exports.sessionApiSlice = sessionApiSlice;
47841
48185
  exports.skillsApiSlice = skillsApiSlice;
47842
48186
  exports.skillsMiddleware = skillsMiddleware;
47843
48187
  exports.skillsReducer = skillsReducer;
48188
+ exports.spendCapsApiSlice = spendCapsApiSlice;
47844
48189
  exports.stripeApiSlice = stripeApiSlice;
47845
48190
  exports.studioAuthoringApiSlice = studioAuthoringApiSlice;
47846
48191
  exports.supportTicketsApiSlice = supportTicketsApiSlice;
@@ -47951,6 +48296,7 @@ exports.useDeactivateWorkflowMutation = useDeactivateWorkflowMutation;
47951
48296
  exports.useDeleteAdminProjectMutation = useDeleteAdminProjectMutation;
47952
48297
  exports.useDeleteAgentSkillMutation = useDeleteAgentSkillMutation;
47953
48298
  exports.useDeleteAgentSkillResourceMutation = useDeleteAgentSkillResourceMutation;
48299
+ exports.useDeleteAgentSpendCapMutation = useDeleteAgentSpendCapMutation;
47954
48300
  exports.useDeleteApiKeyMutation = useDeleteApiKeyMutation;
47955
48301
  exports.useDeleteApplicationAttachmentMutation = useDeleteApplicationAttachmentMutation;
47956
48302
  exports.useDeleteApplicationBlockMutation = useDeleteApplicationBlockMutation;
@@ -47994,10 +48340,12 @@ exports.useDeleteRecommendedPromptMutation = useDeleteRecommendedPromptMutation;
47994
48340
  exports.useDeleteStudioCourseMutation = useDeleteStudioCourseMutation;
47995
48341
  exports.useDeleteSupportTicketMessageMutation = useDeleteSupportTicketMessageMutation;
47996
48342
  exports.useDeleteSupportTicketMutation = useDeleteSupportTicketMutation;
48343
+ exports.useDeleteTenantSpendCapMutation = useDeleteTenantSpendCapMutation;
47997
48344
  exports.useDeleteTrainingDocumentMutation = useDeleteTrainingDocumentMutation;
47998
48345
  exports.useDeleteUserEducationMutation = useDeleteUserEducationMutation;
47999
48346
  exports.useDeleteUserExperienceMutation = useDeleteUserExperienceMutation;
48000
48347
  exports.useDeleteUserProjectMutation = useDeleteUserProjectMutation;
48348
+ exports.useDeleteUserSpendCapMutation = useDeleteUserSpendCapMutation;
48001
48349
  exports.useDeleteWatchedGroupMutation = useDeleteWatchedGroupMutation;
48002
48350
  exports.useDeleteWatcherMutation = useDeleteWatcherMutation;
48003
48351
  exports.useDeleteWorkflowMutation = useDeleteWorkflowMutation;
@@ -48024,6 +48372,7 @@ exports.useGetAgentSkillQuery = useGetAgentSkillQuery;
48024
48372
  exports.useGetAgentSkillResourceQuery = useGetAgentSkillResourceQuery;
48025
48373
  exports.useGetAgentSkillResourcesQuery = useGetAgentSkillResourcesQuery;
48026
48374
  exports.useGetAgentSkillsQuery = useGetAgentSkillsQuery;
48375
+ exports.useGetAgentSpendCapQuery = useGetAgentSpendCapQuery;
48027
48376
  exports.useGetAiSearchMentorsQuery = useGetAiSearchMentorsQuery;
48028
48377
  exports.useGetAllMentorMemoriesQuery = useGetAllMentorMemoriesQuery;
48029
48378
  exports.useGetApiKeyFieldPermissionsQuery = useGetApiKeyFieldPermissionsQuery;
@@ -48075,6 +48424,7 @@ exports.useGetCourseProgressQuery = useGetCourseProgressQuery;
48075
48424
  exports.useGetCredentialsListQuery = useGetCredentialsListQuery;
48076
48425
  exports.useGetCredentialsQuery = useGetCredentialsQuery;
48077
48426
  exports.useGetCredentialsSchemaQuery = useGetCredentialsSchemaQuery;
48427
+ exports.useGetCreditTransactionsQuery = useGetCreditTransactionsQuery;
48078
48428
  exports.useGetCustomDomainsQuery = useGetCustomDomainsQuery;
48079
48429
  exports.useGetCustomMentorsQuery = useGetCustomMentorsQuery;
48080
48430
  exports.useGetDatasetsQuery = useGetDatasetsQuery;
@@ -48199,6 +48549,7 @@ exports.useGetShareableLinkPublicQuery = useGetShareableLinkPublicQuery;
48199
48549
  exports.useGetShareableLinkQuery = useGetShareableLinkQuery;
48200
48550
  exports.useGetSharedSessionIdQuery = useGetSharedSessionIdQuery;
48201
48551
  exports.useGetSkillsPointsPercentileQuery = useGetSkillsPointsPercentileQuery;
48552
+ exports.useGetSpendCapStatusQuery = useGetSpendCapStatusQuery;
48202
48553
  exports.useGetStripeConnectDashboardQuery = useGetStripeConnectDashboardQuery;
48203
48554
  exports.useGetStripeConnectStatusQuery = useGetStripeConnectStatusQuery;
48204
48555
  exports.useGetStripeContextQuery = useGetStripeContextQuery;
@@ -48212,6 +48563,7 @@ exports.useGetTemplateDetailsQuery = useGetTemplateDetailsQuery;
48212
48563
  exports.useGetTemplatesQuery = useGetTemplatesQuery;
48213
48564
  exports.useGetTenantChatPrivacyConfigQuery = useGetTenantChatPrivacyConfigQuery;
48214
48565
  exports.useGetTenantMetadataQuery = useGetTenantMetadataQuery;
48566
+ exports.useGetTenantSpendCapQuery = useGetTenantSpendCapQuery;
48215
48567
  exports.useGetToolsQuery = useGetToolsQuery;
48216
48568
  exports.useGetTopStudentsByChatMessagesQuery = useGetTopStudentsByChatMessagesQuery;
48217
48569
  exports.useGetTopicOverviewQuery = useGetTopicOverviewQuery;
@@ -48253,6 +48605,7 @@ exports.useGetUserProjectsQuery = useGetUserProjectsQuery;
48253
48605
  exports.useGetUserReportedSkillsQuery = useGetUserReportedSkillsQuery;
48254
48606
  exports.useGetUserResumeQuery = useGetUserResumeQuery;
48255
48607
  exports.useGetUserSkillsPointsQuery = useGetUserSkillsPointsQuery;
48608
+ exports.useGetUserSpendCapQuery = useGetUserSpendCapQuery;
48256
48609
  exports.useGetUserTenantsQuery = useGetUserTenantsQuery;
48257
48610
  exports.useGetUsersAsAssertionsQuery = useGetUsersAsAssertionsQuery;
48258
48611
  exports.useGetUsersStatsQuery = useGetUsersStatsQuery;
@@ -48280,6 +48633,7 @@ exports.useLazyGetAdminProjectsQuery = useLazyGetAdminProjectsQuery;
48280
48633
  exports.useLazyGetAgentConfigQuery = useLazyGetAgentConfigQuery;
48281
48634
  exports.useLazyGetAgentSkillResourcesQuery = useLazyGetAgentSkillResourcesQuery;
48282
48635
  exports.useLazyGetAgentSkillsQuery = useLazyGetAgentSkillsQuery;
48636
+ exports.useLazyGetAgentSpendCapQuery = useLazyGetAgentSpendCapQuery;
48283
48637
  exports.useLazyGetAllMentorMemoriesQuery = useLazyGetAllMentorMemoriesQuery;
48284
48638
  exports.useLazyGetApiKeyQuery = useLazyGetApiKeyQuery;
48285
48639
  exports.useLazyGetApiKeysQuery = useLazyGetApiKeysQuery;
@@ -48413,6 +48767,7 @@ exports.useLazyGetShareableLinkPublicQuery = useLazyGetShareableLinkPublicQuery;
48413
48767
  exports.useLazyGetShareableLinkQuery = useLazyGetShareableLinkQuery;
48414
48768
  exports.useLazyGetSharedSessionIdQuery = useLazyGetSharedSessionIdQuery;
48415
48769
  exports.useLazyGetSkillsPointsPercentileQuery = useLazyGetSkillsPointsPercentileQuery;
48770
+ exports.useLazyGetSpendCapStatusQuery = useLazyGetSpendCapStatusQuery;
48416
48771
  exports.useLazyGetStripeConnectDashboardQuery = useLazyGetStripeConnectDashboardQuery;
48417
48772
  exports.useLazyGetStripeConnectStatusQuery = useLazyGetStripeConnectStatusQuery;
48418
48773
  exports.useLazyGetStripeContextQuery = useLazyGetStripeContextQuery;
@@ -48425,6 +48780,7 @@ exports.useLazyGetTemplateDetailsQuery = useLazyGetTemplateDetailsQuery;
48425
48780
  exports.useLazyGetTemplatesQuery = useLazyGetTemplatesQuery;
48426
48781
  exports.useLazyGetTenantChatPrivacyConfigQuery = useLazyGetTenantChatPrivacyConfigQuery;
48427
48782
  exports.useLazyGetTenantMetadataQuery = useLazyGetTenantMetadataQuery;
48783
+ exports.useLazyGetTenantSpendCapQuery = useLazyGetTenantSpendCapQuery;
48428
48784
  exports.useLazyGetToolsQuery = useLazyGetToolsQuery;
48429
48785
  exports.useLazyGetTrainingDocumentRetrainScheduleQuery = useLazyGetTrainingDocumentRetrainScheduleQuery;
48430
48786
  exports.useLazyGetTrainingDocumentsQuery = useLazyGetTrainingDocumentsQuery;
@@ -48453,6 +48809,7 @@ exports.useLazyGetUserProjectsQuery = useLazyGetUserProjectsQuery;
48453
48809
  exports.useLazyGetUserReportedSkillsQuery = useLazyGetUserReportedSkillsQuery;
48454
48810
  exports.useLazyGetUserResumeQuery = useLazyGetUserResumeQuery;
48455
48811
  exports.useLazyGetUserSkillsPointsQuery = useLazyGetUserSkillsPointsQuery;
48812
+ exports.useLazyGetUserSpendCapQuery = useLazyGetUserSpendCapQuery;
48456
48813
  exports.useLazyGetUserTenantsQuery = useLazyGetUserTenantsQuery;
48457
48814
  exports.useLazyGetUsersAsAssertionsQuery = useLazyGetUsersAsAssertionsQuery;
48458
48815
  exports.useLazyGetVectorDocumentsQuery = useLazyGetVectorDocumentsQuery;
@@ -48464,6 +48821,8 @@ exports.useLazyGetWatchedUsersQuery = useLazyGetWatchedUsersQuery;
48464
48821
  exports.useLazyGetWatchersQuery = useLazyGetWatchersQuery;
48465
48822
  exports.useLazyGetWorkflowQuery = useLazyGetWorkflowQuery;
48466
48823
  exports.useLazyGetWorkflowsQuery = useLazyGetWorkflowsQuery;
48824
+ exports.useLazyListAgentSpendCapsQuery = useLazyListAgentSpendCapsQuery;
48825
+ exports.useLazyListAgentUserSpendCapsQuery = useLazyListAgentUserSpendCapsQuery;
48467
48826
  exports.useLazyListArtifactVersionsQuery = useLazyListArtifactVersionsQuery;
48468
48827
  exports.useLazyListArtifactsQuery = useLazyListArtifactsQuery;
48469
48828
  exports.useLazyListEvalDatasetItemsQuery = useLazyListEvalDatasetItemsQuery;
@@ -48486,6 +48845,8 @@ exports.useLazySeedMentorsQuery = useLazySeedMentorsQuery;
48486
48845
  exports.useLazyStarredMentorsQuery = useLazyStarredMentorsQuery;
48487
48846
  exports.useLazyStartOAuthFlowQuery = useLazyStartOAuthFlowQuery;
48488
48847
  exports.useLinkApplicationCandidateMutation = useLinkApplicationCandidateMutation;
48848
+ exports.useListAgentSpendCapsQuery = useListAgentSpendCapsQuery;
48849
+ exports.useListAgentUserSpendCapsQuery = useListAgentUserSpendCapsQuery;
48489
48850
  exports.useListArtifactVersionsQuery = useListArtifactVersionsQuery;
48490
48851
  exports.useListArtifactsQuery = useListArtifactsQuery;
48491
48852
  exports.useListEvalDatasetItemsQuery = useListEvalDatasetItemsQuery;
@@ -48523,10 +48884,12 @@ exports.useRemoveWatchedUserMutation = useRemoveWatchedUserMutation;
48523
48884
  exports.useRenewApplicationMutation = useRenewApplicationMutation;
48524
48885
  exports.useRenewSubscriptionMutation = useRenewSubscriptionMutation;
48525
48886
  exports.useResetPasswordMutation = useResetPasswordMutation;
48887
+ exports.useResetTemplateMutation = useResetTemplateMutation;
48526
48888
  exports.useRevokeShareableLinkMutation = useRevokeShareableLinkMutation;
48527
48889
  exports.useSeedMentorsQuery = useSeedMentorsQuery;
48528
48890
  exports.useSelfRetireMutation = useSelfRetireMutation;
48529
48891
  exports.useSendNotificationMutation = useSendNotificationMutation;
48892
+ exports.useSendTestTemplateEmailMutation = useSendTestTemplateEmailMutation;
48530
48893
  exports.useSetCurrentVersionMutation = useSetCurrentVersionMutation;
48531
48894
  exports.useSetPlatformConfigurationsMutation = useSetPlatformConfigurationsMutation;
48532
48895
  exports.useSetStudentMentorCreationStatusMutation = useSetStudentMentorCreationStatusMutation;
@@ -48627,6 +48990,9 @@ exports.useUploadProfileImageMutation = useUploadProfileImageMutation;
48627
48990
  exports.useUploadStudioCourseAssetMutation = useUploadStudioCourseAssetMutation;
48628
48991
  exports.useUploadStudioCourseVideoMutation = useUploadStudioCourseVideoMutation;
48629
48992
  exports.useUploadStudioScormPackageMutation = useUploadStudioScormPackageMutation;
48993
+ exports.useUpsertAgentSpendCapMutation = useUpsertAgentSpendCapMutation;
48994
+ exports.useUpsertTenantSpendCapMutation = useUpsertTenantSpendCapMutation;
48995
+ exports.useUpsertUserSpendCapMutation = useUpsertUserSpendCapMutation;
48630
48996
  exports.useUsersGradesPassedQuery = useUsersGradesPassedQuery;
48631
48997
  exports.useValidateWorkflowMutation = useValidateWorkflowMutation;
48632
48998
  exports.useWithdrawApplicationMutation = useWithdrawApplicationMutation;