@inploi/plugin-chatbot 14.18.0 → 14.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/cdn/index.js +10 -11
  2. package/cdn/style.css +1 -1
  3. package/dist/chatbot-body-B9-4nZ6I.cjs +5 -0
  4. package/dist/chatbot-body-nYJfLJVU.js +4343 -0
  5. package/dist/index-BQAeBeON.cjs +21 -0
  6. package/dist/index-DZr-JCDW.js +3214 -0
  7. package/dist/index.d.cts +547 -0
  8. package/dist/index.d.ts +547 -2
  9. package/dist/plugin-chatbot.cjs +1 -1
  10. package/dist/plugin-chatbot.js +2 -3
  11. package/dist/style.css +1 -1
  12. package/package.json +17 -12
  13. package/dist/accessible-labels.test.d.ts +0 -1
  14. package/dist/chatbot-body-568f8bdb.cjs +0 -5
  15. package/dist/chatbot-body-b81136fe.cjs +0 -5
  16. package/dist/chatbot-body-c8f256af.js +0 -4637
  17. package/dist/chatbot-body-e611f2c7.js +0 -4637
  18. package/dist/chatbot.analytics.d.ts +0 -37
  19. package/dist/chatbot.analytics.test.d.ts +0 -1
  20. package/dist/chatbot.api.d.ts +0 -26
  21. package/dist/chatbot.beacon.d.ts +0 -40
  22. package/dist/chatbot.beacon.test.d.ts +0 -1
  23. package/dist/chatbot.constants.d.ts +0 -2
  24. package/dist/chatbot.context.test.d.ts +0 -1
  25. package/dist/chatbot.d.ts +0 -104
  26. package/dist/chatbot.dom.d.ts +0 -5
  27. package/dist/chatbot.idb.d.ts +0 -73
  28. package/dist/chatbot.lifecycle.test.d.ts +0 -1
  29. package/dist/chatbot.resume.d.ts +0 -15
  30. package/dist/chatbot.resume.test.d.ts +0 -1
  31. package/dist/chatbot.state.d.ts +0 -78
  32. package/dist/chatbot.state.test.d.ts +0 -1
  33. package/dist/chatbot.storage.test.d.ts +0 -1
  34. package/dist/chatbot.utils.d.ts +0 -8
  35. package/dist/components/chat-bubble.d.ts +0 -11
  36. package/dist/components/chat-error.d.ts +0 -3
  37. package/dist/components/chat-input/chat-input.address-countries.test.d.ts +0 -1
  38. package/dist/components/chat-input/chat-input.address-geo.test.d.ts +0 -1
  39. package/dist/components/chat-input/chat-input.address.d.ts +0 -5
  40. package/dist/components/chat-input/chat-input.address.test.d.ts +0 -1
  41. package/dist/components/chat-input/chat-input.boolean.d.ts +0 -11
  42. package/dist/components/chat-input/chat-input.constants.d.ts +0 -1
  43. package/dist/components/chat-input/chat-input.d.ts +0 -12
  44. package/dist/components/chat-input/chat-input.file.d.ts +0 -8
  45. package/dist/components/chat-input/chat-input.file.test.d.ts +0 -1
  46. package/dist/components/chat-input/chat-input.multiple-choice.d.ts +0 -4
  47. package/dist/components/chat-input/chat-input.multiple-choice.test.d.ts +0 -1
  48. package/dist/components/chat-input/chat-input.number.d.ts +0 -4
  49. package/dist/components/chat-input/chat-input.phone-number.d.ts +0 -4
  50. package/dist/components/chat-input/chat-input.submit.d.ts +0 -4
  51. package/dist/components/chat-input/chat-input.submit.test.d.ts +0 -1
  52. package/dist/components/chat-input/chat-input.text.d.ts +0 -5
  53. package/dist/components/chat-input/chat-input.text.test.d.ts +0 -1
  54. package/dist/components/chat-input/input-style.d.ts +0 -3
  55. package/dist/components/chat-loading.d.ts +0 -1
  56. package/dist/components/chatbot-body.d.ts +0 -12
  57. package/dist/components/chatbot-body.lifecycle.test.d.ts +0 -1
  58. package/dist/components/chatbot.d.ts +0 -17
  59. package/dist/components/conversation.d.ts +0 -8
  60. package/dist/components/correction.test.d.ts +0 -1
  61. package/dist/components/input-error.d.ts +0 -5
  62. package/dist/components/job-alerts-offer.d.ts +0 -13
  63. package/dist/components/job-alerts-offer.test.d.ts +0 -1
  64. package/dist/components/job-alerts-privacy-line.test.d.ts +0 -1
  65. package/dist/components/loading-indicator.d.ts +0 -3
  66. package/dist/components/message.link.d.ts +0 -5
  67. package/dist/components/palette-debugger.d.ts +0 -1
  68. package/dist/components/send-button.d.ts +0 -3
  69. package/dist/components/skip-button.d.ts +0 -3
  70. package/dist/components/status-bar.d.ts +0 -22
  71. package/dist/components/status-bar.test.d.ts +0 -1
  72. package/dist/components/transition.d.ts +0 -1
  73. package/dist/components/typing-indicator.d.ts +0 -3
  74. package/dist/components/useChatService.d.ts +0 -17
  75. package/dist/components/useChatService.test.d.ts +0 -1
  76. package/dist/components/useFocus.d.ts +0 -1
  77. package/dist/i18n.d.ts +0 -776
  78. package/dist/index-0fbc8442.js +0 -3756
  79. package/dist/index-19a00d2c.js +0 -3757
  80. package/dist/index-495ec66b.cjs +0 -22
  81. package/dist/index-90fa15a1.cjs +0 -22
  82. package/dist/index.cdn.d.ts +0 -9
  83. package/dist/index.dev.d.ts +0 -8
  84. package/dist/interpreter.test.d.ts +0 -1
  85. package/dist/md.d.ts +0 -1
  86. package/dist/md.test.d.ts +0 -1
  87. package/dist/mocks/browser.d.ts +0 -1
  88. package/dist/mocks/flows.mocks.d.ts +0 -77
  89. package/dist/mocks/handlers.d.ts +0 -14
  90. package/dist/mocks/mocks.utils.d.ts +0 -5
  91. package/dist/mocks/pre-apply.mock.d.ts +0 -296
  92. package/dist/phone.test.d.ts +0 -1
  93. package/dist/progress.d.ts +0 -12
  94. package/dist/progress.test.d.ts +0 -1
  95. package/dist/rpc.d.ts +0 -1
  96. package/dist/style/theme.d.ts +0 -3
  97. package/dist/style/theme.utils.d.ts +0 -6
  98. package/dist/style/tokens.d.ts +0 -86
  99. package/dist/widget-version.d.ts +0 -9
  100. package/dist/widget-version.test.d.ts +0 -1
  101. /package/dist/{common.geo-transport-CJGUJXTA-1d0a086a.js → common.geo-transport-CJGUJXTA-BsgnqoTX.js} +0 -0
  102. /package/dist/{common.geo-transport-CJGUJXTA-2b8bbb52.cjs → common.geo-transport-CJGUJXTA-DQyNyTXw.cjs} +0 -0
@@ -0,0 +1,547 @@
1
+ import type { AnalyticsService } from '@inploi/sdk' with { 'resolution-mode': 'import' };
2
+ import type { ApiClient } from '@inploi/sdk' with { 'resolution-mode': 'import' };
3
+ import type { FeedbackPlugin } from '@inploi/plugin-feedback' with { 'resolution-mode': 'import' };
4
+ import type { feedbackPlugin } from '@inploi/plugin-feedback' with { 'resolution-mode': 'import' };
5
+ import type { FeedbackPluginParams } from '@inploi/plugin-feedback' with { 'resolution-mode': 'import' };
6
+ import type { Flow } from '@inploi/flows/endpoints' with { 'resolution-mode': 'import' };
7
+ import type { InploiRpcClient } from '@inploi/sdk' with { 'resolution-mode': 'import' };
8
+ import type { InploiSdkEnvironment } from '@inploi/sdk' with { 'resolution-mode': 'import' };
9
+ import type { Logger } from '@inploi/sdk' with { 'resolution-mode': 'import' };
10
+
11
+ export declare type Chatbot = ReturnType<ReturnType<ChatbotPlugin>>;
12
+
13
+ declare type ChatbotDomManager = ReturnType<typeof createChatbotDomManager>;
14
+
15
+ export declare type ChatbotFeedback = {
16
+ plugin: FeedbackPlugin | Promise<{
17
+ feedbackPlugin: typeof feedbackPlugin;
18
+ }>;
19
+ params?: Pick<FeedbackPluginParams, 'terms'>;
20
+ };
21
+
22
+ export declare type ChatbotPlugin = typeof chatbotPlugin;
23
+
24
+ export declare const chatbotPlugin: ({ _internal_domManager: dom, theme, terms, feedback, jobAlerts, }: InternalChatbotPluginParams) => ({ apiClient, rpcClient, logger, analytics, publishableKey, env }: {
25
+ apiClient: ApiClient;
26
+ rpcClient: InploiRpcClient;
27
+ logger: Logger;
28
+ analytics: AnalyticsService;
29
+ publishableKey?: string;
30
+ env?: InploiSdkEnvironment;
31
+ }) => {
32
+ /** Optionally eagerly renders the interface ahead of needing the chatbot. */
33
+ prepare: () => Promise<void>;
34
+ /** Fetches a flow by job ID.
35
+ * @param jobId - The job ID to fetch the flow for. This is the job ID according to the **ATS**, and not the inploi job ID.
36
+ */
37
+ fetchFlowByJobId: (jobId: string, additionalProperties?: FetchFlowByJobIdAdditionalProperties) => Promise<OpenChatbotParams>;
38
+ fetchFlowById: (flowId: string, additionalProperties?: FetchFlowByIdAdditionalProperties) => Promise<OpenChatbotParams>;
39
+ open: (params: OpenChatbotParams | Promise<OpenChatbotParams>) => Promise<void>;
40
+ /**
41
+ * Whether this browser holds an application in progress that `open(params)` would load: the same saved state
42
+ * under the same key, unfinished, with an answer, including one whose submit started. The candidate loader
43
+ * keeps such a candidate on this chatbot rather than move them mid-application (PROD-7342).
44
+ */
45
+ hasApplicationInProgress: (params: OpenChatbotParams) => Promise<boolean>;
46
+ /**
47
+ * Whether this browser holds an application in progress for any job: the candidate loader's question when it
48
+ * cannot load this page's flow to ask `hasApplicationInProgress` (CF-06). Without the flow's nodes, any saved
49
+ * answer counts.
50
+ */
51
+ hasAnyApplicationInProgress: () => Promise<boolean>;
52
+ close: () => Promise<void>;
53
+ destroy: () => void;
54
+ };
55
+
56
+ export declare type ChatbotPluginParams = RemoveInternal<InternalChatbotPluginParams>;
57
+
58
+ export declare type ChatbotTheme = {
59
+ /** Rotation for the hue. Between 0 and 360. */
60
+ hue: number;
61
+ /** Chroma multiplier. Values between 0 and 1.5 work best. */
62
+ chroma?: number;
63
+ mode: 'light' | 'dark';
64
+ };
65
+
66
+ /** Dictionary of translation terms for the chatbot plugin */
67
+ export declare type ChatbotTranslationTerms = Parameters<typeof createTFunction>[0]['overrides'] | undefined;
68
+
69
+ declare const createChatbotDomManager: () => {
70
+ getChatbotElement: () => HTMLDivElement | null;
71
+ getOrCreateChatbotElement: () => HTMLDivElement;
72
+ };
73
+
74
+ declare const createTFunction: <T extends {
75
+ readonly error_heading: "Something unexpected happened";
76
+ readonly flow_closed: "This role is no longer accepting applications.";
77
+ readonly undo: "Change answer";
78
+ readonly job_alerts_offer: "Want to hear about similar roles? We can email you at {{email}} when new ones open.";
79
+ readonly job_alerts_accept: "Get job alerts";
80
+ readonly job_alerts_decline: "No thanks";
81
+ readonly job_alerts_privacy: "We'll use your email only for these alerts. You can unsubscribe at any time.";
82
+ readonly job_alerts_privacy_sender: "{{employer}} will email you new jobs like this one. Every email has an unsubscribe link.";
83
+ readonly job_alerts_success: "Done. We'll email you about similar roles.";
84
+ readonly job_alerts_error: "Sorry, we couldn't set that up. Please try again later.";
85
+ readonly submission_duplicate: "You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.";
86
+ readonly submission_retryable: "We couldn't submit your application. Please try again.";
87
+ readonly submission_unknown: "We couldn't confirm whether your application was sent. Please check your email for a confirmation. If nothing arrives, choose Restart to apply again.";
88
+ readonly maximize: "Maximise";
89
+ readonly submit: "Submit";
90
+ readonly file_more: {
91
+ readonly one: "+{{count}} file";
92
+ readonly other: "+{{count}} files";
93
+ };
94
+ readonly conversation_history: string;
95
+ readonly jump_to_current: string;
96
+ readonly send: string;
97
+ readonly submitting: string;
98
+ readonly skip: string;
99
+ readonly skipped: string;
100
+ readonly submission_closed: string;
101
+ readonly submission_duplicate_earlier_attempt: string;
102
+ readonly submission_failed: string;
103
+ readonly submission_unknown_do_not_resubmit: string;
104
+ readonly submission_unreadable_document: string;
105
+ readonly submission_cooldown: {
106
+ one: string;
107
+ other: string;
108
+ };
109
+ readonly submission_cooldown_ready: string;
110
+ readonly captcha_check: string;
111
+ readonly submission_still_working: string;
112
+ readonly file_preparing: {
113
+ one: string;
114
+ other: string;
115
+ };
116
+ readonly file_ready: {
117
+ one: string;
118
+ other: string;
119
+ };
120
+ readonly file_read_error: string;
121
+ readonly file_read_error_replacement: string;
122
+ readonly address_error: string;
123
+ readonly address_searching: string;
124
+ readonly address_no_results: string;
125
+ readonly restart: string;
126
+ readonly chat_messages: string;
127
+ readonly file_name: string;
128
+ readonly file_size: string;
129
+ readonly file_total_size: string;
130
+ readonly loading: string;
131
+ readonly minimize: string;
132
+ readonly submission_redirect_message: "One last step: finish your application on the employer's site.";
133
+ readonly complete_submission: "Continue on the employer's site";
134
+ readonly submission_completed: "Submission completed!";
135
+ readonly submission_pending: "Thanks, we've received your application and are processing it.";
136
+ readonly submission_provider_maintenance: "Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.";
137
+ readonly submission_provider_maintenance_later: "Sorry, our recruitment system is down for scheduled maintenance until later today. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.";
138
+ readonly submission_available_at: "Submit will be available again at {{time}}.";
139
+ readonly resume_prompt: "You have an unfinished application for this role. Continue where you left off?";
140
+ readonly resume_continue: "Continue";
141
+ readonly resume_start_again: "Start again";
142
+ readonly captcha_failed: "Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.";
143
+ readonly close_application: "Close application";
144
+ readonly invalid_state: "Invalid application state";
145
+ readonly redirect_url_error: "Couldn\u2019t get the redirect URL.";
146
+ readonly upload_file: {
147
+ readonly one: "Select file to upload";
148
+ readonly other: "Select files to upload";
149
+ };
150
+ readonly file_max_size: "max {{size}}";
151
+ readonly file_extensions: "Accepted file extensions";
152
+ readonly address_search: "Type and search for places\u2026";
153
+ readonly address_manual: "Fill in manually";
154
+ readonly back: "Back";
155
+ readonly search: "Search";
156
+ readonly unknown_error: "An error occurred";
157
+ readonly line1: "Line 1";
158
+ readonly line2: "Line 2";
159
+ readonly line3: "Line 3";
160
+ readonly city: "City";
161
+ readonly state: "State";
162
+ readonly postcode: "Postcode";
163
+ readonly country: "Country";
164
+ readonly select_country: "Select a country";
165
+ readonly validation_empty: "Please enter a value";
166
+ readonly validation_date: "Please enter a valid date (YYYY-MM-DD)";
167
+ readonly validation_email: "That doesn\u2019t look like a valid email address";
168
+ readonly validation_url: "That doesn\u2019t look like a valid URL";
169
+ readonly validation_max_chars: "Please enter no more than {{count}} characters";
170
+ readonly validation_min_chars: "Please enter {{count}} or more characters";
171
+ readonly validation_phone: "Please enter a valid phone number";
172
+ readonly validation_phone_min_chars: "Your phone number must be at least {{count}} digits long";
173
+ readonly validation_country_code: "Please select a country code";
174
+ readonly validation_number: "Please enter a valid number";
175
+ readonly validation_number_min: "Please enter a number greater than or equal to {{min}}";
176
+ readonly validation_number_max: "Please enter a number less than or equal to {{max}}";
177
+ readonly validation_number_whole: "Enter a whole number";
178
+ readonly validation_number_decimal_cases: "Please enter a number with at most {{count}} decimal cases";
179
+ readonly validation_file: "Please select a file";
180
+ readonly validation_file_ext: "Please only upload {{ext}} files";
181
+ readonly validation_file_min: {
182
+ readonly one: "Please upload at least one file";
183
+ readonly other: "Please only upload at least {{count}} files";
184
+ };
185
+ readonly validation_file_max: {
186
+ readonly one: "Please only upload one file";
187
+ readonly other: "Please only upload up to {{count}} files";
188
+ };
189
+ readonly validation_file_size: "Your file is too big. Please upload a file smaller than {{size}}";
190
+ readonly validation_file_empty: "This file is empty. If it\u2019s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.";
191
+ readonly validation_required: "This field is required.";
192
+ readonly validation_multiple_choice_min: {
193
+ readonly one: "Please select at least {{count}} option";
194
+ readonly other: "Please select at least {{count}} options";
195
+ };
196
+ readonly validation_multiple_choice_max: {
197
+ readonly one: "Please select at most {{count}} option";
198
+ readonly other: "Please select at most {{count}} options";
199
+ };
200
+ readonly optional: "optional";
201
+ } = {
202
+ readonly error_heading: "Something unexpected happened";
203
+ readonly flow_closed: "This role is no longer accepting applications.";
204
+ readonly undo: "Change answer";
205
+ readonly job_alerts_offer: "Want to hear about similar roles? We can email you at {{email}} when new ones open.";
206
+ readonly job_alerts_accept: "Get job alerts";
207
+ readonly job_alerts_decline: "No thanks";
208
+ readonly job_alerts_privacy: "We'll use your email only for these alerts. You can unsubscribe at any time.";
209
+ readonly job_alerts_privacy_sender: "{{employer}} will email you new jobs like this one. Every email has an unsubscribe link.";
210
+ readonly job_alerts_success: "Done. We'll email you about similar roles.";
211
+ readonly job_alerts_error: "Sorry, we couldn't set that up. Please try again later.";
212
+ readonly submission_duplicate: "You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.";
213
+ readonly submission_retryable: "We couldn't submit your application. Please try again.";
214
+ readonly submission_unknown: "We couldn't confirm whether your application was sent. Please check your email for a confirmation. If nothing arrives, choose Restart to apply again.";
215
+ readonly maximize: "Maximise";
216
+ readonly submit: "Submit";
217
+ readonly file_more: {
218
+ readonly one: "+{{count}} file";
219
+ readonly other: "+{{count}} files";
220
+ };
221
+ readonly conversation_history: string;
222
+ readonly jump_to_current: string;
223
+ readonly send: string;
224
+ readonly submitting: string;
225
+ readonly skip: string;
226
+ readonly skipped: string;
227
+ readonly submission_closed: string;
228
+ readonly submission_duplicate_earlier_attempt: string;
229
+ readonly submission_failed: string;
230
+ readonly submission_unknown_do_not_resubmit: string;
231
+ readonly submission_unreadable_document: string;
232
+ readonly submission_cooldown: {
233
+ one: string;
234
+ other: string;
235
+ };
236
+ readonly submission_cooldown_ready: string;
237
+ readonly captcha_check: string;
238
+ readonly submission_still_working: string;
239
+ readonly file_preparing: {
240
+ one: string;
241
+ other: string;
242
+ };
243
+ readonly file_ready: {
244
+ one: string;
245
+ other: string;
246
+ };
247
+ readonly file_read_error: string;
248
+ readonly file_read_error_replacement: string;
249
+ readonly address_error: string;
250
+ readonly address_searching: string;
251
+ readonly address_no_results: string;
252
+ readonly restart: string;
253
+ readonly chat_messages: string;
254
+ readonly file_name: string;
255
+ readonly file_size: string;
256
+ readonly file_total_size: string;
257
+ readonly loading: string;
258
+ readonly minimize: string;
259
+ readonly submission_redirect_message: "One last step: finish your application on the employer's site.";
260
+ readonly complete_submission: "Continue on the employer's site";
261
+ readonly submission_completed: "Submission completed!";
262
+ readonly submission_pending: "Thanks, we've received your application and are processing it.";
263
+ readonly submission_provider_maintenance: "Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.";
264
+ readonly submission_provider_maintenance_later: "Sorry, our recruitment system is down for scheduled maintenance until later today. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.";
265
+ readonly submission_available_at: "Submit will be available again at {{time}}.";
266
+ readonly resume_prompt: "You have an unfinished application for this role. Continue where you left off?";
267
+ readonly resume_continue: "Continue";
268
+ readonly resume_start_again: "Start again";
269
+ readonly captcha_failed: "Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.";
270
+ readonly close_application: "Close application";
271
+ readonly invalid_state: "Invalid application state";
272
+ readonly redirect_url_error: "Couldn\u2019t get the redirect URL.";
273
+ readonly upload_file: {
274
+ readonly one: "Select file to upload";
275
+ readonly other: "Select files to upload";
276
+ };
277
+ readonly file_max_size: "max {{size}}";
278
+ readonly file_extensions: "Accepted file extensions";
279
+ readonly address_search: "Type and search for places\u2026";
280
+ readonly address_manual: "Fill in manually";
281
+ readonly back: "Back";
282
+ readonly search: "Search";
283
+ readonly unknown_error: "An error occurred";
284
+ readonly line1: "Line 1";
285
+ readonly line2: "Line 2";
286
+ readonly line3: "Line 3";
287
+ readonly city: "City";
288
+ readonly state: "State";
289
+ readonly postcode: "Postcode";
290
+ readonly country: "Country";
291
+ readonly select_country: "Select a country";
292
+ readonly validation_empty: "Please enter a value";
293
+ readonly validation_date: "Please enter a valid date (YYYY-MM-DD)";
294
+ readonly validation_email: "That doesn\u2019t look like a valid email address";
295
+ readonly validation_url: "That doesn\u2019t look like a valid URL";
296
+ readonly validation_max_chars: "Please enter no more than {{count}} characters";
297
+ readonly validation_min_chars: "Please enter {{count}} or more characters";
298
+ readonly validation_phone: "Please enter a valid phone number";
299
+ readonly validation_phone_min_chars: "Your phone number must be at least {{count}} digits long";
300
+ readonly validation_country_code: "Please select a country code";
301
+ readonly validation_number: "Please enter a valid number";
302
+ readonly validation_number_min: "Please enter a number greater than or equal to {{min}}";
303
+ readonly validation_number_max: "Please enter a number less than or equal to {{max}}";
304
+ readonly validation_number_whole: "Enter a whole number";
305
+ readonly validation_number_decimal_cases: "Please enter a number with at most {{count}} decimal cases";
306
+ readonly validation_file: "Please select a file";
307
+ readonly validation_file_ext: "Please only upload {{ext}} files";
308
+ readonly validation_file_min: {
309
+ readonly one: "Please upload at least one file";
310
+ readonly other: "Please only upload at least {{count}} files";
311
+ };
312
+ readonly validation_file_max: {
313
+ readonly one: "Please only upload one file";
314
+ readonly other: "Please only upload up to {{count}} files";
315
+ };
316
+ readonly validation_file_size: "Your file is too big. Please upload a file smaller than {{size}}";
317
+ readonly validation_file_empty: "This file is empty. If it\u2019s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.";
318
+ readonly validation_required: "This field is required.";
319
+ readonly validation_multiple_choice_min: {
320
+ readonly one: "Please select at least {{count}} option";
321
+ readonly other: "Please select at least {{count}} options";
322
+ };
323
+ readonly validation_multiple_choice_max: {
324
+ readonly one: "Please select at most {{count}} option";
325
+ readonly other: "Please select at most {{count}} options";
326
+ };
327
+ readonly optional: "optional";
328
+ }>(options: {
329
+ overrides: Partial<TranslationDict< {
330
+ readonly error_heading: "Something unexpected happened";
331
+ readonly flow_closed: "This role is no longer accepting applications.";
332
+ readonly undo: "Change answer";
333
+ readonly job_alerts_offer: "Want to hear about similar roles? We can email you at {{email}} when new ones open.";
334
+ readonly job_alerts_accept: "Get job alerts";
335
+ readonly job_alerts_decline: "No thanks";
336
+ readonly job_alerts_privacy: "We'll use your email only for these alerts. You can unsubscribe at any time.";
337
+ readonly job_alerts_privacy_sender: "{{employer}} will email you new jobs like this one. Every email has an unsubscribe link.";
338
+ readonly job_alerts_success: "Done. We'll email you about similar roles.";
339
+ readonly job_alerts_error: "Sorry, we couldn't set that up. Please try again later.";
340
+ readonly submission_duplicate: "You've already applied for this role, so we haven't submitted a second application. If that doesn't sound right, check your email for a confirmation or try again in a few minutes.";
341
+ readonly submission_retryable: "We couldn't submit your application. Please try again.";
342
+ readonly submission_unknown: "We couldn't confirm whether your application was sent. Please check your email for a confirmation. If nothing arrives, choose Restart to apply again.";
343
+ readonly maximize: "Maximise";
344
+ readonly submit: "Submit";
345
+ readonly file_more: {
346
+ readonly one: "+{{count}} file";
347
+ readonly other: "+{{count}} files";
348
+ };
349
+ readonly conversation_history: string;
350
+ readonly jump_to_current: string;
351
+ readonly send: string;
352
+ readonly submitting: string;
353
+ readonly skip: string;
354
+ readonly skipped: string;
355
+ readonly submission_closed: string;
356
+ readonly submission_duplicate_earlier_attempt: string;
357
+ readonly submission_failed: string;
358
+ readonly submission_unknown_do_not_resubmit: string;
359
+ readonly submission_unreadable_document: string;
360
+ readonly submission_cooldown: {
361
+ one: string;
362
+ other: string;
363
+ };
364
+ readonly submission_cooldown_ready: string;
365
+ readonly captcha_check: string;
366
+ readonly submission_still_working: string;
367
+ readonly file_preparing: {
368
+ one: string;
369
+ other: string;
370
+ };
371
+ readonly file_ready: {
372
+ one: string;
373
+ other: string;
374
+ };
375
+ readonly file_read_error: string;
376
+ readonly file_read_error_replacement: string;
377
+ readonly address_error: string;
378
+ readonly address_searching: string;
379
+ readonly address_no_results: string;
380
+ readonly restart: string;
381
+ readonly chat_messages: string;
382
+ readonly file_name: string;
383
+ readonly file_size: string;
384
+ readonly file_total_size: string;
385
+ readonly loading: string;
386
+ readonly minimize: string;
387
+ readonly submission_redirect_message: "One last step: finish your application on the employer's site.";
388
+ readonly complete_submission: "Continue on the employer's site";
389
+ readonly submission_completed: "Submission completed!";
390
+ readonly submission_pending: "Thanks, we've received your application and are processing it.";
391
+ readonly submission_provider_maintenance: "Sorry, our recruitment system is down for scheduled maintenance until about {{time}}. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.";
392
+ readonly submission_provider_maintenance_later: "Sorry, our recruitment system is down for scheduled maintenance until later today. Please keep this page open and try again when maintenance ends. We apologise for the inconvenience.";
393
+ readonly submission_available_at: "Submit will be available again at {{time}}.";
394
+ readonly resume_prompt: "You have an unfinished application for this role. Continue where you left off?";
395
+ readonly resume_continue: "Continue";
396
+ readonly resume_start_again: "Start again";
397
+ readonly captcha_failed: "Cloudflare seems to think you're a robot. If that's not the case, please try again in a moment.";
398
+ readonly close_application: "Close application";
399
+ readonly invalid_state: "Invalid application state";
400
+ readonly redirect_url_error: "Couldn\u2019t get the redirect URL.";
401
+ readonly upload_file: {
402
+ readonly one: "Select file to upload";
403
+ readonly other: "Select files to upload";
404
+ };
405
+ readonly file_max_size: "max {{size}}";
406
+ readonly file_extensions: "Accepted file extensions";
407
+ readonly address_search: "Type and search for places\u2026";
408
+ readonly address_manual: "Fill in manually";
409
+ readonly back: "Back";
410
+ readonly search: "Search";
411
+ readonly unknown_error: "An error occurred";
412
+ readonly line1: "Line 1";
413
+ readonly line2: "Line 2";
414
+ readonly line3: "Line 3";
415
+ readonly city: "City";
416
+ readonly state: "State";
417
+ readonly postcode: "Postcode";
418
+ readonly country: "Country";
419
+ readonly select_country: "Select a country";
420
+ readonly validation_empty: "Please enter a value";
421
+ readonly validation_date: "Please enter a valid date (YYYY-MM-DD)";
422
+ readonly validation_email: "That doesn\u2019t look like a valid email address";
423
+ readonly validation_url: "That doesn\u2019t look like a valid URL";
424
+ readonly validation_max_chars: "Please enter no more than {{count}} characters";
425
+ readonly validation_min_chars: "Please enter {{count}} or more characters";
426
+ readonly validation_phone: "Please enter a valid phone number";
427
+ readonly validation_phone_min_chars: "Your phone number must be at least {{count}} digits long";
428
+ readonly validation_country_code: "Please select a country code";
429
+ readonly validation_number: "Please enter a valid number";
430
+ readonly validation_number_min: "Please enter a number greater than or equal to {{min}}";
431
+ readonly validation_number_max: "Please enter a number less than or equal to {{max}}";
432
+ readonly validation_number_whole: "Enter a whole number";
433
+ readonly validation_number_decimal_cases: "Please enter a number with at most {{count}} decimal cases";
434
+ readonly validation_file: "Please select a file";
435
+ readonly validation_file_ext: "Please only upload {{ext}} files";
436
+ readonly validation_file_min: {
437
+ readonly one: "Please upload at least one file";
438
+ readonly other: "Please only upload at least {{count}} files";
439
+ };
440
+ readonly validation_file_max: {
441
+ readonly one: "Please only upload one file";
442
+ readonly other: "Please only upload up to {{count}} files";
443
+ };
444
+ readonly validation_file_size: "Your file is too big. Please upload a file smaller than {{size}}";
445
+ readonly validation_file_empty: "This file is empty. If it\u2019s saved in iCloud, Google Drive or OneDrive, download it to your device, then select it again.";
446
+ readonly validation_required: "This field is required.";
447
+ readonly validation_multiple_choice_min: {
448
+ readonly one: "Please select at least {{count}} option";
449
+ readonly other: "Please select at least {{count}} options";
450
+ };
451
+ readonly validation_multiple_choice_max: {
452
+ readonly one: "Please select at most {{count}} option";
453
+ readonly other: "Please select at most {{count}} options";
454
+ };
455
+ readonly optional: "optional";
456
+ }>>;
457
+ locale: string | undefined;
458
+ }) => TFn<T>;
459
+
460
+ /** Given a string with double curly braces, returns the content of all curly braces. */
461
+ declare type ExtractParams<T extends string> = T extends `${infer Head}{{${infer Param}}}${infer Tail}` ? Param | ExtractParams<Tail> : never;
462
+
463
+ export declare type FetchFlowByIdAdditionalProperties = Partial<OpenChatbotParams>;
464
+
465
+ export declare type FetchFlowByJobIdAdditionalProperties = Partial<OpenChatbotParams & {
466
+ /** What type of id to use. Defaults to `ats` */
467
+ idType: 'inploi' | 'ats';
468
+ }>;
469
+
470
+ declare type HintedString<KnownValues> = (string & {}) | KnownValues;
471
+
472
+ declare type InternalChatbotPluginParams = {
473
+ theme: ChatbotTheme;
474
+ feedback?: ChatbotFeedback;
475
+ terms?: ChatbotTranslationTerms;
476
+ /** Offer email alerts after a submitted application reports that the role closed. */
477
+ jobAlerts?: boolean;
478
+ /** @deprecated For internal usage only */
479
+ _internal_domManager?: ChatbotDomManager;
480
+ };
481
+
482
+ export declare type OpenChatbotParams = {
483
+ /** Overrides the plugin's job-alert offer for this application. */
484
+ jobAlerts?: boolean;
485
+ /** The application flow to be interpreted */
486
+ flow: Flow;
487
+ /** Specify the cache keys for restoring this flow from local state.
488
+ * This will be appended *in addition* to the flow id and version passed to `flow` property.
489
+ * @example [job.id] if you want the flows to be unique per job.
490
+ */
491
+ flowKeys: string[];
492
+ analytics?: {
493
+ /** Data to be forwarded to analytics events as custom properties. */
494
+ customProperties?: Record<string, unknown>;
495
+ };
496
+ /** Job context returned by the API; host context wins at every leaf. */
497
+ jobContext?: Record<string, unknown>;
498
+ /** Host context to be used by nodes internally and to identify saved drafts. */
499
+ context?: Record<string, unknown>;
500
+ /** Title to display in the status bar */
501
+ title: string;
502
+ /** Who sends the job alerts the closed-role offer sets up: the api's company name, which their emails come from. */
503
+ employer?: string;
504
+ job?: {
505
+ id: string;
506
+ /** Whether the job id is an internal (inploi) or external.
507
+ * Use `external` if unsure */
508
+ id_type: 'internal' | 'external';
509
+ };
510
+ /** Coordinates used to order address suggestions by proximity */
511
+ locationOrigin?: {
512
+ lat?: number;
513
+ lng?: number;
514
+ };
515
+ };
516
+
517
+ declare type RemoveInternal<T extends object> = {
518
+ [P in keyof T as string extends P ? never : P extends `_${string}` ? never : P]: T[P];
519
+ };
520
+
521
+ declare type Terms = Record<string, string | TranslationWithPlurals>;
522
+
523
+ declare interface TFn<TTerms extends Terms> {
524
+ <K extends TranslationKeyWithParams<TTerms>>(key: K, options: TTerms[K] extends string ? {
525
+ [_Term in ExtractParams<TTerms[K]>]: number | string;
526
+ } : {
527
+ [_Term in ExtractParams<TTerms[K][keyof TTerms[K]] & string> | 'count']: number | string;
528
+ }): string;
529
+ <T extends Exclude<keyof (keyof TranslationDict<TTerms>), TranslationKeyWithParams<TTerms>>>(key: T): string;
530
+ <T extends keyof TranslationDict<TTerms>>(key: T, options?: {
531
+ [key: string]: string | number;
532
+ }): string;
533
+ }
534
+
535
+ declare type TranslationDict<TTerms extends Terms> = {
536
+ [K in keyof TTerms]: TTerms[K] extends TranslationWithPlurals ? {
537
+ [J in keyof TTerms[K]]: HintedString<TTerms[K][J]>;
538
+ } : HintedString<TTerms[K]>;
539
+ };
540
+
541
+ declare type TranslationKeyWithParams<TTerms extends Terms> = {
542
+ [K in keyof TTerms]: TTerms[K] extends TranslationWithPlurals ? K : ExtractParams<TTerms[K] & string> extends never ? never : K;
543
+ }[keyof TranslationDict<TTerms>];
544
+
545
+ declare type TranslationWithPlurals = Partial<Record<Intl.LDMLPluralRule, string>>;
546
+
547
+ export { }