@roarkanalytics/sdk 2.22.0 → 2.23.1

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 (137) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/client.d.mts +31 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +31 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js +34 -6
  7. package/client.js.map +1 -1
  8. package/client.mjs +34 -6
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-endpoint.d.mts +309 -0
  12. package/resources/agent-endpoint.d.mts.map +1 -0
  13. package/resources/agent-endpoint.d.ts +309 -0
  14. package/resources/agent-endpoint.d.ts.map +1 -0
  15. package/resources/agent-endpoint.js +35 -0
  16. package/resources/agent-endpoint.js.map +1 -0
  17. package/resources/agent-endpoint.mjs +31 -0
  18. package/resources/agent-endpoint.mjs.map +1 -0
  19. package/resources/agent.d.mts +193 -0
  20. package/resources/agent.d.mts.map +1 -0
  21. package/resources/agent.d.ts +193 -0
  22. package/resources/agent.d.ts.map +1 -0
  23. package/resources/agent.js +34 -0
  24. package/resources/agent.js.map +1 -0
  25. package/resources/agent.mjs +30 -0
  26. package/resources/agent.mjs.map +1 -0
  27. package/resources/call.d.mts +120 -1
  28. package/resources/call.d.mts.map +1 -1
  29. package/resources/call.d.ts +120 -1
  30. package/resources/call.d.ts.map +1 -1
  31. package/resources/call.js +7 -0
  32. package/resources/call.js.map +1 -1
  33. package/resources/call.mjs +7 -0
  34. package/resources/call.mjs.map +1 -1
  35. package/resources/evaluation.d.mts +2097 -617
  36. package/resources/evaluation.d.mts.map +1 -1
  37. package/resources/evaluation.d.ts +2097 -617
  38. package/resources/evaluation.d.ts.map +1 -1
  39. package/resources/evaluation.js +14 -0
  40. package/resources/evaluation.js.map +1 -1
  41. package/resources/evaluation.mjs +14 -0
  42. package/resources/evaluation.mjs.map +1 -1
  43. package/resources/http-request-definition.d.mts +339 -0
  44. package/resources/http-request-definition.d.mts.map +1 -0
  45. package/resources/http-request-definition.d.ts +339 -0
  46. package/resources/http-request-definition.d.ts.map +1 -0
  47. package/resources/http-request-definition.js +36 -0
  48. package/resources/http-request-definition.js.map +1 -0
  49. package/resources/http-request-definition.mjs +32 -0
  50. package/resources/http-request-definition.mjs.map +1 -0
  51. package/resources/index.d.mts +11 -4
  52. package/resources/index.d.mts.map +1 -1
  53. package/resources/index.d.ts +11 -4
  54. package/resources/index.d.ts.map +1 -1
  55. package/resources/index.js +19 -5
  56. package/resources/index.js.map +1 -1
  57. package/resources/index.mjs +9 -2
  58. package/resources/index.mjs.map +1 -1
  59. package/resources/simulation-job.d.mts +393 -0
  60. package/resources/simulation-job.d.mts.map +1 -0
  61. package/resources/simulation-job.d.ts +393 -0
  62. package/resources/simulation-job.d.ts.map +1 -0
  63. package/resources/simulation-job.js +38 -0
  64. package/resources/simulation-job.js.map +1 -0
  65. package/resources/simulation-job.mjs +34 -0
  66. package/resources/simulation-job.mjs.map +1 -0
  67. package/resources/{persona.d.mts → simulation-persona.d.mts} +62 -33
  68. package/resources/simulation-persona.d.mts.map +1 -0
  69. package/resources/{persona.d.ts → simulation-persona.d.ts} +62 -33
  70. package/resources/simulation-persona.d.ts.map +1 -0
  71. package/resources/{persona.js → simulation-persona.js} +18 -13
  72. package/resources/simulation-persona.js.map +1 -0
  73. package/resources/{persona.mjs → simulation-persona.mjs} +16 -11
  74. package/resources/simulation-persona.mjs.map +1 -0
  75. package/resources/simulation-run-plan-job.d.mts +359 -0
  76. package/resources/simulation-run-plan-job.d.mts.map +1 -0
  77. package/resources/simulation-run-plan-job.d.ts +359 -0
  78. package/resources/simulation-run-plan-job.d.ts.map +1 -0
  79. package/resources/simulation-run-plan-job.js +50 -0
  80. package/resources/simulation-run-plan-job.js.map +1 -0
  81. package/resources/simulation-run-plan-job.mjs +46 -0
  82. package/resources/simulation-run-plan-job.mjs.map +1 -0
  83. package/resources/simulation-run-plan.d.mts +660 -0
  84. package/resources/simulation-run-plan.d.mts.map +1 -0
  85. package/resources/simulation-run-plan.d.ts +660 -0
  86. package/resources/simulation-run-plan.d.ts.map +1 -0
  87. package/resources/simulation-run-plan.js +93 -0
  88. package/resources/simulation-run-plan.js.map +1 -0
  89. package/resources/simulation-run-plan.mjs +89 -0
  90. package/resources/simulation-run-plan.mjs.map +1 -0
  91. package/resources/simulation-scenario.d.mts +335 -0
  92. package/resources/simulation-scenario.d.mts.map +1 -0
  93. package/resources/simulation-scenario.d.ts +335 -0
  94. package/resources/simulation-scenario.d.ts.map +1 -0
  95. package/resources/simulation-scenario.js +40 -0
  96. package/resources/simulation-scenario.js.map +1 -0
  97. package/resources/simulation-scenario.mjs +36 -0
  98. package/resources/simulation-scenario.mjs.map +1 -0
  99. package/resources/webhook.d.mts +212 -0
  100. package/resources/webhook.d.mts.map +1 -0
  101. package/resources/webhook.d.ts +212 -0
  102. package/resources/webhook.d.ts.map +1 -0
  103. package/resources/webhook.js +35 -0
  104. package/resources/webhook.js.map +1 -0
  105. package/resources/webhook.mjs +31 -0
  106. package/resources/webhook.mjs.map +1 -0
  107. package/src/client.ts +208 -43
  108. package/src/resources/agent-endpoint.ts +400 -0
  109. package/src/resources/agent.ts +263 -0
  110. package/src/resources/call.ts +149 -0
  111. package/src/resources/evaluation.ts +3044 -1154
  112. package/src/resources/http-request-definition.ts +410 -0
  113. package/src/resources/index.ts +89 -21
  114. package/src/resources/simulation-job.ts +527 -0
  115. package/src/resources/{persona.ts → simulation-persona.ts} +78 -40
  116. package/src/resources/simulation-run-plan-job.ts +521 -0
  117. package/src/resources/simulation-run-plan.ts +840 -0
  118. package/src/resources/simulation-scenario.ts +463 -0
  119. package/src/resources/webhook.ts +318 -0
  120. package/src/version.ts +1 -1
  121. package/version.d.mts +1 -1
  122. package/version.d.ts +1 -1
  123. package/version.js +1 -1
  124. package/version.mjs +1 -1
  125. package/resources/persona.d.mts.map +0 -1
  126. package/resources/persona.d.ts.map +0 -1
  127. package/resources/persona.js.map +0 -1
  128. package/resources/persona.mjs.map +0 -1
  129. package/resources/simulation.d.mts +0 -802
  130. package/resources/simulation.d.mts.map +0 -1
  131. package/resources/simulation.d.ts +0 -802
  132. package/resources/simulation.d.ts.map +0 -1
  133. package/resources/simulation.js +0 -90
  134. package/resources/simulation.js.map +0 -1
  135. package/resources/simulation.mjs +0 -86
  136. package/resources/simulation.mjs.map +0 -1
  137. package/src/resources/simulation.ts +0 -1069
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.SimulationRunPlan = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const path_1 = require("../internal/utils/path.js");
7
+ class SimulationRunPlan extends resource_1.APIResource {
8
+ /**
9
+ * Creates a new simulation run plan. Optionally triggers a job immediately if
10
+ * autoRun is true.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const simulationRunPlan =
15
+ * await client.simulationRunPlan.create({
16
+ * agentEndpoints: [
17
+ * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
18
+ * ],
19
+ * direction: 'INBOUND',
20
+ * evaluators: [
21
+ * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
22
+ * ],
23
+ * maxSimulationDurationSeconds: 300,
24
+ * name: 'My Run Plan',
25
+ * personas: [
26
+ * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
27
+ * ],
28
+ * scenarios: [
29
+ * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
30
+ * ],
31
+ * });
32
+ * ```
33
+ */
34
+ create(body, options) {
35
+ return this._client.post('/v1/simulation/plan', { body, ...options });
36
+ }
37
+ /**
38
+ * Updates an existing simulation run plan by its ID.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const simulationRunPlan =
43
+ * await client.simulationRunPlan.update(
44
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
45
+ * );
46
+ * ```
47
+ */
48
+ update(planID, body = {}, options) {
49
+ return this._client.put((0, path_1.path) `/v1/simulation/plan/${planID}`, { body, ...options });
50
+ }
51
+ /**
52
+ * Returns a paginated list of simulation run plans. Optionally filter by search
53
+ * text or agent ID.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * const simulationRunPlans =
58
+ * await client.simulationRunPlan.list();
59
+ * ```
60
+ */
61
+ list(query = {}, options) {
62
+ return this._client.get('/v1/simulation/plan', { query, ...options });
63
+ }
64
+ /**
65
+ * Soft-deletes a simulation run plan by its ID.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const simulationRunPlan =
70
+ * await client.simulationRunPlan.delete(
71
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
72
+ * );
73
+ * ```
74
+ */
75
+ delete(planID, options) {
76
+ return this._client.delete((0, path_1.path) `/v1/simulation/plan/${planID}`, options);
77
+ }
78
+ /**
79
+ * Returns a specific simulation run plan by its ID.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * const response = await client.simulationRunPlan.getByID(
84
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
85
+ * );
86
+ * ```
87
+ */
88
+ getByID(planID, options) {
89
+ return this._client.get((0, path_1.path) `/v1/simulation/plan/${planID}`, options);
90
+ }
91
+ }
92
+ exports.SimulationRunPlan = SimulationRunPlan;
93
+ //# sourceMappingURL=simulation-run-plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulation-run-plan.js","sourceRoot":"","sources":["../src/resources/simulation-run-plan.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,iBAAkB,SAAQ,sBAAW;IAChD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CACJ,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,MAAc,EACd,OAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uBAAuB,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,QAAwD,EAAE,EAC1D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,uBAAuB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,uBAAuB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF;AAlGD,8CAkGC"}
@@ -0,0 +1,89 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { path } from "../internal/utils/path.mjs";
4
+ export class SimulationRunPlan extends APIResource {
5
+ /**
6
+ * Creates a new simulation run plan. Optionally triggers a job immediately if
7
+ * autoRun is true.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const simulationRunPlan =
12
+ * await client.simulationRunPlan.create({
13
+ * agentEndpoints: [
14
+ * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
15
+ * ],
16
+ * direction: 'INBOUND',
17
+ * evaluators: [
18
+ * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
19
+ * ],
20
+ * maxSimulationDurationSeconds: 300,
21
+ * name: 'My Run Plan',
22
+ * personas: [
23
+ * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
24
+ * ],
25
+ * scenarios: [
26
+ * { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
27
+ * ],
28
+ * });
29
+ * ```
30
+ */
31
+ create(body, options) {
32
+ return this._client.post('/v1/simulation/plan', { body, ...options });
33
+ }
34
+ /**
35
+ * Updates an existing simulation run plan by its ID.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const simulationRunPlan =
40
+ * await client.simulationRunPlan.update(
41
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
42
+ * );
43
+ * ```
44
+ */
45
+ update(planID, body = {}, options) {
46
+ return this._client.put(path `/v1/simulation/plan/${planID}`, { body, ...options });
47
+ }
48
+ /**
49
+ * Returns a paginated list of simulation run plans. Optionally filter by search
50
+ * text or agent ID.
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const simulationRunPlans =
55
+ * await client.simulationRunPlan.list();
56
+ * ```
57
+ */
58
+ list(query = {}, options) {
59
+ return this._client.get('/v1/simulation/plan', { query, ...options });
60
+ }
61
+ /**
62
+ * Soft-deletes a simulation run plan by its ID.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * const simulationRunPlan =
67
+ * await client.simulationRunPlan.delete(
68
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
69
+ * );
70
+ * ```
71
+ */
72
+ delete(planID, options) {
73
+ return this._client.delete(path `/v1/simulation/plan/${planID}`, options);
74
+ }
75
+ /**
76
+ * Returns a specific simulation run plan by its ID.
77
+ *
78
+ * @example
79
+ * ```ts
80
+ * const response = await client.simulationRunPlan.getByID(
81
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
82
+ * );
83
+ * ```
84
+ */
85
+ getByID(planID, options) {
86
+ return this._client.get(path `/v1/simulation/plan/${planID}`, options);
87
+ }
88
+ }
89
+ //# sourceMappingURL=simulation-run-plan.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulation-run-plan.mjs","sourceRoot":"","sources":["../src/resources/simulation-run-plan.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAChD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,MAAM,CACJ,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,MAAc,EACd,OAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;OASG;IACH,IAAI,CACF,QAAwD,EAAE,EAC1D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,uBAAuB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,uBAAuB,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF"}
@@ -0,0 +1,335 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { RequestOptions } from "../internal/request-options.mjs";
4
+ export declare class SimulationScenario extends APIResource {
5
+ /**
6
+ * Creates a new simulation scenario for the authenticated project.
7
+ */
8
+ create(body: SimulationScenarioCreateParams, options?: RequestOptions): APIPromise<SimulationScenarioCreateResponse>;
9
+ /**
10
+ * Updates an existing simulation scenario by its ID.
11
+ */
12
+ update(scenarioID: string, body: SimulationScenarioUpdateParams, options?: RequestOptions): APIPromise<SimulationScenarioUpdateResponse>;
13
+ /**
14
+ * Returns a paginated list of simulation scenarios for the authenticated project.
15
+ */
16
+ list(query?: SimulationScenarioListParams | null | undefined, options?: RequestOptions): APIPromise<SimulationScenarioListResponse>;
17
+ /**
18
+ * Deletes a simulation scenario by its ID.
19
+ */
20
+ delete(scenarioID: string, options?: RequestOptions): APIPromise<SimulationScenarioDeleteResponse>;
21
+ /**
22
+ * Returns a specific simulation scenario by its ID.
23
+ */
24
+ getByID(scenarioID: string, options?: RequestOptions): APIPromise<SimulationScenarioGetByIDResponse>;
25
+ }
26
+ export interface SimulationScenarioCreateResponse {
27
+ data: SimulationScenarioCreateResponse.Data;
28
+ }
29
+ export declare namespace SimulationScenarioCreateResponse {
30
+ interface Data {
31
+ /**
32
+ * Unique identifier of the scenario
33
+ */
34
+ id: string;
35
+ /**
36
+ * Creation timestamp in ISO 8601 format
37
+ */
38
+ createdAt: string;
39
+ /**
40
+ * Description of the scenario
41
+ */
42
+ description: string | null;
43
+ /**
44
+ * Name of the scenario (from the start node content)
45
+ */
46
+ name: string | null;
47
+ /**
48
+ * Ordered list of steps in the scenario (excludes the START node)
49
+ */
50
+ steps: Array<Data.Step>;
51
+ /**
52
+ * Last update timestamp in ISO 8601 format
53
+ */
54
+ updatedAt: string;
55
+ }
56
+ namespace Data {
57
+ interface Step {
58
+ /**
59
+ * Content/text of the step
60
+ */
61
+ content: string | null;
62
+ /**
63
+ * Unique identifier of the step node (use this for update/delete operations)
64
+ */
65
+ nodeId: string;
66
+ /**
67
+ * Type of step in the scenario
68
+ */
69
+ type: 'START' | 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'VOICEMAIL';
70
+ }
71
+ }
72
+ }
73
+ export interface SimulationScenarioUpdateResponse {
74
+ data: SimulationScenarioUpdateResponse.Data;
75
+ }
76
+ export declare namespace SimulationScenarioUpdateResponse {
77
+ interface Data {
78
+ /**
79
+ * Unique identifier of the scenario
80
+ */
81
+ id: string;
82
+ /**
83
+ * Creation timestamp in ISO 8601 format
84
+ */
85
+ createdAt: string;
86
+ /**
87
+ * Description of the scenario
88
+ */
89
+ description: string | null;
90
+ /**
91
+ * Name of the scenario (from the start node content)
92
+ */
93
+ name: string | null;
94
+ /**
95
+ * Ordered list of steps in the scenario (excludes the START node)
96
+ */
97
+ steps: Array<Data.Step>;
98
+ /**
99
+ * Last update timestamp in ISO 8601 format
100
+ */
101
+ updatedAt: string;
102
+ }
103
+ namespace Data {
104
+ interface Step {
105
+ /**
106
+ * Content/text of the step
107
+ */
108
+ content: string | null;
109
+ /**
110
+ * Unique identifier of the step node (use this for update/delete operations)
111
+ */
112
+ nodeId: string;
113
+ /**
114
+ * Type of step in the scenario
115
+ */
116
+ type: 'START' | 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'VOICEMAIL';
117
+ }
118
+ }
119
+ }
120
+ export interface SimulationScenarioListResponse {
121
+ data: Array<SimulationScenarioListResponse.Data>;
122
+ pagination: SimulationScenarioListResponse.Pagination;
123
+ }
124
+ export declare namespace SimulationScenarioListResponse {
125
+ interface Data {
126
+ /**
127
+ * Unique identifier of the scenario
128
+ */
129
+ id: string;
130
+ /**
131
+ * Creation timestamp in ISO 8601 format
132
+ */
133
+ createdAt: string;
134
+ /**
135
+ * Description of the scenario
136
+ */
137
+ description: string | null;
138
+ /**
139
+ * Name of the scenario (from the start node content)
140
+ */
141
+ name: string | null;
142
+ /**
143
+ * Ordered list of steps in the scenario (excludes the START node)
144
+ */
145
+ steps: Array<Data.Step>;
146
+ /**
147
+ * Last update timestamp in ISO 8601 format
148
+ */
149
+ updatedAt: string;
150
+ }
151
+ namespace Data {
152
+ interface Step {
153
+ /**
154
+ * Content/text of the step
155
+ */
156
+ content: string | null;
157
+ /**
158
+ * Unique identifier of the step node (use this for update/delete operations)
159
+ */
160
+ nodeId: string;
161
+ /**
162
+ * Type of step in the scenario
163
+ */
164
+ type: 'START' | 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'VOICEMAIL';
165
+ }
166
+ }
167
+ interface Pagination {
168
+ /**
169
+ * Whether there are more items to fetch
170
+ */
171
+ hasMore: boolean;
172
+ /**
173
+ * Cursor for the next page of items
174
+ */
175
+ nextCursor: string | null;
176
+ /**
177
+ * Total number of items
178
+ */
179
+ total: number;
180
+ }
181
+ }
182
+ export interface SimulationScenarioDeleteResponse {
183
+ data: SimulationScenarioDeleteResponse.Data;
184
+ }
185
+ export declare namespace SimulationScenarioDeleteResponse {
186
+ interface Data {
187
+ /**
188
+ * Whether the scenario was deleted
189
+ */
190
+ deleted: boolean;
191
+ }
192
+ }
193
+ export interface SimulationScenarioGetByIDResponse {
194
+ data: SimulationScenarioGetByIDResponse.Data;
195
+ }
196
+ export declare namespace SimulationScenarioGetByIDResponse {
197
+ interface Data {
198
+ /**
199
+ * Unique identifier of the scenario
200
+ */
201
+ id: string;
202
+ /**
203
+ * Creation timestamp in ISO 8601 format
204
+ */
205
+ createdAt: string;
206
+ /**
207
+ * Description of the scenario
208
+ */
209
+ description: string | null;
210
+ /**
211
+ * Name of the scenario (from the start node content)
212
+ */
213
+ name: string | null;
214
+ /**
215
+ * Ordered list of steps in the scenario (excludes the START node)
216
+ */
217
+ steps: Array<Data.Step>;
218
+ /**
219
+ * Last update timestamp in ISO 8601 format
220
+ */
221
+ updatedAt: string;
222
+ }
223
+ namespace Data {
224
+ interface Step {
225
+ /**
226
+ * Content/text of the step
227
+ */
228
+ content: string | null;
229
+ /**
230
+ * Unique identifier of the step node (use this for update/delete operations)
231
+ */
232
+ nodeId: string;
233
+ /**
234
+ * Type of step in the scenario
235
+ */
236
+ type: 'START' | 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'VOICEMAIL';
237
+ }
238
+ }
239
+ }
240
+ export interface SimulationScenarioCreateParams {
241
+ /**
242
+ * Name of the scenario (used as the START node content)
243
+ */
244
+ name: string;
245
+ /**
246
+ * Ordered list of steps for the scenario (at least one step is required)
247
+ */
248
+ steps: Array<SimulationScenarioCreateParams.Step>;
249
+ }
250
+ export declare namespace SimulationScenarioCreateParams {
251
+ /**
252
+ * A step to include when creating a scenario
253
+ */
254
+ interface Step {
255
+ /**
256
+ * The content/text of the step
257
+ */
258
+ content: string;
259
+ /**
260
+ * The type of this step
261
+ */
262
+ type: 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'VOICEMAIL';
263
+ }
264
+ }
265
+ export interface SimulationScenarioUpdateParams {
266
+ /**
267
+ * List of step changes to apply to the scenario
268
+ */
269
+ stepChanges: Array<SimulationScenarioUpdateParams.CreateStepChange | SimulationScenarioUpdateParams.UpdateStepChange | SimulationScenarioUpdateParams.DeleteStepChange>;
270
+ /**
271
+ * New name for the scenario (updates the START node content)
272
+ */
273
+ name?: string;
274
+ }
275
+ export declare namespace SimulationScenarioUpdateParams {
276
+ /**
277
+ * Create a new step in the scenario
278
+ */
279
+ interface CreateStepChange {
280
+ /**
281
+ * Create a new step
282
+ */
283
+ action: 'create';
284
+ /**
285
+ * The content/text of the new step
286
+ */
287
+ content: string;
288
+ /**
289
+ * The type of the new step
290
+ */
291
+ type: 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'VOICEMAIL';
292
+ }
293
+ /**
294
+ * Update an existing step in the scenario
295
+ */
296
+ interface UpdateStepChange {
297
+ /**
298
+ * Update an existing step
299
+ */
300
+ action: 'update';
301
+ /**
302
+ * The ID of the step node to update
303
+ */
304
+ nodeId: string;
305
+ /**
306
+ * The new content/text of the step (optional)
307
+ */
308
+ content?: string;
309
+ /**
310
+ * The new type of the step (optional)
311
+ */
312
+ type?: 'AGENT_TURN' | 'CUSTOMER_TURN' | 'CUSTOMER_FIRST_MESSAGE' | 'CUSTOMER_SILENCE' | 'VOICEMAIL';
313
+ }
314
+ /**
315
+ * Delete a step from the scenario
316
+ */
317
+ interface DeleteStepChange {
318
+ /**
319
+ * Delete an existing step
320
+ */
321
+ action: 'delete';
322
+ /**
323
+ * The ID of the step node to delete
324
+ */
325
+ nodeId: string;
326
+ }
327
+ }
328
+ export interface SimulationScenarioListParams {
329
+ after?: string;
330
+ limit?: number;
331
+ }
332
+ export declare namespace SimulationScenario {
333
+ export { type SimulationScenarioCreateResponse as SimulationScenarioCreateResponse, type SimulationScenarioUpdateResponse as SimulationScenarioUpdateResponse, type SimulationScenarioListResponse as SimulationScenarioListResponse, type SimulationScenarioDeleteResponse as SimulationScenarioDeleteResponse, type SimulationScenarioGetByIDResponse as SimulationScenarioGetByIDResponse, type SimulationScenarioCreateParams as SimulationScenarioCreateParams, type SimulationScenarioUpdateParams as SimulationScenarioUpdateParams, type SimulationScenarioListParams as SimulationScenarioListParams, };
334
+ }
335
+ //# sourceMappingURL=simulation-scenario.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simulation-scenario.d.mts","sourceRoot":"","sources":["../src/resources/simulation-scenario.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,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