qualifire 1.1.7 → 1.1.9

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/lib/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Qualifire = void 0;
4
- const types_1 = require("./types");
5
4
  /**
6
5
  * Represents the Qualifire SDK.
7
6
  */
@@ -39,11 +38,11 @@ class Qualifire {
39
38
  throw new Error(`Qualifire API error: ${response.statusText}`);
40
39
  }
41
40
  const jsonResponse = await response.json();
42
- const parsed = types_1.evaluationResponseSchema.safeParse(jsonResponse);
43
- if (!parsed.success) {
44
- throw new Error('Qualifire API error: Evaluation failed');
45
- }
46
- return parsed.data;
41
+ // const parsed = evaluationResponseSchema.safeParse(jsonResponse);
42
+ // if (!parsed.success) {
43
+ // throw new Error('Qualifire API error: Evaluation failed');
44
+ // }
45
+ return jsonResponse;
47
46
  }
48
47
  };
49
48
  const key = apiKey || process.env.QUALIFIRE_API_KEY;
package/lib/types.d.ts CHANGED
@@ -340,75 +340,75 @@ export declare const evaluationResponseSchema: z.ZodObject<{
340
340
  evaluationResults: z.ZodArray<z.ZodObject<{
341
341
  type: z.ZodString;
342
342
  results: z.ZodArray<z.ZodObject<{
343
- claim: z.ZodString;
344
- contradiction: z.ZodBoolean;
345
- passed: z.ZodBoolean;
346
- matchScore: z.ZodNumber;
347
- reason: z.ZodString;
343
+ claim: z.ZodOptional<z.ZodString>;
344
+ contradiction: z.ZodOptional<z.ZodBoolean>;
345
+ passed: z.ZodOptional<z.ZodBoolean>;
346
+ matchScore: z.ZodOptional<z.ZodNumber>;
347
+ reason: z.ZodOptional<z.ZodString>;
348
348
  quote: z.ZodOptional<z.ZodString>;
349
- includedInContent: z.ZodBoolean;
350
- monitorId: z.ZodString;
351
- createdAt: z.ZodString;
352
- organizationId: z.ZodString;
353
- callId: z.ZodString;
349
+ includedInContent: z.ZodOptional<z.ZodBoolean>;
350
+ monitorId: z.ZodOptional<z.ZodString>;
351
+ createdAt: z.ZodOptional<z.ZodString>;
352
+ organizationId: z.ZodOptional<z.ZodString>;
353
+ callId: z.ZodOptional<z.ZodString>;
354
354
  label: z.ZodOptional<z.ZodString>;
355
355
  }, "strip", z.ZodTypeAny, {
356
- claim: string;
357
- contradiction: boolean;
358
- passed: boolean;
359
- matchScore: number;
360
- reason: string;
361
- includedInContent: boolean;
362
- monitorId: string;
363
- createdAt: string;
364
- organizationId: string;
365
- callId: string;
356
+ claim?: string | undefined;
357
+ contradiction?: boolean | undefined;
358
+ passed?: boolean | undefined;
359
+ matchScore?: number | undefined;
360
+ reason?: string | undefined;
366
361
  quote?: string | undefined;
362
+ includedInContent?: boolean | undefined;
363
+ monitorId?: string | undefined;
364
+ createdAt?: string | undefined;
365
+ organizationId?: string | undefined;
366
+ callId?: string | undefined;
367
367
  label?: string | undefined;
368
368
  }, {
369
- claim: string;
370
- contradiction: boolean;
371
- passed: boolean;
372
- matchScore: number;
373
- reason: string;
374
- includedInContent: boolean;
375
- monitorId: string;
376
- createdAt: string;
377
- organizationId: string;
378
- callId: string;
369
+ claim?: string | undefined;
370
+ contradiction?: boolean | undefined;
371
+ passed?: boolean | undefined;
372
+ matchScore?: number | undefined;
373
+ reason?: string | undefined;
379
374
  quote?: string | undefined;
375
+ includedInContent?: boolean | undefined;
376
+ monitorId?: string | undefined;
377
+ createdAt?: string | undefined;
378
+ organizationId?: string | undefined;
379
+ callId?: string | undefined;
380
380
  label?: string | undefined;
381
381
  }>, "many">;
382
382
  }, "strip", z.ZodTypeAny, {
383
383
  type: string;
384
384
  results: {
385
- claim: string;
386
- contradiction: boolean;
387
- passed: boolean;
388
- matchScore: number;
389
- reason: string;
390
- includedInContent: boolean;
391
- monitorId: string;
392
- createdAt: string;
393
- organizationId: string;
394
- callId: string;
385
+ claim?: string | undefined;
386
+ contradiction?: boolean | undefined;
387
+ passed?: boolean | undefined;
388
+ matchScore?: number | undefined;
389
+ reason?: string | undefined;
395
390
  quote?: string | undefined;
391
+ includedInContent?: boolean | undefined;
392
+ monitorId?: string | undefined;
393
+ createdAt?: string | undefined;
394
+ organizationId?: string | undefined;
395
+ callId?: string | undefined;
396
396
  label?: string | undefined;
397
397
  }[];
398
398
  }, {
399
399
  type: string;
400
400
  results: {
401
- claim: string;
402
- contradiction: boolean;
403
- passed: boolean;
404
- matchScore: number;
405
- reason: string;
406
- includedInContent: boolean;
407
- monitorId: string;
408
- createdAt: string;
409
- organizationId: string;
410
- callId: string;
401
+ claim?: string | undefined;
402
+ contradiction?: boolean | undefined;
403
+ passed?: boolean | undefined;
404
+ matchScore?: number | undefined;
405
+ reason?: string | undefined;
411
406
  quote?: string | undefined;
407
+ includedInContent?: boolean | undefined;
408
+ monitorId?: string | undefined;
409
+ createdAt?: string | undefined;
410
+ organizationId?: string | undefined;
411
+ callId?: string | undefined;
412
412
  label?: string | undefined;
413
413
  }[];
414
414
  }>, "many">;
@@ -430,17 +430,17 @@ export declare const evaluationResponseSchema: z.ZodObject<{
430
430
  evaluationResults: {
431
431
  type: string;
432
432
  results: {
433
- claim: string;
434
- contradiction: boolean;
435
- passed: boolean;
436
- matchScore: number;
437
- reason: string;
438
- includedInContent: boolean;
439
- monitorId: string;
440
- createdAt: string;
441
- organizationId: string;
442
- callId: string;
433
+ claim?: string | undefined;
434
+ contradiction?: boolean | undefined;
435
+ passed?: boolean | undefined;
436
+ matchScore?: number | undefined;
437
+ reason?: string | undefined;
443
438
  quote?: string | undefined;
439
+ includedInContent?: boolean | undefined;
440
+ monitorId?: string | undefined;
441
+ createdAt?: string | undefined;
442
+ organizationId?: string | undefined;
443
+ callId?: string | undefined;
444
444
  label?: string | undefined;
445
445
  }[];
446
446
  }[];
@@ -455,17 +455,17 @@ export declare const evaluationResponseSchema: z.ZodObject<{
455
455
  evaluationResults: {
456
456
  type: string;
457
457
  results: {
458
- claim: string;
459
- contradiction: boolean;
460
- passed: boolean;
461
- matchScore: number;
462
- reason: string;
463
- includedInContent: boolean;
464
- monitorId: string;
465
- createdAt: string;
466
- organizationId: string;
467
- callId: string;
458
+ claim?: string | undefined;
459
+ contradiction?: boolean | undefined;
460
+ passed?: boolean | undefined;
461
+ matchScore?: number | undefined;
462
+ reason?: string | undefined;
468
463
  quote?: string | undefined;
464
+ includedInContent?: boolean | undefined;
465
+ monitorId?: string | undefined;
466
+ createdAt?: string | undefined;
467
+ organizationId?: string | undefined;
468
+ callId?: string | undefined;
469
469
  label?: string | undefined;
470
470
  }[];
471
471
  }[];
package/lib/types.js CHANGED
@@ -35,17 +35,17 @@ exports.evaluationSchema = zod_1.z.object({
35
35
  output: exports.outputSchema,
36
36
  });
37
37
  const resultSchema = zod_1.z.object({
38
- claim: zod_1.z.string(),
39
- contradiction: zod_1.z.boolean(),
40
- passed: zod_1.z.boolean(),
41
- matchScore: zod_1.z.number(),
42
- reason: zod_1.z.string(),
38
+ claim: zod_1.z.string().optional(),
39
+ contradiction: zod_1.z.boolean().optional(),
40
+ passed: zod_1.z.boolean().optional(),
41
+ matchScore: zod_1.z.number().optional(),
42
+ reason: zod_1.z.string().optional(),
43
43
  quote: zod_1.z.string().optional(),
44
- includedInContent: zod_1.z.boolean(),
45
- monitorId: zod_1.z.string(),
46
- createdAt: zod_1.z.string(),
47
- organizationId: zod_1.z.string(),
48
- callId: zod_1.z.string(),
44
+ includedInContent: zod_1.z.boolean().optional(),
45
+ monitorId: zod_1.z.string().optional(),
46
+ createdAt: zod_1.z.string().optional(),
47
+ organizationId: zod_1.z.string().optional(),
48
+ callId: zod_1.z.string().optional(),
49
49
  label: zod_1.z.string().optional(),
50
50
  });
51
51
  const evaluationResultSchema = zod_1.z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qualifire",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "Qualifire client SDK",
5
5
  "main": "./lib/index.js",
6
6
  "files": [