@cairul/sdk 0.0.0-stage → 0.1.0

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.
Files changed (79) hide show
  1. package/LICENSE +202 -0
  2. package/dist/generated/apis/DocumentationApi.d.ts +41 -0
  3. package/dist/generated/apis/DocumentationApi.js +76 -0
  4. package/dist/generated/apis/HealthApi.d.ts +30 -0
  5. package/dist/generated/apis/HealthApi.js +49 -0
  6. package/dist/generated/apis/IdentitiesApi.d.ts +36 -0
  7. package/dist/generated/apis/IdentitiesApi.js +53 -0
  8. package/dist/generated/apis/JourneysApi.d.ts +161 -0
  9. package/dist/generated/apis/JourneysApi.js +268 -0
  10. package/dist/generated/apis/PlansApi.d.ts +73 -0
  11. package/dist/generated/apis/PlansApi.js +121 -0
  12. package/dist/generated/apis/index.d.ts +5 -0
  13. package/dist/generated/apis/index.js +7 -0
  14. package/dist/generated/index.d.ts +3 -0
  15. package/dist/generated/index.js +5 -0
  16. package/dist/generated/models/APIError.d.ts +30 -0
  17. package/dist/generated/models/APIError.js +43 -0
  18. package/dist/generated/models/ApiHealth.d.ts +30 -0
  19. package/dist/generated/models/ApiHealth.js +43 -0
  20. package/dist/generated/models/CapturePolicy.d.ts +47 -0
  21. package/dist/generated/models/CapturePolicy.js +53 -0
  22. package/dist/generated/models/Check.d.ts +39 -0
  23. package/dist/generated/models/Check.js +52 -0
  24. package/dist/generated/models/CheckAction.d.ts +43 -0
  25. package/dist/generated/models/CheckAction.js +50 -0
  26. package/dist/generated/models/CheckInput.d.ts +35 -0
  27. package/dist/generated/models/CheckInput.js +48 -0
  28. package/dist/generated/models/EventPublication.d.ts +60 -0
  29. package/dist/generated/models/EventPublication.js +64 -0
  30. package/dist/generated/models/ExecutionObservation.d.ts +56 -0
  31. package/dist/generated/models/ExecutionObservation.js +73 -0
  32. package/dist/generated/models/HarnessIdentity.d.ts +42 -0
  33. package/dist/generated/models/HarnessIdentity.js +57 -0
  34. package/dist/generated/models/Identity.d.ts +58 -0
  35. package/dist/generated/models/Identity.js +61 -0
  36. package/dist/generated/models/JournalEntry.d.ts +75 -0
  37. package/dist/generated/models/JournalEntry.js +88 -0
  38. package/dist/generated/models/Journey.d.ts +85 -0
  39. package/dist/generated/models/Journey.js +113 -0
  40. package/dist/generated/models/MCPRequestObservation.d.ts +50 -0
  41. package/dist/generated/models/MCPRequestObservation.js +66 -0
  42. package/dist/generated/models/ModelObservation.d.ts +47 -0
  43. package/dist/generated/models/ModelObservation.js +58 -0
  44. package/dist/generated/models/ObservationBatch.d.ts +40 -0
  45. package/dist/generated/models/ObservationBatch.js +55 -0
  46. package/dist/generated/models/ObservationEvent.d.ts +66 -0
  47. package/dist/generated/models/ObservationEvent.js +74 -0
  48. package/dist/generated/models/Phase.d.ts +39 -0
  49. package/dist/generated/models/Phase.js +52 -0
  50. package/dist/generated/models/PhaseInput.d.ts +35 -0
  51. package/dist/generated/models/PhaseInput.js +48 -0
  52. package/dist/generated/models/Plan.d.ts +55 -0
  53. package/dist/generated/models/Plan.js +70 -0
  54. package/dist/generated/models/PlanInput.d.ts +39 -0
  55. package/dist/generated/models/PlanInput.js +52 -0
  56. package/dist/generated/models/PublicationResult.d.ts +35 -0
  57. package/dist/generated/models/PublicationResult.js +46 -0
  58. package/dist/generated/models/RecordingEndObservation.d.ts +52 -0
  59. package/dist/generated/models/RecordingEndObservation.js +67 -0
  60. package/dist/generated/models/RecordingStartObservation.d.ts +35 -0
  61. package/dist/generated/models/RecordingStartObservation.js +48 -0
  62. package/dist/generated/models/StartJourneyInput.d.ts +59 -0
  63. package/dist/generated/models/StartJourneyInput.js +64 -0
  64. package/dist/generated/models/StartedJourney.d.ts +40 -0
  65. package/dist/generated/models/StartedJourney.js +55 -0
  66. package/dist/generated/models/TokenUsage.d.ts +46 -0
  67. package/dist/generated/models/TokenUsage.js +49 -0
  68. package/dist/generated/models/ToolObservation.d.ts +64 -0
  69. package/dist/generated/models/ToolObservation.js +73 -0
  70. package/dist/generated/models/WorkflowActionType.d.ts +29 -0
  71. package/dist/generated/models/WorkflowActionType.js +47 -0
  72. package/dist/generated/models/WorkflowJourneyStatus.d.ts +26 -0
  73. package/dist/generated/models/WorkflowJourneyStatus.js +44 -0
  74. package/dist/generated/models/index.d.ts +29 -0
  75. package/dist/generated/models/index.js +31 -0
  76. package/dist/generated/runtime.d.ts +217 -0
  77. package/dist/generated/runtime.js +455 -0
  78. package/package.json +23 -3
  79. package/README.md +0 -3
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Cairul API
3
+ * Backend API for Cairul.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface Identity
16
+ */
17
+ export interface Identity {
18
+ /**
19
+ *
20
+ */
21
+ createdAt: string;
22
+ /**
23
+ *
24
+ */
25
+ harness?: string;
26
+ /**
27
+ *
28
+ */
29
+ harnessVersion?: string;
30
+ /**
31
+ *
32
+ */
33
+ id: string;
34
+ /**
35
+ *
36
+ */
37
+ name?: string;
38
+ /**
39
+ *
40
+ */
41
+ sessionId?: string;
42
+ /**
43
+ *
44
+ */
45
+ threadId?: string;
46
+ /**
47
+ *
48
+ */
49
+ userId?: string;
50
+ }
51
+ /**
52
+ * Check if a given object implements the Identity interface.
53
+ */
54
+ export declare function instanceOfIdentity(value: object): value is Identity;
55
+ export declare function IdentityFromJSON(json: any): Identity;
56
+ export declare function IdentityFromJSONTyped(json: any, ignoreDiscriminator: boolean): Identity;
57
+ export declare function IdentityToJSON(json: any): Identity;
58
+ export declare function IdentityToJSONTyped(value?: Identity | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Cairul API
5
+ * Backend API for Cairul.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the Identity interface.
16
+ */
17
+ export function instanceOfIdentity(value) {
18
+ if ((!('createdAt' in value) && !('created_at' in value)) ||
19
+ (value['createdAt'] === undefined &&
20
+ value['created_at'] === undefined))
21
+ return false;
22
+ if (!('id' in value) || value['id'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function IdentityFromJSON(json) {
27
+ return IdentityFromJSONTyped(json, false);
28
+ }
29
+ export function IdentityFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ createdAt: json['created_at'],
35
+ harness: json['harness'] == null ? undefined : json['harness'],
36
+ harnessVersion: json['harness_version'] == null ? undefined : json['harness_version'],
37
+ id: json['id'],
38
+ name: json['name'] == null ? undefined : json['name'],
39
+ sessionId: json['session_id'] == null ? undefined : json['session_id'],
40
+ threadId: json['thread_id'] == null ? undefined : json['thread_id'],
41
+ userId: json['user_id'] == null ? undefined : json['user_id'],
42
+ };
43
+ }
44
+ export function IdentityToJSON(json) {
45
+ return IdentityToJSONTyped(json, false);
46
+ }
47
+ export function IdentityToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ created_at: value['createdAt'],
53
+ harness: value['harness'],
54
+ harness_version: value['harnessVersion'],
55
+ id: value['id'],
56
+ name: value['name'],
57
+ session_id: value['sessionId'],
58
+ thread_id: value['threadId'],
59
+ user_id: value['userId'],
60
+ };
61
+ }
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Cairul API
3
+ * Backend API for Cairul.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { HarnessIdentity } from './HarnessIdentity.js';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface JournalEntry
17
+ */
18
+ export interface JournalEntry {
19
+ /**
20
+ *
21
+ */
22
+ cursor: number;
23
+ /**
24
+ *
25
+ */
26
+ data: object;
27
+ /**
28
+ *
29
+ */
30
+ harness?: HarnessIdentity;
31
+ /**
32
+ *
33
+ */
34
+ id: string;
35
+ /**
36
+ *
37
+ */
38
+ journeyId: string;
39
+ /**
40
+ *
41
+ */
42
+ occurredAt: string;
43
+ /**
44
+ *
45
+ */
46
+ recordedAt: string;
47
+ /**
48
+ *
49
+ */
50
+ recordingId?: string;
51
+ /**
52
+ *
53
+ */
54
+ sequence?: number;
55
+ /**
56
+ *
57
+ */
58
+ source: string;
59
+ /**
60
+ *
61
+ */
62
+ type: string;
63
+ /**
64
+ *
65
+ */
66
+ version: number;
67
+ }
68
+ /**
69
+ * Check if a given object implements the JournalEntry interface.
70
+ */
71
+ export declare function instanceOfJournalEntry(value: object): value is JournalEntry;
72
+ export declare function JournalEntryFromJSON(json: any): JournalEntry;
73
+ export declare function JournalEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): JournalEntry;
74
+ export declare function JournalEntryToJSON(json: any): JournalEntry;
75
+ export declare function JournalEntryToJSONTyped(value?: JournalEntry | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,88 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Cairul API
5
+ * Backend API for Cairul.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { HarnessIdentityFromJSON, HarnessIdentityToJSON, } from './HarnessIdentity.js';
15
+ /**
16
+ * Check if a given object implements the JournalEntry interface.
17
+ */
18
+ export function instanceOfJournalEntry(value) {
19
+ if (!('cursor' in value) || value['cursor'] === undefined)
20
+ return false;
21
+ if (!('data' in value) || value['data'] === undefined)
22
+ return false;
23
+ if (!('id' in value) || value['id'] === undefined)
24
+ return false;
25
+ if ((!('journeyId' in value) && !('journey_id' in value)) ||
26
+ (value['journeyId'] === undefined &&
27
+ value['journey_id'] === undefined))
28
+ return false;
29
+ if ((!('occurredAt' in value) && !('occurred_at' in value)) ||
30
+ (value['occurredAt'] === undefined &&
31
+ value['occurred_at'] === undefined))
32
+ return false;
33
+ if ((!('recordedAt' in value) && !('recorded_at' in value)) ||
34
+ (value['recordedAt'] === undefined &&
35
+ value['recorded_at'] === undefined))
36
+ return false;
37
+ if (!('source' in value) || value['source'] === undefined)
38
+ return false;
39
+ if (!('type' in value) || value['type'] === undefined)
40
+ return false;
41
+ if (!('version' in value) || value['version'] === undefined)
42
+ return false;
43
+ return true;
44
+ }
45
+ export function JournalEntryFromJSON(json) {
46
+ return JournalEntryFromJSONTyped(json, false);
47
+ }
48
+ export function JournalEntryFromJSONTyped(json, ignoreDiscriminator) {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+ cursor: json['cursor'],
54
+ data: json['data'],
55
+ harness: json['harness'] == null ? undefined : HarnessIdentityFromJSON(json['harness']),
56
+ id: json['id'],
57
+ journeyId: json['journey_id'],
58
+ occurredAt: json['occurred_at'],
59
+ recordedAt: json['recorded_at'],
60
+ recordingId: json['recording_id'] == null ? undefined : json['recording_id'],
61
+ sequence: json['sequence'] == null ? undefined : json['sequence'],
62
+ source: json['source'],
63
+ type: json['type'],
64
+ version: json['version'],
65
+ };
66
+ }
67
+ export function JournalEntryToJSON(json) {
68
+ return JournalEntryToJSONTyped(json, false);
69
+ }
70
+ export function JournalEntryToJSONTyped(value, ignoreDiscriminator = false) {
71
+ if (value == null) {
72
+ return value;
73
+ }
74
+ return {
75
+ cursor: value['cursor'],
76
+ data: value['data'],
77
+ harness: HarnessIdentityToJSON(value['harness']),
78
+ id: value['id'],
79
+ journey_id: value['journeyId'],
80
+ occurred_at: value['occurredAt'],
81
+ recorded_at: value['recordedAt'],
82
+ recording_id: value['recordingId'],
83
+ sequence: value['sequence'],
84
+ source: value['source'],
85
+ type: value['type'],
86
+ version: value['version'],
87
+ };
88
+ }
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Cairul API
3
+ * Backend API for Cairul.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Check } from './Check.js';
13
+ import type { WorkflowJourneyStatus } from './WorkflowJourneyStatus.js';
14
+ import type { CapturePolicy } from './CapturePolicy.js';
15
+ /**
16
+ *
17
+ * @export
18
+ * @interface Journey
19
+ */
20
+ export interface Journey {
21
+ /**
22
+ *
23
+ */
24
+ capturePolicy: CapturePolicy;
25
+ /**
26
+ *
27
+ */
28
+ createdAt: string;
29
+ /**
30
+ *
31
+ */
32
+ id: string;
33
+ /**
34
+ *
35
+ */
36
+ identityId: string;
37
+ /**
38
+ *
39
+ */
40
+ incompleteChecks: Array<Check>;
41
+ /**
42
+ *
43
+ */
44
+ phase: string;
45
+ /**
46
+ *
47
+ */
48
+ planId: string;
49
+ /**
50
+ *
51
+ */
52
+ planName: string;
53
+ /**
54
+ *
55
+ */
56
+ planRevision: number;
57
+ /**
58
+ *
59
+ */
60
+ readyToComplete: boolean;
61
+ /**
62
+ *
63
+ */
64
+ sessionId?: string;
65
+ /**
66
+ *
67
+ */
68
+ status: WorkflowJourneyStatus;
69
+ /**
70
+ *
71
+ */
72
+ updatedAt: string;
73
+ /**
74
+ *
75
+ */
76
+ workItemUrl?: string;
77
+ }
78
+ /**
79
+ * Check if a given object implements the Journey interface.
80
+ */
81
+ export declare function instanceOfJourney(value: object): value is Journey;
82
+ export declare function JourneyFromJSON(json: any): Journey;
83
+ export declare function JourneyFromJSONTyped(json: any, ignoreDiscriminator: boolean): Journey;
84
+ export declare function JourneyToJSON(json: any): Journey;
85
+ export declare function JourneyToJSONTyped(value?: Journey | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,113 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Cairul API
5
+ * Backend API for Cairul.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { CheckFromJSON, CheckToJSON } from './Check.js';
15
+ import { WorkflowJourneyStatusFromJSON, WorkflowJourneyStatusToJSON, } from './WorkflowJourneyStatus.js';
16
+ import { CapturePolicyFromJSON, CapturePolicyToJSON, } from './CapturePolicy.js';
17
+ /**
18
+ * Check if a given object implements the Journey interface.
19
+ */
20
+ export function instanceOfJourney(value) {
21
+ if ((!('capturePolicy' in value) && !('capture_policy' in value)) ||
22
+ (value['capturePolicy'] === undefined &&
23
+ value['capture_policy'] === undefined))
24
+ return false;
25
+ if ((!('createdAt' in value) && !('created_at' in value)) ||
26
+ (value['createdAt'] === undefined &&
27
+ value['created_at'] === undefined))
28
+ return false;
29
+ if (!('id' in value) || value['id'] === undefined)
30
+ return false;
31
+ if ((!('identityId' in value) && !('identity_id' in value)) ||
32
+ (value['identityId'] === undefined &&
33
+ value['identity_id'] === undefined))
34
+ return false;
35
+ if ((!('incompleteChecks' in value) &&
36
+ !('incomplete_checks' in value)) ||
37
+ (value['incompleteChecks'] === undefined &&
38
+ value['incomplete_checks'] === undefined))
39
+ return false;
40
+ if (!('phase' in value) || value['phase'] === undefined)
41
+ return false;
42
+ if ((!('planId' in value) && !('plan_id' in value)) ||
43
+ (value['planId'] === undefined && value['plan_id'] === undefined))
44
+ return false;
45
+ if ((!('planName' in value) && !('plan_name' in value)) ||
46
+ (value['planName'] === undefined &&
47
+ value['plan_name'] === undefined))
48
+ return false;
49
+ if ((!('planRevision' in value) && !('plan_revision' in value)) ||
50
+ (value['planRevision'] === undefined &&
51
+ value['plan_revision'] === undefined))
52
+ return false;
53
+ if ((!('readyToComplete' in value) &&
54
+ !('ready_to_complete' in value)) ||
55
+ (value['readyToComplete'] === undefined &&
56
+ value['ready_to_complete'] === undefined))
57
+ return false;
58
+ if (!('status' in value) || value['status'] === undefined)
59
+ return false;
60
+ if ((!('updatedAt' in value) && !('updated_at' in value)) ||
61
+ (value['updatedAt'] === undefined &&
62
+ value['updated_at'] === undefined))
63
+ return false;
64
+ return true;
65
+ }
66
+ export function JourneyFromJSON(json) {
67
+ return JourneyFromJSONTyped(json, false);
68
+ }
69
+ export function JourneyFromJSONTyped(json, ignoreDiscriminator) {
70
+ if (json == null) {
71
+ return json;
72
+ }
73
+ return {
74
+ capturePolicy: CapturePolicyFromJSON(json['capture_policy']),
75
+ createdAt: json['created_at'],
76
+ id: json['id'],
77
+ identityId: json['identity_id'],
78
+ incompleteChecks: json['incomplete_checks'].map(CheckFromJSON),
79
+ phase: json['phase'],
80
+ planId: json['plan_id'],
81
+ planName: json['plan_name'],
82
+ planRevision: json['plan_revision'],
83
+ readyToComplete: json['ready_to_complete'],
84
+ sessionId: json['session_id'] == null ? undefined : json['session_id'],
85
+ status: WorkflowJourneyStatusFromJSON(json['status']),
86
+ updatedAt: json['updated_at'],
87
+ workItemUrl: json['work_item_url'] == null ? undefined : json['work_item_url'],
88
+ };
89
+ }
90
+ export function JourneyToJSON(json) {
91
+ return JourneyToJSONTyped(json, false);
92
+ }
93
+ export function JourneyToJSONTyped(value, ignoreDiscriminator = false) {
94
+ if (value == null) {
95
+ return value;
96
+ }
97
+ return {
98
+ capture_policy: CapturePolicyToJSON(value['capturePolicy']),
99
+ created_at: value['createdAt'],
100
+ id: value['id'],
101
+ identity_id: value['identityId'],
102
+ incomplete_checks: value['incompleteChecks'].map(CheckToJSON),
103
+ phase: value['phase'],
104
+ plan_id: value['planId'],
105
+ plan_name: value['planName'],
106
+ plan_revision: value['planRevision'],
107
+ ready_to_complete: value['readyToComplete'],
108
+ session_id: value['sessionId'],
109
+ status: WorkflowJourneyStatusToJSON(value['status']),
110
+ updated_at: value['updatedAt'],
111
+ work_item_url: value['workItemUrl'],
112
+ };
113
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Cairul API
3
+ * Backend API for Cairul.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface MCPRequestObservation
16
+ */
17
+ export interface MCPRequestObservation {
18
+ /**
19
+ *
20
+ */
21
+ callId: string;
22
+ /**
23
+ *
24
+ */
25
+ endedAt: string;
26
+ /**
27
+ *
28
+ */
29
+ failed: boolean;
30
+ /**
31
+ *
32
+ */
33
+ httpStatus?: number;
34
+ /**
35
+ *
36
+ */
37
+ startedAt: string;
38
+ /**
39
+ *
40
+ */
41
+ tool: string;
42
+ }
43
+ /**
44
+ * Check if a given object implements the MCPRequestObservation interface.
45
+ */
46
+ export declare function instanceOfMCPRequestObservation(value: object): value is MCPRequestObservation;
47
+ export declare function MCPRequestObservationFromJSON(json: any): MCPRequestObservation;
48
+ export declare function MCPRequestObservationFromJSONTyped(json: any, ignoreDiscriminator: boolean): MCPRequestObservation;
49
+ export declare function MCPRequestObservationToJSON(json: any): MCPRequestObservation;
50
+ export declare function MCPRequestObservationToJSONTyped(value?: MCPRequestObservation | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Cairul API
5
+ * Backend API for Cairul.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the MCPRequestObservation interface.
16
+ */
17
+ export function instanceOfMCPRequestObservation(value) {
18
+ if ((!('callId' in value) && !('call_id' in value)) ||
19
+ (value['callId'] === undefined && value['call_id'] === undefined))
20
+ return false;
21
+ if ((!('endedAt' in value) && !('ended_at' in value)) ||
22
+ (value['endedAt'] === undefined &&
23
+ value['ended_at'] === undefined))
24
+ return false;
25
+ if (!('failed' in value) || value['failed'] === undefined)
26
+ return false;
27
+ if ((!('startedAt' in value) && !('started_at' in value)) ||
28
+ (value['startedAt'] === undefined &&
29
+ value['started_at'] === undefined))
30
+ return false;
31
+ if (!('tool' in value) || value['tool'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ export function MCPRequestObservationFromJSON(json) {
36
+ return MCPRequestObservationFromJSONTyped(json, false);
37
+ }
38
+ export function MCPRequestObservationFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ callId: json['call_id'],
44
+ endedAt: json['ended_at'],
45
+ failed: json['failed'],
46
+ httpStatus: json['http_status'] == null ? undefined : json['http_status'],
47
+ startedAt: json['started_at'],
48
+ tool: json['tool'],
49
+ };
50
+ }
51
+ export function MCPRequestObservationToJSON(json) {
52
+ return MCPRequestObservationToJSONTyped(json, false);
53
+ }
54
+ export function MCPRequestObservationToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ call_id: value['callId'],
60
+ ended_at: value['endedAt'],
61
+ failed: value['failed'],
62
+ http_status: value['httpStatus'],
63
+ started_at: value['startedAt'],
64
+ tool: value['tool'],
65
+ };
66
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Cairul API
3
+ * Backend API for Cairul.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { TokenUsage } from './TokenUsage.js';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ModelObservation
17
+ */
18
+ export interface ModelObservation {
19
+ /**
20
+ *
21
+ */
22
+ name?: string;
23
+ /**
24
+ *
25
+ */
26
+ observedAt: string;
27
+ /**
28
+ *
29
+ */
30
+ provider?: string;
31
+ /**
32
+ *
33
+ */
34
+ responseId: string;
35
+ /**
36
+ *
37
+ */
38
+ usage?: TokenUsage;
39
+ }
40
+ /**
41
+ * Check if a given object implements the ModelObservation interface.
42
+ */
43
+ export declare function instanceOfModelObservation(value: object): value is ModelObservation;
44
+ export declare function ModelObservationFromJSON(json: any): ModelObservation;
45
+ export declare function ModelObservationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelObservation;
46
+ export declare function ModelObservationToJSON(json: any): ModelObservation;
47
+ export declare function ModelObservationToJSONTyped(value?: ModelObservation | null, ignoreDiscriminator?: boolean): any;