joye-backend-utility 8.2.1 → 8.2.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.
@@ -3,10 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AIResponsesTrackingSchema = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const AIResponsesTracking = new mongoose_1.Schema({
6
- sessionId: {
7
- type: String,
8
- required: true,
9
- },
10
6
  date: {
11
7
  type: String,
12
8
  required: true,
@@ -1,7 +1,8 @@
1
1
  import { Schema } from 'mongoose';
2
2
  /**
3
- * Provider-neutral LLM batch job store (Gemini Batch today; Claude Message Batches later).
3
+ * Provider-neutral LLM batch job store (Gemini Batch + Claude Message Batches).
4
4
  * Collection / model name: `Llm_Batch_Job`
5
+ * Item rows store metadata only — provider request bodies are rebuilt at submit time.
5
6
  */
6
7
  /** Item-level statuses for one request inside an LLM batch job. */
7
8
  export declare type LlmBatchItemStatus = 'queued' | 'submitted' | 'succeeded' | 'failed' | 'timed_out' | 'fallback_sync' | 'fallback_local';
@@ -12,8 +12,7 @@ const LlmBatchJobItemSchema = new mongoose_1.Schema({
12
12
  bucket: { type: Number, required: false },
13
13
  status: { type: String, required: true, default: 'queued' },
14
14
  error: { type: String, required: false },
15
- /** Provider-specific request payload (GenerateContent / Messages batch body). */
16
- request: { type: mongoose_1.Schema.Types.Mixed, required: true },
15
+ // Intentionally no `request` payload rebuild at submit from analyticsId to keep docs small.
17
16
  }, { _id: false });
18
17
  exports.LlmBatchJobSchema = new mongoose_1.Schema({
19
18
  /** `gemini` | `claude` — required so providers never share an open job. */
@@ -32,7 +31,7 @@ exports.LlmBatchJobSchema = new mongoose_1.Schema({
32
31
  batchName: { type: String, required: false, index: true },
33
32
  displayName: { type: String, required: true },
34
33
  state: { type: String, required: true, default: 'open', index: true },
35
- /** Model id used for the batch (e.g. gemini-3.5-flash-lite / claude-sonnet-4-6). */
34
+ /** Model id used for the batch (e.g. gemini-3.7-flash / claude-sonnet-4-6). */
36
35
  model: { type: String, required: false },
37
36
  createdAt: { type: Number, required: true },
38
37
  submittedAt: { type: Number, required: false },
@@ -181,7 +181,7 @@ const UserAnalytic = new mongoose_1.Schema({
181
181
  type: Number,
182
182
  required: false,
183
183
  },
184
- /** Gemini thinking / reasoning tokens (thoughtsTokenCount). */
184
+ /** Thinking / reasoning tokens. Gemini: thoughtsTokenCount. Claude: output_tokens_details.thinking_tokens. */
185
185
  thoughtsToken: {
186
186
  type: Number,
187
187
  required: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joye-backend-utility",
3
- "version": "8.2.1",
3
+ "version": "8.2.3",
4
4
  "description": "Joye backend utility for db functions and common functions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",