@wokuapp/sdk 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -60,6 +60,8 @@ type FetchLike = (input: string, init: {
60
60
  get(name: string): string | null;
61
61
  };
62
62
  text(): Promise<string>;
63
+ /** Needed only by binary downloads such as the folder PDF. */
64
+ arrayBuffer?(): Promise<ArrayBuffer>;
63
65
  }>;
64
66
  interface WokuClientOptions {
65
67
  /** Company secret key. Defaults to `process.env.WOKU_API_KEY`. */
@@ -89,6 +91,11 @@ interface RequestArgs extends RequestOptions {
89
91
  * (send/approve/test) so they are never silently replayed.
90
92
  */
91
93
  idempotent?: boolean;
94
+ /**
95
+ * Return a successful response as raw bytes (`Uint8Array`) instead of parsed
96
+ * JSON. Error responses are still parsed and mapped to API errors.
97
+ */
98
+ binary?: boolean;
92
99
  }
93
100
  /**
94
101
  * Transport core: turns a resource call into an authenticated HTTP request
@@ -158,6 +165,99 @@ interface components {
158
165
  clientEmail?: string;
159
166
  clientPhone?: string;
160
167
  };
168
+ FollowUpOriginDto: {
169
+ /** @enum {string} */
170
+ tool: "woku" | "nps" | "csat" | "ces";
171
+ refId: string;
172
+ instrumentId?: string;
173
+ };
174
+ FollowUpAttachmentDto: {
175
+ /** @description Stable number of the file in the conversation (survey prelude included). */
176
+ index: number;
177
+ /** @description Display label in the conversation language, e.g. "Archivo 2" or "File 2". Summaries cite files by this label. */
178
+ label: string;
179
+ /** @enum {string} */
180
+ kind: "image" | "audio" | "document" | "unsupported";
181
+ /** @description Private original file (evidence). Absent while pending or when nothing was stored (location, contacts, over the limits). */
182
+ fileId?: string;
183
+ /** @description Converted copy the model read, when there was a conversion. */
184
+ readableFileId?: string;
185
+ filename: string;
186
+ mimeType: string;
187
+ /** @enum {string} */
188
+ status: "pending" | "ready" | "failed" | "unsupported";
189
+ /** @description Transcript (audio) or description (image, document) generated from the file. Untrusted customer content. */
190
+ text?: string;
191
+ /** @description Stable reason code when failed or unsupported (e.g. video, location, message_limit, conversation_limit, read_failed). */
192
+ failureReason?: string;
193
+ /** @description Admin page that opens this file after login and a company check (signed, short-lived download). Never a storage URL. */
194
+ adminUrl?: string;
195
+ };
196
+ FollowUpMessageDto: {
197
+ /** @enum {string} */
198
+ role: "agent" | "client";
199
+ /** @description Message text. May be empty when the message only has files. */
200
+ content: string;
201
+ /** Format: date-time */
202
+ timestamp: string;
203
+ /**
204
+ * @description survey: the prelude, what the customer said in the survey before the follow-up. On the survey_thread line it is the WhatsApp survey exchange; on every other line (follow_up_number, email) it is the original comment as a client message. follow_up: the follow-up itself. Every line may start with the prelude, so messages[0] can be a client message; filter phase === 'follow_up' to read only the follow-up.
205
+ * @enum {string}
206
+ */
207
+ phase: "survey" | "follow_up";
208
+ responseType?: string;
209
+ selectedOption?: string;
210
+ /** @description Files the customer sent with this message. */
211
+ attachments?: components["schemas"]["FollowUpAttachmentDto"][];
212
+ };
213
+ FollowUpCitationDto: {
214
+ index: number;
215
+ /** @description Label of the cited file, e.g. "Archivo 2". */
216
+ label: string;
217
+ fileId?: string;
218
+ /** @description What the file supports in the summary. */
219
+ supports: string;
220
+ /** @description Admin page that opens this file after login and a company check (signed, short-lived download). Never a storage URL. */
221
+ adminUrl?: string;
222
+ };
223
+ FollowUpConversationDto: {
224
+ _id: string;
225
+ companyId: string;
226
+ origin: components["schemas"]["FollowUpOriginDto"];
227
+ wokuId?: string;
228
+ reviewId?: string;
229
+ /** @enum {string} */
230
+ reviewType: "textnote" | "voicemail";
231
+ originalReview: string;
232
+ originalQualification?: number;
233
+ /** @enum {string} */
234
+ state: "pending" | "initial_sent" | "awaiting_detail" | "closing" | "completed" | "timed_out" | "cancelled";
235
+ /** @enum {string} */
236
+ channel: "email" | "whatsapp";
237
+ /**
238
+ * @description WhatsApp line. survey_thread: the agent continues the survey conversation on the survey number. follow_up_number: the agent writes from the dedicated follow-up number. Absent for email.
239
+ * @enum {string}
240
+ */
241
+ line?: "survey_thread" | "follow_up_number";
242
+ /** @description Stable reason code for exclusion, failure or uncertain delivery. Provider error details are never exposed. */
243
+ reason?: string;
244
+ /** @description Messages in order: the survey prelude (phase survey) first, then the follow-up (phase follow_up). Filter phase === 'follow_up' for the follow-up messages only. */
245
+ messages: components["schemas"]["FollowUpMessageDto"][];
246
+ executiveSummary?: string;
247
+ actionItems?: string[];
248
+ sentiment?: string;
249
+ topics?: string[];
250
+ /** @description Files the summary cites; the summary text mentions them as "(Archivo N)". */
251
+ summaryCitations?: components["schemas"]["FollowUpCitationDto"][];
252
+ summaryVersion: number;
253
+ /** Format: date-time */
254
+ createdAt?: string;
255
+ /** Format: date-time */
256
+ updatedAt?: string;
257
+ };
258
+ FollowUpEnvelopeDto: {
259
+ data: components["schemas"]["FollowUpConversationDto"];
260
+ };
161
261
  CreateExternalTrackerDefinitionDTO: {
162
262
  /**
163
263
  * @description Tracker name. Identifies the tracker within the company catalog. Unique per company.
@@ -229,6 +329,33 @@ interface components {
229
329
  */
230
330
  value: string;
231
331
  };
332
+ CustomTicketDestinationUpdateDto: {
333
+ /**
334
+ * @description upsert explicitly reuses the creation URL/method with a stable externalId. remote-id updates the previously created remote resource.
335
+ * @enum {string}
336
+ */
337
+ mode: "upsert" | "remote-id";
338
+ /** @description remote-id only: same-origin URL containing {{remoteId}}; credentials and fragments are forbidden. */
339
+ url?: string;
340
+ /**
341
+ * @description remote-id only.
342
+ * @default PATCH
343
+ * @enum {string}
344
+ */
345
+ method: "PUT" | "PATCH";
346
+ /** @description Dot-separated path to the ID in the creation response, required for remote-id. Prototype keys are forbidden. */
347
+ responseIdPath?: string;
348
+ };
349
+ CustomTicketDestinationConfigDto: {
350
+ /** Format: uri */
351
+ url: string;
352
+ /** @enum {string} */
353
+ method?: "POST" | "PUT";
354
+ headers?: {
355
+ [key: string]: string;
356
+ };
357
+ update?: components["schemas"]["CustomTicketDestinationUpdateDto"];
358
+ };
232
359
  TicketRoutingConditionDto: {
233
360
  /** @enum {string} */
234
361
  relationToPrevious?: "AND" | "OR";
@@ -251,10 +378,12 @@ interface components {
251
378
  V1CreateTicketDestinationDto: {
252
379
  /** @example Zendesk Soporte Chile */
253
380
  name: string;
254
- /** @description Non-secret provider config (validated per kind). */
381
+ /** @description Kind-specific destination configuration. Custom update is optional and explicit; omission never causes a second create. */
255
382
  config: {
256
383
  [key: string]: unknown;
257
- };
384
+ } & (components["schemas"]["CustomTicketDestinationConfigDto"] | {
385
+ [key: string]: unknown;
386
+ });
258
387
  /** @description Provider credentials (write-only, encrypted). */
259
388
  credentials: {
260
389
  [key: string]: string;
@@ -268,9 +397,12 @@ interface components {
268
397
  };
269
398
  V1UpdateTicketDestinationDto: {
270
399
  name?: string;
400
+ /** @description Kind-specific configuration including explicit custom update capability. */
271
401
  config?: {
272
402
  [key: string]: unknown;
273
- };
403
+ } & (components["schemas"]["CustomTicketDestinationConfigDto"] | {
404
+ [key: string]: unknown;
405
+ });
274
406
  /** @description Present = credential rotation. */
275
407
  credentials?: {
276
408
  [key: string]: string;
@@ -407,6 +539,16 @@ interface components {
407
539
  folderId: string | null;
408
540
  };
409
541
  V1CreateTextnoteBodyDto: {
542
+ /**
543
+ * @description Collection provenance. Omitted historical inputs remain unknown and cannot start follow-up.
544
+ * @enum {string}
545
+ */
546
+ collectionKind?: "standalone" | "flow";
547
+ /**
548
+ * Format: ObjectId
549
+ * @description Required for flow captures; validated against the company and instrument.
550
+ */
551
+ flowId?: string;
410
552
  /** @description Opaque invitation or prepared journey-entry response token. Consumed after saving feedback; never stored on the review. */
411
553
  dispatchToken?: string;
412
554
  /**
@@ -429,6 +571,16 @@ interface components {
429
571
  responseChannel?: string;
430
572
  };
431
573
  V1CreateVoicemailBodyDto: {
574
+ /**
575
+ * @description Collection provenance. Omitted historical inputs remain unknown and cannot start follow-up.
576
+ * @enum {string}
577
+ */
578
+ collectionKind?: "standalone" | "flow";
579
+ /**
580
+ * Format: ObjectId
581
+ * @description Required for flow captures; validated against the company and instrument.
582
+ */
583
+ flowId?: string;
432
584
  /** @description Opaque invitation or prepared journey-entry response token. Consumed after saving feedback; never stored on the review. */
433
585
  dispatchToken?: string;
434
586
  /**
@@ -488,6 +640,16 @@ interface components {
488
640
  revoked: boolean;
489
641
  };
490
642
  V1CreateNpsBodyDto: {
643
+ /**
644
+ * @description Collection provenance. Omitted historical inputs remain unknown and cannot start follow-up.
645
+ * @enum {string}
646
+ */
647
+ collectionKind?: "standalone" | "flow";
648
+ /**
649
+ * Format: ObjectId
650
+ * @description Required for flow captures; validated against the company and instrument.
651
+ */
652
+ flowId?: string;
491
653
  /**
492
654
  * @description NPS score 0-10 (0-6 detractor, 7-8 passive, 9-10 promoter)
493
655
  * @example 9
@@ -526,6 +688,16 @@ interface components {
526
688
  description: string;
527
689
  };
528
690
  V1CreateCsatBodyDto: {
691
+ /**
692
+ * @description Collection provenance. Omitted historical inputs remain unknown and cannot start follow-up.
693
+ * @enum {string}
694
+ */
695
+ collectionKind?: "standalone" | "flow";
696
+ /**
697
+ * Format: ObjectId
698
+ * @description Required for flow captures; validated against the company and instrument.
699
+ */
700
+ flowId?: string;
529
701
  /**
530
702
  * @description CSAT satisfaction score 1-5
531
703
  * @example 4
@@ -559,6 +731,16 @@ interface components {
559
731
  description: string;
560
732
  };
561
733
  V1CreateCesBodyDto: {
734
+ /**
735
+ * @description Collection provenance. Omitted historical inputs remain unknown and cannot start follow-up.
736
+ * @enum {string}
737
+ */
738
+ collectionKind?: "standalone" | "flow";
739
+ /**
740
+ * Format: ObjectId
741
+ * @description Required for flow captures; validated against the company and instrument.
742
+ */
743
+ flowId?: string;
562
744
  /**
563
745
  * @description CES effort score 1-5
564
746
  * @example 4
@@ -608,6 +790,16 @@ interface components {
608
790
  externalId?: string;
609
791
  };
610
792
  V1CaptureBodyDto: {
793
+ /**
794
+ * @description Collection provenance. Omitted historical inputs remain unknown and cannot start follow-up.
795
+ * @enum {string}
796
+ */
797
+ collectionKind?: "standalone" | "flow";
798
+ /**
799
+ * Format: ObjectId
800
+ * @description Required for flow captures; validated against the company and instrument.
801
+ */
802
+ flowId?: string;
611
803
  /** @description Opaque invitation or prepared journey-entry response token. Consumed after saving feedback; never stored on the review. */
612
804
  dispatchToken?: string;
613
805
  /** @description Client-generated idempotency id */
@@ -802,6 +994,29 @@ interface components {
802
994
  */
803
995
  dispatchToken?: string;
804
996
  };
997
+ FlowStepBodyDTO: {
998
+ /**
999
+ * @description Kind of tool the respondent answers in this step.
1000
+ * @enum {string}
1001
+ */
1002
+ type: "woku" | "nps" | "csat" | "ces";
1003
+ /**
1004
+ * Format: ObjectId
1005
+ * @description Tool id (woku, NPS tool, CSAT tool or CES tool). For an nps step, your company id means the company-level NPS.
1006
+ */
1007
+ toolId: string;
1008
+ };
1009
+ CreateFlowBodyDTO: {
1010
+ /** @example Post-purchase journey */
1011
+ name: string;
1012
+ /** @description Ordered steps. A tool can appear once. Flows live outside folders. */
1013
+ steps: components["schemas"]["FlowStepBodyDTO"][];
1014
+ };
1015
+ UpdateFlowBodyDTO: {
1016
+ name?: string;
1017
+ /** @description The new full ordered list of steps. */
1018
+ steps?: components["schemas"]["FlowStepBodyDTO"][];
1019
+ };
805
1020
  NpsToolLocalizedContentBodyDTO: {
806
1021
  /**
807
1022
  * @example en
@@ -820,6 +1035,11 @@ interface components {
820
1035
  audienceType?: string;
821
1036
  };
822
1037
  CreateNpsToolBodyDTO: {
1038
+ /**
1039
+ * Format: ObjectId
1040
+ * @description Folder to create the tool in. Must belong to your company. Omit for the root.
1041
+ */
1042
+ folderId?: string;
823
1043
  /**
824
1044
  * @description Tool name for identification.
825
1045
  * @example Post-Purchase Survey
@@ -874,6 +1094,13 @@ interface components {
874
1094
  defaultLocale?: "es" | "en";
875
1095
  localizedContent?: components["schemas"]["NpsToolLocalizedContentBodyDTO"][];
876
1096
  };
1097
+ MoveToolBodyDTO: {
1098
+ /**
1099
+ * Format: ObjectId
1100
+ * @description Target folder id, or null to move the tool to the root.
1101
+ */
1102
+ folderId: string | null;
1103
+ };
877
1104
  CsatToolLocalizedContentBodyDTO: {
878
1105
  /**
879
1106
  * @example en
@@ -892,6 +1119,11 @@ interface components {
892
1119
  subject?: string;
893
1120
  };
894
1121
  CreateCsatToolBodyDTO: {
1122
+ /**
1123
+ * Format: ObjectId
1124
+ * @description Folder to create the tool in. Must belong to your company. Omit for the root.
1125
+ */
1126
+ folderId?: string;
895
1127
  /**
896
1128
  * @description Tool name for identification.
897
1129
  * @example Post-Purchase CSAT
@@ -956,6 +1188,11 @@ interface components {
956
1188
  action?: string;
957
1189
  };
958
1190
  CreateCesToolBodyDTO: {
1191
+ /**
1192
+ * Format: ObjectId
1193
+ * @description Folder to create the tool in. Must belong to your company. Omit for the root.
1194
+ */
1195
+ folderId?: string;
959
1196
  /**
960
1197
  * @description Tool name for identification.
961
1198
  * @example Post-Purchase Effort
@@ -1002,6 +1239,96 @@ interface components {
1002
1239
  defaultLocale?: "es" | "en";
1003
1240
  localizedContent?: components["schemas"]["CesToolLocalizedContentBodyDTO"][];
1004
1241
  };
1242
+ PublicTicketOriginDto: {
1243
+ /** @enum {string} */
1244
+ tool: "woku" | "nps" | "form" | "csat" | "ces";
1245
+ refId: string;
1246
+ instrumentId?: string;
1247
+ instrumentName?: string;
1248
+ trackers?: {
1249
+ trackerId?: string;
1250
+ name?: string;
1251
+ value?: string;
1252
+ }[];
1253
+ };
1254
+ TicketFollowUpDto: {
1255
+ conversationId?: string;
1256
+ /** @enum {string} */
1257
+ state: "not_applicable" | "pending" | "initial_sent" | "awaiting_detail" | "closing" | "completed" | "timed_out" | "cancelled";
1258
+ reason?: string;
1259
+ availableSummaryVersion?: number;
1260
+ /**
1261
+ * @description Current result of applying follow-up evidence to the ticket.
1262
+ * @enum {string}
1263
+ */
1264
+ enrichmentState?: "processing" | "applied" | "failed" | "skipped";
1265
+ /** @description Machine-readable reason for the enrichment result, without provider details or credentials. */
1266
+ enrichmentReason?: string;
1267
+ /** @description Last summary version successfully applied to this ticket. Conversation completion alone does not imply enrichment. */
1268
+ appliedSummaryVersion?: number;
1269
+ /** Format: date-time */
1270
+ enrichedAt?: string;
1271
+ };
1272
+ PublicTicketDto: {
1273
+ _id: string;
1274
+ code?: string;
1275
+ title: string;
1276
+ /** @enum {string} */
1277
+ severity: "high" | "medium" | "low";
1278
+ destinationId?: string;
1279
+ origin: components["schemas"]["PublicTicketOriginDto"];
1280
+ /**
1281
+ * @description Monotonic version of generated ticket content.
1282
+ * @default 1
1283
+ */
1284
+ contentVersion: number;
1285
+ followUp?: components["schemas"]["TicketFollowUpDto"];
1286
+ score?: {
1287
+ value?: number;
1288
+ max?: number;
1289
+ kind?: string;
1290
+ display?: string;
1291
+ };
1292
+ aiSummary?: string;
1293
+ aiCategory?: string;
1294
+ caseDescription?: string;
1295
+ historyHighlights?: string[];
1296
+ whatCustomerWants?: string;
1297
+ suggestedResolution?: string;
1298
+ language?: string;
1299
+ churnRisk?: string;
1300
+ criteria?: string[];
1301
+ historySnapshot?: {
1302
+ [key: string]: unknown;
1303
+ };
1304
+ sentiment?: string;
1305
+ generatedByAI?: boolean;
1306
+ customerComment?: {
1307
+ text?: string;
1308
+ isAudio?: boolean;
1309
+ audioUrl?: string;
1310
+ transcription?: string;
1311
+ };
1312
+ client?: {
1313
+ clientId?: string;
1314
+ name?: string;
1315
+ email?: string;
1316
+ phone?: string;
1317
+ };
1318
+ timeline?: {
1319
+ [key: string]: unknown;
1320
+ }[];
1321
+ /** Format: date-time */
1322
+ createdAt?: string;
1323
+ /** Format: date-time */
1324
+ updatedAt?: string;
1325
+ };
1326
+ PublicTicketsPageDto: {
1327
+ data: components["schemas"]["PublicTicketDto"][];
1328
+ total: number;
1329
+ page: number;
1330
+ limit: number;
1331
+ };
1005
1332
  UpdateTicketBodyDTO: {
1006
1333
  title?: string;
1007
1334
  /** @enum {string} */
@@ -1482,6 +1809,59 @@ interface components {
1482
1809
  V1JourneyEventResponseDto: {
1483
1810
  journeys: number;
1484
1811
  };
1812
+ CreateFolderBodyDTO: {
1813
+ /** @example Post-sale */
1814
+ name: string;
1815
+ /**
1816
+ * Format: ObjectId
1817
+ * @description Parent folder. Omit to create the folder at the root.
1818
+ */
1819
+ parentFolderId?: string;
1820
+ /** @example #3498db */
1821
+ color?: string;
1822
+ };
1823
+ WhatsappAlertRecipientDTO: {
1824
+ /**
1825
+ * @description E.164 phone number without the leading +.
1826
+ * @example 56912345678
1827
+ */
1828
+ whatsappId: string;
1829
+ /** @example Ana (support) */
1830
+ name: string;
1831
+ /** @description Kinds of comment that alert this number. Defaults to all four. */
1832
+ sources?: ("woku" | "nps" | "csat" | "ces")[];
1833
+ };
1834
+ UpdateFolderBodyDTO: {
1835
+ name?: string;
1836
+ /**
1837
+ * @description Hex color, or null to clear it.
1838
+ * @example #3498db
1839
+ */
1840
+ color?: string | null;
1841
+ /** @description Replaces the WhatsApp numbers alerted when a comment of any tool in this folder is an improvement (wokus, NPS, CSAT, CES). Send [] to clear. */
1842
+ whatsappAlertRecipients?: components["schemas"]["WhatsappAlertRecipientDTO"][];
1843
+ };
1844
+ MoveFolderBodyDTO: {
1845
+ /**
1846
+ * Format: ObjectId
1847
+ * @description New parent folder, or null to move the folder to the root. A folder cannot move into itself or one of its subfolders.
1848
+ */
1849
+ parentFolderId: string | null;
1850
+ };
1851
+ MoveItemDTO: {
1852
+ /** @enum {string} */
1853
+ type: "woku" | "nps" | "csat" | "ces" | "folder";
1854
+ /** Format: ObjectId */
1855
+ id: string;
1856
+ };
1857
+ MoveToolItemsBodyDTO: {
1858
+ items: components["schemas"]["MoveItemDTO"][];
1859
+ /**
1860
+ * Format: ObjectId
1861
+ * @description Destination folder. `null` moves the items to the root.
1862
+ */
1863
+ folderId: string | null;
1864
+ };
1485
1865
  JourneyEntryInfoDto: {
1486
1866
  name?: string;
1487
1867
  momentName?: string;
@@ -1519,6 +1899,34 @@ interface components {
1519
1899
  pathItems: never;
1520
1900
  }
1521
1901
  interface operations {
1902
+ V1FollowUpsController_get: {
1903
+ parameters: {
1904
+ query?: never;
1905
+ header?: never;
1906
+ path: {
1907
+ id: string;
1908
+ };
1909
+ cookie?: never;
1910
+ };
1911
+ requestBody?: never;
1912
+ responses: {
1913
+ 200: {
1914
+ headers: {
1915
+ [name: string]: unknown;
1916
+ };
1917
+ content: {
1918
+ "application/json": components["schemas"]["FollowUpEnvelopeDto"];
1919
+ };
1920
+ };
1921
+ /** @description Follow-up not found in this company */
1922
+ 404: {
1923
+ headers: {
1924
+ [name: string]: unknown;
1925
+ };
1926
+ content?: never;
1927
+ };
1928
+ };
1929
+ };
1522
1930
  V1Controller_health: {
1523
1931
  parameters: {
1524
1932
  query?: never;
@@ -4337,6 +4745,40 @@ interface operations {
4337
4745
  };
4338
4746
  };
4339
4747
  };
4748
+ V1FlowsController_createFlow: {
4749
+ parameters: {
4750
+ query?: never;
4751
+ header?: {
4752
+ /** @description Client-generated key to make the create safe to retry. A retry with the same key returns the original result instead of creating again. */
4753
+ "X-Woku-Idempotency-Key"?: string;
4754
+ };
4755
+ path?: never;
4756
+ cookie?: never;
4757
+ };
4758
+ requestBody: {
4759
+ content: {
4760
+ "application/json": components["schemas"]["CreateFlowBodyDTO"];
4761
+ };
4762
+ };
4763
+ responses: {
4764
+ /** @description Flow created */
4765
+ 201: {
4766
+ headers: {
4767
+ [name: string]: unknown;
4768
+ };
4769
+ content?: never;
4770
+ };
4771
+ /** @description Validation error or a step is not a tool of your company */
4772
+ 400: {
4773
+ headers: {
4774
+ [name: string]: unknown;
4775
+ };
4776
+ content: {
4777
+ "application/json": components["schemas"]["ValidationErrorResponseDto"];
4778
+ };
4779
+ };
4780
+ };
4781
+ };
4340
4782
  V1FlowsController_getFlow: {
4341
4783
  parameters: {
4342
4784
  query?: never;
@@ -4372,60 +4814,118 @@ interface operations {
4372
4814
  };
4373
4815
  };
4374
4816
  };
4375
- V1NpsDataController_listNpsTools: {
4817
+ V1FlowsController_deleteFlow: {
4376
4818
  parameters: {
4377
- query?: {
4378
- page?: number;
4379
- limit?: number;
4380
- };
4819
+ query?: never;
4381
4820
  header?: never;
4382
- path?: never;
4821
+ path: {
4822
+ id: string;
4823
+ };
4383
4824
  cookie?: never;
4384
4825
  };
4385
4826
  requestBody?: never;
4386
4827
  responses: {
4387
- /** @description Paginated NPS tools */
4828
+ /** @description Flow deleted */
4388
4829
  200: {
4389
4830
  headers: {
4390
4831
  [name: string]: unknown;
4391
4832
  };
4392
4833
  content?: never;
4393
4834
  };
4835
+ /** @description Flow not found */
4836
+ 404: {
4837
+ headers: {
4838
+ [name: string]: unknown;
4839
+ };
4840
+ content?: never;
4841
+ };
4394
4842
  };
4395
4843
  };
4396
- V1NpsToolsController_createNpsTool: {
4844
+ V1FlowsController_updateFlow: {
4397
4845
  parameters: {
4398
4846
  query?: never;
4399
- header?: {
4400
- /** @description Client-generated key to make the create safe to retry. A retry with the same key returns the original result instead of creating again. */
4401
- "X-Woku-Idempotency-Key"?: string;
4847
+ header?: never;
4848
+ path: {
4849
+ id: string;
4402
4850
  };
4403
- path?: never;
4404
4851
  cookie?: never;
4405
4852
  };
4406
4853
  requestBody: {
4407
4854
  content: {
4408
- "application/json": components["schemas"]["CreateNpsToolBodyDTO"];
4855
+ "application/json": components["schemas"]["UpdateFlowBodyDTO"];
4409
4856
  };
4410
4857
  };
4411
4858
  responses: {
4412
- /** @description NPS tool created */
4413
- 201: {
4859
+ /** @description Flow updated */
4860
+ 200: {
4414
4861
  headers: {
4415
4862
  [name: string]: unknown;
4416
4863
  };
4417
4864
  content?: never;
4418
4865
  };
4419
- /** @description Validation error */
4420
- 400: {
4866
+ /** @description Flow not found */
4867
+ 404: {
4421
4868
  headers: {
4422
4869
  [name: string]: unknown;
4423
4870
  };
4424
- content: {
4425
- "application/json": components["schemas"]["ValidationErrorResponseDto"];
4426
- };
4871
+ content?: never;
4427
4872
  };
4428
- /** @description Invalid or missing API key */
4873
+ };
4874
+ };
4875
+ V1NpsDataController_listNpsTools: {
4876
+ parameters: {
4877
+ query?: {
4878
+ page?: number;
4879
+ limit?: number;
4880
+ };
4881
+ header?: never;
4882
+ path?: never;
4883
+ cookie?: never;
4884
+ };
4885
+ requestBody?: never;
4886
+ responses: {
4887
+ /** @description Paginated NPS tools */
4888
+ 200: {
4889
+ headers: {
4890
+ [name: string]: unknown;
4891
+ };
4892
+ content?: never;
4893
+ };
4894
+ };
4895
+ };
4896
+ V1NpsToolsController_createNpsTool: {
4897
+ parameters: {
4898
+ query?: never;
4899
+ header?: {
4900
+ /** @description Client-generated key to make the create safe to retry. A retry with the same key returns the original result instead of creating again. */
4901
+ "X-Woku-Idempotency-Key"?: string;
4902
+ };
4903
+ path?: never;
4904
+ cookie?: never;
4905
+ };
4906
+ requestBody: {
4907
+ content: {
4908
+ "application/json": components["schemas"]["CreateNpsToolBodyDTO"];
4909
+ };
4910
+ };
4911
+ responses: {
4912
+ /** @description NPS tool created */
4913
+ 201: {
4914
+ headers: {
4915
+ [name: string]: unknown;
4916
+ };
4917
+ content?: never;
4918
+ };
4919
+ /** @description Validation error */
4920
+ 400: {
4921
+ headers: {
4922
+ [name: string]: unknown;
4923
+ };
4924
+ content: {
4925
+ "application/json": components["schemas"]["ValidationErrorResponseDto"];
4926
+ };
4927
+ };
4928
+ /** @description Invalid or missing API key */
4429
4929
  403: {
4430
4930
  headers: {
4431
4931
  [name: string]: unknown;
@@ -4713,6 +5213,37 @@ interface operations {
4713
5213
  };
4714
5214
  };
4715
5215
  };
5216
+ V1NpsToolsController_moveNpsTool: {
5217
+ parameters: {
5218
+ query?: never;
5219
+ header?: never;
5220
+ path: {
5221
+ id: string;
5222
+ };
5223
+ cookie?: never;
5224
+ };
5225
+ requestBody: {
5226
+ content: {
5227
+ "application/json": components["schemas"]["MoveToolBodyDTO"];
5228
+ };
5229
+ };
5230
+ responses: {
5231
+ /** @description NPS tool moved */
5232
+ 200: {
5233
+ headers: {
5234
+ [name: string]: unknown;
5235
+ };
5236
+ content?: never;
5237
+ };
5238
+ /** @description Tool or folder not found */
5239
+ 404: {
5240
+ headers: {
5241
+ [name: string]: unknown;
5242
+ };
5243
+ content?: never;
5244
+ };
5245
+ };
5246
+ };
4716
5247
  V1CsatToolsController_deleteCsatTool: {
4717
5248
  parameters: {
4718
5249
  query?: never;
@@ -4780,6 +5311,37 @@ interface operations {
4780
5311
  };
4781
5312
  };
4782
5313
  };
5314
+ V1CsatToolsController_moveCsatTool: {
5315
+ parameters: {
5316
+ query?: never;
5317
+ header?: never;
5318
+ path: {
5319
+ id: string;
5320
+ };
5321
+ cookie?: never;
5322
+ };
5323
+ requestBody: {
5324
+ content: {
5325
+ "application/json": components["schemas"]["MoveToolBodyDTO"];
5326
+ };
5327
+ };
5328
+ responses: {
5329
+ /** @description Csat tool moved */
5330
+ 200: {
5331
+ headers: {
5332
+ [name: string]: unknown;
5333
+ };
5334
+ content?: never;
5335
+ };
5336
+ /** @description Tool or folder not found */
5337
+ 404: {
5338
+ headers: {
5339
+ [name: string]: unknown;
5340
+ };
5341
+ content?: never;
5342
+ };
5343
+ };
5344
+ };
4783
5345
  V1CesToolsController_deleteCesTool: {
4784
5346
  parameters: {
4785
5347
  query?: never;
@@ -4847,6 +5409,37 @@ interface operations {
4847
5409
  };
4848
5410
  };
4849
5411
  };
5412
+ V1CesToolsController_moveCesTool: {
5413
+ parameters: {
5414
+ query?: never;
5415
+ header?: never;
5416
+ path: {
5417
+ id: string;
5418
+ };
5419
+ cookie?: never;
5420
+ };
5421
+ requestBody: {
5422
+ content: {
5423
+ "application/json": components["schemas"]["MoveToolBodyDTO"];
5424
+ };
5425
+ };
5426
+ responses: {
5427
+ /** @description Ces tool moved */
5428
+ 200: {
5429
+ headers: {
5430
+ [name: string]: unknown;
5431
+ };
5432
+ content?: never;
5433
+ };
5434
+ /** @description Tool or folder not found */
5435
+ 404: {
5436
+ headers: {
5437
+ [name: string]: unknown;
5438
+ };
5439
+ content?: never;
5440
+ };
5441
+ };
5442
+ };
4850
5443
  V1TicketsController_listTickets: {
4851
5444
  parameters: {
4852
5445
  query?: {
@@ -4875,7 +5468,9 @@ interface operations {
4875
5468
  headers: {
4876
5469
  [name: string]: unknown;
4877
5470
  };
4878
- content?: never;
5471
+ content: {
5472
+ "application/json": components["schemas"]["PublicTicketsPageDto"];
5473
+ };
4879
5474
  };
4880
5475
  /** @description Validation error */
4881
5476
  400: {
@@ -4929,7 +5524,9 @@ interface operations {
4929
5524
  headers: {
4930
5525
  [name: string]: unknown;
4931
5526
  };
4932
- content?: never;
5527
+ content: {
5528
+ "application/json": components["schemas"]["PublicTicketDto"];
5529
+ };
4933
5530
  };
4934
5531
  /** @description Ticket not found */
4935
5532
  404: {
@@ -4960,7 +5557,9 @@ interface operations {
4960
5557
  headers: {
4961
5558
  [name: string]: unknown;
4962
5559
  };
4963
- content?: never;
5560
+ content: {
5561
+ "application/json": components["schemas"]["PublicTicketDto"];
5562
+ };
4964
5563
  };
4965
5564
  /** @description Validation error */
4966
5565
  400: {
@@ -5823,33 +6422,62 @@ interface operations {
5823
6422
  };
5824
6423
  };
5825
6424
  };
5826
- CustomJourneyEntryController_info: {
6425
+ V1FoldersController_listFolders: {
5827
6426
  parameters: {
5828
- query?: never;
5829
- header?: never;
5830
- path: {
5831
- journeyId: string;
6427
+ query?: {
6428
+ /** @description List only the direct subfolders of this folder. Omit to list every folder of the company. */
6429
+ parentFolderId?: string;
6430
+ /** @description Case and accent insensitive match on the folder name. */
6431
+ q?: string;
5832
6432
  };
6433
+ header?: never;
6434
+ path?: never;
5833
6435
  cookie?: never;
5834
6436
  };
5835
6437
  requestBody?: never;
5836
6438
  responses: {
6439
+ /** @description Folders */
5837
6440
  200: {
5838
6441
  headers: {
5839
6442
  [name: string]: unknown;
5840
6443
  };
5841
- content: {
5842
- "application/json": components["schemas"]["JourneyEntryInfoDto"];
6444
+ content?: never;
6445
+ };
6446
+ };
6447
+ };
6448
+ V1FoldersController_createFolder: {
6449
+ parameters: {
6450
+ query?: never;
6451
+ header?: {
6452
+ /** @description Client-generated key to make the create safe to retry. A retry with the same key returns the original result instead of creating again. */
6453
+ "X-Woku-Idempotency-Key"?: string;
6454
+ };
6455
+ path?: never;
6456
+ cookie?: never;
6457
+ };
6458
+ requestBody: {
6459
+ content: {
6460
+ "application/json": components["schemas"]["CreateFolderBodyDTO"];
6461
+ };
6462
+ };
6463
+ responses: {
6464
+ /** @description Folder created */
6465
+ 201: {
6466
+ headers: {
6467
+ [name: string]: unknown;
5843
6468
  };
6469
+ content?: never;
5844
6470
  };
5845
- /** @description Invalid contact, case reference or request ID */
6471
+ /** @description Validation error */
5846
6472
  400: {
5847
6473
  headers: {
5848
6474
  [name: string]: unknown;
5849
6475
  };
5850
- content?: never;
6476
+ content: {
6477
+ "application/json": components["schemas"]["ValidationErrorResponseDto"];
6478
+ };
5851
6479
  };
5852
- /** @description This evaluation is not available */
6480
+ /** @description Parent folder not found */
5853
6481
  404: {
5854
6482
  headers: {
5855
6483
  [name: string]: unknown;
@@ -5858,52 +6486,84 @@ interface operations {
5858
6486
  };
5859
6487
  };
5860
6488
  };
5861
- CustomJourneyEntryController_prepare: {
6489
+ V1FoldersController_getFolder: {
5862
6490
  parameters: {
5863
6491
  query?: never;
5864
6492
  header?: never;
5865
6493
  path: {
5866
- journeyId: string;
6494
+ id: string;
5867
6495
  };
5868
6496
  cookie?: never;
5869
6497
  };
5870
- requestBody: {
5871
- content: {
5872
- "application/json": components["schemas"]["PrepareJourneyEntryDto"];
5873
- };
5874
- };
6498
+ requestBody?: never;
5875
6499
  responses: {
5876
- 201: {
6500
+ /** @description Folder */
6501
+ 200: {
5877
6502
  headers: {
5878
6503
  [name: string]: unknown;
5879
6504
  };
5880
- content: {
5881
- "application/json": components["schemas"]["PreparedJourneyEntryDto"];
6505
+ content?: never;
6506
+ };
6507
+ /** @description Folder not found */
6508
+ 404: {
6509
+ headers: {
6510
+ [name: string]: unknown;
5882
6511
  };
6512
+ content?: never;
5883
6513
  };
5884
- /** @description Invalid contact, case reference or request ID */
5885
- 400: {
6514
+ };
6515
+ };
6516
+ V1FoldersController_deleteFolder: {
6517
+ parameters: {
6518
+ query?: never;
6519
+ header?: never;
6520
+ path: {
6521
+ id: string;
6522
+ };
6523
+ cookie?: never;
6524
+ };
6525
+ requestBody?: never;
6526
+ responses: {
6527
+ /** @description Folder deleted */
6528
+ 200: {
5886
6529
  headers: {
5887
6530
  [name: string]: unknown;
5888
6531
  };
5889
6532
  content?: never;
5890
6533
  };
5891
- /** @description This evaluation is not available */
6534
+ /** @description Folder not found */
5892
6535
  404: {
5893
6536
  headers: {
5894
6537
  [name: string]: unknown;
5895
6538
  };
5896
6539
  content?: never;
5897
6540
  };
5898
- /** @description Customer or case already has an active evaluation */
5899
- 409: {
6541
+ };
6542
+ };
6543
+ V1FoldersController_updateFolder: {
6544
+ parameters: {
6545
+ query?: never;
6546
+ header?: never;
6547
+ path: {
6548
+ id: string;
6549
+ };
6550
+ cookie?: never;
6551
+ };
6552
+ requestBody: {
6553
+ content: {
6554
+ "application/json": components["schemas"]["UpdateFolderBodyDTO"];
6555
+ };
6556
+ };
6557
+ responses: {
6558
+ /** @description Folder updated */
6559
+ 200: {
5900
6560
  headers: {
5901
6561
  [name: string]: unknown;
5902
6562
  };
5903
6563
  content?: never;
5904
6564
  };
5905
- /** @description Preparation is still in progress; retry with the same requestId */
5906
- 503: {
6565
+ /** @description Folder not found */
6566
+ 404: {
5907
6567
  headers: {
5908
6568
  [name: string]: unknown;
5909
6569
  };
@@ -5911,21 +6571,424 @@ interface operations {
5911
6571
  };
5912
6572
  };
5913
6573
  };
5914
- }
5915
-
5916
- /** The full generated schema map (advanced use / escape hatch). */
5917
- type Schemas = components['schemas'];
5918
- type CreateTrackerParams = Schemas['CreateExternalTrackerDefinitionDTO'];
5919
- type UpdateTrackerParams = Schemas['UpdateExternalTrackerDefinitionDTO'];
5920
- type SearchEntitiesByTrackersParams = Schemas['SearchEntitiesByTrackersDTO'];
5921
- type AssignTrackerByNameParams = Schemas['AssignExternalTrackerByNameDTO'];
5922
- type CreateNpsToolParams = Schemas['CreateNpsToolBodyDTO'];
5923
- type UpdateNpsToolParams = Schemas['UpdateNpsToolBodyDTO'];
5924
- type CreateCsatToolParams = Schemas['CreateCsatToolBodyDTO'];
5925
- type UpdateCsatToolParams = Schemas['UpdateCsatToolBodyDTO'];
5926
- type CreateCesToolParams = Schemas['CreateCesToolBodyDTO'];
5927
- type UpdateCesToolParams = Schemas['UpdateCesToolBodyDTO'];
5928
- type SendInvitationsParams = Schemas['V1CreateInvitationsBodyDto'];
6574
+ V1FoldersController_getFolderReport: {
6575
+ parameters: {
6576
+ query?: {
6577
+ /** @description Regenerate the report even if the number of reviews did not change. */
6578
+ regenerate?: boolean;
6579
+ /** @description Language of the report narrative. */
6580
+ lang?: "es" | "en";
6581
+ };
6582
+ header?: never;
6583
+ path: {
6584
+ id: string;
6585
+ };
6586
+ cookie?: never;
6587
+ };
6588
+ requestBody?: never;
6589
+ responses: {
6590
+ /** @description Folder report */
6591
+ 200: {
6592
+ headers: {
6593
+ [name: string]: unknown;
6594
+ };
6595
+ content?: never;
6596
+ };
6597
+ /** @description Folder not found */
6598
+ 404: {
6599
+ headers: {
6600
+ [name: string]: unknown;
6601
+ };
6602
+ content?: never;
6603
+ };
6604
+ };
6605
+ };
6606
+ V1FoldersController_getFolderPdf: {
6607
+ parameters: {
6608
+ query?: {
6609
+ /** @description Language of the PDF. Defaults to the report language. */
6610
+ lang?: "es" | "en";
6611
+ };
6612
+ header?: never;
6613
+ path: {
6614
+ id: string;
6615
+ };
6616
+ cookie?: never;
6617
+ };
6618
+ requestBody?: never;
6619
+ responses: {
6620
+ /** @description PDF file */
6621
+ 200: {
6622
+ headers: {
6623
+ [name: string]: unknown;
6624
+ };
6625
+ content: {
6626
+ "application/pdf": string;
6627
+ };
6628
+ };
6629
+ /** @description Folder not found */
6630
+ 404: {
6631
+ headers: {
6632
+ [name: string]: unknown;
6633
+ };
6634
+ content?: never;
6635
+ };
6636
+ };
6637
+ };
6638
+ V1FoldersController_getFolderMetrics: {
6639
+ parameters: {
6640
+ query?: {
6641
+ /** @description Period in days: 7, 30 or 90, or 0 for the whole history. Defaults to 30. */
6642
+ days?: 0 | 7 | 30 | 90;
6643
+ };
6644
+ header?: never;
6645
+ path: {
6646
+ id: string;
6647
+ };
6648
+ cookie?: never;
6649
+ };
6650
+ requestBody?: never;
6651
+ responses: {
6652
+ /** @description Folder tool metrics */
6653
+ 200: {
6654
+ headers: {
6655
+ [name: string]: unknown;
6656
+ };
6657
+ content?: never;
6658
+ };
6659
+ /** @description Folder not found */
6660
+ 404: {
6661
+ headers: {
6662
+ [name: string]: unknown;
6663
+ };
6664
+ content?: never;
6665
+ };
6666
+ };
6667
+ };
6668
+ V1FoldersController_getFolderCsv: {
6669
+ parameters: {
6670
+ query?: never;
6671
+ header?: never;
6672
+ path: {
6673
+ id: string;
6674
+ };
6675
+ cookie?: never;
6676
+ };
6677
+ requestBody?: never;
6678
+ responses: {
6679
+ /** @description CSV file */
6680
+ 200: {
6681
+ headers: {
6682
+ [name: string]: unknown;
6683
+ };
6684
+ content: {
6685
+ "text/csv": string;
6686
+ };
6687
+ };
6688
+ /** @description Folder not found */
6689
+ 404: {
6690
+ headers: {
6691
+ [name: string]: unknown;
6692
+ };
6693
+ content?: never;
6694
+ };
6695
+ };
6696
+ };
6697
+ V1FoldersController_moveFolder: {
6698
+ parameters: {
6699
+ query?: never;
6700
+ header?: never;
6701
+ path: {
6702
+ id: string;
6703
+ };
6704
+ cookie?: never;
6705
+ };
6706
+ requestBody: {
6707
+ content: {
6708
+ "application/json": components["schemas"]["MoveFolderBodyDTO"];
6709
+ };
6710
+ };
6711
+ responses: {
6712
+ /** @description Folder moved */
6713
+ 200: {
6714
+ headers: {
6715
+ [name: string]: unknown;
6716
+ };
6717
+ content?: never;
6718
+ };
6719
+ /** @description A folder cannot move into itself or one of its subfolders */
6720
+ 400: {
6721
+ headers: {
6722
+ [name: string]: unknown;
6723
+ };
6724
+ content: {
6725
+ "application/json": components["schemas"]["ValidationErrorResponseDto"];
6726
+ };
6727
+ };
6728
+ /** @description Folder not found */
6729
+ 404: {
6730
+ headers: {
6731
+ [name: string]: unknown;
6732
+ };
6733
+ content?: never;
6734
+ };
6735
+ };
6736
+ };
6737
+ V1ToolsController_listTools: {
6738
+ parameters: {
6739
+ query?: {
6740
+ /** @description `level` (default) lists one folder level; `company` is a flat list of every tool of the company. */
6741
+ scope?: "level" | "company";
6742
+ /** @description Comma separated tool types: woku, nps, csat, ces. */
6743
+ types?: string[];
6744
+ /** @description Case and accent insensitive search over names and questions. A search is company-wide and also matches folder names. */
6745
+ q?: string;
6746
+ sort?: "name" | "-name" | "created" | "-created";
6747
+ /** @description Opaque `nextCursor` of the previous page. */
6748
+ cursor?: string;
6749
+ limit?: number;
6750
+ /** @description Folders per page ("see more"). Omitted returns every folder of the level. */
6751
+ foldersLimit?: number;
6752
+ /** @description Opaque `foldersNextCursor` of a previous page. Returns only that page of folders, without tools. */
6753
+ foldersCursor?: string;
6754
+ /** @description Only tools created on or after this date (ISO 8601). */
6755
+ createdFrom?: string;
6756
+ /** @description Only tools created on or before this date (ISO 8601). */
6757
+ createdTo?: string;
6758
+ /** @description Tracker chips as `name:value`, repeatable (`?trackers=TRR:00482&trackers=OC:2024`, up to 10). A tool matches when it has every one: the tracker name is matched exactly, the value partially and ignoring case (`482` also matches `00482`). Like a search, it is company-wide and lists no folders. A chip without name or value is a 400. */
6759
+ trackers?: string[];
6760
+ /** @description Folder whose direct content is listed. Omit for the root. Ignored when `scope=company` or when searching. */
6761
+ folderId?: string;
6762
+ };
6763
+ header?: never;
6764
+ path?: never;
6765
+ cookie?: never;
6766
+ };
6767
+ requestBody?: never;
6768
+ responses: {
6769
+ /** @description Folders, tools and facets */
6770
+ 200: {
6771
+ headers: {
6772
+ [name: string]: unknown;
6773
+ };
6774
+ content?: never;
6775
+ };
6776
+ };
6777
+ };
6778
+ V1ToolsController_getToolsStats: {
6779
+ parameters: {
6780
+ query?: {
6781
+ /** @description Scope the figures to this folder and its subfolders. Omit for the whole company. */
6782
+ folderId?: string;
6783
+ /** @description Only responses on or after this date (ISO 8601). */
6784
+ from?: string;
6785
+ /** @description Only responses on or before this date (ISO 8601). */
6786
+ to?: string;
6787
+ };
6788
+ header?: never;
6789
+ path?: never;
6790
+ cookie?: never;
6791
+ };
6792
+ requestBody?: never;
6793
+ responses: {
6794
+ /** @description Figures per type */
6795
+ 200: {
6796
+ headers: {
6797
+ [name: string]: unknown;
6798
+ };
6799
+ content?: never;
6800
+ };
6801
+ };
6802
+ };
6803
+ V1ToolsController_moveTools: {
6804
+ parameters: {
6805
+ query?: never;
6806
+ header?: never;
6807
+ path?: never;
6808
+ cookie?: never;
6809
+ };
6810
+ requestBody: {
6811
+ content: {
6812
+ "application/json": components["schemas"]["MoveToolItemsBodyDTO"];
6813
+ };
6814
+ };
6815
+ responses: {
6816
+ /** @description Items moved */
6817
+ 200: {
6818
+ headers: {
6819
+ [name: string]: unknown;
6820
+ };
6821
+ content?: never;
6822
+ };
6823
+ /** @description Invalid move (for example a folder into its own subtree) */
6824
+ 400: {
6825
+ headers: {
6826
+ [name: string]: unknown;
6827
+ };
6828
+ content: {
6829
+ "application/json": components["schemas"]["ValidationErrorResponseDto"];
6830
+ };
6831
+ };
6832
+ /** @description Folder or item not found */
6833
+ 404: {
6834
+ headers: {
6835
+ [name: string]: unknown;
6836
+ };
6837
+ content?: never;
6838
+ };
6839
+ };
6840
+ };
6841
+ V1JourneyFoldersController_getJourneyFolders: {
6842
+ parameters: {
6843
+ query?: never;
6844
+ header?: never;
6845
+ path?: never;
6846
+ cookie?: never;
6847
+ };
6848
+ requestBody?: never;
6849
+ responses: {
6850
+ /** @description Status */
6851
+ 200: {
6852
+ headers: {
6853
+ [name: string]: unknown;
6854
+ };
6855
+ content?: never;
6856
+ };
6857
+ };
6858
+ };
6859
+ V1JourneyFoldersController_organizeJourneyFolders: {
6860
+ parameters: {
6861
+ query?: never;
6862
+ header?: never;
6863
+ path?: never;
6864
+ cookie?: never;
6865
+ };
6866
+ requestBody?: never;
6867
+ responses: {
6868
+ /** @description Organization started */
6869
+ 202: {
6870
+ headers: {
6871
+ [name: string]: unknown;
6872
+ };
6873
+ content?: never;
6874
+ };
6875
+ /** @description Already organizing */
6876
+ 409: {
6877
+ headers: {
6878
+ [name: string]: unknown;
6879
+ };
6880
+ content?: never;
6881
+ };
6882
+ };
6883
+ };
6884
+ CustomJourneyEntryController_info: {
6885
+ parameters: {
6886
+ query?: never;
6887
+ header?: never;
6888
+ path: {
6889
+ journeyId: string;
6890
+ };
6891
+ cookie?: never;
6892
+ };
6893
+ requestBody?: never;
6894
+ responses: {
6895
+ 200: {
6896
+ headers: {
6897
+ [name: string]: unknown;
6898
+ };
6899
+ content: {
6900
+ "application/json": components["schemas"]["JourneyEntryInfoDto"];
6901
+ };
6902
+ };
6903
+ /** @description Invalid contact, case reference or request ID */
6904
+ 400: {
6905
+ headers: {
6906
+ [name: string]: unknown;
6907
+ };
6908
+ content?: never;
6909
+ };
6910
+ /** @description This evaluation is not available */
6911
+ 404: {
6912
+ headers: {
6913
+ [name: string]: unknown;
6914
+ };
6915
+ content?: never;
6916
+ };
6917
+ };
6918
+ };
6919
+ CustomJourneyEntryController_prepare: {
6920
+ parameters: {
6921
+ query?: never;
6922
+ header?: never;
6923
+ path: {
6924
+ journeyId: string;
6925
+ };
6926
+ cookie?: never;
6927
+ };
6928
+ requestBody: {
6929
+ content: {
6930
+ "application/json": components["schemas"]["PrepareJourneyEntryDto"];
6931
+ };
6932
+ };
6933
+ responses: {
6934
+ 201: {
6935
+ headers: {
6936
+ [name: string]: unknown;
6937
+ };
6938
+ content: {
6939
+ "application/json": components["schemas"]["PreparedJourneyEntryDto"];
6940
+ };
6941
+ };
6942
+ /** @description Invalid contact, case reference or request ID */
6943
+ 400: {
6944
+ headers: {
6945
+ [name: string]: unknown;
6946
+ };
6947
+ content?: never;
6948
+ };
6949
+ /** @description This evaluation is not available */
6950
+ 404: {
6951
+ headers: {
6952
+ [name: string]: unknown;
6953
+ };
6954
+ content?: never;
6955
+ };
6956
+ /** @description Customer or case already has an active evaluation */
6957
+ 409: {
6958
+ headers: {
6959
+ [name: string]: unknown;
6960
+ };
6961
+ content?: never;
6962
+ };
6963
+ /** @description Preparation is still in progress; retry with the same requestId */
6964
+ 503: {
6965
+ headers: {
6966
+ [name: string]: unknown;
6967
+ };
6968
+ content?: never;
6969
+ };
6970
+ };
6971
+ };
6972
+ }
6973
+
6974
+ /** The full generated schema map (advanced use / escape hatch). */
6975
+ type Schemas = components['schemas'];
6976
+ type CreateTrackerParams = Schemas['CreateExternalTrackerDefinitionDTO'];
6977
+ type UpdateTrackerParams = Schemas['UpdateExternalTrackerDefinitionDTO'];
6978
+ type SearchEntitiesByTrackersParams = Schemas['SearchEntitiesByTrackersDTO'];
6979
+ type AssignTrackerByNameParams = Schemas['AssignExternalTrackerByNameDTO'];
6980
+ type CreateFlowParams = Schemas['CreateFlowBodyDTO'];
6981
+ type UpdateFlowParams = Schemas['UpdateFlowBodyDTO'];
6982
+ type CreateFolderParams = Schemas['CreateFolderBodyDTO'];
6983
+ type UpdateFolderParams = Schemas['UpdateFolderBodyDTO'];
6984
+ type MoveToolItemsParams = Schemas['MoveToolItemsBodyDTO'];
6985
+ type CreateNpsToolParams = Schemas['CreateNpsToolBodyDTO'];
6986
+ type UpdateNpsToolParams = Schemas['UpdateNpsToolBodyDTO'];
6987
+ type CreateCsatToolParams = Schemas['CreateCsatToolBodyDTO'];
6988
+ type UpdateCsatToolParams = Schemas['UpdateCsatToolBodyDTO'];
6989
+ type CreateCesToolParams = Schemas['CreateCesToolBodyDTO'];
6990
+ type UpdateCesToolParams = Schemas['UpdateCesToolBodyDTO'];
6991
+ type SendInvitationsParams = Schemas['V1CreateInvitationsBodyDto'];
5929
6992
  type SendNpsInvitationsParams = Schemas['V1CreateNpsInvitationsBodyDto'];
5930
6993
  type SendCsatInvitationsParams = Schemas['V1CreateCsatInvitationsBodyDto'];
5931
6994
  type SendCesInvitationsParams = Schemas['V1CreateCesInvitationsBodyDto'];
@@ -5937,6 +7000,22 @@ type ShareWokuParams = Schemas['V1ShareWokuBodyDto'];
5937
7000
  type UpdateTicketParams = Schemas['UpdateTicketBodyDTO'];
5938
7001
  type CreateTicketDestinationParams = Schemas['V1CreateTicketDestinationDto'];
5939
7002
  type UpdateTicketDestinationParams = Schemas['V1UpdateTicketDestinationDto'];
7003
+ /** Explicit receiver contract for updating the original custom support case. */
7004
+ type CustomTicketUpdateConfig = {
7005
+ mode: 'upsert';
7006
+ responseIdPath?: string;
7007
+ } | {
7008
+ mode: 'remote-id';
7009
+ url: string;
7010
+ method?: 'PUT' | 'PATCH';
7011
+ responseIdPath: string;
7012
+ };
7013
+ type CustomTicketDestinationConfig = {
7014
+ url: string;
7015
+ method?: 'POST' | 'PUT';
7016
+ headers?: Record<string, string>;
7017
+ update?: CustomTicketUpdateConfig;
7018
+ };
5940
7019
  type CreateActionPlanGroupParams = Schemas['CreateActionPlanGroupDto'];
5941
7020
  type UpdateActionPlanGroupParams = Schemas['UpdateActionPlanGroupDto'];
5942
7021
  type CreateActionPlanTaskParams = Schemas['CreateActionPlanTaskDto'];
@@ -5992,6 +7071,8 @@ interface ToolLocalizedContent {
5992
7071
  /** NPS tool definition (curated, no internal fields). */
5993
7072
  interface NpsTool {
5994
7073
  _id: string;
7074
+ /** Folder the tool lives in, `null` at the root. */
7075
+ folderId?: string | null;
5995
7076
  name: string;
5996
7077
  npsMessage: string;
5997
7078
  audienceType?: string;
@@ -6003,6 +7084,8 @@ interface NpsTool {
6003
7084
  /** CSAT tool definition (curated). */
6004
7085
  interface CsatTool {
6005
7086
  _id: string;
7087
+ /** Folder the tool lives in, `null` at the root. */
7088
+ folderId?: string | null;
6006
7089
  name: string;
6007
7090
  question: string;
6008
7091
  subject?: string;
@@ -6014,6 +7097,8 @@ interface CsatTool {
6014
7097
  /** CES tool definition (curated). */
6015
7098
  interface CesTool {
6016
7099
  _id: string;
7100
+ /** Folder the tool lives in, `null` at the root. */
7101
+ folderId?: string | null;
6017
7102
  name: string;
6018
7103
  question: string;
6019
7104
  action?: string;
@@ -6037,6 +7122,114 @@ interface InvitationsResult {
6037
7122
  }>;
6038
7123
  [key: string]: unknown;
6039
7124
  }
7125
+ type FollowUpState = 'pending' | 'initial_sent' | 'awaiting_detail' | 'closing' | 'completed' | 'timed_out' | 'cancelled';
7126
+ interface FollowUpOrigin {
7127
+ tool: 'woku' | 'nps' | 'csat' | 'ces';
7128
+ refId: string;
7129
+ instrumentId?: string;
7130
+ }
7131
+ /** Lightweight evidence state. Completion alone does not mean evidence was applied. */
7132
+ interface FollowUp {
7133
+ conversationId?: string;
7134
+ state: FollowUpState | 'not_applicable';
7135
+ reason?: string;
7136
+ availableSummaryVersion?: number;
7137
+ appliedSummaryVersion?: number;
7138
+ enrichedAt?: string;
7139
+ /** Ticket processing status; conversation completion does not imply application. */
7140
+ enrichmentState?: 'processing' | 'applied' | 'failed' | 'skipped';
7141
+ enrichmentReason?: string;
7142
+ }
7143
+ /**
7144
+ * WhatsApp line of a follow-up. `survey_thread`: the agent continued the
7145
+ * survey conversation on the survey number. `follow_up_number`: it wrote from
7146
+ * the dedicated follow-up number. Absent for email.
7147
+ */
7148
+ type FollowUpLine = 'survey_thread' | 'follow_up_number';
7149
+ /**
7150
+ * `survey`: the survey exchange that preceded the follow-up (prelude).
7151
+ * `follow_up`: the follow-up itself.
7152
+ */
7153
+ type FollowUpMessagePhase = 'survey' | 'follow_up';
7154
+ /**
7155
+ * A file the customer sent. `adminUrl` opens it in the woku admin after login
7156
+ * and a company check; the file itself and storage URLs are never returned.
7157
+ */
7158
+ interface FollowUpAttachment {
7159
+ /** Stable number of the file in the conversation (prelude included). */
7160
+ index: number;
7161
+ /** Label in the conversation language, e.g. "Archivo 2" or "File 2". */
7162
+ label: string;
7163
+ kind: 'image' | 'audio' | 'document' | 'unsupported';
7164
+ /** Private original file. Absent while pending or when nothing was stored. */
7165
+ fileId?: string;
7166
+ /** Converted copy the model read, when there was a conversion. */
7167
+ readableFileId?: string;
7168
+ filename: string;
7169
+ mimeType: string;
7170
+ status: 'pending' | 'ready' | 'failed' | 'unsupported';
7171
+ /** Transcript (audio) or description (image, document). Untrusted customer content. */
7172
+ text?: string;
7173
+ /** Stable reason code when failed or unsupported (e.g. `video`, `read_failed`). */
7174
+ failureReason?: string;
7175
+ adminUrl?: string;
7176
+ }
7177
+ /** A file the executive summary cites as "(Archivo N)". */
7178
+ interface FollowUpCitation {
7179
+ index: number;
7180
+ label: string;
7181
+ fileId?: string;
7182
+ /** What the file supports in the summary. */
7183
+ supports: string;
7184
+ adminUrl?: string;
7185
+ }
7186
+ interface FollowUpMessage {
7187
+ role: 'agent' | 'client';
7188
+ /** May be empty when the message only has files. */
7189
+ content: string;
7190
+ timestamp: string;
7191
+ phase: FollowUpMessagePhase;
7192
+ responseType?: string;
7193
+ selectedOption?: string;
7194
+ attachments?: FollowUpAttachment[];
7195
+ }
7196
+ /** Authorized conversation detail, without response tokens or transport credentials. */
7197
+ interface FollowUpConversation {
7198
+ _id: string;
7199
+ companyId: string;
7200
+ origin: FollowUpOrigin;
7201
+ wokuId?: string;
7202
+ reviewId?: string;
7203
+ reviewType: 'textnote' | 'voicemail';
7204
+ originalReview: string;
7205
+ originalQualification?: number;
7206
+ state: FollowUpState;
7207
+ channel: Channel;
7208
+ line?: FollowUpLine;
7209
+ reason?: string;
7210
+ messages: FollowUpMessage[];
7211
+ executiveSummary?: string;
7212
+ actionItems?: string[];
7213
+ sentiment?: string;
7214
+ topics?: string[];
7215
+ summaryCitations?: FollowUpCitation[];
7216
+ summaryVersion?: number;
7217
+ createdAt?: string;
7218
+ updatedAt?: string;
7219
+ }
7220
+ interface TicketOriginTracker {
7221
+ trackerId?: string;
7222
+ name?: string;
7223
+ value: string;
7224
+ }
7225
+ interface TicketOrigin {
7226
+ tool: FollowUpOrigin['tool'] | 'form';
7227
+ refId: string;
7228
+ instrumentId?: string;
7229
+ instrumentName?: string;
7230
+ trackers?: TicketOriginTracker[];
7231
+ [key: string]: unknown;
7232
+ }
6040
7233
  /** Support ticket (curated allow-list). */
6041
7234
  interface Ticket {
6042
7235
  _id: string;
@@ -6044,7 +7237,9 @@ interface Ticket {
6044
7237
  title: string;
6045
7238
  severity: Severity;
6046
7239
  destinationId?: string;
6047
- origin?: WokuRecord;
7240
+ origin?: TicketOrigin;
7241
+ followUp?: FollowUp;
7242
+ contentVersion?: number;
6048
7243
  score?: WokuRecord;
6049
7244
  aiSummary?: string;
6050
7245
  aiCategory?: string;
@@ -6130,6 +7325,183 @@ interface ApiKeyResult {
6130
7325
  secretKey: string;
6131
7326
  [key: string]: unknown;
6132
7327
  }
7328
+ /** Kinds of item the Tools view mixes. */
7329
+ type ToolType = 'woku' | 'nps' | 'csat' | 'ces';
7330
+ /** Headline figure of a tool, always in its native scale (scales are never mixed). */
7331
+ interface ToolHeadline {
7332
+ kind: 'stars' | 'nps' | 'csat' | 'ces';
7333
+ /** Stars 1-5, NPS -100..100, CSAT satisfied %, CES mean 1-5. `null` without responses. */
7334
+ value: number | null;
7335
+ scale: string;
7336
+ }
7337
+ /** A woku, NPS, CSAT or CES tool as listed by `tools.list`. */
7338
+ interface ToolItem {
7339
+ type: ToolType;
7340
+ id: string;
7341
+ name: string;
7342
+ folderId: string | null;
7343
+ createdAt: string | null;
7344
+ reviewCount: number;
7345
+ lastResponseAt: string | null;
7346
+ headline: ToolHeadline;
7347
+ }
7348
+ /** Subtree figures of a folder. */
7349
+ interface FolderStats {
7350
+ toolCounts: Record<ToolType, number>;
7351
+ subfolderCount: number;
7352
+ reviewCount: number;
7353
+ }
7354
+ /**
7355
+ * Kind of a system folder created by woku: the `Viajes` root, one journey, one
7356
+ * journey moment or an integration (Shopify, Pancake). `null` for your own folders.
7357
+ */
7358
+ type FolderOrigin = 'journeys-root' | 'journey' | 'journey-moment' | 'integration';
7359
+ /** A WhatsApp number that receives improvement alerts of a folder. */
7360
+ interface WhatsappAlertRecipient {
7361
+ /** E.164 phone number without the leading +. */
7362
+ whatsappId: string;
7363
+ name: string;
7364
+ /** Kinds of comment that alert this number (numbers created before this feature only get `woku`). */
7365
+ sources: ToolType[];
7366
+ }
7367
+ /** A folder with its breadcrumb path and subtree stats. */
7368
+ interface Folder {
7369
+ id: string;
7370
+ name: string;
7371
+ color: string | null;
7372
+ parentFolderId: string | null;
7373
+ /** Breadcrumb from the root, for example `Journeys > Post-sale`. */
7374
+ path: string;
7375
+ /** System folder kind, `null` for a folder you created. */
7376
+ origin: FolderOrigin | null;
7377
+ /** Provider of an integration folder (`shopify`, `pancake`), otherwise `null`. */
7378
+ integrationProvider?: string | null;
7379
+ /** WhatsApp numbers alerted when a comment of any tool in the folder is an improvement. */
7380
+ whatsappAlertRecipients: WhatsappAlertRecipient[];
7381
+ createdAt: string | null;
7382
+ stats: FolderStats;
7383
+ }
7384
+ /** One page of `tools.list`: folders, tools, facet counts and the cursor. */
7385
+ interface ToolItemsPageResponse {
7386
+ folders: Folder[];
7387
+ /** Cursor of the next page of folders; null when they were all returned. */
7388
+ foldersNextCursor: string | null;
7389
+ tools: ToolItem[];
7390
+ nextCursor: string | null;
7391
+ facets: {
7392
+ types: Record<ToolType, number>;
7393
+ };
7394
+ }
7395
+ /** Headline figures of one tool type for the company or a folder. */
7396
+ interface ToolTypeStats {
7397
+ toolCount: number;
7398
+ reviewCount: number;
7399
+ headline: ToolHeadline;
7400
+ lastResponseAt: string | null;
7401
+ /** NPS only. */
7402
+ distribution?: {
7403
+ promoters: number;
7404
+ passives: number;
7405
+ detractors: number;
7406
+ };
7407
+ }
7408
+ /** A type that failed to compute reports `{ error: true }`; the others stay valid. */
7409
+ type ToolsStats = Record<ToolType, ToolTypeStats | {
7410
+ error: true;
7411
+ }>;
7412
+ /** One window (the period, or the one before it) of one tool. */
7413
+ interface ToolWindow {
7414
+ count: number;
7415
+ headline: ToolHeadline;
7416
+ /** Share (0-100) of positive responses: 4-5, or NPS promoters; `null` with no responses. */
7417
+ positive: number | null;
7418
+ /** Share (0-100) of negative responses: 1-2, or NPS detractors; `null` with no responses. */
7419
+ negative: number | null;
7420
+ /** The raw counts and score sum behind the shares, to combine tools without rounding drift. */
7421
+ positiveCount: number;
7422
+ negativeCount: number;
7423
+ scoreSum: number;
7424
+ }
7425
+ /** Per-tool figures of `folders.metrics`: the period against the one before it. */
7426
+ interface ToolMetrics {
7427
+ type: ToolType;
7428
+ id: string;
7429
+ name: string;
7430
+ /** Responses ever received. */
7431
+ totalResponses: number;
7432
+ lastResponseAt: string | null;
7433
+ current: ToolWindow;
7434
+ previous: ToolWindow;
7435
+ }
7436
+ /** Sums of one day (UTC) and tool type, enough to rebuild any score on any bucket. */
7437
+ interface DailyPoint {
7438
+ date: string;
7439
+ type: ToolType;
7440
+ count: number;
7441
+ scoreSum: number;
7442
+ positive: number;
7443
+ negative: number;
7444
+ }
7445
+ /** Result of `folders.metrics`. */
7446
+ interface FolderToolMetrics {
7447
+ /** Period in days; `0` is the whole history (then every `previous` window is empty). */
7448
+ days: number;
7449
+ tools: ToolMetrics[];
7450
+ /** Daily sums of both windows (2 x `days`). */
7451
+ daily: DailyPoint[];
7452
+ /** Responses per score in the period: 0-10 for NPS, 1-5 for the rest. */
7453
+ distribution: Record<ToolType, number[]>;
7454
+ }
7455
+ /** Result of `tools.move` and `folders.move` batches. */
7456
+ interface MoveResult {
7457
+ moved: number;
7458
+ folderId: string | null;
7459
+ items: {
7460
+ type: ToolType | 'folder';
7461
+ id: string;
7462
+ }[];
7463
+ }
7464
+ /** The CSV of a folder: the raw text, one row per response. */
7465
+ type FolderCsv = string;
7466
+ /** Whether the company keeps its journeys in folders (`Viajes > journey > moment`). */
7467
+ interface JourneyFoldersStatus {
7468
+ enabled: boolean;
7469
+ enabledAt: string | null;
7470
+ organizedAt: string | null;
7471
+ /** True while the one-off organization is running in the background. */
7472
+ organizing: boolean;
7473
+ /** Journeys and tools still without a folder. */
7474
+ pending: {
7475
+ journeys: number;
7476
+ tools: number;
7477
+ };
7478
+ }
7479
+ /** One step of a flow: the tool the respondent answers at that point. */
7480
+ interface FlowStep {
7481
+ type: ToolType;
7482
+ /** Tool id. For an `nps` step, your company id means the company-level NPS. */
7483
+ toolId: string;
7484
+ }
7485
+ /** A survey flow: an ordered sequence of woku, NPS, CSAT and CES steps. */
7486
+ interface Flow {
7487
+ _id: string;
7488
+ name: string;
7489
+ /** Ordered steps. Flows live outside folders. */
7490
+ steps: FlowStep[];
7491
+ /** Woku ids of the `woku` steps, in order (kept for compatibility). */
7492
+ wokusIds?: string[];
7493
+ npsToolId?: string | null;
7494
+ companyIdNps?: string | null;
7495
+ createdAt?: string;
7496
+ updatedAt?: string;
7497
+ }
7498
+
7499
+ /** Read authorized follow-up conversations with a company management secret. */
7500
+ declare class FollowUps {
7501
+ private readonly client;
7502
+ constructor(client: WokuClient);
7503
+ get(id: string, opts?: RequestOptions): Promise<FollowUpConversation>;
7504
+ }
6133
7505
 
6134
7506
  /** A VoC entity type that can carry tracker values. */
6135
7507
  type TrackerEntityType = 'nps' | 'csat' | 'ces' | 'form' | 'flow';
@@ -6190,6 +7562,10 @@ declare class NpsTools {
6190
7562
  create(body: CreateNpsToolParams, opts?: RequestOptions): Promise<NpsTool>;
6191
7563
  get(id: string, opts?: RequestOptions): Promise<NpsTool>;
6192
7564
  update(id: string, body: UpdateNpsToolParams, opts?: RequestOptions): Promise<NpsTool>;
7565
+ /** Move the tool into a folder, or to the root with `folderId: null`. */
7566
+ move(id: string, body: {
7567
+ folderId: string | null;
7568
+ }, opts?: RequestOptions): Promise<NpsTool>;
6193
7569
  delete(id: string, opts?: RequestOptions): Promise<DeletedResult>;
6194
7570
  }
6195
7571
  /** Manage CSAT tool definitions (`/v1/csat-tools`). */
@@ -6203,6 +7579,10 @@ declare class CsatTools {
6203
7579
  create(body: CreateCsatToolParams, opts?: RequestOptions): Promise<CsatTool>;
6204
7580
  get(id: string, opts?: RequestOptions): Promise<CsatTool>;
6205
7581
  update(id: string, body: UpdateCsatToolParams, opts?: RequestOptions): Promise<CsatTool>;
7582
+ /** Move the tool into a folder, or to the root with `folderId: null`. */
7583
+ move(id: string, body: {
7584
+ folderId: string | null;
7585
+ }, opts?: RequestOptions): Promise<CsatTool>;
6206
7586
  delete(id: string, opts?: RequestOptions): Promise<DeletedResult>;
6207
7587
  }
6208
7588
  /** Manage CES tool definitions (`/v1/ces-tools`). */
@@ -6216,6 +7596,10 @@ declare class CesTools {
6216
7596
  create(body: CreateCesToolParams, opts?: RequestOptions): Promise<CesTool>;
6217
7597
  get(id: string, opts?: RequestOptions): Promise<CesTool>;
6218
7598
  update(id: string, body: UpdateCesToolParams, opts?: RequestOptions): Promise<CesTool>;
7599
+ /** Move the tool into a folder, or to the root with `folderId: null`. */
7600
+ move(id: string, body: {
7601
+ folderId: string | null;
7602
+ }, opts?: RequestOptions): Promise<CesTool>;
6219
7603
  delete(id: string, opts?: RequestOptions): Promise<DeletedResult>;
6220
7604
  }
6221
7605
 
@@ -6298,15 +7682,29 @@ declare class Forms {
6298
7682
  sendInvitations(id: string, body: SendInvitationsParams, opts?: RequestOptions): Promise<InvitationsResult>;
6299
7683
  }
6300
7684
 
6301
- /** Read data flows (`/v1/flows`). */
7685
+ /**
7686
+ * Survey flows (`/v1/flows`): an ordered sequence of steps, each a woku or an
7687
+ * NPS, CSAT or CES tool, that a respondent answers one after the other.
7688
+ */
6302
7689
  declare class Flows {
6303
7690
  private readonly client;
6304
7691
  constructor(client: WokuClient);
7692
+ /** List the flows of the company, with their ordered `steps`. */
6305
7693
  list(params?: {
6306
7694
  page?: number;
6307
7695
  limit?: number;
6308
- }, opts?: RequestOptions): Promise<Page<WokuRecord>>;
7696
+ }, opts?: RequestOptions): Promise<Page<Flow>>;
7697
+ /** The data of a flow: ordered steps with their tools, wokus and branding. */
6309
7698
  get(id: string, opts?: RequestOptions): Promise<WokuRecord>;
7699
+ /**
7700
+ * Create a flow from 1 to 20 ordered steps (each tool once, all of your
7701
+ * company). Flows live outside folders.
7702
+ */
7703
+ create(body: CreateFlowParams, opts?: RequestOptions): Promise<Flow>;
7704
+ /** Rename a flow or replace its full ordered list of steps. */
7705
+ update(id: string, body: UpdateFlowParams, opts?: RequestOptions): Promise<Flow>;
7706
+ /** Delete a flow. Its tools and their responses stay. */
7707
+ delete(id: string, opts?: RequestOptions): Promise<DeletedResult>;
6310
7708
  }
6311
7709
 
6312
7710
  interface ListActionPlansParams {
@@ -6461,7 +7859,16 @@ type JourneyMomentPreview = Schemas['V1JourneyPreviewResponseDto'];
6461
7859
  type JourneyMomentTrigger = Schemas['V1JourneyTriggerDto'];
6462
7860
  type JourneyMoment = Schemas['V1JourneyMomentDto'];
6463
7861
  type JourneyInput = Schemas['V1UpdateJourneyBodyDto'];
6464
- type Journey = Schemas['V1JourneyResponseDto'];
7862
+ /**
7863
+ * A journey as returned by `/v1/journeys`. `folderId` and `momentFolders`
7864
+ * (moment key to folder id) point at the folders that hold the journey's tools
7865
+ * once the company organized its journeys in folders; they are `null` and `{}`
7866
+ * before that. Reads only: they are not part of the journey definition.
7867
+ */
7868
+ type Journey = Schemas['V1JourneyResponseDto'] & {
7869
+ folderId?: string | null;
7870
+ momentFolders?: Record<string, string>;
7871
+ };
6465
7872
  type CreatedJourney = Schemas['V1CreatedJourneyResponseDto'];
6466
7873
  type JourneyEnrollment = Schemas['V1JourneyParticipationDto'];
6467
7874
  type JourneyEnrollmentPage = Schemas['V1JourneyParticipationPageDto'];
@@ -6553,6 +7960,165 @@ declare class Quarantines {
6553
7960
  }, opts?: RequestOptions): Promise<WokuRecord>;
6554
7961
  }
6555
7962
 
7963
+ /**
7964
+ * Folders that organize wokus and NPS, CSAT and CES tools (`/v1/folders`).
7965
+ * To list what a folder contains use `woku.tools.list({ folderId })`.
7966
+ */
7967
+ declare class Folders {
7968
+ private readonly client;
7969
+ constructor(client: WokuClient);
7970
+ /** Every folder of the company, or the direct subfolders of `parentFolderId`. */
7971
+ list(params?: {
7972
+ parentFolderId?: string;
7973
+ q?: string;
7974
+ }, opts?: RequestOptions): Promise<Folder[]>;
7975
+ get(id: string, opts?: RequestOptions): Promise<Folder>;
7976
+ create(body: CreateFolderParams, opts?: RequestOptions): Promise<Folder>;
7977
+ /**
7978
+ * Rename or recolor a folder (`color: null` clears the color) and/or replace
7979
+ * its WhatsApp alert recipients (`whatsappAlertRecipients`, `[]` clears them).
7980
+ */
7981
+ update(id: string, body: UpdateFolderParams, opts?: RequestOptions): Promise<Folder>;
7982
+ /**
7983
+ * Move a folder under another folder, or to the root with
7984
+ * `parentFolderId: null`. A folder cannot move into its own subtree.
7985
+ */
7986
+ move(id: string, body: {
7987
+ parentFolderId: string | null;
7988
+ }, opts?: RequestOptions): Promise<Folder>;
7989
+ /**
7990
+ * Delete a folder. Nothing inside is deleted: subfolders, wokus and tools
7991
+ * move up to the parent folder (or the root).
7992
+ */
7993
+ delete(id: string, opts?: RequestOptions): Promise<DeletedResult>;
7994
+ /**
7995
+ * AI report over every woku, NPS, CSAT and CES tool of the folder and its
7996
+ * subfolders. Scales differ per type, so there is no rating distribution.
7997
+ */
7998
+ report(id: string, params?: {
7999
+ regenerate?: boolean;
8000
+ lang?: 'es' | 'en';
8001
+ }, opts?: RequestOptions): Promise<WokuRecord>;
8002
+ /**
8003
+ * Per-tool figures of the woku, NPS, CSAT and CES tools of the folder and its
8004
+ * subfolders for a period against the one before it, with the daily sums and
8005
+ * the histogram of scores. `days` is 7, 30 (default) or 90, or 0 for the whole
8006
+ * history (every `previous` window is then empty). The period is the last
8007
+ * `days` calendar days in UTC, today included. Scales are never mixed across
8008
+ * types.
8009
+ */
8010
+ metrics(id: string, params?: {
8011
+ days?: 0 | 7 | 30 | 90;
8012
+ }, opts?: RequestOptions): Promise<FolderToolMetrics>;
8013
+ /** CSV text with one row per response of every tool of the folder subtree. */
8014
+ csv(id: string, opts?: RequestOptions): Promise<FolderCsv>;
8015
+ /**
8016
+ * PDF of the folder report (every woku, NPS, CSAT and CES tool of the folder
8017
+ * and its subfolders) with a breakdown per type on each native scale.
8018
+ * Returns the file bytes: write them to disk or send them as is.
8019
+ */
8020
+ pdf(id: string, params?: {
8021
+ lang?: 'es' | 'en';
8022
+ }, opts?: RequestOptions): Promise<Uint8Array>;
8023
+ }
8024
+
8025
+ /** Filters of `tools.list`. */
8026
+ interface ListToolsParams {
8027
+ /** Folder whose direct content is listed. Omit for the root. */
8028
+ folderId?: string;
8029
+ /** `level` (default) lists one folder level; `company` lists every tool flat. */
8030
+ scope?: 'level' | 'company';
8031
+ /** Only these tool types. */
8032
+ types?: ToolType[];
8033
+ /** Case and accent insensitive search (company-wide, also matches folders). */
8034
+ q?: string;
8035
+ sort?: 'name' | '-name' | 'created' | '-created';
8036
+ /** Page size, 1-100 (default 50). */
8037
+ limit?: number;
8038
+ /** Folders per page, 1-100 (omit to receive every folder of the level). */
8039
+ foldersLimit?: number;
8040
+ createdFrom?: string;
8041
+ createdTo?: string;
8042
+ /**
8043
+ * Tracker chips as `name:value` (for example `TRR:00482`, up to 10); a tool
8044
+ * matches when it has every one: the tracker name is matched exactly, the value
8045
+ * partially and ignoring case (`482` also matches `00482`). Like a search it is
8046
+ * company-wide and lists no folders. A chip without name or value is a 400.
8047
+ */
8048
+ trackers?: string[];
8049
+ }
8050
+ /**
8051
+ * One page of `tools.list`. Iterate every tool across all pages with
8052
+ * `for await (const tool of page)`, or page by page with `page.iterPages()`.
8053
+ */
8054
+ declare class ToolsPage implements AsyncIterable<ToolItem> {
8055
+ private readonly fetchNext;
8056
+ private readonly fetchMoreFolders;
8057
+ readonly folders: Folder[];
8058
+ readonly tools: ToolItem[];
8059
+ readonly nextCursor: string | null;
8060
+ /** Cursor of the next page of folders (only set when `foldersLimit` was used). */
8061
+ readonly foldersNextCursor: string | null;
8062
+ readonly facets: ToolItemsPageResponse['facets'];
8063
+ constructor(response: ToolItemsPageResponse, fetchNext: (cursor: string) => Promise<ToolsPage>, fetchMoreFolders?: (cursor: string) => Promise<ToolsPage>);
8064
+ hasMoreFolders(): boolean;
8065
+ /** The next page of folders ("see more"): a page with those folders and no tools. */
8066
+ getMoreFolders(): Promise<ToolsPage>;
8067
+ hasNextPage(): boolean;
8068
+ getNextPage(): Promise<ToolsPage>;
8069
+ iterPages(): AsyncGenerator<ToolsPage>;
8070
+ [Symbol.asyncIterator](): AsyncIterator<ToolItem>;
8071
+ }
8072
+ /**
8073
+ * The unified view over wokus and NPS, CSAT and CES tools (`/v1/tools`):
8074
+ * search and filters, headline figures per type and batch moves.
8075
+ */
8076
+ declare class Tools {
8077
+ private readonly client;
8078
+ constructor(client: WokuClient);
8079
+ /**
8080
+ * List one folder level (or search the company). Folders and tools of every
8081
+ * type come together; the first page also carries the folders and facets.
8082
+ */
8083
+ list(params?: ListToolsParams, opts?: RequestOptions): Promise<ToolsPage>;
8084
+ /**
8085
+ * Headline figures per type (woku stars, NPS score, CSAT satisfied %, CES
8086
+ * mean) for the company or one folder and its subfolders, in a period.
8087
+ * A type that fails reports `{ error: true }`; the others stay valid.
8088
+ */
8089
+ stats(params?: {
8090
+ folderId?: string;
8091
+ from?: string;
8092
+ to?: string;
8093
+ }, opts?: RequestOptions): Promise<ToolsStats>;
8094
+ /**
8095
+ * Move up to 200 items of mixed types (`woku`, `nps`, `csat`, `ces`,
8096
+ * `folder`) into a folder, or to the root with `folderId: null`. Idempotent;
8097
+ * nothing moves if one item or the destination is not found.
8098
+ */
8099
+ move(body: MoveToolItemsParams, opts?: RequestOptions): Promise<MoveResult>;
8100
+ }
8101
+
8102
+ /**
8103
+ * Keep customer journeys in folders (`/v1/journey-folders`): `Viajes > journey >
8104
+ * moment`. Each journey and moment exposes its folder in `journeys.get`
8105
+ * (`folderId`, `momentFolders`).
8106
+ */
8107
+ declare class JourneyFolders {
8108
+ private readonly client;
8109
+ constructor(client: WokuClient);
8110
+ /** Whether the organization is on, running, and how much is still without a folder. */
8111
+ status(opts?: RequestOptions): Promise<JourneyFoldersStatus>;
8112
+ /**
8113
+ * Switch the organization on and run the one-off pass in the background: tools
8114
+ * of existing journeys without a folder move into their moment folder, and
8115
+ * tools journeys create from now on are placed there. Tools that already have
8116
+ * a folder are never touched. Rejects with a conflict (409) while a pass is
8117
+ * already running; poll {@link status} for progress.
8118
+ */
8119
+ organize(opts?: RequestOptions): Promise<JourneyFoldersStatus>;
8120
+ }
8121
+
6556
8122
  /**
6557
8123
  * Entry point to the Woku management API.
6558
8124
  *
@@ -6581,6 +8147,7 @@ declare class Woku {
6581
8147
  readonly actionPlans: ActionPlans;
6582
8148
  readonly actionPlanGroups: ActionPlanGroups;
6583
8149
  readonly tickets: Tickets;
8150
+ readonly followUps: FollowUps;
6584
8151
  readonly ticketDestinations: TicketDestinations;
6585
8152
  readonly dispatches: Dispatches;
6586
8153
  readonly reports: Reports;
@@ -6588,6 +8155,12 @@ declare class Woku {
6588
8155
  /** Customer journeys: moments, their tools and how each one starts. */
6589
8156
  readonly journeys: Journeys;
6590
8157
  readonly quarantines: Quarantines;
8158
+ /** Folders that organize wokus and NPS, CSAT and CES tools. */
8159
+ readonly folders: Folders;
8160
+ /** Unified search, headline figures and batch moves across every tool type. */
8161
+ readonly tools: Tools;
8162
+ /** Keep journeys and their moments in folders (`Viajes > journey > moment`). */
8163
+ readonly journeyFolders: JourneyFolders;
6591
8164
  constructor(options?: WokuClientOptions | string);
6592
8165
  }
6593
8166
 
@@ -6687,4 +8260,4 @@ declare class InternalServerError extends WokuAPIError {
6687
8260
  constructor(...args: ConstructorParameters<typeof WokuAPIError>);
6688
8261
  }
6689
8262
 
6690
- export { type ApiKeyResult, type AssignTrackerByNameParams, AuthenticationError, BadRequestError, type CesTool, type Channel, ConflictError, type CreateActionPlanGroupParams, type CreateActionPlanTaskParams, type CreateCesToolParams, type CreateCsatToolParams, type CreateNpsToolParams, type CreateTicketDestinationParams, type CreateTrackerParams, type CreateWokuParams, type CreatedJourney, type CsatTool, type DeletedResult, type Dispatch, type DispatchStats, type EnrollInput, type EntitiesByTrackers, type FeedbackType, type FetchLike, InternalServerError, type InvitationsResult, type Journey, type JourneyConnection, type JourneyEnrollment, type JourneyEnrollmentPage, type JourneyEntryInfo, type JourneyEventInput, type JourneyInput, type JourneyMoment, type JourneyMomentPreview, type JourneyMomentTrigger, type JourneyRecipients, type JourneySendWindow, type JourneyStartMode, type JourneyWebhook, Journeys, type ListJourneyEnrollmentsParams, type Locale, Media, type MediaUploadParams, type MediaUploadResult, type MoveWokuParams, NotFoundError, type NpsTool, Page, type PageResponse, PayloadTooLargeError, PermissionDeniedError, type PostPlanReplyParams, type PrepareJourneyEntryInput, type PreparedJourneyEntry, RateLimitError, type ReorderActionPlanTasksParams, type RequestOptions, type Schemas, type SearchEntitiesByTrackersParams, type SendCesInvitationsParams, type SendCsatInvitationsParams, type SendInvitationsParams, type SendNpsInvitationsParams, type Severity, type ShareWokuParams, type TestConnectionResult, type Ticket, type TicketStats, type Tracker, UnprocessableEntityError, type UpdateActionPlanGroupParams, type UpdateActionPlanTaskParams, type UpdateCesToolParams, type UpdateCsatToolParams, type UpdateNpsToolParams, type UpdateTicketDestinationParams, type UpdateTicketParams, type UpdateTrackerParams, type UpdateWokuParams, type UpdateWokuSettingsParams, Woku, WokuAPIError, WokuClient, type WokuClientOptions, WokuConnectionError, WokuError, type WokuErrorBody, type WokuRecord, type WokuResource, WokuTimeoutError };
8263
+ export { type ApiKeyResult, type AssignTrackerByNameParams, AuthenticationError, BadRequestError, type CesTool, type Channel, ConflictError, type CreateActionPlanGroupParams, type CreateActionPlanTaskParams, type CreateCesToolParams, type CreateCsatToolParams, type CreateFlowParams, type CreateFolderParams, type CreateNpsToolParams, type CreateTicketDestinationParams, type CreateTrackerParams, type CreateWokuParams, type CreatedJourney, type CsatTool, type CustomTicketDestinationConfig, type CustomTicketUpdateConfig, type DailyPoint, type DeletedResult, type Dispatch, type DispatchStats, type EnrollInput, type EntitiesByTrackers, type FeedbackType, type FetchLike, type Flow, type FlowStep, type Folder, type FolderCsv, type FolderOrigin, type FolderStats, type FolderToolMetrics, Folders, type FollowUp, type FollowUpAttachment, type FollowUpCitation, type FollowUpConversation, type FollowUpLine, type FollowUpMessage, type FollowUpMessagePhase, type FollowUpOrigin, type FollowUpState, FollowUps, InternalServerError, type InvitationsResult, type Journey, type JourneyConnection, type JourneyEnrollment, type JourneyEnrollmentPage, type JourneyEntryInfo, type JourneyEventInput, JourneyFolders, type JourneyFoldersStatus, type JourneyInput, type JourneyMoment, type JourneyMomentPreview, type JourneyMomentTrigger, type JourneyRecipients, type JourneySendWindow, type JourneyStartMode, type JourneyWebhook, Journeys, type ListJourneyEnrollmentsParams, type ListToolsParams, type Locale, Media, type MediaUploadParams, type MediaUploadResult, type MoveResult, type MoveToolItemsParams, type MoveWokuParams, NotFoundError, type NpsTool, Page, type PageResponse, PayloadTooLargeError, PermissionDeniedError, type PostPlanReplyParams, type PrepareJourneyEntryInput, type PreparedJourneyEntry, RateLimitError, type ReorderActionPlanTasksParams, type RequestOptions, type Schemas, type SearchEntitiesByTrackersParams, type SendCesInvitationsParams, type SendCsatInvitationsParams, type SendInvitationsParams, type SendNpsInvitationsParams, type Severity, type ShareWokuParams, type TestConnectionResult, type Ticket, type TicketOrigin, type TicketOriginTracker, type TicketStats, type ToolHeadline, type ToolItem, type ToolItemsPageResponse, type ToolMetrics, type ToolType, type ToolTypeStats, type ToolWindow, Tools, ToolsPage, type ToolsStats, type Tracker, UnprocessableEntityError, type UpdateActionPlanGroupParams, type UpdateActionPlanTaskParams, type UpdateCesToolParams, type UpdateCsatToolParams, type UpdateFlowParams, type UpdateFolderParams, type UpdateNpsToolParams, type UpdateTicketDestinationParams, type UpdateTicketParams, type UpdateTrackerParams, type UpdateWokuParams, type UpdateWokuSettingsParams, type WhatsappAlertRecipient, Woku, WokuAPIError, WokuClient, type WokuClientOptions, WokuConnectionError, WokuError, type WokuErrorBody, type WokuRecord, type WokuResource, WokuTimeoutError };