@roarkanalytics/sdk 9.7.0 → 9.9.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 (45) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/config.d.mts +12 -0
  10. package/resources/config.d.mts.map +1 -1
  11. package/resources/config.d.ts +12 -0
  12. package/resources/config.d.ts.map +1 -1
  13. package/resources/customer-flow-folder.d.mts +118 -16
  14. package/resources/customer-flow-folder.d.mts.map +1 -1
  15. package/resources/customer-flow-folder.d.ts +118 -16
  16. package/resources/customer-flow-folder.d.ts.map +1 -1
  17. package/resources/customer-flow-folder.js +28 -7
  18. package/resources/customer-flow-folder.js.map +1 -1
  19. package/resources/customer-flow-folder.mjs +28 -7
  20. package/resources/customer-flow-folder.mjs.map +1 -1
  21. package/resources/customer-flow.d.mts +136 -45
  22. package/resources/customer-flow.d.mts.map +1 -1
  23. package/resources/customer-flow.d.ts +136 -45
  24. package/resources/customer-flow.d.ts.map +1 -1
  25. package/resources/index.d.mts +1 -1
  26. package/resources/index.d.mts.map +1 -1
  27. package/resources/index.d.ts +1 -1
  28. package/resources/index.d.ts.map +1 -1
  29. package/resources/index.js.map +1 -1
  30. package/resources/index.mjs.map +1 -1
  31. package/resources/simulation.d.mts +60 -18
  32. package/resources/simulation.d.mts.map +1 -1
  33. package/resources/simulation.d.ts +60 -18
  34. package/resources/simulation.d.ts.map +1 -1
  35. package/src/client.ts +4 -0
  36. package/src/resources/config.ts +24 -0
  37. package/src/resources/customer-flow-folder.ts +166 -15
  38. package/src/resources/customer-flow.ts +152 -45
  39. package/src/resources/index.ts +2 -0
  40. package/src/resources/simulation.ts +66 -18
  41. package/src/version.ts +1 -1
  42. package/version.d.mts +1 -1
  43. package/version.d.ts +1 -1
  44. package/version.js +1 -1
  45. package/version.mjs +1 -1
@@ -3,9 +3,11 @@ import { APIPromise } from "../core/api-promise.mjs";
3
3
  import { RequestOptions } from "../internal/request-options.mjs";
4
4
  export declare class CustomerFlowFolder extends APIResource {
5
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.
6
+ * Creates a folder to group customer flows, at the top level or inside another
7
+ * folder with `parentId`. Folders nest up to 5 levels deep. File a flow into it by
8
+ * sending its `folderId` when you create or update the flow. Names are unique
9
+ * within their parent folder, ignoring case. Customer flows were previously called
10
+ * scenarios.
9
11
  *
10
12
  * @example
11
13
  * ```ts
@@ -14,11 +16,27 @@ export declare class CustomerFlowFolder extends APIResource {
14
16
  * ```
15
17
  */
16
18
  create(body: CustomerFlowFolderCreateParams, options?: RequestOptions): APIPromise<CustomerFlowFolderCreateResponse>;
19
+ /**
20
+ * Renames, recolors or moves a folder. Send `parentId` to move it, with its flows
21
+ * and subfolders, inside another folder, or null to move it to the top level.
22
+ * Fields you omit are left as they are. Built-in folders cannot be changed.
23
+ * Customer flows were previously called scenarios.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const customerFlowFolder =
28
+ * await client.customerFlowFolder.update(
29
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
30
+ * );
31
+ * ```
32
+ */
33
+ update(folderID: string, body?: CustomerFlowFolderUpdateParams | null | undefined, options?: RequestOptions): APIPromise<CustomerFlowFolderUpdateResponse>;
17
34
  /**
18
35
  * 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.
36
+ * flows each holds, in the order the app shows them. Subfolders are included, each
37
+ * with the `parentId` of the folder it sits in. Filter the flow list to one folder
38
+ * with `GET /v1/customer-flow?folderId=`, adding `includeSubfolders=true` to take
39
+ * in the folders inside it. Customer flows were previously called scenarios.
22
40
  *
23
41
  * @example
24
42
  * ```ts
@@ -28,7 +46,8 @@ export declare class CustomerFlowFolder extends APIResource {
28
46
  */
29
47
  list(options?: RequestOptions): APIPromise<CustomerFlowFolderListResponse>;
30
48
  /**
31
- * Deletes a folder. The flows in it are kept and no longer sit in any folder.
49
+ * Deletes a folder. Its flows and subfolders are kept and move up one level: into
50
+ * the folder it sat in, or out of any folder when it was a top-level folder.
32
51
  * Built-in folders cannot be deleted.
33
52
  *
34
53
  * @example
@@ -43,13 +62,15 @@ export declare class CustomerFlowFolder extends APIResource {
43
62
  }
44
63
  export interface CustomerFlowFolderCreateResponse {
45
64
  /**
46
- * A folder that groups customer flows. A flow sits in at most one folder.
65
+ * A folder that groups customer flows. A flow sits in at most one folder. Folders
66
+ * can sit inside other folders, up to 5 levels deep.
47
67
  */
48
68
  data: CustomerFlowFolderCreateResponse.Data;
49
69
  }
50
70
  export declare namespace CustomerFlowFolderCreateResponse {
51
71
  /**
52
- * A folder that groups customer flows. A flow sits in at most one folder.
72
+ * A folder that groups customer flows. A flow sits in at most one folder. Folders
73
+ * can sit inside other folders, up to 5 levels deep.
53
74
  */
54
75
  interface Data {
55
76
  id: string;
@@ -72,9 +93,59 @@ export declare namespace CustomerFlowFolderCreateResponse {
72
93
  */
73
94
  description: string | null;
74
95
  /**
75
- * The folder name, unique within the project.
96
+ * The folder name, unique within its parent folder.
76
97
  */
77
98
  name: string;
99
+ /**
100
+ * The folder this one sits inside, or null when it is a top-level folder.
101
+ */
102
+ parentId: string | null;
103
+ /**
104
+ * Last update timestamp in ISO 8601 format
105
+ */
106
+ updatedAt: string;
107
+ }
108
+ }
109
+ export interface CustomerFlowFolderUpdateResponse {
110
+ /**
111
+ * A folder that groups customer flows. A flow sits in at most one folder. Folders
112
+ * can sit inside other folders, up to 5 levels deep.
113
+ */
114
+ data: CustomerFlowFolderUpdateResponse.Data;
115
+ }
116
+ export declare namespace CustomerFlowFolderUpdateResponse {
117
+ /**
118
+ * A folder that groups customer flows. A flow sits in at most one folder. Folders
119
+ * can sit inside other folders, up to 5 levels deep.
120
+ */
121
+ interface Data {
122
+ id: string;
123
+ /**
124
+ * Whether Roark curates this folder. Built-in folders cannot be deleted or have
125
+ * your flows filed in them.
126
+ */
127
+ builtIn: boolean;
128
+ /**
129
+ * The color the folder is shown with in the app. Folders share the palette labels
130
+ * use.
131
+ */
132
+ color: 'GREEN' | 'RED' | 'ORANGE' | 'PURPLE' | 'GREY' | 'BLUE' | 'PEACH' | 'TEAL' | 'INDIGO' | 'AMBER' | 'ROSE' | 'CYAN';
133
+ /**
134
+ * Creation timestamp in ISO 8601 format
135
+ */
136
+ createdAt: string;
137
+ /**
138
+ * What belongs in this folder.
139
+ */
140
+ description: string | null;
141
+ /**
142
+ * The folder name, unique within its parent folder.
143
+ */
144
+ name: string;
145
+ /**
146
+ * The folder this one sits inside, or null when it is a top-level folder.
147
+ */
148
+ parentId: string | null;
78
149
  /**
79
150
  * Last update timestamp in ISO 8601 format
80
151
  */
@@ -82,14 +153,16 @@ export declare namespace CustomerFlowFolderCreateResponse {
82
153
  }
83
154
  }
84
155
  /**
85
- * The project's customer flow folders, in the order the app shows them.
156
+ * The project's customer flow folders, in the order the app shows them. Subfolders
157
+ * are listed with the rest; rebuild the tree from each folder's `parentId`.
86
158
  */
87
159
  export interface CustomerFlowFolderListResponse {
88
160
  data: Array<CustomerFlowFolderListResponse.Data>;
89
161
  }
90
162
  export declare namespace CustomerFlowFolderListResponse {
91
163
  /**
92
- * A folder that groups customer flows. A flow sits in at most one folder.
164
+ * A folder that groups customer flows. A flow sits in at most one folder. Folders
165
+ * can sit inside other folders, up to 5 levels deep.
93
166
  */
94
167
  interface Data {
95
168
  id: string;
@@ -112,13 +185,17 @@ export declare namespace CustomerFlowFolderListResponse {
112
185
  */
113
186
  description: string | null;
114
187
  /**
115
- * How many flows are in this folder.
188
+ * How many flows are directly in this folder, not counting its subfolders.
116
189
  */
117
190
  flowCount: number;
118
191
  /**
119
- * The folder name, unique within the project.
192
+ * The folder name, unique within its parent folder.
120
193
  */
121
194
  name: string;
195
+ /**
196
+ * The folder this one sits inside, or null when it is a top-level folder.
197
+ */
198
+ parentId: string | null;
122
199
  /**
123
200
  * Last update timestamp in ISO 8601 format
124
201
  */
@@ -138,7 +215,7 @@ export declare namespace CustomerFlowFolderDeleteResponse {
138
215
  }
139
216
  export interface CustomerFlowFolderCreateParams {
140
217
  /**
141
- * The folder name. Must be unique in the project.
218
+ * The folder name. Must be unique within its parent folder, ignoring case.
142
219
  */
143
220
  name: string;
144
221
  /**
@@ -150,8 +227,33 @@ export interface CustomerFlowFolderCreateParams {
150
227
  * What belongs in this folder.
151
228
  */
152
229
  description?: string | null;
230
+ /**
231
+ * Create the folder inside this folder. Omit it, or send null, for a top-level
232
+ * folder.
233
+ */
234
+ parentId?: string | null;
235
+ }
236
+ export interface CustomerFlowFolderUpdateParams {
237
+ /**
238
+ * The color the folder is shown with in the app. Folders share the palette labels
239
+ * use.
240
+ */
241
+ color?: 'GREEN' | 'RED' | 'ORANGE' | 'PURPLE' | 'GREY' | 'BLUE' | 'PEACH' | 'TEAL' | 'INDIGO' | 'AMBER' | 'ROSE' | 'CYAN';
242
+ /**
243
+ * What belongs in this folder. Null clears it.
244
+ */
245
+ description?: string | null;
246
+ /**
247
+ * A new name. Must be unique within the parent folder, ignoring case.
248
+ */
249
+ name?: string;
250
+ /**
251
+ * Moves the folder, with everything in it, inside this folder. Null moves it to
252
+ * the top level; omit it to leave it where it is.
253
+ */
254
+ parentId?: string | null;
153
255
  }
154
256
  export declare namespace CustomerFlowFolder {
155
- export { type CustomerFlowFolderCreateResponse as CustomerFlowFolderCreateResponse, type CustomerFlowFolderListResponse as CustomerFlowFolderListResponse, type CustomerFlowFolderDeleteResponse as CustomerFlowFolderDeleteResponse, type CustomerFlowFolderCreateParams as CustomerFlowFolderCreateParams, };
257
+ export { type CustomerFlowFolderCreateResponse as CustomerFlowFolderCreateResponse, type CustomerFlowFolderUpdateResponse as CustomerFlowFolderUpdateResponse, type CustomerFlowFolderListResponse as CustomerFlowFolderListResponse, type CustomerFlowFolderDeleteResponse as CustomerFlowFolderDeleteResponse, type CustomerFlowFolderCreateParams as CustomerFlowFolderCreateParams, type CustomerFlowFolderUpdateParams as CustomerFlowFolderUpdateParams, };
156
258
  }
157
259
  //# sourceMappingURL=customer-flow-folder.d.mts.map
@@ -1 +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,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gCAAgC,CAAC;CAGjG;AAED,MAAM,WAAW,gCAAgC;IAC/C;;OAEG;IACH,IAAI,EAAE,gCAAgC,CAAC,IAAI,CAAC;CAC7C;AAED,yBAAiB,gCAAgC,CAAC;IAChD;;OAEG;IACH,UAAiB,IAAI;QACnB,EAAE,EAAE,MAAM,CAAC;QAEX;;;WAGG;QACH,OAAO,EAAE,OAAO,CAAC;QAEjB;;;WAGG;QACH,KAAK,EACD,OAAO,GACP,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,GACN,QAAQ,GACR,O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AAO,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;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,OAAO,EACL,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
@@ -3,9 +3,11 @@ import { APIPromise } from "../core/api-promise.js";
3
3
  import { RequestOptions } from "../internal/request-options.js";
4
4
  export declare class CustomerFlowFolder extends APIResource {
5
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.
6
+ * Creates a folder to group customer flows, at the top level or inside another
7
+ * folder with `parentId`. Folders nest up to 5 levels deep. File a flow into it by
8
+ * sending its `folderId` when you create or update the flow. Names are unique
9
+ * within their parent folder, ignoring case. Customer flows were previously called
10
+ * scenarios.
9
11
  *
10
12
  * @example
11
13
  * ```ts
@@ -14,11 +16,27 @@ export declare class CustomerFlowFolder extends APIResource {
14
16
  * ```
15
17
  */
16
18
  create(body: CustomerFlowFolderCreateParams, options?: RequestOptions): APIPromise<CustomerFlowFolderCreateResponse>;
19
+ /**
20
+ * Renames, recolors or moves a folder. Send `parentId` to move it, with its flows
21
+ * and subfolders, inside another folder, or null to move it to the top level.
22
+ * Fields you omit are left as they are. Built-in folders cannot be changed.
23
+ * Customer flows were previously called scenarios.
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const customerFlowFolder =
28
+ * await client.customerFlowFolder.update(
29
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
30
+ * );
31
+ * ```
32
+ */
33
+ update(folderID: string, body?: CustomerFlowFolderUpdateParams | null | undefined, options?: RequestOptions): APIPromise<CustomerFlowFolderUpdateResponse>;
17
34
  /**
18
35
  * 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.
36
+ * flows each holds, in the order the app shows them. Subfolders are included, each
37
+ * with the `parentId` of the folder it sits in. Filter the flow list to one folder
38
+ * with `GET /v1/customer-flow?folderId=`, adding `includeSubfolders=true` to take
39
+ * in the folders inside it. Customer flows were previously called scenarios.
22
40
  *
23
41
  * @example
24
42
  * ```ts
@@ -28,7 +46,8 @@ export declare class CustomerFlowFolder extends APIResource {
28
46
  */
29
47
  list(options?: RequestOptions): APIPromise<CustomerFlowFolderListResponse>;
30
48
  /**
31
- * Deletes a folder. The flows in it are kept and no longer sit in any folder.
49
+ * Deletes a folder. Its flows and subfolders are kept and move up one level: into
50
+ * the folder it sat in, or out of any folder when it was a top-level folder.
32
51
  * Built-in folders cannot be deleted.
33
52
  *
34
53
  * @example
@@ -43,13 +62,15 @@ export declare class CustomerFlowFolder extends APIResource {
43
62
  }
44
63
  export interface CustomerFlowFolderCreateResponse {
45
64
  /**
46
- * A folder that groups customer flows. A flow sits in at most one folder.
65
+ * A folder that groups customer flows. A flow sits in at most one folder. Folders
66
+ * can sit inside other folders, up to 5 levels deep.
47
67
  */
48
68
  data: CustomerFlowFolderCreateResponse.Data;
49
69
  }
50
70
  export declare namespace CustomerFlowFolderCreateResponse {
51
71
  /**
52
- * A folder that groups customer flows. A flow sits in at most one folder.
72
+ * A folder that groups customer flows. A flow sits in at most one folder. Folders
73
+ * can sit inside other folders, up to 5 levels deep.
53
74
  */
54
75
  interface Data {
55
76
  id: string;
@@ -72,9 +93,59 @@ export declare namespace CustomerFlowFolderCreateResponse {
72
93
  */
73
94
  description: string | null;
74
95
  /**
75
- * The folder name, unique within the project.
96
+ * The folder name, unique within its parent folder.
76
97
  */
77
98
  name: string;
99
+ /**
100
+ * The folder this one sits inside, or null when it is a top-level folder.
101
+ */
102
+ parentId: string | null;
103
+ /**
104
+ * Last update timestamp in ISO 8601 format
105
+ */
106
+ updatedAt: string;
107
+ }
108
+ }
109
+ export interface CustomerFlowFolderUpdateResponse {
110
+ /**
111
+ * A folder that groups customer flows. A flow sits in at most one folder. Folders
112
+ * can sit inside other folders, up to 5 levels deep.
113
+ */
114
+ data: CustomerFlowFolderUpdateResponse.Data;
115
+ }
116
+ export declare namespace CustomerFlowFolderUpdateResponse {
117
+ /**
118
+ * A folder that groups customer flows. A flow sits in at most one folder. Folders
119
+ * can sit inside other folders, up to 5 levels deep.
120
+ */
121
+ interface Data {
122
+ id: string;
123
+ /**
124
+ * Whether Roark curates this folder. Built-in folders cannot be deleted or have
125
+ * your flows filed in them.
126
+ */
127
+ builtIn: boolean;
128
+ /**
129
+ * The color the folder is shown with in the app. Folders share the palette labels
130
+ * use.
131
+ */
132
+ color: 'GREEN' | 'RED' | 'ORANGE' | 'PURPLE' | 'GREY' | 'BLUE' | 'PEACH' | 'TEAL' | 'INDIGO' | 'AMBER' | 'ROSE' | 'CYAN';
133
+ /**
134
+ * Creation timestamp in ISO 8601 format
135
+ */
136
+ createdAt: string;
137
+ /**
138
+ * What belongs in this folder.
139
+ */
140
+ description: string | null;
141
+ /**
142
+ * The folder name, unique within its parent folder.
143
+ */
144
+ name: string;
145
+ /**
146
+ * The folder this one sits inside, or null when it is a top-level folder.
147
+ */
148
+ parentId: string | null;
78
149
  /**
79
150
  * Last update timestamp in ISO 8601 format
80
151
  */
@@ -82,14 +153,16 @@ export declare namespace CustomerFlowFolderCreateResponse {
82
153
  }
83
154
  }
84
155
  /**
85
- * The project's customer flow folders, in the order the app shows them.
156
+ * The project's customer flow folders, in the order the app shows them. Subfolders
157
+ * are listed with the rest; rebuild the tree from each folder's `parentId`.
86
158
  */
87
159
  export interface CustomerFlowFolderListResponse {
88
160
  data: Array<CustomerFlowFolderListResponse.Data>;
89
161
  }
90
162
  export declare namespace CustomerFlowFolderListResponse {
91
163
  /**
92
- * A folder that groups customer flows. A flow sits in at most one folder.
164
+ * A folder that groups customer flows. A flow sits in at most one folder. Folders
165
+ * can sit inside other folders, up to 5 levels deep.
93
166
  */
94
167
  interface Data {
95
168
  id: string;
@@ -112,13 +185,17 @@ export declare namespace CustomerFlowFolderListResponse {
112
185
  */
113
186
  description: string | null;
114
187
  /**
115
- * How many flows are in this folder.
188
+ * How many flows are directly in this folder, not counting its subfolders.
116
189
  */
117
190
  flowCount: number;
118
191
  /**
119
- * The folder name, unique within the project.
192
+ * The folder name, unique within its parent folder.
120
193
  */
121
194
  name: string;
195
+ /**
196
+ * The folder this one sits inside, or null when it is a top-level folder.
197
+ */
198
+ parentId: string | null;
122
199
  /**
123
200
  * Last update timestamp in ISO 8601 format
124
201
  */
@@ -138,7 +215,7 @@ export declare namespace CustomerFlowFolderDeleteResponse {
138
215
  }
139
216
  export interface CustomerFlowFolderCreateParams {
140
217
  /**
141
- * The folder name. Must be unique in the project.
218
+ * The folder name. Must be unique within its parent folder, ignoring case.
142
219
  */
143
220
  name: string;
144
221
  /**
@@ -150,8 +227,33 @@ export interface CustomerFlowFolderCreateParams {
150
227
  * What belongs in this folder.
151
228
  */
152
229
  description?: string | null;
230
+ /**
231
+ * Create the folder inside this folder. Omit it, or send null, for a top-level
232
+ * folder.
233
+ */
234
+ parentId?: string | null;
235
+ }
236
+ export interface CustomerFlowFolderUpdateParams {
237
+ /**
238
+ * The color the folder is shown with in the app. Folders share the palette labels
239
+ * use.
240
+ */
241
+ color?: 'GREEN' | 'RED' | 'ORANGE' | 'PURPLE' | 'GREY' | 'BLUE' | 'PEACH' | 'TEAL' | 'INDIGO' | 'AMBER' | 'ROSE' | 'CYAN';
242
+ /**
243
+ * What belongs in this folder. Null clears it.
244
+ */
245
+ description?: string | null;
246
+ /**
247
+ * A new name. Must be unique within the parent folder, ignoring case.
248
+ */
249
+ name?: string;
250
+ /**
251
+ * Moves the folder, with everything in it, inside this folder. Null moves it to
252
+ * the top level; omit it to leave it where it is.
253
+ */
254
+ parentId?: string | null;
153
255
  }
154
256
  export declare namespace CustomerFlowFolder {
155
- export { type CustomerFlowFolderCreateResponse as CustomerFlowFolderCreateResponse, type CustomerFlowFolderListResponse as CustomerFlowFolderListResponse, type CustomerFlowFolderDeleteResponse as CustomerFlowFolderDeleteResponse, type CustomerFlowFolderCreateParams as CustomerFlowFolderCreateParams, };
257
+ export { type CustomerFlowFolderCreateResponse as CustomerFlowFolderCreateResponse, type CustomerFlowFolderUpdateResponse as CustomerFlowFolderUpdateResponse, type CustomerFlowFolderListResponse as CustomerFlowFolderListResponse, type CustomerFlowFolderDeleteResponse as CustomerFlowFolderDeleteResponse, type CustomerFlowFolderCreateParams as CustomerFlowFolderCreateParams, type CustomerFlowFolderUpdateParams as CustomerFlowFolderUpdateParams, };
156
258
  }
157
259
  //# sourceMappingURL=customer-flow-folder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customer-flow-folder.d.ts","sourceRoot":"","sources":["../src/resources/customer-flow-folder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;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,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AE,MAAM,GAAG,IAAI,CAAC;QAE3B;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;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"}
1
+ {"version":3,"file":"customer-flow-folder.d.ts","sourceRoot":"","sources":["../src/resources/customer-flow-folder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAG7D,qBAAa,kBAAmB,SAAQ,WAAW;IACjD;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,IAAI,EAAE,8BAA8B,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gCAAgC,CAAC;IAI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ED,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;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,8BAA8B;IAC7C;;;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;IAE5B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,WAAW,kBAAkB,CAAC;IAC1C,OAAO,EACL,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,8BAA8B,IAAI,8BAA8B,GACtE,CAAC;CACH"}
@@ -6,9 +6,11 @@ const resource_1 = require("../core/resource.js");
6
6
  const path_1 = require("../internal/utils/path.js");
7
7
  class CustomerFlowFolder extends resource_1.APIResource {
8
8
  /**
9
- * Creates a folder to group customer flows. File a flow into it by sending its
10
- * `folderId` when you create or update the flow. Names are unique within a
11
- * project, ignoring case. Customer flows were previously called scenarios.
9
+ * Creates a folder to group customer flows, at the top level or inside another
10
+ * folder with `parentId`. Folders nest up to 5 levels deep. File a flow into it by
11
+ * sending its `folderId` when you create or update the flow. Names are unique
12
+ * within their parent folder, ignoring case. Customer flows were previously called
13
+ * scenarios.
12
14
  *
13
15
  * @example
14
16
  * ```ts
@@ -19,11 +21,29 @@ class CustomerFlowFolder extends resource_1.APIResource {
19
21
  create(body, options) {
20
22
  return this._client.post('/v1/customer-flow/folder', { body, ...options });
21
23
  }
24
+ /**
25
+ * Renames, recolors or moves a folder. Send `parentId` to move it, with its flows
26
+ * and subfolders, inside another folder, or null to move it to the top level.
27
+ * Fields you omit are left as they are. Built-in folders cannot be changed.
28
+ * Customer flows were previously called scenarios.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * const customerFlowFolder =
33
+ * await client.customerFlowFolder.update(
34
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
35
+ * );
36
+ * ```
37
+ */
38
+ update(folderID, body = {}, options) {
39
+ return this._client.put((0, path_1.path) `/v1/customer-flow/folder/${folderID}`, { body, ...options });
40
+ }
22
41
  /**
23
42
  * Returns every folder the project groups its customer flows into, with how many
24
- * flows each holds, in the order the app shows them. Filter the flow list to one
25
- * folder with `GET /v1/customer-flow?folderId=`. Customer flows were previously
26
- * called scenarios.
43
+ * flows each holds, in the order the app shows them. Subfolders are included, each
44
+ * with the `parentId` of the folder it sits in. Filter the flow list to one folder
45
+ * with `GET /v1/customer-flow?folderId=`, adding `includeSubfolders=true` to take
46
+ * in the folders inside it. Customer flows were previously called scenarios.
27
47
  *
28
48
  * @example
29
49
  * ```ts
@@ -35,7 +55,8 @@ class CustomerFlowFolder extends resource_1.APIResource {
35
55
  return this._client.get('/v1/customer-flow/folder', options);
36
56
  }
37
57
  /**
38
- * Deletes a folder. The flows in it are kept and no longer sit in any folder.
58
+ * Deletes a folder. Its flows and subfolders are kept and move up one level: into
59
+ * the folder it sat in, or out of any folder when it was a top-level folder.
39
60
  * Built-in folders cannot be deleted.
40
61
  *
41
62
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"customer-flow-folder.js","sourceRoot":"","sources":["../src/resources/customer-flow-folder.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,kBAAmB,SAAQ,sBAAW;IACjD;;;;;;;;;;OAUG;IACH,MAAM,CACJ,IAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,4BAA4B,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACF;AAlDD,gDAkDC"}
1
+ {"version":3,"file":"customer-flow-folder.js","sourceRoot":"","sources":["../src/resources/customer-flow-folder.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,oDAA8C;AAE9C,MAAa,kBAAmB,SAAQ,sBAAW;IACjD;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,IAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,QAAgB,EAChB,OAA0D,EAAE,EAC5D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,4BAA4B,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,4BAA4B,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACF;AA5ED,gDA4EC"}
@@ -3,9 +3,11 @@ import { APIResource } from "../core/resource.mjs";
3
3
  import { path } from "../internal/utils/path.mjs";
4
4
  export class CustomerFlowFolder extends APIResource {
5
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.
6
+ * Creates a folder to group customer flows, at the top level or inside another
7
+ * folder with `parentId`. Folders nest up to 5 levels deep. File a flow into it by
8
+ * sending its `folderId` when you create or update the flow. Names are unique
9
+ * within their parent folder, ignoring case. Customer flows were previously called
10
+ * scenarios.
9
11
  *
10
12
  * @example
11
13
  * ```ts
@@ -16,11 +18,29 @@ export class CustomerFlowFolder extends APIResource {
16
18
  create(body, options) {
17
19
  return this._client.post('/v1/customer-flow/folder', { body, ...options });
18
20
  }
21
+ /**
22
+ * Renames, recolors or moves a folder. Send `parentId` to move it, with its flows
23
+ * and subfolders, inside another folder, or null to move it to the top level.
24
+ * Fields you omit are left as they are. Built-in folders cannot be changed.
25
+ * Customer flows were previously called scenarios.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * const customerFlowFolder =
30
+ * await client.customerFlowFolder.update(
31
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
32
+ * );
33
+ * ```
34
+ */
35
+ update(folderID, body = {}, options) {
36
+ return this._client.put(path `/v1/customer-flow/folder/${folderID}`, { body, ...options });
37
+ }
19
38
  /**
20
39
  * Returns every folder the project groups its customer flows into, with how many
21
- * flows each holds, in the order the app shows them. Filter the flow list to one
22
- * folder with `GET /v1/customer-flow?folderId=`. Customer flows were previously
23
- * called scenarios.
40
+ * flows each holds, in the order the app shows them. Subfolders are included, each
41
+ * with the `parentId` of the folder it sits in. Filter the flow list to one folder
42
+ * with `GET /v1/customer-flow?folderId=`, adding `includeSubfolders=true` to take
43
+ * in the folders inside it. Customer flows were previously called scenarios.
24
44
  *
25
45
  * @example
26
46
  * ```ts
@@ -32,7 +52,8 @@ export class CustomerFlowFolder extends APIResource {
32
52
  return this._client.get('/v1/customer-flow/folder', options);
33
53
  }
34
54
  /**
35
- * Deletes a folder. The flows in it are kept and no longer sit in any folder.
55
+ * Deletes a folder. Its flows and subfolders are kept and move up one level: into
56
+ * the folder it sat in, or out of any folder when it was a top-level folder.
36
57
  * Built-in folders cannot be deleted.
37
58
  *
38
59
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"customer-flow-folder.mjs","sourceRoot":"","sources":["../src/resources/customer-flow-folder.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IACjD;;;;;;;;;;OAUG;IACH,MAAM,CACJ,IAAoC,EACpC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,I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