eric-sdk 0.0.3 → 0.0.4

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.cjs CHANGED
@@ -86,7 +86,7 @@ var EricSDK = class {
86
86
  * 2) DECIDE — agentic routing with optional allowedFlows
87
87
  * ------------------------------------------------------------- */
88
88
  async decide(data) {
89
- const { allowedFlows, ...rest } = data;
89
+ const { allowedFlows, requestType, ...rest } = data;
90
90
  const payload = {
91
91
  flow: "decisionRouter",
92
92
  data: {
@@ -94,6 +94,9 @@ var EricSDK = class {
94
94
  client: this.client
95
95
  }
96
96
  };
97
+ if (requestType) {
98
+ payload.data.requestType = requestType;
99
+ }
97
100
  if (allowedFlows) {
98
101
  payload.data.allowedFlows = allowedFlows;
99
102
  }
package/dist/index.d.cts CHANGED
@@ -17,6 +17,7 @@ declare class EricSDK {
17
17
  decide(data: {
18
18
  text: string;
19
19
  topic?: string;
20
+ requestType?: string;
20
21
  userState?: any;
21
22
  allowedFlows?: string[];
22
23
  }): Promise<EricResponse>;
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ declare class EricSDK {
17
17
  decide(data: {
18
18
  text: string;
19
19
  topic?: string;
20
+ requestType?: string;
20
21
  userState?: any;
21
22
  allowedFlows?: string[];
22
23
  }): Promise<EricResponse>;
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ var EricSDK = class {
30
30
  * 2) DECIDE — agentic routing with optional allowedFlows
31
31
  * ------------------------------------------------------------- */
32
32
  async decide(data) {
33
- const { allowedFlows, ...rest } = data;
33
+ const { allowedFlows, requestType, ...rest } = data;
34
34
  const payload = {
35
35
  flow: "decisionRouter",
36
36
  data: {
@@ -38,6 +38,9 @@ var EricSDK = class {
38
38
  client: this.client
39
39
  }
40
40
  };
41
+ if (requestType) {
42
+ payload.data.requestType = requestType;
43
+ }
41
44
  if (allowedFlows) {
42
45
  payload.data.allowedFlows = allowedFlows;
43
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eric-sdk",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Official SDK for interacting with the Eric AI Policy Engine",
5
5
  "author": "Rod Bridges",
6
6
  "license": "MIT",
package/src/client.ts CHANGED
@@ -54,10 +54,11 @@ export class EricSDK {
54
54
  async decide(data: {
55
55
  text: string;
56
56
  topic?: string;
57
+ requestType?: string;
57
58
  userState?: any;
58
59
  allowedFlows?: string[];
59
60
  }): Promise<EricResponse> {
60
- const { allowedFlows, ...rest } = data;
61
+ const { allowedFlows, requestType, ...rest } = data;
61
62
 
62
63
  const payload: any = {
63
64
  flow: "decisionRouter",
@@ -67,6 +68,10 @@ export class EricSDK {
67
68
  }
68
69
  };
69
70
 
71
+ if (requestType) {
72
+ payload.data.requestType = requestType;
73
+ }
74
+
70
75
  if (allowedFlows) {
71
76
  payload.data.allowedFlows = allowedFlows;
72
77
  }