@recovr/sdk 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +139 -2
  3. package/dist/cjs/client.d.ts +36 -0
  4. package/dist/cjs/client.js +100 -0
  5. package/dist/cjs/errors.d.ts +31 -0
  6. package/dist/cjs/errors.js +69 -0
  7. package/dist/cjs/generated/client/client.gen.d.ts +2 -0
  8. package/dist/cjs/generated/client/client.gen.js +220 -0
  9. package/dist/cjs/generated/client/index.d.ts +10 -0
  10. package/dist/cjs/generated/client/index.js +17 -0
  11. package/dist/cjs/generated/client/types.gen.d.ts +120 -0
  12. package/dist/cjs/generated/client/types.gen.js +3 -0
  13. package/dist/cjs/generated/client/utils.gen.d.ts +37 -0
  14. package/dist/cjs/generated/client/utils.gen.js +239 -0
  15. package/dist/cjs/generated/client.gen.d.ts +12 -0
  16. package/dist/cjs/generated/client.gen.js +6 -0
  17. package/dist/cjs/generated/core/auth.gen.d.ts +25 -0
  18. package/dist/cjs/generated/core/auth.gen.js +18 -0
  19. package/dist/cjs/generated/core/bodySerializer.gen.d.ts +25 -0
  20. package/dist/cjs/generated/core/bodySerializer.gen.js +60 -0
  21. package/dist/cjs/generated/core/params.gen.d.ts +43 -0
  22. package/dist/cjs/generated/core/params.gen.js +112 -0
  23. package/dist/cjs/generated/core/pathSerializer.gen.d.ts +33 -0
  24. package/dist/cjs/generated/core/pathSerializer.gen.js +115 -0
  25. package/dist/cjs/generated/core/queryKeySerializer.gen.d.ts +18 -0
  26. package/dist/cjs/generated/core/queryKeySerializer.gen.js +98 -0
  27. package/dist/cjs/generated/core/serverSentEvents.gen.d.ts +71 -0
  28. package/dist/cjs/generated/core/serverSentEvents.gen.js +135 -0
  29. package/dist/cjs/generated/core/types.gen.d.ts +83 -0
  30. package/dist/cjs/generated/core/types.gen.js +3 -0
  31. package/dist/cjs/generated/core/utils.gen.d.ts +19 -0
  32. package/dist/cjs/generated/core/utils.gen.js +93 -0
  33. package/dist/cjs/generated/index.d.ts +2 -0
  34. package/dist/cjs/generated/index.js +6 -0
  35. package/dist/cjs/generated/sdk.gen.d.ts +225 -0
  36. package/dist/cjs/generated/sdk.gen.js +825 -0
  37. package/dist/cjs/generated/types.gen.d.ts +2455 -0
  38. package/dist/cjs/generated/types.gen.js +3 -0
  39. package/dist/cjs/index.d.ts +4 -0
  40. package/dist/cjs/index.js +11 -0
  41. package/dist/cjs/package.json +3 -0
  42. package/dist/cjs/paginate.d.ts +24 -0
  43. package/dist/cjs/paginate.js +18 -0
  44. package/dist/esm/client.d.ts +36 -0
  45. package/dist/esm/client.js +95 -0
  46. package/dist/esm/errors.d.ts +31 -0
  47. package/dist/esm/errors.js +64 -0
  48. package/dist/esm/generated/client/client.gen.d.ts +2 -0
  49. package/dist/esm/generated/client/client.gen.js +216 -0
  50. package/dist/esm/generated/client/index.d.ts +10 -0
  51. package/dist/esm/generated/client/index.js +6 -0
  52. package/dist/esm/generated/client/types.gen.d.ts +120 -0
  53. package/dist/esm/generated/client/types.gen.js +2 -0
  54. package/dist/esm/generated/client/utils.gen.d.ts +37 -0
  55. package/dist/esm/generated/client/utils.gen.js +228 -0
  56. package/dist/esm/generated/client.gen.d.ts +12 -0
  57. package/dist/esm/generated/client.gen.js +3 -0
  58. package/dist/esm/generated/core/auth.gen.d.ts +25 -0
  59. package/dist/esm/generated/core/auth.gen.js +14 -0
  60. package/dist/esm/generated/core/bodySerializer.gen.d.ts +25 -0
  61. package/dist/esm/generated/core/bodySerializer.gen.js +57 -0
  62. package/dist/esm/generated/core/params.gen.d.ts +43 -0
  63. package/dist/esm/generated/core/params.gen.js +109 -0
  64. package/dist/esm/generated/core/pathSerializer.gen.d.ts +33 -0
  65. package/dist/esm/generated/core/pathSerializer.gen.js +106 -0
  66. package/dist/esm/generated/core/queryKeySerializer.gen.d.ts +18 -0
  67. package/dist/esm/generated/core/queryKeySerializer.gen.js +92 -0
  68. package/dist/esm/generated/core/serverSentEvents.gen.d.ts +71 -0
  69. package/dist/esm/generated/core/serverSentEvents.gen.js +132 -0
  70. package/dist/esm/generated/core/types.gen.d.ts +83 -0
  71. package/dist/esm/generated/core/types.gen.js +2 -0
  72. package/dist/esm/generated/core/utils.gen.d.ts +19 -0
  73. package/dist/esm/generated/core/utils.gen.js +87 -0
  74. package/dist/esm/generated/index.d.ts +2 -0
  75. package/dist/esm/generated/index.js +2 -0
  76. package/dist/esm/generated/sdk.gen.d.ts +225 -0
  77. package/dist/esm/generated/sdk.gen.js +821 -0
  78. package/dist/esm/generated/types.gen.d.ts +2455 -0
  79. package/dist/esm/generated/types.gen.js +2 -0
  80. package/dist/esm/index.d.ts +4 -0
  81. package/dist/esm/index.js +3 -0
  82. package/dist/esm/paginate.d.ts +24 -0
  83. package/dist/esm/paginate.js +15 -0
  84. package/package.json +56 -4
@@ -0,0 +1,2455 @@
1
+ export type ClientOptions = {
2
+ baseUrl: 'https://retention-backend.recovr.com/v1' | (string & {});
3
+ };
4
+ export type Error = {
5
+ error: {
6
+ /**
7
+ * Stable, for programs to branch on: `invalid_request`, `invalid_cursor`, the authentication codes listed on 401 and 403, `missing_permission`, `not_found`, `rate_limited`, `idempotency_key_reused`, `idempotency_request_in_progress`, `idempotency_outcome_unknown`, `idempotency_permissions_changed`, `payload_too_large`, `internal_error`, `unavailable`, and the endpoint-specific codes each endpoint lists. New codes may be added.
8
+ */
9
+ code: string;
10
+ /**
11
+ * For people. It may be reworded at any time.
12
+ */
13
+ message: string;
14
+ /**
15
+ * Extra context for some codes, described by the endpoint that returns them.
16
+ */
17
+ details?: {
18
+ [key: string]: unknown;
19
+ };
20
+ };
21
+ };
22
+ export type Location = {
23
+ /**
24
+ * The Recovr location id.
25
+ */
26
+ id: number;
27
+ name: string | null;
28
+ /**
29
+ * IANA timezone. Business dates (due today, last visit) use it.
30
+ */
31
+ timezone: string;
32
+ city: string | null;
33
+ state: string | null;
34
+ /**
35
+ * As set on the location. National phone numbers in GET /clients `phone` are read as this country's.
36
+ */
37
+ country: string | null;
38
+ };
39
+ export type TeamMember = {
40
+ /**
41
+ * Use as `assigned_to` when assigning clients and filtering them.
42
+ */
43
+ id: number;
44
+ name: string;
45
+ first_name: string | null;
46
+ last_name: string | null;
47
+ };
48
+ export type Client = {
49
+ /**
50
+ * The Recovr client id. Use it in every /clients/{id} path.
51
+ */
52
+ id: number;
53
+ /**
54
+ * The client's id in the location's booking platform. Filter on it with `external_client_id`.
55
+ */
56
+ external_client_id: string | null;
57
+ /**
58
+ * Full name.
59
+ */
60
+ name: string;
61
+ first_name: string | null;
62
+ last_name: string | null;
63
+ /**
64
+ * Present only when the key has the `contact_details:read` permission.
65
+ */
66
+ email?: string | null;
67
+ /**
68
+ * As the booking platform holds it. Present only when the key has the `contact_details:read` permission.
69
+ */
70
+ phone?: string | null;
71
+ /**
72
+ * Recovr's current status for the client: the booking platform's status after Recovr maps it and applies its status rules (for example, a live recurring membership keeps someone Active through a billing gap). Known values are in `KnownClientStatus`; others may appear. Active status alone doesn't make someone an active member: see `is_active_member`.
73
+ */
74
+ client_status: KnownClientStatus | string | null;
75
+ /**
76
+ * An active member: Active status and a current package classified Membership that the gym shows in reports (the member count in Recovr's reports). Not the same as `client_status` Active, which also includes leads, trials and class-pack holders.
77
+ */
78
+ is_active_member: boolean;
79
+ /**
80
+ * `lead` (an enquiry, never bought), `member` (Active status and a current package of any kind: wider than an active member) or `former_member` (held a package here before, holds none now). Null for anyone else.
81
+ */
82
+ lifecycle_stage: string | null;
83
+ membership_type: string | null;
84
+ /**
85
+ * Names of the packages the client currently holds.
86
+ */
87
+ active_packages: Array<string>;
88
+ /**
89
+ * Recovr's health score, 0–100. Null until one is computed.
90
+ */
91
+ health_score: number | null;
92
+ /**
93
+ * The Risk Level the Clients page shows. `suspended` for a Suspended client and `cancelled` for a Cancelled or Inactive one; otherwise the band the health score falls in: `high-risk`, `medium-risk`, `low-risk` or `non-attender`. Null when there's no score yet.
94
+ */
95
+ risk_level: 'high-risk' | 'medium-risk' | 'low-risk' | 'non-attender' | 'suspended' | 'cancelled' | null;
96
+ /**
97
+ * How the client's recent attendance compares with their usual pattern.
98
+ */
99
+ attendance_trend: string | null;
100
+ /**
101
+ * The main reason behind the health score, in a sentence.
102
+ */
103
+ health_summary: string | null;
104
+ /**
105
+ * Sessions attended, all time.
106
+ */
107
+ total_attended_sessions: number;
108
+ /**
109
+ * Location calendar date, YYYY-MM-DD.
110
+ */
111
+ last_attended_on: string | null;
112
+ /**
113
+ * Location calendar date, YYYY-MM-DD.
114
+ */
115
+ next_booking_on: string | null;
116
+ /**
117
+ * Location calendar date, YYYY-MM-DD.
118
+ */
119
+ joined_on: string | null;
120
+ /**
121
+ * Flagged for the team's attention.
122
+ */
123
+ flagged: boolean;
124
+ /**
125
+ * Out of Next Up until `snoozed_until`.
126
+ */
127
+ snoozed: boolean;
128
+ /**
129
+ * When the snooze ends (UTC). Null when not snoozed.
130
+ */
131
+ snoozed_until: string | null;
132
+ /**
133
+ * The team member who looks after this client (an id from GET /team-members), or null.
134
+ */
135
+ assigned_to: number | null;
136
+ /**
137
+ * The labels the client has. See GET /client-labels.
138
+ */
139
+ label_ids: Array<number>;
140
+ do_not_contact: DoNotContact;
141
+ };
142
+ /**
143
+ * The client statuses Recovr uses today. `client_status` can hold other values in future, so treat this list as known values, not every possible one.
144
+ */
145
+ export type KnownClientStatus = 'Active' | 'Suspended' | 'Cancelled' | 'Inactive' | 'Future' | 'Deleted';
146
+ /**
147
+ * true on a channel means Recovr won't contact the client on it: every send from Recovr, including workflows, checks this. It is set by your team (POST /clients/{id}/do-not-contact), by the client replying STOP, or, at a location connected to GoHighLevel, by LeadConnector, which can change it again on its next sync.
148
+ */
149
+ export type DoNotContact = {
150
+ sms: boolean;
151
+ email: boolean;
152
+ whatsapp: boolean;
153
+ /**
154
+ * Phone calls.
155
+ */
156
+ voice: boolean;
157
+ };
158
+ export type AssignClient = {
159
+ /**
160
+ * A team member id from GET /team-members, or null to unassign.
161
+ */
162
+ assigned_to: number | null;
163
+ };
164
+ export type FlagClient = {
165
+ /**
166
+ * Why, added to the flag entry on the client's timeline.
167
+ */
168
+ reason?: string;
169
+ };
170
+ export type SnoozeClient = {
171
+ /**
172
+ * Snooze for this many days from now.
173
+ */
174
+ days?: number;
175
+ /**
176
+ * Snooze until this moment. A date (YYYY-MM-DD) means the start of that day in the location's timezone; a datetime needs an offset or Z. Must be in the future.
177
+ */
178
+ until?: string | string;
179
+ };
180
+ export type SetClientDoNotContact = {
181
+ /**
182
+ * The channels to change (`voice` is phone calls). Channels you leave out keep their current setting.
183
+ */
184
+ channels: Array<'sms' | 'email' | 'whatsapp' | 'voice'>;
185
+ /**
186
+ * true stops Recovr contacting the client on these channels; false allows it again.
187
+ */
188
+ do_not_contact: boolean;
189
+ /**
190
+ * Why, kept with the setting.
191
+ */
192
+ reason?: string;
193
+ };
194
+ export type AddClientLabel = {
195
+ /**
196
+ * A label id from GET /client-labels.
197
+ */
198
+ label_id: number;
199
+ };
200
+ export type ClientSuspension = {
201
+ /**
202
+ * Whether the client's `client_status` is Suspended. Recovr takes this from the booking platform.
203
+ */
204
+ is_suspended: boolean;
205
+ /**
206
+ * The day the suspension started, as the client's profile shows it.
207
+ */
208
+ started_on: string | null;
209
+ /**
210
+ * The return date the booking platform gave, when it gives one. Read only.
211
+ */
212
+ platform_return_on: string | null;
213
+ /**
214
+ * The return date your team expects, set on the profile or here.
215
+ */
216
+ expected_return_on: string | null;
217
+ reason: string | null;
218
+ notes: string | null;
219
+ /**
220
+ * When these details were last saved (UTC).
221
+ */
222
+ updated_at: string | null;
223
+ /**
224
+ * Who last saved them. See GET /team-members.
225
+ */
226
+ updated_by_team_member_id: number | null;
227
+ };
228
+ export type UpdateClientSuspension = {
229
+ /**
230
+ * Any text. The profile offers Medical Leave, Travel, Financial Hardship, Schedule Conflict, Personal Emergency, Pregnancy and Surgery Recovery; anything else shows as Other with your text.
231
+ */
232
+ reason?: string | null;
233
+ /**
234
+ * Location calendar date, YYYY-MM-DD. Can't be before the suspension started.
235
+ */
236
+ expected_return_on?: string | null;
237
+ notes?: string | null;
238
+ };
239
+ export type ClientLabel = {
240
+ id: number;
241
+ name: string;
242
+ color: string;
243
+ /**
244
+ * Smart labels are applied by a rule in Recovr and can't be added or removed through the API.
245
+ */
246
+ kind: 'manual' | 'smart';
247
+ archived: boolean;
248
+ };
249
+ export type Note = {
250
+ /**
251
+ * Note id. Use it in /notes/{note_id} paths.
252
+ */
253
+ id: number;
254
+ client_id: number;
255
+ content: string;
256
+ subject: string | null;
257
+ /**
258
+ * `staff` for a note written in Recovr (including through the API), `recovr_ai` for one Recovr AI left for the team, `booking_platform` for one imported from the booking platform.
259
+ */
260
+ origin: 'staff' | 'recovr_ai' | 'booking_platform';
261
+ /**
262
+ * A client has at most one pinned note; it shows at the top of their profile.
263
+ */
264
+ pinned: boolean;
265
+ /**
266
+ * The team member who wrote it, or null for an import or an automation.
267
+ */
268
+ author: {
269
+ name: string;
270
+ } | null;
271
+ /**
272
+ * UTC.
273
+ */
274
+ created_at: string;
275
+ /**
276
+ * UTC.
277
+ */
278
+ updated_at: string | null;
279
+ };
280
+ export type CreateNote = {
281
+ content: string;
282
+ /**
283
+ * Tags the note in the client's activity, as the app's note types do. Defaults to an untagged note.
284
+ */
285
+ type?: 'general' | 'followup' | 'alert';
286
+ };
287
+ export type Interaction = {
288
+ id: number;
289
+ client_id: number;
290
+ /**
291
+ * `call`, `in_person` or `message`. `other` is an older or imported contact log whose method doesn't say which; you can't log one.
292
+ */
293
+ kind: 'call' | 'in_person' | 'message' | 'other';
294
+ /**
295
+ * For calls, when it was recorded.
296
+ */
297
+ outcome: 'completed' | 'no_answer' | 'busy' | 'voicemail' | null;
298
+ /**
299
+ * For messages: `email`, `sms` or `whatsapp` when logged here; an imported row can name another. Null otherwise.
300
+ */
301
+ channel: string | null;
302
+ summary: string;
303
+ /**
304
+ * When the contact happened (UTC).
305
+ */
306
+ occurred_at: string;
307
+ /**
308
+ * The team member who wrote it, or null for an import or an automation.
309
+ */
310
+ author: {
311
+ name: string;
312
+ } | null;
313
+ /**
314
+ * When it was logged (UTC).
315
+ */
316
+ created_at: string;
317
+ };
318
+ export type CreateInteraction = ({
319
+ kind: 'call';
320
+ } & CreateCallInteraction) | ({
321
+ kind: 'in_person';
322
+ } & CreateInPersonInteraction) | ({
323
+ kind: 'message';
324
+ } & CreateMessageInteraction);
325
+ /**
326
+ * A phone call, as the profile's Call tab logs one.
327
+ */
328
+ export type CreateCallInteraction = {
329
+ kind: 'call';
330
+ /**
331
+ * How the call went.
332
+ */
333
+ outcome?: 'completed' | 'no_answer' | 'busy' | 'voicemail';
334
+ /**
335
+ * What was said or done.
336
+ */
337
+ summary: string;
338
+ /**
339
+ * When it happened. Defaults to now.
340
+ */
341
+ occurred_at?: string;
342
+ };
343
+ /**
344
+ * A conversation in person, as the profile's Interact tab logs one.
345
+ */
346
+ export type CreateInPersonInteraction = {
347
+ kind: 'in_person';
348
+ /**
349
+ * What was said or done.
350
+ */
351
+ summary: string;
352
+ /**
353
+ * When it happened. Defaults to now.
354
+ */
355
+ occurred_at?: string;
356
+ };
357
+ /**
358
+ * A message the team sent outside Recovr. Nothing is sent; to send one, use the Inbox.
359
+ */
360
+ export type CreateMessageInteraction = {
361
+ kind: 'message';
362
+ /**
363
+ * The channel the team used.
364
+ */
365
+ channel: 'email' | 'sms' | 'whatsapp';
366
+ /**
367
+ * What was said or done.
368
+ */
369
+ summary: string;
370
+ /**
371
+ * When it happened. Defaults to now.
372
+ */
373
+ occurred_at?: string;
374
+ };
375
+ export type Reminder = {
376
+ /**
377
+ * Reminder id. Use it in /reminders/{id} paths.
378
+ */
379
+ id: number;
380
+ client_id: number;
381
+ /**
382
+ * What the team should do.
383
+ */
384
+ note: string;
385
+ /**
386
+ * `date`: due at `due_at`, and comes up in Next Up. `next_class`: no date; shown on the client's next class until closed.
387
+ */
388
+ due_kind: 'date' | 'next_class';
389
+ /**
390
+ * UTC. Null for `next_class`.
391
+ */
392
+ due_at: string | null;
393
+ /**
394
+ * For `next_class` reminders set from a class: shown only on classes that start after this time (UTC). Null means the client's next class, whichever it is.
395
+ */
396
+ next_class_after: string | null;
397
+ /**
398
+ * Who raised it: `manual` (a team member, including through the API), `next_up` (a Next Up card), `workflow` (a workflow step), `ai` (Recovr AI, asked by a team member) or `system` (Recovr itself). Null on older reminders.
399
+ */
400
+ source: 'manual' | 'next_up' | 'workflow' | 'ai' | 'system' | null;
401
+ /**
402
+ * The team member it's for (see GET /team-members). Null is the whole team.
403
+ */
404
+ assigned_to: number | null;
405
+ /**
406
+ * The team member who wrote it, or null for an import or an automation.
407
+ */
408
+ author: {
409
+ name: string;
410
+ } | null;
411
+ /**
412
+ * UTC.
413
+ */
414
+ created_at: string;
415
+ /**
416
+ * When it was ticked off (UTC). Null while open.
417
+ */
418
+ closed_at: string | null;
419
+ };
420
+ export type CreateReminder = {
421
+ due_kind: 'date';
422
+ /**
423
+ * A future time.
424
+ */
425
+ due_at: string;
426
+ /**
427
+ * What the team should do.
428
+ */
429
+ note: string;
430
+ } | {
431
+ due_kind: 'next_class';
432
+ /**
433
+ * What the team should do.
434
+ */
435
+ note: string;
436
+ /**
437
+ * Show it only on classes that start after this time, e.g. the start of the class it was set from.
438
+ */
439
+ next_class_after?: string;
440
+ };
441
+ export type UpdateReminder = {
442
+ /**
443
+ * A new future due time.
444
+ */
445
+ due_at?: string;
446
+ /**
447
+ * What the team should do.
448
+ */
449
+ note?: string;
450
+ /**
451
+ * The client the reminder belongs to. When sent, a reminder for any other client is a 404, so a mixed-up id can't change the wrong client's reminder.
452
+ */
453
+ client_id?: number;
454
+ };
455
+ export type CloseReminder = {
456
+ /**
457
+ * The client the reminder belongs to. When sent, a reminder for any other client is a 404, so a mixed-up id can't change the wrong client's reminder.
458
+ */
459
+ client_id?: number;
460
+ };
461
+ export type Form = {
462
+ id: number;
463
+ name: string;
464
+ description: string | null;
465
+ /**
466
+ * Only published forms accept new submissions.
467
+ */
468
+ status: 'published' | 'draft' | 'archived';
469
+ created_at: string;
470
+ };
471
+ export type FormDetail = Form & {
472
+ /**
473
+ * The questions the published form collects, in order (the draft's when it has never been published).
474
+ */
475
+ questions: Array<FormQuestion>;
476
+ };
477
+ export type FormQuestion = {
478
+ /**
479
+ * Matches `question_id` on a submission's answers.
480
+ */
481
+ id: string;
482
+ label: string;
483
+ /**
484
+ * How to read the answer: text, integer, real, numeric, boolean, date, datetime or json.
485
+ */
486
+ type: string;
487
+ description: string | null;
488
+ };
489
+ export type FormSubmission = {
490
+ id: number;
491
+ form_id: number;
492
+ form_name: string;
493
+ /**
494
+ * The client who submitted it, or null when nobody is attached (an anonymous answer to the Feedback form).
495
+ */
496
+ client_id: number | null;
497
+ /**
498
+ * True when this submission created the client (a new lead).
499
+ */
500
+ created_client: boolean;
501
+ submitted_at: string;
502
+ /**
503
+ * In the form's question order; answers to questions the form no longer has come last.
504
+ */
505
+ answers: Array<FormAnswer>;
506
+ };
507
+ export type FormAnswer = {
508
+ question_id: string;
509
+ label: string;
510
+ /**
511
+ * How to read `value`: text, integer, real, numeric, boolean, date, datetime or json.
512
+ */
513
+ type: string;
514
+ /**
515
+ * The answer as text, whatever its type. Several choices are joined with a comma and a space. Unanswered questions are left out.
516
+ */
517
+ value: string;
518
+ };
519
+ export type GetMeData = {
520
+ body?: never;
521
+ path?: never;
522
+ query?: never;
523
+ url: '/me';
524
+ };
525
+ export type GetMeErrors = {
526
+ /**
527
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
528
+ */
529
+ 400: Error;
530
+ /**
531
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
532
+ */
533
+ 401: Error;
534
+ /**
535
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
536
+ */
537
+ 403: Error;
538
+ /**
539
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
540
+ */
541
+ 429: Error;
542
+ /**
543
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
544
+ */
545
+ 500: Error;
546
+ /**
547
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
548
+ */
549
+ 503: Error;
550
+ };
551
+ export type GetMeError = GetMeErrors[keyof GetMeErrors];
552
+ export type GetMeResponses = {
553
+ /**
554
+ * This credential
555
+ */
556
+ 200: {
557
+ data: {
558
+ /**
559
+ * `api_key` for a personal access token, `oauth` for an app connected with OAuth.
560
+ */
561
+ auth_method: 'api_key' | 'oauth';
562
+ /**
563
+ * The personal access token's name, or the OAuth app's name.
564
+ */
565
+ credential_name: string | null;
566
+ /**
567
+ * The personal access token's id and name, or the OAuth app's client id and name.
568
+ */
569
+ key: {
570
+ id: string;
571
+ name: string | null;
572
+ };
573
+ /**
574
+ * What this request may do: what the credential was granted, never more than its owner's role allows.
575
+ */
576
+ permissions: {
577
+ [key: string]: Array<string>;
578
+ };
579
+ location: {
580
+ id: number;
581
+ name: string | null;
582
+ timezone: string;
583
+ };
584
+ rate_limit: {
585
+ limit: number | null;
586
+ remaining: number | null;
587
+ };
588
+ };
589
+ };
590
+ };
591
+ export type GetMeResponse = GetMeResponses[keyof GetMeResponses];
592
+ export type GetLocationData = {
593
+ body?: never;
594
+ path?: never;
595
+ query?: never;
596
+ url: '/location';
597
+ };
598
+ export type GetLocationErrors = {
599
+ /**
600
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
601
+ */
602
+ 400: Error;
603
+ /**
604
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
605
+ */
606
+ 401: Error;
607
+ /**
608
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
609
+ */
610
+ 403: Error;
611
+ /**
612
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
613
+ */
614
+ 429: Error;
615
+ /**
616
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
617
+ */
618
+ 500: Error;
619
+ /**
620
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
621
+ */
622
+ 503: Error;
623
+ };
624
+ export type GetLocationError = GetLocationErrors[keyof GetLocationErrors];
625
+ export type GetLocationResponses = {
626
+ /**
627
+ * The location
628
+ */
629
+ 200: {
630
+ data: Location;
631
+ };
632
+ };
633
+ export type GetLocationResponse = GetLocationResponses[keyof GetLocationResponses];
634
+ export type ListTeamMembersData = {
635
+ body?: never;
636
+ path?: never;
637
+ query?: never;
638
+ url: '/team-members';
639
+ };
640
+ export type ListTeamMembersErrors = {
641
+ /**
642
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
643
+ */
644
+ 400: Error;
645
+ /**
646
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
647
+ */
648
+ 401: Error;
649
+ /**
650
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
651
+ */
652
+ 403: Error;
653
+ /**
654
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
655
+ */
656
+ 429: Error;
657
+ /**
658
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
659
+ */
660
+ 500: Error;
661
+ /**
662
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
663
+ */
664
+ 503: Error;
665
+ };
666
+ export type ListTeamMembersError = ListTeamMembersErrors[keyof ListTeamMembersErrors];
667
+ export type ListTeamMembersResponses = {
668
+ /**
669
+ * Team members
670
+ */
671
+ 200: {
672
+ data: Array<TeamMember>;
673
+ };
674
+ };
675
+ export type ListTeamMembersResponse = ListTeamMembersResponses[keyof ListTeamMembersResponses];
676
+ export type GetClientData = {
677
+ body?: never;
678
+ path: {
679
+ /**
680
+ * The Recovr client id (`id` on a Client).
681
+ */
682
+ id: number;
683
+ };
684
+ query?: never;
685
+ url: '/clients/{id}';
686
+ };
687
+ export type GetClientErrors = {
688
+ /**
689
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
690
+ */
691
+ 400: Error;
692
+ /**
693
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
694
+ */
695
+ 401: Error;
696
+ /**
697
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
698
+ */
699
+ 403: Error;
700
+ /**
701
+ * Not found at the credential's location (`not_found`)
702
+ */
703
+ 404: Error;
704
+ /**
705
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
706
+ */
707
+ 429: Error;
708
+ /**
709
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
710
+ */
711
+ 500: Error;
712
+ /**
713
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
714
+ */
715
+ 503: Error;
716
+ };
717
+ export type GetClientError = GetClientErrors[keyof GetClientErrors];
718
+ export type GetClientResponses = {
719
+ /**
720
+ * The client
721
+ */
722
+ 200: {
723
+ data: Client;
724
+ };
725
+ };
726
+ export type GetClientResponse = GetClientResponses[keyof GetClientResponses];
727
+ export type ListClientsData = {
728
+ body?: never;
729
+ path?: never;
730
+ query?: {
731
+ /**
732
+ * How many items to return, 1 to 200. You can change it between pages.
733
+ */
734
+ limit?: number;
735
+ /**
736
+ * `next_cursor` from the previous page, sent with the same filters and sort. Leave it out for the first page. A cursor used with different filters is refused with 400 `invalid_cursor`.
737
+ */
738
+ cursor?: string;
739
+ /**
740
+ * Search: matches part of the client's name or booking-platform id, case-insensitive. With the `contact_details:read` permission it also matches part of their email or phone; without it, it never looks at them.
741
+ */
742
+ q?: string;
743
+ /**
744
+ * Exactly this booking-platform id (an opaque string, compared as sent).
745
+ */
746
+ external_client_id?: string;
747
+ /**
748
+ * Exactly this email, ignoring case and surrounding spaces. Addresses are not otherwise rewritten: dots and +tags count. Needs the `contact_details:read` permission (403 without it).
749
+ */
750
+ email?: string;
751
+ /**
752
+ * Exactly this phone number, compared in international (E.164) form. A number without a + is read as a national number of the location's country. Only the client's own phone matches: numbers staff linked to a client in Recovr don't. An invalid number is a 400. Needs the `contact_details:read` permission (403 without it).
753
+ */
754
+ phone?: string;
755
+ /**
756
+ * Clients with this `client_status`.
757
+ */
758
+ client_status?: string;
759
+ /**
760
+ * Only active members (true), or every other client (false).
761
+ */
762
+ is_active_member?: 'true' | 'false';
763
+ /**
764
+ * Clients with this `risk_level`. `suspended` is every Suspended client and `cancelled` every Cancelled or Inactive one, as the Clients page's views are. A health-score band lists only clients the gym shows in reports, and leaves out Suspended, Cancelled, Inactive and Future clients, as the page's risk views do.
765
+ */
766
+ risk_level?: 'high-risk' | 'medium-risk' | 'low-risk' | 'non-attender' | 'suspended' | 'cancelled';
767
+ lifecycle_stage?: 'lead' | 'member' | 'former_member';
768
+ flagged?: 'true' | 'false';
769
+ snoozed?: 'true' | 'false';
770
+ /**
771
+ * A team member id (see GET /team-members), or `none` for unassigned clients.
772
+ */
773
+ assigned_to?: string;
774
+ /**
775
+ * Clients with this label (see GET /client-labels).
776
+ */
777
+ label_id?: number;
778
+ /**
779
+ * Exact current package name, or `none` for no current package.
780
+ */
781
+ package?: string;
782
+ /**
783
+ * Last visit before this location date (YYYY-MM-DD).
784
+ */
785
+ last_attended_before?: string;
786
+ /**
787
+ * Joined on or after this location date (YYYY-MM-DD).
788
+ */
789
+ joined_after?: string;
790
+ /**
791
+ * Order by this field; clients without a value come last. Without it, clients are ordered by `id`.
792
+ */
793
+ sort?: 'name' | 'health_score' | 'last_attended_on' | 'joined_on' | 'total_attended_sessions';
794
+ /**
795
+ * Sort direction. Defaults to `asc`.
796
+ */
797
+ order?: 'asc' | 'desc';
798
+ };
799
+ url: '/clients';
800
+ };
801
+ export type ListClientsErrors = {
802
+ /**
803
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
804
+ */
805
+ 400: Error;
806
+ /**
807
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
808
+ */
809
+ 401: Error;
810
+ /**
811
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
812
+ */
813
+ 403: Error;
814
+ /**
815
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
816
+ */
817
+ 429: Error;
818
+ /**
819
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
820
+ */
821
+ 500: Error;
822
+ /**
823
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
824
+ */
825
+ 503: Error;
826
+ };
827
+ export type ListClientsError = ListClientsErrors[keyof ListClientsErrors];
828
+ export type ListClientsResponses = {
829
+ /**
830
+ * A page of clients
831
+ */
832
+ 200: {
833
+ data: Array<Client>;
834
+ /**
835
+ * Pass as `cursor` for the next page. Null on the last page.
836
+ */
837
+ next_cursor: string | null;
838
+ /**
839
+ * How many clients match, across all pages.
840
+ */
841
+ total: number;
842
+ };
843
+ };
844
+ export type ListClientsResponse = ListClientsResponses[keyof ListClientsResponses];
845
+ export type AssignClientData = {
846
+ body: AssignClient;
847
+ headers?: {
848
+ /**
849
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
850
+ */
851
+ 'Idempotency-Key'?: string;
852
+ };
853
+ path: {
854
+ /**
855
+ * The Recovr client id (`id` on a Client).
856
+ */
857
+ id: number;
858
+ };
859
+ query?: never;
860
+ url: '/clients/{id}/assign';
861
+ };
862
+ export type AssignClientErrors = {
863
+ /**
864
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
865
+ */
866
+ 400: Error;
867
+ /**
868
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
869
+ */
870
+ 401: Error;
871
+ /**
872
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
873
+ */
874
+ 403: Error;
875
+ /**
876
+ * Not found at the credential's location (`not_found`)
877
+ */
878
+ 404: Error;
879
+ /**
880
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
881
+ */
882
+ 409: Error;
883
+ /**
884
+ * The request body is too large (`payload_too_large`)
885
+ */
886
+ 413: Error;
887
+ /**
888
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
889
+ */
890
+ 429: Error;
891
+ /**
892
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
893
+ */
894
+ 500: Error;
895
+ /**
896
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
897
+ */
898
+ 503: Error;
899
+ };
900
+ export type AssignClientError = AssignClientErrors[keyof AssignClientErrors];
901
+ export type AssignClientResponses = {
902
+ /**
903
+ * The client, after the change
904
+ */
905
+ 200: {
906
+ data: Client;
907
+ };
908
+ };
909
+ export type AssignClientResponse = AssignClientResponses[keyof AssignClientResponses];
910
+ export type FlagClientData = {
911
+ body?: FlagClient;
912
+ headers?: {
913
+ /**
914
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
915
+ */
916
+ 'Idempotency-Key'?: string;
917
+ };
918
+ path: {
919
+ /**
920
+ * The Recovr client id (`id` on a Client).
921
+ */
922
+ id: number;
923
+ };
924
+ query?: never;
925
+ url: '/clients/{id}/flag';
926
+ };
927
+ export type FlagClientErrors = {
928
+ /**
929
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
930
+ */
931
+ 400: Error;
932
+ /**
933
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
934
+ */
935
+ 401: Error;
936
+ /**
937
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
938
+ */
939
+ 403: Error;
940
+ /**
941
+ * Not found at the credential's location (`not_found`)
942
+ */
943
+ 404: Error;
944
+ /**
945
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
946
+ */
947
+ 409: Error;
948
+ /**
949
+ * The request body is too large (`payload_too_large`)
950
+ */
951
+ 413: Error;
952
+ /**
953
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
954
+ */
955
+ 429: Error;
956
+ /**
957
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
958
+ */
959
+ 500: Error;
960
+ /**
961
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
962
+ */
963
+ 503: Error;
964
+ };
965
+ export type FlagClientError = FlagClientErrors[keyof FlagClientErrors];
966
+ export type FlagClientResponses = {
967
+ /**
968
+ * The client, after the change
969
+ */
970
+ 200: {
971
+ data: Client;
972
+ };
973
+ };
974
+ export type FlagClientResponse = FlagClientResponses[keyof FlagClientResponses];
975
+ export type UnflagClientData = {
976
+ body?: never;
977
+ headers?: {
978
+ /**
979
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
980
+ */
981
+ 'Idempotency-Key'?: string;
982
+ };
983
+ path: {
984
+ /**
985
+ * The Recovr client id (`id` on a Client).
986
+ */
987
+ id: number;
988
+ };
989
+ query?: never;
990
+ url: '/clients/{id}/unflag';
991
+ };
992
+ export type UnflagClientErrors = {
993
+ /**
994
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
995
+ */
996
+ 400: Error;
997
+ /**
998
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
999
+ */
1000
+ 401: Error;
1001
+ /**
1002
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1003
+ */
1004
+ 403: Error;
1005
+ /**
1006
+ * Not found at the credential's location (`not_found`)
1007
+ */
1008
+ 404: Error;
1009
+ /**
1010
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
1011
+ */
1012
+ 409: Error;
1013
+ /**
1014
+ * The request body is too large (`payload_too_large`)
1015
+ */
1016
+ 413: Error;
1017
+ /**
1018
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1019
+ */
1020
+ 429: Error;
1021
+ /**
1022
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1023
+ */
1024
+ 500: Error;
1025
+ /**
1026
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1027
+ */
1028
+ 503: Error;
1029
+ };
1030
+ export type UnflagClientError = UnflagClientErrors[keyof UnflagClientErrors];
1031
+ export type UnflagClientResponses = {
1032
+ /**
1033
+ * The client, after the change
1034
+ */
1035
+ 200: {
1036
+ data: Client;
1037
+ };
1038
+ };
1039
+ export type UnflagClientResponse = UnflagClientResponses[keyof UnflagClientResponses];
1040
+ export type SnoozeClientData = {
1041
+ body: SnoozeClient;
1042
+ headers?: {
1043
+ /**
1044
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
1045
+ */
1046
+ 'Idempotency-Key'?: string;
1047
+ };
1048
+ path: {
1049
+ /**
1050
+ * The Recovr client id (`id` on a Client).
1051
+ */
1052
+ id: number;
1053
+ };
1054
+ query?: never;
1055
+ url: '/clients/{id}/snooze';
1056
+ };
1057
+ export type SnoozeClientErrors = {
1058
+ /**
1059
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1060
+ */
1061
+ 400: Error;
1062
+ /**
1063
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1064
+ */
1065
+ 401: Error;
1066
+ /**
1067
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1068
+ */
1069
+ 403: Error;
1070
+ /**
1071
+ * Not found at the credential's location (`not_found`)
1072
+ */
1073
+ 404: Error;
1074
+ /**
1075
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
1076
+ */
1077
+ 409: Error;
1078
+ /**
1079
+ * The request body is too large (`payload_too_large`)
1080
+ */
1081
+ 413: Error;
1082
+ /**
1083
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1084
+ */
1085
+ 429: Error;
1086
+ /**
1087
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1088
+ */
1089
+ 500: Error;
1090
+ /**
1091
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1092
+ */
1093
+ 503: Error;
1094
+ };
1095
+ export type SnoozeClientError = SnoozeClientErrors[keyof SnoozeClientErrors];
1096
+ export type SnoozeClientResponses = {
1097
+ /**
1098
+ * The client, after the change
1099
+ */
1100
+ 200: {
1101
+ data: Client;
1102
+ };
1103
+ };
1104
+ export type SnoozeClientResponse = SnoozeClientResponses[keyof SnoozeClientResponses];
1105
+ export type UnsnoozeClientData = {
1106
+ body?: never;
1107
+ headers?: {
1108
+ /**
1109
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
1110
+ */
1111
+ 'Idempotency-Key'?: string;
1112
+ };
1113
+ path: {
1114
+ /**
1115
+ * The Recovr client id (`id` on a Client).
1116
+ */
1117
+ id: number;
1118
+ };
1119
+ query?: never;
1120
+ url: '/clients/{id}/unsnooze';
1121
+ };
1122
+ export type UnsnoozeClientErrors = {
1123
+ /**
1124
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1125
+ */
1126
+ 400: Error;
1127
+ /**
1128
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1129
+ */
1130
+ 401: Error;
1131
+ /**
1132
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1133
+ */
1134
+ 403: Error;
1135
+ /**
1136
+ * Not found at the credential's location (`not_found`)
1137
+ */
1138
+ 404: Error;
1139
+ /**
1140
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
1141
+ */
1142
+ 409: Error;
1143
+ /**
1144
+ * The request body is too large (`payload_too_large`)
1145
+ */
1146
+ 413: Error;
1147
+ /**
1148
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1149
+ */
1150
+ 429: Error;
1151
+ /**
1152
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1153
+ */
1154
+ 500: Error;
1155
+ /**
1156
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1157
+ */
1158
+ 503: Error;
1159
+ };
1160
+ export type UnsnoozeClientError = UnsnoozeClientErrors[keyof UnsnoozeClientErrors];
1161
+ export type UnsnoozeClientResponses = {
1162
+ /**
1163
+ * The client, after the change
1164
+ */
1165
+ 200: {
1166
+ data: Client;
1167
+ };
1168
+ };
1169
+ export type UnsnoozeClientResponse = UnsnoozeClientResponses[keyof UnsnoozeClientResponses];
1170
+ export type SetClientDoNotContactData = {
1171
+ body: SetClientDoNotContact;
1172
+ headers?: {
1173
+ /**
1174
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
1175
+ */
1176
+ 'Idempotency-Key'?: string;
1177
+ };
1178
+ path: {
1179
+ /**
1180
+ * The Recovr client id (`id` on a Client).
1181
+ */
1182
+ id: number;
1183
+ };
1184
+ query?: never;
1185
+ url: '/clients/{id}/do-not-contact';
1186
+ };
1187
+ export type SetClientDoNotContactErrors = {
1188
+ /**
1189
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1190
+ */
1191
+ 400: Error;
1192
+ /**
1193
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1194
+ */
1195
+ 401: Error;
1196
+ /**
1197
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1198
+ */
1199
+ 403: Error;
1200
+ /**
1201
+ * Not found at the credential's location (`not_found`)
1202
+ */
1203
+ 404: Error;
1204
+ /**
1205
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
1206
+ */
1207
+ 409: Error;
1208
+ /**
1209
+ * The request body is too large (`payload_too_large`)
1210
+ */
1211
+ 413: Error;
1212
+ /**
1213
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1214
+ */
1215
+ 429: Error;
1216
+ /**
1217
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1218
+ */
1219
+ 500: Error;
1220
+ /**
1221
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1222
+ */
1223
+ 503: Error;
1224
+ };
1225
+ export type SetClientDoNotContactError = SetClientDoNotContactErrors[keyof SetClientDoNotContactErrors];
1226
+ export type SetClientDoNotContactResponses = {
1227
+ /**
1228
+ * The client, after the change
1229
+ */
1230
+ 200: {
1231
+ data: Client;
1232
+ };
1233
+ };
1234
+ export type SetClientDoNotContactResponse = SetClientDoNotContactResponses[keyof SetClientDoNotContactResponses];
1235
+ export type AddClientLabelData = {
1236
+ body: AddClientLabel;
1237
+ headers?: {
1238
+ /**
1239
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
1240
+ */
1241
+ 'Idempotency-Key'?: string;
1242
+ };
1243
+ path: {
1244
+ /**
1245
+ * The Recovr client id (`id` on a Client).
1246
+ */
1247
+ id: number;
1248
+ };
1249
+ query?: never;
1250
+ url: '/clients/{id}/labels';
1251
+ };
1252
+ export type AddClientLabelErrors = {
1253
+ /**
1254
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1255
+ */
1256
+ 400: Error;
1257
+ /**
1258
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1259
+ */
1260
+ 401: Error;
1261
+ /**
1262
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1263
+ */
1264
+ 403: Error;
1265
+ /**
1266
+ * Not found at the credential's location (`not_found`)
1267
+ */
1268
+ 404: Error;
1269
+ /**
1270
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
1271
+ */
1272
+ 409: Error;
1273
+ /**
1274
+ * The request body is too large (`payload_too_large`)
1275
+ */
1276
+ 413: Error;
1277
+ /**
1278
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1279
+ */
1280
+ 429: Error;
1281
+ /**
1282
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1283
+ */
1284
+ 500: Error;
1285
+ /**
1286
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1287
+ */
1288
+ 503: Error;
1289
+ };
1290
+ export type AddClientLabelError = AddClientLabelErrors[keyof AddClientLabelErrors];
1291
+ export type AddClientLabelResponses = {
1292
+ /**
1293
+ * The client, after the change
1294
+ */
1295
+ 200: {
1296
+ data: Client;
1297
+ };
1298
+ };
1299
+ export type AddClientLabelResponse = AddClientLabelResponses[keyof AddClientLabelResponses];
1300
+ export type RemoveClientLabelData = {
1301
+ body?: never;
1302
+ path: {
1303
+ /**
1304
+ * The Recovr client id (`id` on a Client).
1305
+ */
1306
+ id: number;
1307
+ /**
1308
+ * A label id from GET /client-labels
1309
+ */
1310
+ label_id: number;
1311
+ };
1312
+ query?: never;
1313
+ url: '/clients/{id}/labels/{label_id}';
1314
+ };
1315
+ export type RemoveClientLabelErrors = {
1316
+ /**
1317
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1318
+ */
1319
+ 400: Error;
1320
+ /**
1321
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1322
+ */
1323
+ 401: Error;
1324
+ /**
1325
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1326
+ */
1327
+ 403: Error;
1328
+ /**
1329
+ * Not found at the credential's location (`not_found`)
1330
+ */
1331
+ 404: Error;
1332
+ /**
1333
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1334
+ */
1335
+ 429: Error;
1336
+ /**
1337
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1338
+ */
1339
+ 500: Error;
1340
+ /**
1341
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1342
+ */
1343
+ 503: Error;
1344
+ };
1345
+ export type RemoveClientLabelError = RemoveClientLabelErrors[keyof RemoveClientLabelErrors];
1346
+ export type RemoveClientLabelResponses = {
1347
+ /**
1348
+ * The client, after the change
1349
+ */
1350
+ 200: {
1351
+ data: Client;
1352
+ };
1353
+ };
1354
+ export type RemoveClientLabelResponse = RemoveClientLabelResponses[keyof RemoveClientLabelResponses];
1355
+ export type GetClientSuspensionData = {
1356
+ body?: never;
1357
+ path: {
1358
+ /**
1359
+ * The Recovr client id (`id` on a Client).
1360
+ */
1361
+ id: number;
1362
+ };
1363
+ query?: never;
1364
+ url: '/clients/{id}/suspension';
1365
+ };
1366
+ export type GetClientSuspensionErrors = {
1367
+ /**
1368
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1369
+ */
1370
+ 400: Error;
1371
+ /**
1372
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1373
+ */
1374
+ 401: Error;
1375
+ /**
1376
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1377
+ */
1378
+ 403: Error;
1379
+ /**
1380
+ * Not found at the credential's location (`not_found`)
1381
+ */
1382
+ 404: Error;
1383
+ /**
1384
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1385
+ */
1386
+ 429: Error;
1387
+ /**
1388
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1389
+ */
1390
+ 500: Error;
1391
+ /**
1392
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1393
+ */
1394
+ 503: Error;
1395
+ };
1396
+ export type GetClientSuspensionError = GetClientSuspensionErrors[keyof GetClientSuspensionErrors];
1397
+ export type GetClientSuspensionResponses = {
1398
+ /**
1399
+ * The client's suspension details
1400
+ */
1401
+ 200: {
1402
+ data: ClientSuspension;
1403
+ };
1404
+ };
1405
+ export type GetClientSuspensionResponse = GetClientSuspensionResponses[keyof GetClientSuspensionResponses];
1406
+ export type UpdateClientSuspensionData = {
1407
+ body: UpdateClientSuspension;
1408
+ headers?: {
1409
+ /**
1410
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
1411
+ */
1412
+ 'Idempotency-Key'?: string;
1413
+ };
1414
+ path: {
1415
+ /**
1416
+ * The Recovr client id (`id` on a Client).
1417
+ */
1418
+ id: number;
1419
+ };
1420
+ query?: never;
1421
+ url: '/clients/{id}/suspension';
1422
+ };
1423
+ export type UpdateClientSuspensionErrors = {
1424
+ /**
1425
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1426
+ */
1427
+ 400: Error;
1428
+ /**
1429
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1430
+ */
1431
+ 401: Error;
1432
+ /**
1433
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1434
+ */
1435
+ 403: Error;
1436
+ /**
1437
+ * Not found at the credential's location (`not_found`)
1438
+ */
1439
+ 404: Error;
1440
+ /**
1441
+ * The client isn't Suspended in Recovr yet (`client_not_suspended`). The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
1442
+ */
1443
+ 409: Error;
1444
+ /**
1445
+ * The request body is too large (`payload_too_large`)
1446
+ */
1447
+ 413: Error;
1448
+ /**
1449
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1450
+ */
1451
+ 429: Error;
1452
+ /**
1453
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1454
+ */
1455
+ 500: Error;
1456
+ /**
1457
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1458
+ */
1459
+ 503: Error;
1460
+ };
1461
+ export type UpdateClientSuspensionError = UpdateClientSuspensionErrors[keyof UpdateClientSuspensionErrors];
1462
+ export type UpdateClientSuspensionResponses = {
1463
+ /**
1464
+ * The client's suspension details
1465
+ */
1466
+ 200: {
1467
+ data: ClientSuspension;
1468
+ };
1469
+ };
1470
+ export type UpdateClientSuspensionResponse = UpdateClientSuspensionResponses[keyof UpdateClientSuspensionResponses];
1471
+ export type ListClientLabelsData = {
1472
+ body?: never;
1473
+ path?: never;
1474
+ query?: {
1475
+ /**
1476
+ * Include archived labels.
1477
+ */
1478
+ include_archived?: 'true' | 'false';
1479
+ };
1480
+ url: '/client-labels';
1481
+ };
1482
+ export type ListClientLabelsErrors = {
1483
+ /**
1484
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1485
+ */
1486
+ 400: Error;
1487
+ /**
1488
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1489
+ */
1490
+ 401: Error;
1491
+ /**
1492
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1493
+ */
1494
+ 403: Error;
1495
+ /**
1496
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1497
+ */
1498
+ 429: Error;
1499
+ /**
1500
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1501
+ */
1502
+ 500: Error;
1503
+ /**
1504
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1505
+ */
1506
+ 503: Error;
1507
+ };
1508
+ export type ListClientLabelsError = ListClientLabelsErrors[keyof ListClientLabelsErrors];
1509
+ export type ListClientLabelsResponses = {
1510
+ /**
1511
+ * The labels
1512
+ */
1513
+ 200: {
1514
+ data: Array<ClientLabel>;
1515
+ };
1516
+ };
1517
+ export type ListClientLabelsResponse = ListClientLabelsResponses[keyof ListClientLabelsResponses];
1518
+ export type ListClientNotesData = {
1519
+ body?: never;
1520
+ path: {
1521
+ /**
1522
+ * The Recovr client id (`id` on a Client).
1523
+ */
1524
+ id: number;
1525
+ };
1526
+ query?: {
1527
+ /**
1528
+ * How many items to return, 1 to 200. You can change it between pages.
1529
+ */
1530
+ limit?: number;
1531
+ /**
1532
+ * `next_cursor` from the previous page, sent with the same filters and sort. Leave it out for the first page. A cursor used with different filters is refused with 400 `invalid_cursor`.
1533
+ */
1534
+ cursor?: string;
1535
+ };
1536
+ url: '/clients/{id}/notes';
1537
+ };
1538
+ export type ListClientNotesErrors = {
1539
+ /**
1540
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1541
+ */
1542
+ 400: Error;
1543
+ /**
1544
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1545
+ */
1546
+ 401: Error;
1547
+ /**
1548
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1549
+ */
1550
+ 403: Error;
1551
+ /**
1552
+ * Not found at the credential's location (`not_found`)
1553
+ */
1554
+ 404: Error;
1555
+ /**
1556
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1557
+ */
1558
+ 429: Error;
1559
+ /**
1560
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1561
+ */
1562
+ 500: Error;
1563
+ /**
1564
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1565
+ */
1566
+ 503: Error;
1567
+ };
1568
+ export type ListClientNotesError = ListClientNotesErrors[keyof ListClientNotesErrors];
1569
+ export type ListClientNotesResponses = {
1570
+ /**
1571
+ * A page of notes
1572
+ */
1573
+ 200: {
1574
+ data: Array<Note>;
1575
+ /**
1576
+ * Pass as `cursor` for the next page. Null on the last page.
1577
+ */
1578
+ next_cursor: string | null;
1579
+ };
1580
+ };
1581
+ export type ListClientNotesResponse = ListClientNotesResponses[keyof ListClientNotesResponses];
1582
+ export type CreateClientNoteData = {
1583
+ body: CreateNote;
1584
+ headers?: {
1585
+ /**
1586
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
1587
+ */
1588
+ 'Idempotency-Key'?: string;
1589
+ };
1590
+ path: {
1591
+ /**
1592
+ * The Recovr client id (`id` on a Client).
1593
+ */
1594
+ id: number;
1595
+ };
1596
+ query?: never;
1597
+ url: '/clients/{id}/notes';
1598
+ };
1599
+ export type CreateClientNoteErrors = {
1600
+ /**
1601
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1602
+ */
1603
+ 400: Error;
1604
+ /**
1605
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1606
+ */
1607
+ 401: Error;
1608
+ /**
1609
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1610
+ */
1611
+ 403: Error;
1612
+ /**
1613
+ * Not found at the credential's location (`not_found`)
1614
+ */
1615
+ 404: Error;
1616
+ /**
1617
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
1618
+ */
1619
+ 409: Error;
1620
+ /**
1621
+ * The request body is too large (`payload_too_large`)
1622
+ */
1623
+ 413: Error;
1624
+ /**
1625
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1626
+ */
1627
+ 429: Error;
1628
+ /**
1629
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1630
+ */
1631
+ 500: Error;
1632
+ /**
1633
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1634
+ */
1635
+ 503: Error;
1636
+ };
1637
+ export type CreateClientNoteError = CreateClientNoteErrors[keyof CreateClientNoteErrors];
1638
+ export type CreateClientNoteResponses = {
1639
+ /**
1640
+ * The note
1641
+ */
1642
+ 201: {
1643
+ data: Note;
1644
+ };
1645
+ };
1646
+ export type CreateClientNoteResponse = CreateClientNoteResponses[keyof CreateClientNoteResponses];
1647
+ export type PinNoteData = {
1648
+ body?: never;
1649
+ headers?: {
1650
+ /**
1651
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
1652
+ */
1653
+ 'Idempotency-Key'?: string;
1654
+ };
1655
+ path: {
1656
+ /**
1657
+ * A note id (`id` on a Note).
1658
+ */
1659
+ note_id: number;
1660
+ };
1661
+ query?: never;
1662
+ url: '/notes/{note_id}/pin';
1663
+ };
1664
+ export type PinNoteErrors = {
1665
+ /**
1666
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1667
+ */
1668
+ 400: Error;
1669
+ /**
1670
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1671
+ */
1672
+ 401: Error;
1673
+ /**
1674
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1675
+ */
1676
+ 403: Error;
1677
+ /**
1678
+ * Not found at the credential's location (`not_found`)
1679
+ */
1680
+ 404: Error;
1681
+ /**
1682
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
1683
+ */
1684
+ 409: Error;
1685
+ /**
1686
+ * The request body is too large (`payload_too_large`)
1687
+ */
1688
+ 413: Error;
1689
+ /**
1690
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1691
+ */
1692
+ 429: Error;
1693
+ /**
1694
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1695
+ */
1696
+ 500: Error;
1697
+ /**
1698
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1699
+ */
1700
+ 503: Error;
1701
+ };
1702
+ export type PinNoteError = PinNoteErrors[keyof PinNoteErrors];
1703
+ export type PinNoteResponses = {
1704
+ /**
1705
+ * The note
1706
+ */
1707
+ 200: {
1708
+ data: Note;
1709
+ };
1710
+ };
1711
+ export type PinNoteResponse = PinNoteResponses[keyof PinNoteResponses];
1712
+ export type UnpinNoteData = {
1713
+ body?: never;
1714
+ headers?: {
1715
+ /**
1716
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
1717
+ */
1718
+ 'Idempotency-Key'?: string;
1719
+ };
1720
+ path: {
1721
+ /**
1722
+ * A note id (`id` on a Note).
1723
+ */
1724
+ note_id: number;
1725
+ };
1726
+ query?: never;
1727
+ url: '/notes/{note_id}/unpin';
1728
+ };
1729
+ export type UnpinNoteErrors = {
1730
+ /**
1731
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1732
+ */
1733
+ 400: Error;
1734
+ /**
1735
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1736
+ */
1737
+ 401: Error;
1738
+ /**
1739
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1740
+ */
1741
+ 403: Error;
1742
+ /**
1743
+ * Not found at the credential's location (`not_found`)
1744
+ */
1745
+ 404: Error;
1746
+ /**
1747
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
1748
+ */
1749
+ 409: Error;
1750
+ /**
1751
+ * The request body is too large (`payload_too_large`)
1752
+ */
1753
+ 413: Error;
1754
+ /**
1755
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1756
+ */
1757
+ 429: Error;
1758
+ /**
1759
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1760
+ */
1761
+ 500: Error;
1762
+ /**
1763
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1764
+ */
1765
+ 503: Error;
1766
+ };
1767
+ export type UnpinNoteError = UnpinNoteErrors[keyof UnpinNoteErrors];
1768
+ export type UnpinNoteResponses = {
1769
+ /**
1770
+ * The note
1771
+ */
1772
+ 200: {
1773
+ data: Note;
1774
+ };
1775
+ };
1776
+ export type UnpinNoteResponse = UnpinNoteResponses[keyof UnpinNoteResponses];
1777
+ export type ListClientInteractionsData = {
1778
+ body?: never;
1779
+ path: {
1780
+ /**
1781
+ * The Recovr client id (`id` on a Client).
1782
+ */
1783
+ id: number;
1784
+ };
1785
+ query?: {
1786
+ /**
1787
+ * How many items to return, 1 to 200. You can change it between pages.
1788
+ */
1789
+ limit?: number;
1790
+ /**
1791
+ * `next_cursor` from the previous page, sent with the same filters and sort. Leave it out for the first page. A cursor used with different filters is refused with 400 `invalid_cursor`.
1792
+ */
1793
+ cursor?: string;
1794
+ };
1795
+ url: '/clients/{id}/interactions';
1796
+ };
1797
+ export type ListClientInteractionsErrors = {
1798
+ /**
1799
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1800
+ */
1801
+ 400: Error;
1802
+ /**
1803
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1804
+ */
1805
+ 401: Error;
1806
+ /**
1807
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1808
+ */
1809
+ 403: Error;
1810
+ /**
1811
+ * Not found at the credential's location (`not_found`)
1812
+ */
1813
+ 404: Error;
1814
+ /**
1815
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1816
+ */
1817
+ 429: Error;
1818
+ /**
1819
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1820
+ */
1821
+ 500: Error;
1822
+ /**
1823
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1824
+ */
1825
+ 503: Error;
1826
+ };
1827
+ export type ListClientInteractionsError = ListClientInteractionsErrors[keyof ListClientInteractionsErrors];
1828
+ export type ListClientInteractionsResponses = {
1829
+ /**
1830
+ * A page of interactions
1831
+ */
1832
+ 200: {
1833
+ data: Array<Interaction>;
1834
+ /**
1835
+ * Pass as `cursor` for the next page. Null on the last page.
1836
+ */
1837
+ next_cursor: string | null;
1838
+ };
1839
+ };
1840
+ export type ListClientInteractionsResponse = ListClientInteractionsResponses[keyof ListClientInteractionsResponses];
1841
+ export type CreateClientInteractionData = {
1842
+ body: CreateInteraction;
1843
+ headers?: {
1844
+ /**
1845
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
1846
+ */
1847
+ 'Idempotency-Key'?: string;
1848
+ };
1849
+ path: {
1850
+ /**
1851
+ * The Recovr client id (`id` on a Client).
1852
+ */
1853
+ id: number;
1854
+ };
1855
+ query?: never;
1856
+ url: '/clients/{id}/interactions';
1857
+ };
1858
+ export type CreateClientInteractionErrors = {
1859
+ /**
1860
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1861
+ */
1862
+ 400: Error;
1863
+ /**
1864
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1865
+ */
1866
+ 401: Error;
1867
+ /**
1868
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1869
+ */
1870
+ 403: Error;
1871
+ /**
1872
+ * Not found at the credential's location (`not_found`)
1873
+ */
1874
+ 404: Error;
1875
+ /**
1876
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
1877
+ */
1878
+ 409: Error;
1879
+ /**
1880
+ * The request body is too large (`payload_too_large`)
1881
+ */
1882
+ 413: Error;
1883
+ /**
1884
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1885
+ */
1886
+ 429: Error;
1887
+ /**
1888
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1889
+ */
1890
+ 500: Error;
1891
+ /**
1892
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1893
+ */
1894
+ 503: Error;
1895
+ };
1896
+ export type CreateClientInteractionError = CreateClientInteractionErrors[keyof CreateClientInteractionErrors];
1897
+ export type CreateClientInteractionResponses = {
1898
+ /**
1899
+ * The interaction
1900
+ */
1901
+ 201: {
1902
+ data: Interaction;
1903
+ };
1904
+ };
1905
+ export type CreateClientInteractionResponse = CreateClientInteractionResponses[keyof CreateClientInteractionResponses];
1906
+ export type ListClientRemindersData = {
1907
+ body?: never;
1908
+ path: {
1909
+ /**
1910
+ * The Recovr client id (`id` on a Client).
1911
+ */
1912
+ id: number;
1913
+ };
1914
+ query?: {
1915
+ /**
1916
+ * How many items to return, 1 to 200. You can change it between pages.
1917
+ */
1918
+ limit?: number;
1919
+ /**
1920
+ * `next_cursor` from the previous page, sent with the same filters and sort. Leave it out for the first page. A cursor used with different filters is refused with 400 `invalid_cursor`.
1921
+ */
1922
+ cursor?: string;
1923
+ };
1924
+ url: '/clients/{id}/reminders';
1925
+ };
1926
+ export type ListClientRemindersErrors = {
1927
+ /**
1928
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1929
+ */
1930
+ 400: Error;
1931
+ /**
1932
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1933
+ */
1934
+ 401: Error;
1935
+ /**
1936
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1937
+ */
1938
+ 403: Error;
1939
+ /**
1940
+ * Not found at the credential's location (`not_found`)
1941
+ */
1942
+ 404: Error;
1943
+ /**
1944
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
1945
+ */
1946
+ 429: Error;
1947
+ /**
1948
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1949
+ */
1950
+ 500: Error;
1951
+ /**
1952
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
1953
+ */
1954
+ 503: Error;
1955
+ };
1956
+ export type ListClientRemindersError = ListClientRemindersErrors[keyof ListClientRemindersErrors];
1957
+ export type ListClientRemindersResponses = {
1958
+ /**
1959
+ * A page of the client's open reminders
1960
+ */
1961
+ 200: {
1962
+ data: Array<Reminder>;
1963
+ /**
1964
+ * Pass as `cursor` for the next page. Null on the last page.
1965
+ */
1966
+ next_cursor: string | null;
1967
+ };
1968
+ };
1969
+ export type ListClientRemindersResponse = ListClientRemindersResponses[keyof ListClientRemindersResponses];
1970
+ export type CreateClientReminderData = {
1971
+ body: CreateReminder;
1972
+ headers?: {
1973
+ /**
1974
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
1975
+ */
1976
+ 'Idempotency-Key'?: string;
1977
+ };
1978
+ path: {
1979
+ /**
1980
+ * The Recovr client id (`id` on a Client).
1981
+ */
1982
+ id: number;
1983
+ };
1984
+ query?: never;
1985
+ url: '/clients/{id}/reminders';
1986
+ };
1987
+ export type CreateClientReminderErrors = {
1988
+ /**
1989
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
1990
+ */
1991
+ 400: Error;
1992
+ /**
1993
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
1994
+ */
1995
+ 401: Error;
1996
+ /**
1997
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
1998
+ */
1999
+ 403: Error;
2000
+ /**
2001
+ * Not found at the credential's location (`not_found`)
2002
+ */
2003
+ 404: Error;
2004
+ /**
2005
+ * The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
2006
+ */
2007
+ 409: Error;
2008
+ /**
2009
+ * The request body is too large (`payload_too_large`)
2010
+ */
2011
+ 413: Error;
2012
+ /**
2013
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
2014
+ */
2015
+ 429: Error;
2016
+ /**
2017
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2018
+ */
2019
+ 500: Error;
2020
+ /**
2021
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2022
+ */
2023
+ 503: Error;
2024
+ };
2025
+ export type CreateClientReminderError = CreateClientReminderErrors[keyof CreateClientReminderErrors];
2026
+ export type CreateClientReminderResponses = {
2027
+ /**
2028
+ * The reminder
2029
+ */
2030
+ 201: {
2031
+ data: Reminder;
2032
+ };
2033
+ };
2034
+ export type CreateClientReminderResponse = CreateClientReminderResponses[keyof CreateClientReminderResponses];
2035
+ export type UpdateReminderData = {
2036
+ body: UpdateReminder;
2037
+ headers?: {
2038
+ /**
2039
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
2040
+ */
2041
+ 'Idempotency-Key'?: string;
2042
+ };
2043
+ path: {
2044
+ /**
2045
+ * A reminder id (`id` on a Reminder).
2046
+ */
2047
+ id: number;
2048
+ };
2049
+ query?: never;
2050
+ url: '/reminders/{id}';
2051
+ };
2052
+ export type UpdateReminderErrors = {
2053
+ /**
2054
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
2055
+ */
2056
+ 400: Error;
2057
+ /**
2058
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
2059
+ */
2060
+ 401: Error;
2061
+ /**
2062
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
2063
+ */
2064
+ 403: Error;
2065
+ /**
2066
+ * Not found at the credential's location (`not_found`)
2067
+ */
2068
+ 404: Error;
2069
+ /**
2070
+ * Somebody already ticked the reminder off (`reminder_already_closed`); `error.details` has `closed_at`, `closed_by` (a team member id, or null) and `action`. The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
2071
+ */
2072
+ 409: Error;
2073
+ /**
2074
+ * The request body is too large (`payload_too_large`)
2075
+ */
2076
+ 413: Error;
2077
+ /**
2078
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
2079
+ */
2080
+ 429: Error;
2081
+ /**
2082
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2083
+ */
2084
+ 500: Error;
2085
+ /**
2086
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2087
+ */
2088
+ 503: Error;
2089
+ };
2090
+ export type UpdateReminderError = UpdateReminderErrors[keyof UpdateReminderErrors];
2091
+ export type UpdateReminderResponses = {
2092
+ /**
2093
+ * The reminder
2094
+ */
2095
+ 200: {
2096
+ data: Reminder;
2097
+ };
2098
+ };
2099
+ export type UpdateReminderResponse = UpdateReminderResponses[keyof UpdateReminderResponses];
2100
+ export type CloseReminderData = {
2101
+ body?: CloseReminder;
2102
+ headers?: {
2103
+ /**
2104
+ * Any unique string up to 255 characters (a UUID works well). Retrying with the same key and the same body within 24 hours returns the first response again, with an `Idempotent-Replayed: true` header, instead of repeating the change. That includes an error: after a 5xx, a retry with the same key returns the same error, because the change may have been made before the failure; check whether it was, then use a new key to try again. A refusal is kept too (a 404, a 409, or a 400 the endpoint itself returned), so after correcting a request the API refused, send it with a new key; only a request that never reached the endpoint (a body or parameter that failed validation, malformed JSON, a credential problem) isn't kept. Reusing a key with a different body is a 409 `idempotency_key_reused`; a retry while the first request is still running is a 409 `idempotency_request_in_progress`; if the first request didn't finish recording its result, a retry is a 409 `idempotency_outcome_unknown` and the change is never run again on that key (check the record, then use a new key if you still need it); a retry after the credential's permissions changed is a 409 `idempotency_permissions_changed` (use a new key).
2105
+ */
2106
+ 'Idempotency-Key'?: string;
2107
+ };
2108
+ path: {
2109
+ /**
2110
+ * A reminder id (`id` on a Reminder).
2111
+ */
2112
+ id: number;
2113
+ };
2114
+ query?: never;
2115
+ url: '/reminders/{id}/close';
2116
+ };
2117
+ export type CloseReminderErrors = {
2118
+ /**
2119
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
2120
+ */
2121
+ 400: Error;
2122
+ /**
2123
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
2124
+ */
2125
+ 401: Error;
2126
+ /**
2127
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
2128
+ */
2129
+ 403: Error;
2130
+ /**
2131
+ * Not found at the credential's location (`not_found`)
2132
+ */
2133
+ 404: Error;
2134
+ /**
2135
+ * Somebody already ticked the reminder off (`reminder_already_closed`); `error.details` has `closed_at`, `closed_by` (a team member id, or null) and `action`. The Idempotency-Key was used with a different request (`idempotency_key_reused`), the first request with it is still running (`idempotency_request_in_progress`), the first request didn't finish recording its result, so whether its change was made is unknown (`idempotency_outcome_unknown`: check the record, then use a new key), or the credential's permissions have changed since that request ran, so its response isn't replayed (`idempotency_permissions_changed`).
2136
+ */
2137
+ 409: Error;
2138
+ /**
2139
+ * The request body is too large (`payload_too_large`)
2140
+ */
2141
+ 413: Error;
2142
+ /**
2143
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
2144
+ */
2145
+ 429: Error;
2146
+ /**
2147
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2148
+ */
2149
+ 500: Error;
2150
+ /**
2151
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2152
+ */
2153
+ 503: Error;
2154
+ };
2155
+ export type CloseReminderError = CloseReminderErrors[keyof CloseReminderErrors];
2156
+ export type CloseReminderResponses = {
2157
+ /**
2158
+ * The closed reminder
2159
+ */
2160
+ 200: {
2161
+ data: Reminder;
2162
+ };
2163
+ };
2164
+ export type CloseReminderResponse = CloseReminderResponses[keyof CloseReminderResponses];
2165
+ export type ListFormsData = {
2166
+ body?: never;
2167
+ path?: never;
2168
+ query?: {
2169
+ limit?: number;
2170
+ /**
2171
+ * `next_cursor` from the previous page.
2172
+ */
2173
+ cursor?: string;
2174
+ };
2175
+ url: '/forms';
2176
+ };
2177
+ export type ListFormsErrors = {
2178
+ /**
2179
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
2180
+ */
2181
+ 400: Error;
2182
+ /**
2183
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
2184
+ */
2185
+ 401: Error;
2186
+ /**
2187
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
2188
+ */
2189
+ 403: Error;
2190
+ /**
2191
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
2192
+ */
2193
+ 429: Error;
2194
+ /**
2195
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2196
+ */
2197
+ 500: Error;
2198
+ /**
2199
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2200
+ */
2201
+ 503: Error;
2202
+ };
2203
+ export type ListFormsError = ListFormsErrors[keyof ListFormsErrors];
2204
+ export type ListFormsResponses = {
2205
+ /**
2206
+ * A page of forms
2207
+ */
2208
+ 200: {
2209
+ data: Array<Form>;
2210
+ next_cursor: string | null;
2211
+ };
2212
+ };
2213
+ export type ListFormsResponse = ListFormsResponses[keyof ListFormsResponses];
2214
+ export type GetFormData = {
2215
+ body?: never;
2216
+ path: {
2217
+ /**
2218
+ * Form id
2219
+ */
2220
+ id: number;
2221
+ };
2222
+ query?: never;
2223
+ url: '/forms/{id}';
2224
+ };
2225
+ export type GetFormErrors = {
2226
+ /**
2227
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
2228
+ */
2229
+ 400: Error;
2230
+ /**
2231
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
2232
+ */
2233
+ 401: Error;
2234
+ /**
2235
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
2236
+ */
2237
+ 403: Error;
2238
+ /**
2239
+ * Not found at the credential's location (`not_found`)
2240
+ */
2241
+ 404: Error;
2242
+ /**
2243
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
2244
+ */
2245
+ 429: Error;
2246
+ /**
2247
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2248
+ */
2249
+ 500: Error;
2250
+ /**
2251
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2252
+ */
2253
+ 503: Error;
2254
+ };
2255
+ export type GetFormError = GetFormErrors[keyof GetFormErrors];
2256
+ export type GetFormResponses = {
2257
+ /**
2258
+ * The form
2259
+ */
2260
+ 200: {
2261
+ data: FormDetail;
2262
+ };
2263
+ };
2264
+ export type GetFormResponse = GetFormResponses[keyof GetFormResponses];
2265
+ export type ListFormSubmissionsData = {
2266
+ body?: never;
2267
+ path: {
2268
+ /**
2269
+ * Form id
2270
+ */
2271
+ id: number;
2272
+ };
2273
+ query?: {
2274
+ limit?: number;
2275
+ /**
2276
+ * `next_cursor` from the previous page.
2277
+ */
2278
+ cursor?: string;
2279
+ /**
2280
+ * Only submissions Recovr recorded after the one with this id, oldest first. To fetch what's new, pass the highest `id` you have. Ids follow the order Recovr records submissions in, which `submitted_at` doesn't: a submission recovered late keeps the time it was made. Start with 0.
2281
+ */
2282
+ after_id?: number | null;
2283
+ /**
2284
+ * Only submissions made after this time (exclusive). A date filter; to fetch what's new, use `after_id`.
2285
+ */
2286
+ submitted_after?: string;
2287
+ /**
2288
+ * Only submissions made before this time (exclusive).
2289
+ */
2290
+ submitted_before?: string;
2291
+ };
2292
+ url: '/forms/{id}/submissions';
2293
+ };
2294
+ export type ListFormSubmissionsErrors = {
2295
+ /**
2296
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
2297
+ */
2298
+ 400: Error;
2299
+ /**
2300
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
2301
+ */
2302
+ 401: Error;
2303
+ /**
2304
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
2305
+ */
2306
+ 403: Error;
2307
+ /**
2308
+ * Not found at the credential's location (`not_found`)
2309
+ */
2310
+ 404: Error;
2311
+ /**
2312
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
2313
+ */
2314
+ 429: Error;
2315
+ /**
2316
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2317
+ */
2318
+ 500: Error;
2319
+ /**
2320
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2321
+ */
2322
+ 503: Error;
2323
+ };
2324
+ export type ListFormSubmissionsError = ListFormSubmissionsErrors[keyof ListFormSubmissionsErrors];
2325
+ export type ListFormSubmissionsResponses = {
2326
+ /**
2327
+ * A page of submissions
2328
+ */
2329
+ 200: {
2330
+ data: Array<FormSubmission>;
2331
+ next_cursor: string | null;
2332
+ };
2333
+ };
2334
+ export type ListFormSubmissionsResponse = ListFormSubmissionsResponses[keyof ListFormSubmissionsResponses];
2335
+ export type ListClientFormSubmissionsData = {
2336
+ body?: never;
2337
+ path: {
2338
+ /**
2339
+ * The Recovr client id (`id` on a Client).
2340
+ */
2341
+ id: number;
2342
+ };
2343
+ query?: {
2344
+ limit?: number;
2345
+ /**
2346
+ * `next_cursor` from the previous page.
2347
+ */
2348
+ cursor?: string;
2349
+ /**
2350
+ * Only submissions Recovr recorded after the one with this id, oldest first. To fetch what's new, pass the highest `id` you have. Ids follow the order Recovr records submissions in, which `submitted_at` doesn't: a submission recovered late keeps the time it was made. Start with 0.
2351
+ */
2352
+ after_id?: number | null;
2353
+ /**
2354
+ * Only submissions made after this time (exclusive). A date filter; to fetch what's new, use `after_id`.
2355
+ */
2356
+ submitted_after?: string;
2357
+ /**
2358
+ * Only submissions made before this time (exclusive).
2359
+ */
2360
+ submitted_before?: string;
2361
+ };
2362
+ url: '/clients/{id}/form-submissions';
2363
+ };
2364
+ export type ListClientFormSubmissionsErrors = {
2365
+ /**
2366
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
2367
+ */
2368
+ 400: Error;
2369
+ /**
2370
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
2371
+ */
2372
+ 401: Error;
2373
+ /**
2374
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
2375
+ */
2376
+ 403: Error;
2377
+ /**
2378
+ * Not found at the credential's location (`not_found`)
2379
+ */
2380
+ 404: Error;
2381
+ /**
2382
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
2383
+ */
2384
+ 429: Error;
2385
+ /**
2386
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2387
+ */
2388
+ 500: Error;
2389
+ /**
2390
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2391
+ */
2392
+ 503: Error;
2393
+ };
2394
+ export type ListClientFormSubmissionsError = ListClientFormSubmissionsErrors[keyof ListClientFormSubmissionsErrors];
2395
+ export type ListClientFormSubmissionsResponses = {
2396
+ /**
2397
+ * A page of submissions
2398
+ */
2399
+ 200: {
2400
+ data: Array<FormSubmission>;
2401
+ next_cursor: string | null;
2402
+ };
2403
+ };
2404
+ export type ListClientFormSubmissionsResponse = ListClientFormSubmissionsResponses[keyof ListClientFormSubmissionsResponses];
2405
+ export type GetFormSubmissionData = {
2406
+ body?: never;
2407
+ path: {
2408
+ /**
2409
+ * Form submission id
2410
+ */
2411
+ id: number;
2412
+ };
2413
+ query?: never;
2414
+ url: '/form-submissions/{id}';
2415
+ };
2416
+ export type GetFormSubmissionErrors = {
2417
+ /**
2418
+ * The request is invalid (`invalid_request`, `invalid_cursor`)
2419
+ */
2420
+ 400: Error;
2421
+ /**
2422
+ * No credential, or one that can't be used. Personal access tokens: `missing_api_key`, `invalid_api_key`, `api_key_expired`, `api_key_owner_removed`. OAuth access tokens: `invalid_token`, `token_expired` (refresh it), `wrong_audience` (issued for another Recovr resource), `app_disconnected`, `app_disabled`, `owner_removed`.
2423
+ */
2424
+ 401: Error;
2425
+ /**
2426
+ * The credential lacks a permission this request needs (`missing_permission`; an OAuth token also gets a `WWW-Authenticate` challenge with `insufficient_scope` naming the scope), the person's role sees only some members so the API isn't available to it (`role_not_supported`), or the location can't use Recovr right now (`location_closed`, `location_disabled`, `subscription_blocked`, `payment_setup_required`).
2427
+ */
2428
+ 403: Error;
2429
+ /**
2430
+ * Not found at the credential's location (`not_found`)
2431
+ */
2432
+ 404: Error;
2433
+ /**
2434
+ * Rate limit reached for this personal access token or OAuth connection (`rate_limited`). Wait `Retry-After` seconds before trying again.
2435
+ */
2436
+ 429: Error;
2437
+ /**
2438
+ * Something went wrong at Recovr (`internal_error`). On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2439
+ */
2440
+ 500: Error;
2441
+ /**
2442
+ * Recovr is briefly unavailable (`unavailable`). Retry after a short wait. On a POST or PATCH the change may have been made before the failure, so a retry with the same Idempotency-Key returns this same error rather than running again: check whether the change was made, then use a new key to try again.
2443
+ */
2444
+ 503: Error;
2445
+ };
2446
+ export type GetFormSubmissionError = GetFormSubmissionErrors[keyof GetFormSubmissionErrors];
2447
+ export type GetFormSubmissionResponses = {
2448
+ /**
2449
+ * The submission
2450
+ */
2451
+ 200: {
2452
+ data: FormSubmission;
2453
+ };
2454
+ };
2455
+ export type GetFormSubmissionResponse = GetFormSubmissionResponses[keyof GetFormSubmissionResponses];