@wokuapp/sdk 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1035,6 +1035,10 @@ interface components {
1035
1035
  audienceType?: string;
1036
1036
  };
1037
1037
  CreateNpsToolBodyDTO: {
1038
+ /** @description Require an identified response (email or phone) */
1039
+ anonymousDisabled?: boolean;
1040
+ /** @description Accept one response per identified client; anonymous answers never count */
1041
+ onlyOneResponsePerClient?: boolean;
1038
1042
  /**
1039
1043
  * Format: ObjectId
1040
1044
  * @description Folder to create the tool in. Must belong to your company. Omit for the root.
@@ -1072,6 +1076,10 @@ interface components {
1072
1076
  localizedContent?: components["schemas"]["NpsToolLocalizedContentBodyDTO"][];
1073
1077
  };
1074
1078
  UpdateNpsToolBodyDTO: {
1079
+ /** @description Require an identified response (email or phone) */
1080
+ anonymousDisabled?: boolean;
1081
+ /** @description Accept one response per identified client; anonymous answers never count */
1082
+ onlyOneResponsePerClient?: boolean;
1075
1083
  name?: string;
1076
1084
  /**
1077
1085
  * @description Recommended company/product/service fragment (e.g. "our company"), NOT the full question.
@@ -1119,6 +1127,10 @@ interface components {
1119
1127
  subject?: string;
1120
1128
  };
1121
1129
  CreateCsatToolBodyDTO: {
1130
+ /** @description Require an identified response (email or phone) */
1131
+ anonymousDisabled?: boolean;
1132
+ /** @description Accept one response per identified client; anonymous answers never count */
1133
+ onlyOneResponsePerClient?: boolean;
1122
1134
  /**
1123
1135
  * Format: ObjectId
1124
1136
  * @description Folder to create the tool in. Must belong to your company. Omit for the root.
@@ -1156,6 +1168,10 @@ interface components {
1156
1168
  localizedContent?: components["schemas"]["CsatToolLocalizedContentBodyDTO"][];
1157
1169
  };
1158
1170
  UpdateCsatToolBodyDTO: {
1171
+ /** @description Require an identified response (email or phone) */
1172
+ anonymousDisabled?: boolean;
1173
+ /** @description Accept one response per identified client; anonymous answers never count */
1174
+ onlyOneResponsePerClient?: boolean;
1159
1175
  name?: string;
1160
1176
  question?: string;
1161
1177
  subject?: string;
@@ -1188,6 +1204,10 @@ interface components {
1188
1204
  action?: string;
1189
1205
  };
1190
1206
  CreateCesToolBodyDTO: {
1207
+ /** @description Require an identified response (email or phone) */
1208
+ anonymousDisabled?: boolean;
1209
+ /** @description Accept one response per identified client; anonymous answers never count */
1210
+ onlyOneResponsePerClient?: boolean;
1191
1211
  /**
1192
1212
  * Format: ObjectId
1193
1213
  * @description Folder to create the tool in. Must belong to your company. Omit for the root.
@@ -1225,6 +1245,10 @@ interface components {
1225
1245
  localizedContent?: components["schemas"]["CesToolLocalizedContentBodyDTO"][];
1226
1246
  };
1227
1247
  UpdateCesToolBodyDTO: {
1248
+ /** @description Require an identified response (email or phone) */
1249
+ anonymousDisabled?: boolean;
1250
+ /** @description Accept one response per identified client; anonymous answers never count */
1251
+ onlyOneResponsePerClient?: boolean;
1228
1252
  name?: string;
1229
1253
  question?: string;
1230
1254
  action?: string;
@@ -1853,6 +1877,63 @@ interface components {
1853
1877
  */
1854
1878
  parentFolderId: string | null;
1855
1879
  };
1880
+ CreateReportSubscriptionDTO: {
1881
+ /** @enum {string} */
1882
+ scopeType: "folder" | "woku" | "nps" | "csat" | "ces";
1883
+ /**
1884
+ * Format: ObjectId
1885
+ * @description Folder or tool id
1886
+ */
1887
+ scopeId: string;
1888
+ /**
1889
+ * @description monthly (1st), biweekly (1st and 16th), weekly (Mondays) at 12:00 UTC with the previous complete period, or once
1890
+ * @enum {string}
1891
+ */
1892
+ frequency: "monthly" | "biweekly" | "weekly" | "once";
1893
+ /** @description Recipient emails, 1 to 10; they need no woku account */
1894
+ recipients: string[];
1895
+ /** @description Folder only: also attach the CSV */
1896
+ includeCsv?: boolean;
1897
+ /**
1898
+ * @default es
1899
+ * @enum {string}
1900
+ */
1901
+ locale: "es" | "en";
1902
+ /** @description once only: when to send it (ISO); absent = now */
1903
+ sendAt?: string;
1904
+ /** @description once only: period start (ISO) */
1905
+ periodFrom?: string;
1906
+ /** @description once only: period end (ISO, exclusive) */
1907
+ periodTo?: string;
1908
+ };
1909
+ UpdateReportSubscriptionDTO: {
1910
+ /** @enum {string} */
1911
+ frequency?: "monthly" | "biweekly" | "weekly";
1912
+ recipients?: string[];
1913
+ includeCsv?: boolean;
1914
+ /** @enum {string} */
1915
+ locale?: "es" | "en";
1916
+ /** @description false pauses, true resumes */
1917
+ active?: boolean;
1918
+ };
1919
+ SetFolderParticipantsDTO: {
1920
+ /**
1921
+ * @description One person per line: a name, an email and/or a phone (with country code), separated by commas, semicolons or tabs. A CSV pastes as is; a header row is skipped. Replaces the list; up to 500 people.
1922
+ * @example Ana Pérez, ana@acme.cl, +56 9 1234 5678
1923
+ * bo@acme.cl
1924
+ */
1925
+ text: string;
1926
+ };
1927
+ ResendToMissingParticipantsDTO: {
1928
+ /** @enum {string} */
1929
+ toolType: "woku" | "nps" | "csat" | "ces";
1930
+ /** Format: ObjectId */
1931
+ toolId: string;
1932
+ /** @enum {string} */
1933
+ channel: "email" | "whatsapp";
1934
+ /** @enum {string} */
1935
+ language?: "es" | "en";
1936
+ };
1856
1937
  MoveItemDTO: {
1857
1938
  /** @enum {string} */
1858
1939
  type: "woku" | "nps" | "csat" | "ces" | "folder";
@@ -6648,7 +6729,12 @@ interface operations {
6648
6729
  };
6649
6730
  V1FoldersController_getFolderCsv: {
6650
6731
  parameters: {
6651
- query?: never;
6732
+ query?: {
6733
+ /** @description Start of the period (ISO 8601, inclusive). Needs `to`. */
6734
+ from?: string;
6735
+ /** @description End of the period (ISO 8601, exclusive). Needs `from`. */
6736
+ to?: string;
6737
+ };
6652
6738
  header?: never;
6653
6739
  path: {
6654
6740
  id: string;
@@ -6715,6 +6801,355 @@ interface operations {
6715
6801
  };
6716
6802
  };
6717
6803
  };
6804
+ V1ReportSubscriptionsController_list: {
6805
+ parameters: {
6806
+ query?: {
6807
+ scopeType?: "folder" | "woku" | "nps" | "csat" | "ces";
6808
+ scopeId?: string;
6809
+ };
6810
+ header?: never;
6811
+ path?: never;
6812
+ cookie?: never;
6813
+ };
6814
+ requestBody?: never;
6815
+ responses: {
6816
+ /** @description Scheduled reports */
6817
+ 200: {
6818
+ headers: {
6819
+ [name: string]: unknown;
6820
+ };
6821
+ content?: never;
6822
+ };
6823
+ };
6824
+ };
6825
+ V1ReportSubscriptionsController_create: {
6826
+ parameters: {
6827
+ query?: never;
6828
+ header?: never;
6829
+ path?: never;
6830
+ cookie?: never;
6831
+ };
6832
+ requestBody: {
6833
+ content: {
6834
+ "application/json": components["schemas"]["CreateReportSubscriptionDTO"];
6835
+ };
6836
+ };
6837
+ responses: {
6838
+ /** @description Scheduled report created */
6839
+ 201: {
6840
+ headers: {
6841
+ [name: string]: unknown;
6842
+ };
6843
+ content?: never;
6844
+ };
6845
+ /** @description Validation error */
6846
+ 400: {
6847
+ headers: {
6848
+ [name: string]: unknown;
6849
+ };
6850
+ content: {
6851
+ "application/json": components["schemas"]["ValidationErrorResponseDto"];
6852
+ };
6853
+ };
6854
+ /** @description Folder or tool not found */
6855
+ 404: {
6856
+ headers: {
6857
+ [name: string]: unknown;
6858
+ };
6859
+ content?: never;
6860
+ };
6861
+ };
6862
+ };
6863
+ V1ReportSubscriptionsController_remove: {
6864
+ parameters: {
6865
+ query?: never;
6866
+ header?: never;
6867
+ path: {
6868
+ id: string;
6869
+ };
6870
+ cookie?: never;
6871
+ };
6872
+ requestBody?: never;
6873
+ responses: {
6874
+ /** @description Deleted */
6875
+ 200: {
6876
+ headers: {
6877
+ [name: string]: unknown;
6878
+ };
6879
+ content?: never;
6880
+ };
6881
+ /** @description Scheduled report not found */
6882
+ 404: {
6883
+ headers: {
6884
+ [name: string]: unknown;
6885
+ };
6886
+ content?: never;
6887
+ };
6888
+ };
6889
+ };
6890
+ V1ReportSubscriptionsController_update: {
6891
+ parameters: {
6892
+ query?: never;
6893
+ header?: never;
6894
+ path: {
6895
+ id: string;
6896
+ };
6897
+ cookie?: never;
6898
+ };
6899
+ requestBody: {
6900
+ content: {
6901
+ "application/json": components["schemas"]["UpdateReportSubscriptionDTO"];
6902
+ };
6903
+ };
6904
+ responses: {
6905
+ /** @description Scheduled report updated */
6906
+ 200: {
6907
+ headers: {
6908
+ [name: string]: unknown;
6909
+ };
6910
+ content?: never;
6911
+ };
6912
+ /** @description Scheduled report not found */
6913
+ 404: {
6914
+ headers: {
6915
+ [name: string]: unknown;
6916
+ };
6917
+ content?: never;
6918
+ };
6919
+ };
6920
+ };
6921
+ V1ReportSubscriptionsController_sendNow: {
6922
+ parameters: {
6923
+ query?: never;
6924
+ header?: never;
6925
+ path: {
6926
+ id: string;
6927
+ };
6928
+ cookie?: never;
6929
+ };
6930
+ requestBody?: never;
6931
+ responses: {
6932
+ /** @description Send result */
6933
+ 200: {
6934
+ headers: {
6935
+ [name: string]: unknown;
6936
+ };
6937
+ content?: never;
6938
+ };
6939
+ /** @description Scheduled report not found */
6940
+ 404: {
6941
+ headers: {
6942
+ [name: string]: unknown;
6943
+ };
6944
+ content?: never;
6945
+ };
6946
+ };
6947
+ };
6948
+ V1FolderParticipantsController_participation: {
6949
+ parameters: {
6950
+ query?: never;
6951
+ header?: never;
6952
+ path: {
6953
+ /** @description Folder id */
6954
+ id: string;
6955
+ };
6956
+ cookie?: never;
6957
+ };
6958
+ requestBody?: never;
6959
+ responses: {
6960
+ /** @description List and participation */
6961
+ 200: {
6962
+ headers: {
6963
+ [name: string]: unknown;
6964
+ };
6965
+ content?: never;
6966
+ };
6967
+ /** @description Folder not found */
6968
+ 404: {
6969
+ headers: {
6970
+ [name: string]: unknown;
6971
+ };
6972
+ content?: never;
6973
+ };
6974
+ };
6975
+ };
6976
+ V1FolderParticipantsController_replace: {
6977
+ parameters: {
6978
+ query?: never;
6979
+ header?: never;
6980
+ path: {
6981
+ /** @description Folder id */
6982
+ id: string;
6983
+ };
6984
+ cookie?: never;
6985
+ };
6986
+ requestBody: {
6987
+ content: {
6988
+ "application/json": components["schemas"]["SetFolderParticipantsDTO"];
6989
+ };
6990
+ };
6991
+ responses: {
6992
+ /** @description People saved, invalid lines and duplicates */
6993
+ 200: {
6994
+ headers: {
6995
+ [name: string]: unknown;
6996
+ };
6997
+ content?: never;
6998
+ };
6999
+ 400: {
7000
+ headers: {
7001
+ [name: string]: unknown;
7002
+ };
7003
+ content: {
7004
+ "application/json": components["schemas"]["ValidationErrorResponseDto"];
7005
+ };
7006
+ };
7007
+ /** @description Folder not found */
7008
+ 404: {
7009
+ headers: {
7010
+ [name: string]: unknown;
7011
+ };
7012
+ content?: never;
7013
+ };
7014
+ };
7015
+ };
7016
+ V1FolderParticipantsController_add: {
7017
+ parameters: {
7018
+ query?: never;
7019
+ header?: never;
7020
+ path: {
7021
+ /** @description Folder id */
7022
+ id: string;
7023
+ };
7024
+ cookie?: never;
7025
+ };
7026
+ requestBody: {
7027
+ content: {
7028
+ "application/json": components["schemas"]["SetFolderParticipantsDTO"];
7029
+ };
7030
+ };
7031
+ responses: {
7032
+ /** @description People added and the new total */
7033
+ 200: {
7034
+ headers: {
7035
+ [name: string]: unknown;
7036
+ };
7037
+ content?: never;
7038
+ };
7039
+ 400: {
7040
+ headers: {
7041
+ [name: string]: unknown;
7042
+ };
7043
+ content: {
7044
+ "application/json": components["schemas"]["ValidationErrorResponseDto"];
7045
+ };
7046
+ };
7047
+ /** @description Folder not found */
7048
+ 404: {
7049
+ headers: {
7050
+ [name: string]: unknown;
7051
+ };
7052
+ content?: never;
7053
+ };
7054
+ };
7055
+ };
7056
+ V1FolderParticipantsController_remove: {
7057
+ parameters: {
7058
+ query?: never;
7059
+ header?: never;
7060
+ path: {
7061
+ /** @description Folder id */
7062
+ id: string;
7063
+ };
7064
+ cookie?: never;
7065
+ };
7066
+ requestBody?: never;
7067
+ responses: {
7068
+ /** @description List deleted */
7069
+ 200: {
7070
+ headers: {
7071
+ [name: string]: unknown;
7072
+ };
7073
+ content?: never;
7074
+ };
7075
+ /** @description Folder not found */
7076
+ 404: {
7077
+ headers: {
7078
+ [name: string]: unknown;
7079
+ };
7080
+ content?: never;
7081
+ };
7082
+ };
7083
+ };
7084
+ V1FolderParticipantsController_resend: {
7085
+ parameters: {
7086
+ query?: never;
7087
+ header?: never;
7088
+ path: {
7089
+ /** @description Folder id */
7090
+ id: string;
7091
+ };
7092
+ cookie?: never;
7093
+ };
7094
+ requestBody: {
7095
+ content: {
7096
+ "application/json": components["schemas"]["ResendToMissingParticipantsDTO"];
7097
+ };
7098
+ };
7099
+ responses: {
7100
+ /** @description missing, sent, withoutContact, failed */
7101
+ 200: {
7102
+ headers: {
7103
+ [name: string]: unknown;
7104
+ };
7105
+ content?: never;
7106
+ };
7107
+ 400: {
7108
+ headers: {
7109
+ [name: string]: unknown;
7110
+ };
7111
+ content: {
7112
+ "application/json": components["schemas"]["ValidationErrorResponseDto"];
7113
+ };
7114
+ };
7115
+ /** @description Folder not found */
7116
+ 404: {
7117
+ headers: {
7118
+ [name: string]: unknown;
7119
+ };
7120
+ content?: never;
7121
+ };
7122
+ };
7123
+ };
7124
+ V1FolderParticipantsController_removeOne: {
7125
+ parameters: {
7126
+ query?: never;
7127
+ header?: never;
7128
+ path: {
7129
+ /** @description Folder id */
7130
+ id: string;
7131
+ participantId: string;
7132
+ };
7133
+ cookie?: never;
7134
+ };
7135
+ requestBody?: never;
7136
+ responses: {
7137
+ /** @description Person removed */
7138
+ 200: {
7139
+ headers: {
7140
+ [name: string]: unknown;
7141
+ };
7142
+ content?: never;
7143
+ };
7144
+ /** @description Folder not found */
7145
+ 404: {
7146
+ headers: {
7147
+ [name: string]: unknown;
7148
+ };
7149
+ content?: never;
7150
+ };
7151
+ };
7152
+ };
6718
7153
  V1ToolsController_listTools: {
6719
7154
  parameters: {
6720
7155
  query?: {
@@ -6724,7 +7159,7 @@ interface operations {
6724
7159
  types?: string[];
6725
7160
  /** @description Case and accent insensitive search over names and questions. A search is company-wide and also matches folder names. */
6726
7161
  q?: string;
6727
- sort?: "name" | "-name" | "created" | "-created";
7162
+ sort?: "name" | "-name" | "created" | "-created" | "lastResponse" | "-lastResponse";
6728
7163
  /** @description Opaque `nextCursor` of the previous page. */
6729
7164
  cursor?: string;
6730
7165
  limit?: number;
@@ -7060,6 +7495,10 @@ interface NpsTool {
7060
7495
  availableLocales?: string[];
7061
7496
  defaultLocale?: string;
7062
7497
  localizedContent?: ToolLocalizedContent[];
7498
+ /** Only identified answers (email or phone) are accepted. */
7499
+ anonymousDisabled?: boolean;
7500
+ /** Each identified client can answer once; anonymous answers never count. */
7501
+ onlyOneResponsePerClient?: boolean;
7063
7502
  createdAt?: string;
7064
7503
  }
7065
7504
  /** CSAT tool definition (curated). */
@@ -7073,6 +7512,10 @@ interface CsatTool {
7073
7512
  availableLocales?: string[];
7074
7513
  defaultLocale?: string;
7075
7514
  localizedContent?: ToolLocalizedContent[];
7515
+ /** Only identified answers (email or phone) are accepted. */
7516
+ anonymousDisabled?: boolean;
7517
+ /** Each identified client can answer once; anonymous answers never count. */
7518
+ onlyOneResponsePerClient?: boolean;
7076
7519
  createdAt?: string;
7077
7520
  }
7078
7521
  /** CES tool definition (curated). */
@@ -7086,6 +7529,10 @@ interface CesTool {
7086
7529
  availableLocales?: string[];
7087
7530
  defaultLocale?: string;
7088
7531
  localizedContent?: ToolLocalizedContent[];
7532
+ /** Only identified answers (email or phone) are accepted. */
7533
+ anonymousDisabled?: boolean;
7534
+ /** Each identified client can answer once; anonymous answers never count. */
7535
+ onlyOneResponsePerClient?: boolean;
7089
7536
  createdAt?: string;
7090
7537
  }
7091
7538
  /** Acknowledgement returned by tool deletes. */
@@ -7481,6 +7928,103 @@ interface Flow {
7481
7928
  createdAt?: string;
7482
7929
  updatedAt?: string;
7483
7930
  }
7931
+ /** What a scheduled report covers: a folder (every tool of its subtree) or one tool. */
7932
+ type ReportSubscriptionScope = 'folder' | 'woku' | 'nps' | 'csat' | 'ces';
7933
+ /** monthly (1st), biweekly (1st and 16th), weekly (Mondays) at 12:00 UTC, or once. */
7934
+ type ReportSubscriptionFrequency = 'monthly' | 'biweekly' | 'weekly' | 'once';
7935
+ /** One send of a scheduled report. */
7936
+ interface ReportSubscriptionDelivery {
7937
+ /** `YYYY-MM-DD/YYYY-MM-DD`, the period it covered (`to` exclusive). */
7938
+ periodKey: string;
7939
+ sentAt: string;
7940
+ /** Recipients that got it. */
7941
+ recipients: number;
7942
+ delivered: boolean;
7943
+ error?: string;
7944
+ }
7945
+ /** A report emailed on a schedule to people inside or outside woku. */
7946
+ interface ReportSubscription {
7947
+ id: string;
7948
+ scopeType: ReportSubscriptionScope;
7949
+ scopeId: string;
7950
+ /** Name of the folder or tool; empty when it no longer exists. */
7951
+ scopeName?: string;
7952
+ frequency: ReportSubscriptionFrequency;
7953
+ /** `once` only: the period of the single report. */
7954
+ periodFrom: string | null;
7955
+ periodTo: string | null;
7956
+ recipients: string[];
7957
+ /** Folder only: the CSV of the period is attached too. */
7958
+ includeCsv: boolean;
7959
+ locale: string;
7960
+ /** `false` when paused, or when a one-off already went out. */
7961
+ active: boolean;
7962
+ nextRunAt: string | null;
7963
+ lastDelivery: ReportSubscriptionDelivery | null;
7964
+ createdAt: string | null;
7965
+ }
7966
+ /** Outcome of `reportSubscriptions.send`. */
7967
+ interface ReportSubscriptionSendResult {
7968
+ status: 'sent' | 'skipped' | 'failed';
7969
+ sent: number;
7970
+ periodKey?: string;
7971
+ }
7972
+ /** A person of a folder's participant list. */
7973
+ interface FolderParticipant {
7974
+ /** Stable id, for `folderParticipants.remove`. */
7975
+ id: string;
7976
+ name?: string;
7977
+ email?: string;
7978
+ /** Digits with the country code, no `+`. */
7979
+ phone?: string;
7980
+ }
7981
+ /** Who of the list answered one tool of the folder subtree. */
7982
+ interface ToolParticipation {
7983
+ type: ToolType;
7984
+ id: string;
7985
+ name: string;
7986
+ folderPath: string;
7987
+ /** The tool takes anonymous responses, which cannot be matched to the list. */
7988
+ anonymousAllowed: boolean;
7989
+ /** Indexes into `participants`: answered once. */
7990
+ responded: number[];
7991
+ missing: number[];
7992
+ /** Answered more than once. */
7993
+ repeated: number[];
7994
+ /** Responses not from the list (anonymous or from someone else). */
7995
+ outsideList: number;
7996
+ }
7997
+ /** A folder's participant list and who of it answered each tool. */
7998
+ interface FolderParticipation {
7999
+ folder: {
8000
+ id: string;
8001
+ name: string;
8002
+ };
8003
+ participants: FolderParticipant[];
8004
+ updatedAt: string | null;
8005
+ tools: ToolParticipation[];
8006
+ }
8007
+ /** Outcome of `folderParticipants.replace`. */
8008
+ interface ParticipantsSaveResult {
8009
+ count: number;
8010
+ /** 1-based lines without an email or phone. */
8011
+ invalidLines: number[];
8012
+ duplicates: number;
8013
+ }
8014
+ /** Outcome of `folderParticipants.add`. */
8015
+ interface ParticipantsAddResult extends ParticipantsSaveResult {
8016
+ /** People on the list after adding. */
8017
+ total: number;
8018
+ }
8019
+ /** Outcome of `folderParticipants.resendToMissing`. */
8020
+ interface ResendToMissingResult {
8021
+ /** People of the list who have not answered the tool. */
8022
+ missing: number;
8023
+ sent: number;
8024
+ /** Missing people without a contact for the channel. */
8025
+ withoutContact: number;
8026
+ failed: number;
8027
+ }
7484
8028
 
7485
8029
  /** Read authorized follow-up conversations with a company management secret. */
7486
8030
  declare class FollowUps {
@@ -7988,8 +8532,14 @@ declare class Folders {
7988
8532
  from?: string;
7989
8533
  to?: string;
7990
8534
  }, opts?: RequestOptions): Promise<FolderToolMetrics>;
7991
- /** CSV text with one row per response of every tool of the folder subtree. */
7992
- csv(id: string, opts?: RequestOptions): Promise<FolderCsv>;
8535
+ /**
8536
+ * CSV text with one row per response of every tool of the folder subtree,
8537
+ * or only those of a period (`from` inclusive, `to` exclusive, ISO 8601).
8538
+ */
8539
+ csv(id: string, params?: {
8540
+ from?: string;
8541
+ to?: string;
8542
+ }, opts?: RequestOptions): Promise<FolderCsv>;
7993
8543
  /**
7994
8544
  * PDF of the folder report (every woku, NPS, CSAT and CES tool of the folder
7995
8545
  * and its subfolders) with a breakdown per type on each native scale.
@@ -8010,7 +8560,8 @@ interface ListToolsParams {
8010
8560
  types?: ToolType[];
8011
8561
  /** Case and accent insensitive search (company-wide, also matches folders). */
8012
8562
  q?: string;
8013
- sort?: 'name' | '-name' | 'created' | '-created';
8563
+ /** `lastResponse` orders by the latest response; tools without one sort as the oldest. */
8564
+ sort?: 'name' | '-name' | 'created' | '-created' | 'lastResponse' | '-lastResponse';
8014
8565
  /** Page size, 1-100 (default 50). */
8015
8566
  limit?: number;
8016
8567
  /** Folders per page, 1-100 (omit to receive every folder of the level). */
@@ -8097,6 +8648,92 @@ declare class JourneyFolders {
8097
8648
  organize(opts?: RequestOptions): Promise<JourneyFoldersStatus>;
8098
8649
  }
8099
8650
 
8651
+ /** Body of `reportSubscriptions.create`. */
8652
+ interface CreateReportSubscriptionParams {
8653
+ scopeType: ReportSubscriptionScope;
8654
+ /** Folder or tool id. */
8655
+ scopeId: string;
8656
+ frequency: ReportSubscriptionFrequency;
8657
+ /** 1 to 10 emails; they need no woku account. */
8658
+ recipients: string[];
8659
+ /** Folder only: also attach the CSV of the period. */
8660
+ includeCsv?: boolean;
8661
+ locale?: 'es' | 'en';
8662
+ /** `once` only: when to send it (ISO). Omit to send it within minutes. */
8663
+ sendAt?: string;
8664
+ /** `once` only: period start (ISO, inclusive). */
8665
+ periodFrom?: string;
8666
+ /** `once` only: period end (ISO, exclusive). */
8667
+ periodTo?: string;
8668
+ }
8669
+ /** Body of `reportSubscriptions.update` (recurring reports only). */
8670
+ interface UpdateReportSubscriptionParams {
8671
+ frequency?: Exclude<ReportSubscriptionFrequency, 'once'>;
8672
+ recipients?: string[];
8673
+ includeCsv?: boolean;
8674
+ locale?: 'es' | 'en';
8675
+ /** `false` pauses, `true` resumes. */
8676
+ active?: boolean;
8677
+ }
8678
+ /**
8679
+ * Reports emailed on a schedule (`/v1/report-subscriptions`): the PDF of a
8680
+ * folder or of one tool, monthly, every two weeks, weekly or once, sent as
8681
+ * the company with a one-click unsubscribe.
8682
+ */
8683
+ declare class ReportSubscriptions {
8684
+ private readonly client;
8685
+ constructor(client: WokuClient);
8686
+ /** Every scheduled report, or those of one folder or tool. */
8687
+ list(params?: {
8688
+ scopeType?: ReportSubscriptionScope;
8689
+ scopeId?: string;
8690
+ }, opts?: RequestOptions): Promise<ReportSubscription[]>;
8691
+ create(body: CreateReportSubscriptionParams, opts?: RequestOptions): Promise<ReportSubscription>;
8692
+ /** Edit, pause or resume a recurring scheduled report. */
8693
+ update(id: string, body: UpdateReportSubscriptionParams, opts?: RequestOptions): Promise<ReportSubscription>;
8694
+ delete(id: string, opts?: RequestOptions): Promise<DeletedResult>;
8695
+ /**
8696
+ * Send it now: the last complete period of a recurring report (its
8697
+ * schedule stays) or the period of a one-off (which then closes).
8698
+ */
8699
+ send(id: string, opts?: RequestOptions): Promise<ReportSubscriptionSendResult>;
8700
+ }
8701
+
8702
+ /** Body of `folderParticipants.resendToMissing`. */
8703
+ interface ResendToMissingParams {
8704
+ toolType: ToolType;
8705
+ toolId: string;
8706
+ channel: 'email' | 'whatsapp';
8707
+ language?: 'es' | 'en';
8708
+ }
8709
+ /**
8710
+ * The participant list of a folder (`/v1/folders/{id}/participants`): the
8711
+ * people expected to answer its tools and who of them did. The list is text,
8712
+ * one person per line with a name, an email and/or a phone (with its country
8713
+ * code), separated by commas, semicolons or tabs; a CSV goes as is. Up to 500
8714
+ * people.
8715
+ */
8716
+ declare class FolderParticipants {
8717
+ private readonly client;
8718
+ constructor(client: WokuClient);
8719
+ /** The list and, per tool of the folder subtree, who answered. */
8720
+ get(folderId: string, opts?: RequestOptions): Promise<FolderParticipation>;
8721
+ /** Replace the whole list. */
8722
+ replace(folderId: string, text: string, opts?: RequestOptions): Promise<ParticipantsSaveResult>;
8723
+ /** Add people; the ones already on the list are skipped. */
8724
+ add(folderId: string, text: string, opts?: RequestOptions): Promise<ParticipantsAddResult>;
8725
+ /** Remove one person (the `id` from `get`). */
8726
+ remove(folderId: string, participantId: string, opts?: RequestOptions): Promise<{
8727
+ removed: true;
8728
+ }>;
8729
+ /** Delete the whole list. Responses are never touched. */
8730
+ clear(folderId: string, opts?: RequestOptions): Promise<{
8731
+ deleted: true;
8732
+ }>;
8733
+ /** Send a tool again to the people of the list who have not answered it. */
8734
+ resendToMissing(folderId: string, body: ResendToMissingParams, opts?: RequestOptions): Promise<ResendToMissingResult>;
8735
+ }
8736
+
8100
8737
  /**
8101
8738
  * Entry point to the Woku management API.
8102
8739
  *
@@ -8134,6 +8771,10 @@ declare class Woku {
8134
8771
  readonly journeys: Journeys;
8135
8772
  /** Folders that organize wokus and NPS, CSAT and CES tools. */
8136
8773
  readonly folders: Folders;
8774
+ /** The participant list of a folder and who of it answered each tool. */
8775
+ readonly folderParticipants: FolderParticipants;
8776
+ /** Reports emailed on a schedule (monthly, every two weeks, weekly or once). */
8777
+ readonly reportSubscriptions: ReportSubscriptions;
8137
8778
  /** Unified search, headline figures and batch moves across every tool type. */
8138
8779
  readonly tools: Tools;
8139
8780
  /** Keep journeys and their moments in folders (`Viajes > journey > moment`). */
@@ -8237,4 +8878,4 @@ declare class InternalServerError extends WokuAPIError {
8237
8878
  constructor(...args: ConstructorParameters<typeof WokuAPIError>);
8238
8879
  }
8239
8880
 
8240
- 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 };
8881
+ 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 CreateReportSubscriptionParams, 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 FolderParticipant, FolderParticipants, type FolderParticipation, 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, type ParticipantsAddResult, type ParticipantsSaveResult, PayloadTooLargeError, PermissionDeniedError, type PostPlanReplyParams, type PrepareJourneyEntryInput, type PreparedJourneyEntry, RateLimitError, type ReorderActionPlanTasksParams, type ReportSubscription, type ReportSubscriptionDelivery, type ReportSubscriptionFrequency, type ReportSubscriptionScope, type ReportSubscriptionSendResult, ReportSubscriptions, type RequestOptions, type ResendToMissingParams, type ResendToMissingResult, 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 ToolParticipation, 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 UpdateReportSubscriptionParams, 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 };