@roarkanalytics/sdk 8.0.1 → 9.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 (118) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +7 -7
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -7
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +4 -4
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-connection.d.mts +0 -88
  12. package/resources/agent-connection.d.mts.map +1 -1
  13. package/resources/agent-connection.d.ts +0 -88
  14. package/resources/agent-connection.d.ts.map +1 -1
  15. package/resources/agent.d.mts +2 -200
  16. package/resources/agent.d.mts.map +1 -1
  17. package/resources/agent.d.ts +2 -200
  18. package/resources/agent.d.ts.map +1 -1
  19. package/resources/config.d.mts +6 -6
  20. package/resources/config.d.mts.map +1 -1
  21. package/resources/config.d.ts +6 -6
  22. package/resources/config.d.ts.map +1 -1
  23. package/resources/conversation.d.mts +6 -95
  24. package/resources/conversation.d.mts.map +1 -1
  25. package/resources/conversation.d.ts +6 -95
  26. package/resources/conversation.d.ts.map +1 -1
  27. package/resources/conversation.js +5 -17
  28. package/resources/conversation.js.map +1 -1
  29. package/resources/conversation.mjs +5 -17
  30. package/resources/conversation.mjs.map +1 -1
  31. package/resources/customer-flow-folder.d.mts +157 -0
  32. package/resources/customer-flow-folder.d.mts.map +1 -0
  33. package/resources/customer-flow-folder.d.ts +157 -0
  34. package/resources/customer-flow-folder.d.ts.map +1 -0
  35. package/resources/customer-flow-folder.js +54 -0
  36. package/resources/customer-flow-folder.js.map +1 -0
  37. package/resources/customer-flow-folder.mjs +50 -0
  38. package/resources/customer-flow-folder.mjs.map +1 -0
  39. package/resources/customer-flow.d.mts +558 -2
  40. package/resources/customer-flow.d.mts.map +1 -1
  41. package/resources/customer-flow.d.ts +558 -2
  42. package/resources/customer-flow.d.ts.map +1 -1
  43. package/resources/customer-flow.js +2 -2
  44. package/resources/customer-flow.mjs +2 -2
  45. package/resources/dashboard.d.mts +3 -3
  46. package/resources/dashboard.d.ts +3 -3
  47. package/resources/dashboard.js +3 -3
  48. package/resources/dashboard.mjs +3 -3
  49. package/resources/index.d.mts +3 -3
  50. package/resources/index.d.mts.map +1 -1
  51. package/resources/index.d.ts +3 -3
  52. package/resources/index.d.ts.map +1 -1
  53. package/resources/index.js +3 -3
  54. package/resources/index.js.map +1 -1
  55. package/resources/index.mjs +2 -2
  56. package/resources/index.mjs.map +1 -1
  57. package/resources/live-report.d.mts +10 -10
  58. package/resources/live-report.d.ts +10 -10
  59. package/resources/me.d.mts +20 -19
  60. package/resources/me.d.mts.map +1 -1
  61. package/resources/me.d.ts +20 -19
  62. package/resources/me.d.ts.map +1 -1
  63. package/resources/me.js +14 -13
  64. package/resources/me.js.map +1 -1
  65. package/resources/me.mjs +14 -13
  66. package/resources/me.mjs.map +1 -1
  67. package/resources/metric.d.mts +60 -60
  68. package/resources/metric.d.ts +60 -60
  69. package/resources/simulation-group.d.mts +13 -13
  70. package/resources/simulation-group.d.ts +13 -13
  71. package/resources/simulation-group.js +5 -5
  72. package/resources/simulation-group.mjs +5 -5
  73. package/resources/simulation-run-group.d.mts +2 -2
  74. package/resources/simulation-run-group.d.ts +2 -2
  75. package/resources/simulation-run-group.js +2 -2
  76. package/resources/simulation-run-group.mjs +2 -2
  77. package/resources/simulation.d.mts +1086 -4
  78. package/resources/simulation.d.mts.map +1 -1
  79. package/resources/simulation.d.ts +1086 -4
  80. package/resources/simulation.d.ts.map +1 -1
  81. package/resources/simulation.js +106 -0
  82. package/resources/simulation.js.map +1 -1
  83. package/resources/simulation.mjs +106 -0
  84. package/resources/simulation.mjs.map +1 -1
  85. package/resources/webhook.d.mts +4 -4
  86. package/resources/webhook.d.mts.map +1 -1
  87. package/resources/webhook.d.ts +4 -4
  88. package/resources/webhook.d.ts.map +1 -1
  89. package/src/client.ts +39 -43
  90. package/src/resources/agent-connection.ts +0 -103
  91. package/src/resources/agent.ts +2 -317
  92. package/src/resources/config.ts +12 -12
  93. package/src/resources/conversation.ts +6 -126
  94. package/src/resources/customer-flow-folder.ts +235 -0
  95. package/src/resources/customer-flow.ts +862 -2
  96. package/src/resources/dashboard.ts +3 -3
  97. package/src/resources/index.ts +18 -20
  98. package/src/resources/live-report.ts +10 -10
  99. package/src/resources/me.ts +20 -19
  100. package/src/resources/metric.ts +60 -60
  101. package/src/resources/simulation-group.ts +13 -13
  102. package/src/resources/simulation-run-group.ts +2 -2
  103. package/src/resources/simulation.ts +1759 -52
  104. package/src/resources/webhook.ts +8 -8
  105. package/src/version.ts +1 -1
  106. package/version.d.mts +1 -1
  107. package/version.d.ts +1 -1
  108. package/version.js +1 -1
  109. package/version.mjs +1 -1
  110. package/resources/agent-setup.d.mts +0 -1057
  111. package/resources/agent-setup.d.mts.map +0 -1
  112. package/resources/agent-setup.d.ts +0 -1057
  113. package/resources/agent-setup.d.ts.map +0 -1
  114. package/resources/agent-setup.js +0 -113
  115. package/resources/agent-setup.js.map +0 -1
  116. package/resources/agent-setup.mjs +0 -109
  117. package/resources/agent-setup.mjs.map +0 -1
  118. package/src/resources/agent-setup.ts +0 -1685
@@ -3,22 +3,12 @@ import { APIPromise } from "../core/api-promise.mjs";
3
3
  import { RequestOptions } from "../internal/request-options.mjs";
4
4
  export declare class Conversation extends APIResource {
5
5
  /**
6
- * Calls and chats in the project as one list, most recent start first. A
7
- * conversation is listed once it is recorded: a call when it connects, a chat when
8
- * it ends. Listing calls needs `call:read`, chats `chat:read`, and both kinds
9
- * both.
10
- *
11
- * @example
12
- * ```ts
13
- * const conversations = await client.conversation.list();
14
- * ```
15
- */
16
- list(query?: ConversationListParams | null | undefined, options?: RequestOptions): APIPromise<ConversationListResponse>;
17
- /**
18
- * A call or chat by its id, whichever it is. One started through
6
+ * Fetches one conversation by its id, whether it is a call or a chat. The same
7
+ * endpoint reads both modalities, and `modality` in the response says which one it
8
+ * is, so you do not need to know it up front. A conversation started with
19
9
  * `POST /v1/agent/{agentId}/conversations` reads back from the moment it is
20
- * created, before it is recorded. For its transcript and metrics, read it as a
21
- * call or chat, as `modality` says.
10
+ * created, before it is recorded as a call or chat. For its transcript and
11
+ * metrics, use the call or chat endpoints that match its `modality`.
22
12
  *
23
13
  * @example
24
14
  * ```ts
@@ -29,63 +19,6 @@ export declare class Conversation extends APIResource {
29
19
  */
30
20
  getByID(conversationID: string, options?: RequestOptions): APIPromise<ConversationGetByIDResponse>;
31
21
  }
32
- export interface ConversationListResponse {
33
- data: Array<ConversationListResponse.Data>;
34
- pagination: ConversationListResponse.Pagination;
35
- }
36
- export declare namespace ConversationListResponse {
37
- interface Data {
38
- /**
39
- * The conversation id: its call id or chat id. `modality` says which, and where to
40
- * read its transcript and metrics (`/v1/call/{callId}` or `/v1/chat/{id}`).
41
- */
42
- id: string;
43
- createdAt: string;
44
- /**
45
- * How long it ran. Null until it ends.
46
- */
47
- durationMs: number | null;
48
- /**
49
- * When it ended (ISO 8601). Null until it ends.
50
- */
51
- endedAt: string | null;
52
- /**
53
- * Your own id for it, if one was given.
54
- */
55
- externalId: string | null;
56
- /**
57
- * `voice` or `chat`. A voice conversation is recorded as a call
58
- * (`/v1/call/{callId}`), a chat as a chat (`/v1/chat/{id}`).
59
- */
60
- modality: 'voice' | 'chat';
61
- projectId: string;
62
- /**
63
- * When it started, or was created while pending (ISO 8601).
64
- */
65
- startedAt: string;
66
- /**
67
- * `PENDING` until it starts (a call ringing, a chat nobody has joined yet),
68
- * `IN_PROGRESS`, then `ENDED`.
69
- */
70
- status: 'PENDING' | 'IN_PROGRESS' | 'ENDED';
71
- summary: string | null;
72
- title: string | null;
73
- }
74
- interface Pagination {
75
- /**
76
- * Whether there are more items to fetch
77
- */
78
- hasMore: boolean;
79
- /**
80
- * Cursor for the next page of items
81
- */
82
- nextCursor: string | null;
83
- /**
84
- * Total number of items
85
- */
86
- total: number;
87
- }
88
- }
89
22
  export interface ConversationGetByIDResponse {
90
23
  data: ConversationGetByIDResponse.Data;
91
24
  }
@@ -128,29 +61,7 @@ export declare namespace ConversationGetByIDResponse {
128
61
  title: string | null;
129
62
  }
130
63
  }
131
- export interface ConversationListParams {
132
- /**
133
- * The `nextCursor` of the previous page.
134
- */
135
- after?: string;
136
- /**
137
- * How many to return (default 20, max 100).
138
- */
139
- limit?: number;
140
- /**
141
- * Only `voice`, or only `chat`. Both by default.
142
- */
143
- modality?: 'voice' | 'chat' | 'call';
144
- /**
145
- * Only conversations that started at or after this time.
146
- */
147
- startedFrom?: string;
148
- /**
149
- * Only conversations that started at or before this time.
150
- */
151
- startedTo?: string;
152
- }
153
64
  export declare namespace Conversation {
154
- export { type ConversationListResponse as ConversationListResponse, type ConversationGetByIDResponse as ConversationGetByIDResponse, type ConversationListParams as ConversationListParams, };
65
+ export { type ConversationGetByIDResponse as ConversationGetByIDResponse };
155
66
  }
156
67
  //# sourceMappingURL=conversation.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.mts","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAIvC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;CAGnG;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAE3C,UAAU,E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,CAAC;QAElB;;WAEG;QACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B;;WAEG;QACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB;;WAEG;QACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B;;;WAGG;QACH,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;QAE3B,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,OAAO,CAAC;QAE5C,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,2BAA2B,IAAI,2BAA2B,EAAE,CAAC;CAC5E"}
@@ -3,22 +3,12 @@ import { APIPromise } from "../core/api-promise.js";
3
3
  import { RequestOptions } from "../internal/request-options.js";
4
4
  export declare class Conversation extends APIResource {
5
5
  /**
6
- * Calls and chats in the project as one list, most recent start first. A
7
- * conversation is listed once it is recorded: a call when it connects, a chat when
8
- * it ends. Listing calls needs `call:read`, chats `chat:read`, and both kinds
9
- * both.
10
- *
11
- * @example
12
- * ```ts
13
- * const conversations = await client.conversation.list();
14
- * ```
15
- */
16
- list(query?: ConversationListParams | null | undefined, options?: RequestOptions): APIPromise<ConversationListResponse>;
17
- /**
18
- * A call or chat by its id, whichever it is. One started through
6
+ * Fetches one conversation by its id, whether it is a call or a chat. The same
7
+ * endpoint reads both modalities, and `modality` in the response says which one it
8
+ * is, so you do not need to know it up front. A conversation started with
19
9
  * `POST /v1/agent/{agentId}/conversations` reads back from the moment it is
20
- * created, before it is recorded. For its transcript and metrics, read it as a
21
- * call or chat, as `modality` says.
10
+ * created, before it is recorded as a call or chat. For its transcript and
11
+ * metrics, use the call or chat endpoints that match its `modality`.
22
12
  *
23
13
  * @example
24
14
  * ```ts
@@ -29,63 +19,6 @@ export declare class Conversation extends APIResource {
29
19
  */
30
20
  getByID(conversationID: string, options?: RequestOptions): APIPromise<ConversationGetByIDResponse>;
31
21
  }
32
- export interface ConversationListResponse {
33
- data: Array<ConversationListResponse.Data>;
34
- pagination: ConversationListResponse.Pagination;
35
- }
36
- export declare namespace ConversationListResponse {
37
- interface Data {
38
- /**
39
- * The conversation id: its call id or chat id. `modality` says which, and where to
40
- * read its transcript and metrics (`/v1/call/{callId}` or `/v1/chat/{id}`).
41
- */
42
- id: string;
43
- createdAt: string;
44
- /**
45
- * How long it ran. Null until it ends.
46
- */
47
- durationMs: number | null;
48
- /**
49
- * When it ended (ISO 8601). Null until it ends.
50
- */
51
- endedAt: string | null;
52
- /**
53
- * Your own id for it, if one was given.
54
- */
55
- externalId: string | null;
56
- /**
57
- * `voice` or `chat`. A voice conversation is recorded as a call
58
- * (`/v1/call/{callId}`), a chat as a chat (`/v1/chat/{id}`).
59
- */
60
- modality: 'voice' | 'chat';
61
- projectId: string;
62
- /**
63
- * When it started, or was created while pending (ISO 8601).
64
- */
65
- startedAt: string;
66
- /**
67
- * `PENDING` until it starts (a call ringing, a chat nobody has joined yet),
68
- * `IN_PROGRESS`, then `ENDED`.
69
- */
70
- status: 'PENDING' | 'IN_PROGRESS' | 'ENDED';
71
- summary: string | null;
72
- title: string | null;
73
- }
74
- interface Pagination {
75
- /**
76
- * Whether there are more items to fetch
77
- */
78
- hasMore: boolean;
79
- /**
80
- * Cursor for the next page of items
81
- */
82
- nextCursor: string | null;
83
- /**
84
- * Total number of items
85
- */
86
- total: number;
87
- }
88
- }
89
22
  export interface ConversationGetByIDResponse {
90
23
  data: ConversationGetByIDResponse.Data;
91
24
  }
@@ -128,29 +61,7 @@ export declare namespace ConversationGetByIDResponse {
128
61
  title: string | null;
129
62
  }
130
63
  }
131
- export interface ConversationListParams {
132
- /**
133
- * The `nextCursor` of the previous page.
134
- */
135
- after?: string;
136
- /**
137
- * How many to return (default 20, max 100).
138
- */
139
- limit?: number;
140
- /**
141
- * Only `voice`, or only `chat`. Both by default.
142
- */
143
- modality?: 'voice' | 'chat' | 'call';
144
- /**
145
- * Only conversations that started at or after this time.
146
- */
147
- startedFrom?: string;
148
- /**
149
- * Only conversations that started at or before this time.
150
- */
151
- startedTo?: string;
152
- }
153
64
  export declare namespace Conversation {
154
- export { type ConversationListResponse as ConversationListResponse, type ConversationGetByIDResponse as ConversationGetByIDResponse, type ConversationListParams as ConversationListParams, };
65
+ export { type ConversationGetByIDResponse as ConversationGetByIDResponse };
155
66
  }
156
67
  //# sourceMappingURL=conversation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wBAAwB,CAAC;IAIvC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;CAGnG;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAE3C,UAAU,EAAE,wBAAwB,CAAC,UAAU,CAAC;CACjD;AAED,yBAAiB,wBAAwB,CAAC;IACxC,UAAiB,IAAI;QACnB;;;WAGG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,UAAU,EAAE,MAAM,GAAG,IAAI,CA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AO,GAAG,MAAM,CAAC;QAE3B,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;;WAGG;QACH,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,OAAO,CAAC;QAE5C,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;KACtB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,2BAA2B,IAAI,2BAA2B,EAAE,CAAC;CAC5E"}
@@ -6,24 +6,12 @@ const resource_1 = require("../core/resource.js");
6
6
  const path_1 = require("../internal/utils/path.js");
7
7
  class Conversation extends resource_1.APIResource {
8
8
  /**
9
- * Calls and chats in the project as one list, most recent start first. A
10
- * conversation is listed once it is recorded: a call when it connects, a chat when
11
- * it ends. Listing calls needs `call:read`, chats `chat:read`, and both kinds
12
- * both.
13
- *
14
- * @example
15
- * ```ts
16
- * const conversations = await client.conversation.list();
17
- * ```
18
- */
19
- list(query = {}, options) {
20
- return this._client.get('/v1/conversation', { query, ...options });
21
- }
22
- /**
23
- * A call or chat by its id, whichever it is. One started through
9
+ * Fetches one conversation by its id, whether it is a call or a chat. The same
10
+ * endpoint reads both modalities, and `modality` in the response says which one it
11
+ * is, so you do not need to know it up front. A conversation started with
24
12
  * `POST /v1/agent/{agentId}/conversations` reads back from the moment it is
25
- * created, before it is recorded. For its transcript and metrics, read it as a
26
- * call or chat, as `modality` says.
13
+ * created, before it is recorded as a call or chat. For its transcript and
14
+ * metrics, use the call or chat endpoints that match its `modality`.
27
15
  *
28
16
  * @example
29
17
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.js","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,cAAsB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF;AAnCD,oCAmCC"}
1
+ {"version":3,"file":"conversation.js","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,cAAsB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,oBAAoB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF;AAnBD,oCAmBC"}
@@ -3,24 +3,12 @@ import { APIResource } from "../core/resource.mjs";
3
3
  import { path } from "../internal/utils/path.mjs";
4
4
  export class Conversation extends APIResource {
5
5
  /**
6
- * Calls and chats in the project as one list, most recent start first. A
7
- * conversation is listed once it is recorded: a call when it connects, a chat when
8
- * it ends. Listing calls needs `call:read`, chats `chat:read`, and both kinds
9
- * both.
10
- *
11
- * @example
12
- * ```ts
13
- * const conversations = await client.conversation.list();
14
- * ```
15
- */
16
- list(query = {}, options) {
17
- return this._client.get('/v1/conversation', { query, ...options });
18
- }
19
- /**
20
- * A call or chat by its id, whichever it is. One started through
6
+ * Fetches one conversation by its id, whether it is a call or a chat. The same
7
+ * endpoint reads both modalities, and `modality` in the response says which one it
8
+ * is, so you do not need to know it up front. A conversation started with
21
9
  * `POST /v1/agent/{agentId}/conversations` reads back from the moment it is
22
- * created, before it is recorded. For its transcript and metrics, read it as a
23
- * call or chat, as `modality` says.
10
+ * created, before it is recorded as a call or chat. For its transcript and
11
+ * metrics, use the call or chat endpoints that match its `modality`.
24
12
  *
25
13
  * @example
26
14
  * ```ts
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.mjs","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,cAAsB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,oBAAoB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF"}
1
+ {"version":3,"file":"conversation.mjs","sourceRoot":"","sources":["../src/resources/conversation.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,cAAsB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,oBAAoB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;CACF"}
@@ -0,0 +1,157 @@
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 CustomerFlowFolder extends APIResource {
5
+ /**
6
+ * Creates a folder to group customer flows. File a flow into it by sending its
7
+ * `folderId` when you create or update the flow. Names are unique within a
8
+ * project, ignoring case. Customer flows were previously called scenarios.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const customerFlowFolder =
13
+ * await client.customerFlowFolder.create({ name: 'x' });
14
+ * ```
15
+ */
16
+ create(body: CustomerFlowFolderCreateParams, options?: RequestOptions): APIPromise<CustomerFlowFolderCreateResponse>;
17
+ /**
18
+ * Returns every folder the project groups its customer flows into, with how many
19
+ * flows each holds, in the order the app shows them. Filter the flow list to one
20
+ * folder with `GET /v1/customer-flow?folderId=`. Customer flows were previously
21
+ * called scenarios.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const customerFlowFolders =
26
+ * await client.customerFlowFolder.list();
27
+ * ```
28
+ */
29
+ list(options?: RequestOptions): APIPromise<CustomerFlowFolderListResponse>;
30
+ /**
31
+ * Deletes a folder. The flows in it are kept and no longer sit in any folder.
32
+ * Built-in folders cannot be deleted.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const customerFlowFolder =
37
+ * await client.customerFlowFolder.delete(
38
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
39
+ * );
40
+ * ```
41
+ */
42
+ delete(folderID: string, options?: RequestOptions): APIPromise<CustomerFlowFolderDeleteResponse>;
43
+ }
44
+ export interface CustomerFlowFolderCreateResponse {
45
+ /**
46
+ * A folder that groups customer flows. A flow sits in at most one folder.
47
+ */
48
+ data: CustomerFlowFolderCreateResponse.Data;
49
+ }
50
+ export declare namespace CustomerFlowFolderCreateResponse {
51
+ /**
52
+ * A folder that groups customer flows. A flow sits in at most one folder.
53
+ */
54
+ interface Data {
55
+ id: string;
56
+ /**
57
+ * Whether Roark curates this folder. Built-in folders cannot be deleted or have
58
+ * your flows filed in them.
59
+ */
60
+ builtIn: boolean;
61
+ /**
62
+ * The color the folder is shown with in the app. Folders share the palette labels
63
+ * use.
64
+ */
65
+ color: 'GREEN' | 'RED' | 'ORANGE' | 'PURPLE' | 'GREY' | 'BLUE' | 'PEACH' | 'TEAL' | 'INDIGO' | 'AMBER' | 'ROSE' | 'CYAN';
66
+ /**
67
+ * Creation timestamp in ISO 8601 format
68
+ */
69
+ createdAt: string;
70
+ /**
71
+ * What belongs in this folder.
72
+ */
73
+ description: string | null;
74
+ /**
75
+ * The folder name, unique within the project.
76
+ */
77
+ name: string;
78
+ /**
79
+ * Last update timestamp in ISO 8601 format
80
+ */
81
+ updatedAt: string;
82
+ }
83
+ }
84
+ /**
85
+ * The project's customer flow folders, in the order the app shows them.
86
+ */
87
+ export interface CustomerFlowFolderListResponse {
88
+ data: Array<CustomerFlowFolderListResponse.Data>;
89
+ }
90
+ export declare namespace CustomerFlowFolderListResponse {
91
+ /**
92
+ * A folder that groups customer flows. A flow sits in at most one folder.
93
+ */
94
+ interface Data {
95
+ id: string;
96
+ /**
97
+ * Whether Roark curates this folder. Built-in folders cannot be deleted or have
98
+ * your flows filed in them.
99
+ */
100
+ builtIn: boolean;
101
+ /**
102
+ * The color the folder is shown with in the app. Folders share the palette labels
103
+ * use.
104
+ */
105
+ color: 'GREEN' | 'RED' | 'ORANGE' | 'PURPLE' | 'GREY' | 'BLUE' | 'PEACH' | 'TEAL' | 'INDIGO' | 'AMBER' | 'ROSE' | 'CYAN';
106
+ /**
107
+ * Creation timestamp in ISO 8601 format
108
+ */
109
+ createdAt: string;
110
+ /**
111
+ * What belongs in this folder.
112
+ */
113
+ description: string | null;
114
+ /**
115
+ * How many flows are in this folder.
116
+ */
117
+ flowCount: number;
118
+ /**
119
+ * The folder name, unique within the project.
120
+ */
121
+ name: string;
122
+ /**
123
+ * Last update timestamp in ISO 8601 format
124
+ */
125
+ updatedAt: string;
126
+ }
127
+ }
128
+ export interface CustomerFlowFolderDeleteResponse {
129
+ data: CustomerFlowFolderDeleteResponse.Data;
130
+ }
131
+ export declare namespace CustomerFlowFolderDeleteResponse {
132
+ interface Data {
133
+ /**
134
+ * Whether the folder was deleted
135
+ */
136
+ deleted: boolean;
137
+ }
138
+ }
139
+ export interface CustomerFlowFolderCreateParams {
140
+ /**
141
+ * The folder name. Must be unique in the project.
142
+ */
143
+ name: string;
144
+ /**
145
+ * The color the folder is shown with in the app. Folders share the palette labels
146
+ * use. Defaults to GREY.
147
+ */
148
+ color?: 'GREEN' | 'RED' | 'ORANGE' | 'PURPLE' | 'GREY' | 'BLUE' | 'PEACH' | 'TEAL' | 'INDIGO' | 'AMBER' | 'ROSE' | 'CYAN';
149
+ /**
150
+ * What belongs in this folder.
151
+ */
152
+ description?: string | null;
153
+ }
154
+ export declare namespace CustomerFlowFolder {
155
+ export { type CustomerFlowFolderCreateResponse as CustomerFlowFolderCreateResponse, type CustomerFlowFolderListResponse as CustomerFlowFolderListResponse, type CustomerFlowFolderDeleteResponse as CustomerFlowFolderDeleteResponse, type CustomerFlowFolderCreateParams as CustomerFlowFolderCreateParams, };
156
+ }
157
+ //# sourceMappingURL=customer-flow-folder.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer-flow-folder.d.mts","sourceRoot":"","sources":["../src/resources/customer-flow-folder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,kBAAmB,SAAQ,WAAW;IACjD;;;;;;;;;;OAUG;IACH,MAAM,CACJ,IAAI,EAAE,8BAA8B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gCAAgC,CAAC;IAI/C;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,8BAA8B,CAAC;IAI1E;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAA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AC;QAEb;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,gCAAgC,CAAC,IAAI,CAAC;CAC7C;AAED,yBAAiB,gCAAgC,CAAC;IAChD,UAAiB,IAAI;QACnB;;WAEG;QACH,OAAO,EAAE,OAAO,CAAC;KAClB;CACF;AAED,MAAM,WAAW,8BAA8B;IAC7C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,KAAK,CAAC,EACF,OAAO,GACP,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,OAAO,GACP,MAAM,GACN,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,OAAO,EACL,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
@@ -0,0 +1,157 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { RequestOptions } from "../internal/request-options.js";
4
+ export declare class CustomerFlowFolder extends APIResource {
5
+ /**
6
+ * Creates a folder to group customer flows. File a flow into it by sending its
7
+ * `folderId` when you create or update the flow. Names are unique within a
8
+ * project, ignoring case. Customer flows were previously called scenarios.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * const customerFlowFolder =
13
+ * await client.customerFlowFolder.create({ name: 'x' });
14
+ * ```
15
+ */
16
+ create(body: CustomerFlowFolderCreateParams, options?: RequestOptions): APIPromise<CustomerFlowFolderCreateResponse>;
17
+ /**
18
+ * Returns every folder the project groups its customer flows into, with how many
19
+ * flows each holds, in the order the app shows them. Filter the flow list to one
20
+ * folder with `GET /v1/customer-flow?folderId=`. Customer flows were previously
21
+ * called scenarios.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * const customerFlowFolders =
26
+ * await client.customerFlowFolder.list();
27
+ * ```
28
+ */
29
+ list(options?: RequestOptions): APIPromise<CustomerFlowFolderListResponse>;
30
+ /**
31
+ * Deletes a folder. The flows in it are kept and no longer sit in any folder.
32
+ * Built-in folders cannot be deleted.
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const customerFlowFolder =
37
+ * await client.customerFlowFolder.delete(
38
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
39
+ * );
40
+ * ```
41
+ */
42
+ delete(folderID: string, options?: RequestOptions): APIPromise<CustomerFlowFolderDeleteResponse>;
43
+ }
44
+ export interface CustomerFlowFolderCreateResponse {
45
+ /**
46
+ * A folder that groups customer flows. A flow sits in at most one folder.
47
+ */
48
+ data: CustomerFlowFolderCreateResponse.Data;
49
+ }
50
+ export declare namespace CustomerFlowFolderCreateResponse {
51
+ /**
52
+ * A folder that groups customer flows. A flow sits in at most one folder.
53
+ */
54
+ interface Data {
55
+ id: string;
56
+ /**
57
+ * Whether Roark curates this folder. Built-in folders cannot be deleted or have
58
+ * your flows filed in them.
59
+ */
60
+ builtIn: boolean;
61
+ /**
62
+ * The color the folder is shown with in the app. Folders share the palette labels
63
+ * use.
64
+ */
65
+ color: 'GREEN' | 'RED' | 'ORANGE' | 'PURPLE' | 'GREY' | 'BLUE' | 'PEACH' | 'TEAL' | 'INDIGO' | 'AMBER' | 'ROSE' | 'CYAN';
66
+ /**
67
+ * Creation timestamp in ISO 8601 format
68
+ */
69
+ createdAt: string;
70
+ /**
71
+ * What belongs in this folder.
72
+ */
73
+ description: string | null;
74
+ /**
75
+ * The folder name, unique within the project.
76
+ */
77
+ name: string;
78
+ /**
79
+ * Last update timestamp in ISO 8601 format
80
+ */
81
+ updatedAt: string;
82
+ }
83
+ }
84
+ /**
85
+ * The project's customer flow folders, in the order the app shows them.
86
+ */
87
+ export interface CustomerFlowFolderListResponse {
88
+ data: Array<CustomerFlowFolderListResponse.Data>;
89
+ }
90
+ export declare namespace CustomerFlowFolderListResponse {
91
+ /**
92
+ * A folder that groups customer flows. A flow sits in at most one folder.
93
+ */
94
+ interface Data {
95
+ id: string;
96
+ /**
97
+ * Whether Roark curates this folder. Built-in folders cannot be deleted or have
98
+ * your flows filed in them.
99
+ */
100
+ builtIn: boolean;
101
+ /**
102
+ * The color the folder is shown with in the app. Folders share the palette labels
103
+ * use.
104
+ */
105
+ color: 'GREEN' | 'RED' | 'ORANGE' | 'PURPLE' | 'GREY' | 'BLUE' | 'PEACH' | 'TEAL' | 'INDIGO' | 'AMBER' | 'ROSE' | 'CYAN';
106
+ /**
107
+ * Creation timestamp in ISO 8601 format
108
+ */
109
+ createdAt: string;
110
+ /**
111
+ * What belongs in this folder.
112
+ */
113
+ description: string | null;
114
+ /**
115
+ * How many flows are in this folder.
116
+ */
117
+ flowCount: number;
118
+ /**
119
+ * The folder name, unique within the project.
120
+ */
121
+ name: string;
122
+ /**
123
+ * Last update timestamp in ISO 8601 format
124
+ */
125
+ updatedAt: string;
126
+ }
127
+ }
128
+ export interface CustomerFlowFolderDeleteResponse {
129
+ data: CustomerFlowFolderDeleteResponse.Data;
130
+ }
131
+ export declare namespace CustomerFlowFolderDeleteResponse {
132
+ interface Data {
133
+ /**
134
+ * Whether the folder was deleted
135
+ */
136
+ deleted: boolean;
137
+ }
138
+ }
139
+ export interface CustomerFlowFolderCreateParams {
140
+ /**
141
+ * The folder name. Must be unique in the project.
142
+ */
143
+ name: string;
144
+ /**
145
+ * The color the folder is shown with in the app. Folders share the palette labels
146
+ * use. Defaults to GREY.
147
+ */
148
+ color?: 'GREEN' | 'RED' | 'ORANGE' | 'PURPLE' | 'GREY' | 'BLUE' | 'PEACH' | 'TEAL' | 'INDIGO' | 'AMBER' | 'ROSE' | 'CYAN';
149
+ /**
150
+ * What belongs in this folder.
151
+ */
152
+ description?: string | null;
153
+ }
154
+ export declare namespace CustomerFlowFolder {
155
+ export { type CustomerFlowFolderCreateResponse as CustomerFlowFolderCreateResponse, type CustomerFlowFolderListResponse as CustomerFlowFolderListResponse, type CustomerFlowFolderDeleteResponse as CustomerFlowFolderDeleteResponse, type CustomerFlowFolderCreateParams as CustomerFlowFolderCreateParams, };
156
+ }
157
+ //# sourceMappingURL=customer-flow-folder.d.ts.map