gunsmith-common 2.3.26 → 2.4.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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gunsmith-common",
3
- "version": "2.3.26",
3
+ "version": "2.4.0",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": ">= 6.1.10",
6
6
  "@angular/common": ">= 6.1.10",
@@ -9,7 +9,8 @@
9
9
  "@angular/forms": ">= 6.1.10",
10
10
  "rxjs": ">= 6.0.0",
11
11
  "rxjs-compat": ">= 6.0.0",
12
- "zone.js": ">= 0.8.26"
12
+ "zone.js": ">= 0.8.26",
13
+ "@microsoft/signalr": ">= 3.1.0"
13
14
  },
14
15
  "dependencies": {
15
16
  "tslib": "^2.0.0"
@@ -0,0 +1,82 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { InjectionToken } from '@angular/core';
3
+ import { Observable, Subject } from 'rxjs';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Supplies a bearer token (the Cognito ID token) for the SignalR hub connection.
7
+ * Provided by the host app so this library stays decoupled from the auth provider.
8
+ */
9
+ export declare const AI_ID_TOKEN_FACTORY: InjectionToken<() => Promise<string>>;
10
+ export interface ConversationDto {
11
+ id: number;
12
+ title?: string;
13
+ createdUtc: string;
14
+ lastActivityUtc: string;
15
+ }
16
+ export interface MessageDto {
17
+ id: number;
18
+ role: string;
19
+ content: string;
20
+ createdUtc: string;
21
+ toolTraceJson?: string;
22
+ }
23
+ export interface ConversationDetailDto {
24
+ id: number;
25
+ title?: string;
26
+ messages: MessageDto[];
27
+ }
28
+ export interface SendMessageResponse {
29
+ streamId: string;
30
+ userMessageId: number;
31
+ }
32
+ export interface Citation {
33
+ title?: string;
34
+ uri?: string;
35
+ page?: number;
36
+ heading?: string;
37
+ }
38
+ export interface TokenEvent {
39
+ streamId: string;
40
+ text: string;
41
+ }
42
+ export interface ToolEvent {
43
+ streamId: string;
44
+ toolName: string;
45
+ }
46
+ export interface CitationsEvent {
47
+ streamId: string;
48
+ citations: Citation[];
49
+ }
50
+ export interface CompletedEvent {
51
+ streamId: string;
52
+ messageId: number;
53
+ }
54
+ export interface StreamErrorEvent {
55
+ streamId: string;
56
+ message: string;
57
+ }
58
+ /**
59
+ * REST + SignalR client for the GunSmith.AI service. REST auth is handled by the host app's
60
+ * HTTP interceptor; the hub uses the injected token factory via accessTokenFactory.
61
+ */
62
+ export declare class AiAssistantService {
63
+ private http;
64
+ private env;
65
+ private idTokenFactory?;
66
+ private hub?;
67
+ private readonly apiBase;
68
+ readonly token$: Subject<TokenEvent>;
69
+ readonly toolStarted$: Subject<ToolEvent>;
70
+ readonly citations$: Subject<CitationsEvent>;
71
+ readonly completed$: Subject<CompletedEvent>;
72
+ readonly streamError$: Subject<StreamErrorEvent>;
73
+ constructor(http: HttpClient, env: any, idTokenFactory?: () => Promise<string>);
74
+ get connectionId(): string | null;
75
+ connect(): Promise<void>;
76
+ createConversation(): Observable<ConversationDto>;
77
+ getConversations(): Observable<ConversationDto[]>;
78
+ getConversation(id: number): Observable<ConversationDetailDto>;
79
+ sendMessage(id: number, content: string, connectionId: string): Observable<SendMessageResponse>;
80
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiAssistantService, [null, null, { optional: true; }]>;
81
+ static ɵprov: i0.ɵɵInjectableDeclaration<AiAssistantService>;
82
+ }
@@ -41,3 +41,4 @@ export * from './coating-value.service';
41
41
  export * from './finish-date-helper.service';
42
42
  export * from './milling-type-addon.service';
43
43
  export * from './firearm-milling-type.service';
44
+ export * from './ai-assistant.service';
@@ -10,8 +10,11 @@ export declare class FirearmOptic {
10
10
  mountTypeId: number;
11
11
  mountTypeName: string;
12
12
  mountTypeNonBuisPlatePrice: number;
13
+ mountTypeNonBuisRequiresPlate: boolean;
13
14
  mountTypeBuisPlatePrice: number;
15
+ mountTypeBuisRequiresPlate: boolean;
14
16
  mountTypeMillingTypeId: number;
17
+ mountTypeRearSightCutServiceCodePrice: number;
15
18
  frontSights: OpticSight[];
16
19
  rearSights: OpticSight[];
17
20
  keepDovetail: boolean;
@@ -4,6 +4,7 @@ export declare class MountType {
4
4
  nonBuisPlateId: number;
5
5
  buisPlateId: number;
6
6
  millingTypeId: number;
7
+ rearSightCutServiceCodeId: number;
7
8
  active: boolean;
8
9
  timestamp: string;
9
10
  }
Binary file