clinch-core 0.3.0 → 0.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.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/package.json +1 -1
- package/src/index.ts +6 -0
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare class ClinchCore extends EventEmitter {
|
|
|
51
51
|
private isSandboxMode;
|
|
52
52
|
private sandboxModelContext;
|
|
53
53
|
private sandboxMaxTurns;
|
|
54
|
+
get activeNegotiationId(): string | null;
|
|
54
55
|
constructor(config?: ClinchConfig);
|
|
55
56
|
private setStatus;
|
|
56
57
|
initialize(cachedToken?: string): Promise<void>;
|
|
@@ -83,6 +84,7 @@ export interface SellerRecord {
|
|
|
83
84
|
supported_modes: string[];
|
|
84
85
|
categories: string[];
|
|
85
86
|
capabilities: string[];
|
|
87
|
+
display_name?: string;
|
|
86
88
|
}
|
|
87
89
|
export declare class ClinchSeller extends EventEmitter {
|
|
88
90
|
private config;
|
package/dist/index.js
CHANGED
|
@@ -70,6 +70,10 @@ class ClinchCore extends events_1.EventEmitter {
|
|
|
70
70
|
isSandboxMode = false;
|
|
71
71
|
sandboxModelContext = null;
|
|
72
72
|
sandboxMaxTurns = 6;
|
|
73
|
+
// Legacy support for single-tenant applications checking the last ID
|
|
74
|
+
get activeNegotiationId() {
|
|
75
|
+
return Array.from(this.activeSessions.keys()).pop() || null;
|
|
76
|
+
}
|
|
73
77
|
constructor(config = {}) {
|
|
74
78
|
super();
|
|
75
79
|
this.config = { timeoutMs: 5000, ...config };
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -100,6 +100,11 @@ export class ClinchCore extends EventEmitter {
|
|
|
100
100
|
private sandboxModelContext: any = null;
|
|
101
101
|
private sandboxMaxTurns = 6;
|
|
102
102
|
|
|
103
|
+
// Legacy support for single-tenant applications checking the last ID
|
|
104
|
+
public get activeNegotiationId(): string | null {
|
|
105
|
+
return Array.from(this.activeSessions.keys()).pop() || null;
|
|
106
|
+
}
|
|
107
|
+
|
|
103
108
|
constructor(config: ClinchConfig = {}) {
|
|
104
109
|
super();
|
|
105
110
|
this.config = { timeoutMs: 5000, ...config };
|
|
@@ -618,6 +623,7 @@ export interface SellerRecord {
|
|
|
618
623
|
supported_modes: string[];
|
|
619
624
|
categories: string[];
|
|
620
625
|
capabilities: string[];
|
|
626
|
+
display_name?: string; // Optional legacy support
|
|
621
627
|
}
|
|
622
628
|
|
|
623
629
|
export class ClinchSeller extends EventEmitter {
|