@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,19 @@
1
+ import type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';
2
+ export interface PathSerializer {
3
+ path: Record<string, unknown>;
4
+ url: string;
5
+ }
6
+ export declare const PATH_PARAM_RE: RegExp;
7
+ export declare const defaultPathSerializer: ({ path, url: _url }: PathSerializer) => string;
8
+ export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
9
+ baseUrl?: string;
10
+ path?: Record<string, unknown>;
11
+ query?: Record<string, unknown>;
12
+ querySerializer: QuerySerializer;
13
+ url: string;
14
+ }) => string;
15
+ export declare function getValidRequestBody(options: {
16
+ body?: unknown;
17
+ bodySerializer?: BodySerializer | null;
18
+ serializedBody?: unknown;
19
+ }): unknown;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ // This file is auto-generated by @hey-api/openapi-ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getUrl = exports.defaultPathSerializer = exports.PATH_PARAM_RE = void 0;
5
+ exports.getValidRequestBody = getValidRequestBody;
6
+ const pathSerializer_gen_js_1 = require("./pathSerializer.gen.js");
7
+ exports.PATH_PARAM_RE = /\{[^{}]+\}/g;
8
+ const defaultPathSerializer = ({ path, url: _url }) => {
9
+ let url = _url;
10
+ const matches = _url.match(exports.PATH_PARAM_RE);
11
+ if (matches) {
12
+ for (const match of matches) {
13
+ let explode = false;
14
+ let name = match.substring(1, match.length - 1);
15
+ let style = 'simple';
16
+ if (name.endsWith('*')) {
17
+ explode = true;
18
+ name = name.substring(0, name.length - 1);
19
+ }
20
+ if (name.startsWith('.')) {
21
+ name = name.substring(1);
22
+ style = 'label';
23
+ }
24
+ else if (name.startsWith(';')) {
25
+ name = name.substring(1);
26
+ style = 'matrix';
27
+ }
28
+ const value = path[name];
29
+ if (value === undefined || value === null) {
30
+ continue;
31
+ }
32
+ if (Array.isArray(value)) {
33
+ url = url.replace(match, (0, pathSerializer_gen_js_1.serializeArrayParam)({ explode, name, style, value }));
34
+ continue;
35
+ }
36
+ if (typeof value === 'object') {
37
+ url = url.replace(match, (0, pathSerializer_gen_js_1.serializeObjectParam)({
38
+ explode,
39
+ name,
40
+ style,
41
+ value: value,
42
+ valueOnly: true,
43
+ }));
44
+ continue;
45
+ }
46
+ if (style === 'matrix') {
47
+ url = url.replace(match, `;${(0, pathSerializer_gen_js_1.serializePrimitiveParam)({
48
+ name,
49
+ value: value,
50
+ })}`);
51
+ continue;
52
+ }
53
+ const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
54
+ url = url.replace(match, replaceValue);
55
+ }
56
+ }
57
+ return url;
58
+ };
59
+ exports.defaultPathSerializer = defaultPathSerializer;
60
+ const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
61
+ const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
62
+ let url = (baseUrl ?? '') + pathUrl;
63
+ if (path) {
64
+ url = (0, exports.defaultPathSerializer)({ path, url });
65
+ }
66
+ let search = query ? querySerializer(query) : '';
67
+ if (search.startsWith('?')) {
68
+ search = search.substring(1);
69
+ }
70
+ if (search) {
71
+ url += `?${search}`;
72
+ }
73
+ return url;
74
+ };
75
+ exports.getUrl = getUrl;
76
+ function getValidRequestBody(options) {
77
+ const hasBody = options.body !== undefined;
78
+ const isSerializedBody = hasBody && options.bodySerializer;
79
+ if (isSerializedBody) {
80
+ if ('serializedBody' in options) {
81
+ const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== '';
82
+ return hasSerializedBody ? options.serializedBody : null;
83
+ }
84
+ // not all clients implement a serializedBody property (i.e., client-axios)
85
+ return options.body !== '' ? options.body : null;
86
+ }
87
+ // plain/text body
88
+ if (hasBody) {
89
+ return options.body;
90
+ }
91
+ // no body was provided
92
+ return undefined;
93
+ }
@@ -0,0 +1,2 @@
1
+ export { type Options, RecovrSdk } from './sdk.gen.js';
2
+ export type { AddClientLabel, AddClientLabelData, AddClientLabelError, AddClientLabelErrors, AddClientLabelResponse, AddClientLabelResponses, AssignClient, AssignClientData, AssignClientError, AssignClientErrors, AssignClientResponse, AssignClientResponses, Client, ClientLabel, ClientOptions, ClientSuspension, CloseReminder, CloseReminderData, CloseReminderError, CloseReminderErrors, CloseReminderResponse, CloseReminderResponses, CreateCallInteraction, CreateClientInteractionData, CreateClientInteractionError, CreateClientInteractionErrors, CreateClientInteractionResponse, CreateClientInteractionResponses, CreateClientNoteData, CreateClientNoteError, CreateClientNoteErrors, CreateClientNoteResponse, CreateClientNoteResponses, CreateClientReminderData, CreateClientReminderError, CreateClientReminderErrors, CreateClientReminderResponse, CreateClientReminderResponses, CreateInPersonInteraction, CreateInteraction, CreateMessageInteraction, CreateNote, CreateReminder, DoNotContact, Error, FlagClient, FlagClientData, FlagClientError, FlagClientErrors, FlagClientResponse, FlagClientResponses, Form, FormAnswer, FormDetail, FormQuestion, FormSubmission, GetClientData, GetClientError, GetClientErrors, GetClientResponse, GetClientResponses, GetClientSuspensionData, GetClientSuspensionError, GetClientSuspensionErrors, GetClientSuspensionResponse, GetClientSuspensionResponses, GetFormData, GetFormError, GetFormErrors, GetFormResponse, GetFormResponses, GetFormSubmissionData, GetFormSubmissionError, GetFormSubmissionErrors, GetFormSubmissionResponse, GetFormSubmissionResponses, GetLocationData, GetLocationError, GetLocationErrors, GetLocationResponse, GetLocationResponses, GetMeData, GetMeError, GetMeErrors, GetMeResponse, GetMeResponses, Interaction, KnownClientStatus, ListClientFormSubmissionsData, ListClientFormSubmissionsError, ListClientFormSubmissionsErrors, ListClientFormSubmissionsResponse, ListClientFormSubmissionsResponses, ListClientInteractionsData, ListClientInteractionsError, ListClientInteractionsErrors, ListClientInteractionsResponse, ListClientInteractionsResponses, ListClientLabelsData, ListClientLabelsError, ListClientLabelsErrors, ListClientLabelsResponse, ListClientLabelsResponses, ListClientNotesData, ListClientNotesError, ListClientNotesErrors, ListClientNotesResponse, ListClientNotesResponses, ListClientRemindersData, ListClientRemindersError, ListClientRemindersErrors, ListClientRemindersResponse, ListClientRemindersResponses, ListClientsData, ListClientsError, ListClientsErrors, ListClientsResponse, ListClientsResponses, ListFormsData, ListFormsError, ListFormsErrors, ListFormsResponse, ListFormsResponses, ListFormSubmissionsData, ListFormSubmissionsError, ListFormSubmissionsErrors, ListFormSubmissionsResponse, ListFormSubmissionsResponses, ListTeamMembersData, ListTeamMembersError, ListTeamMembersErrors, ListTeamMembersResponse, ListTeamMembersResponses, Location, Note, PinNoteData, PinNoteError, PinNoteErrors, PinNoteResponse, PinNoteResponses, Reminder, RemoveClientLabelData, RemoveClientLabelError, RemoveClientLabelErrors, RemoveClientLabelResponse, RemoveClientLabelResponses, SetClientDoNotContact, SetClientDoNotContactData, SetClientDoNotContactError, SetClientDoNotContactErrors, SetClientDoNotContactResponse, SetClientDoNotContactResponses, SnoozeClient, SnoozeClientData, SnoozeClientError, SnoozeClientErrors, SnoozeClientResponse, SnoozeClientResponses, TeamMember, UnflagClientData, UnflagClientError, UnflagClientErrors, UnflagClientResponse, UnflagClientResponses, UnpinNoteData, UnpinNoteError, UnpinNoteErrors, UnpinNoteResponse, UnpinNoteResponses, UnsnoozeClientData, UnsnoozeClientError, UnsnoozeClientErrors, UnsnoozeClientResponse, UnsnoozeClientResponses, UpdateClientSuspension, UpdateClientSuspensionData, UpdateClientSuspensionError, UpdateClientSuspensionErrors, UpdateClientSuspensionResponse, UpdateClientSuspensionResponses, UpdateReminder, UpdateReminderData, UpdateReminderError, UpdateReminderErrors, UpdateReminderResponse, UpdateReminderResponses } from './types.gen.js';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // This file is auto-generated by @hey-api/openapi-ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.RecovrSdk = void 0;
5
+ var sdk_gen_js_1 = require("./sdk.gen.js");
6
+ Object.defineProperty(exports, "RecovrSdk", { enumerable: true, get: function () { return sdk_gen_js_1.RecovrSdk; } });
@@ -0,0 +1,225 @@
1
+ import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
2
+ import type { AddClientLabelData, AddClientLabelErrors, AddClientLabelResponses, AssignClientData, AssignClientErrors, AssignClientResponses, CloseReminderData, CloseReminderErrors, CloseReminderResponses, CreateClientInteractionData, CreateClientInteractionErrors, CreateClientInteractionResponses, CreateClientNoteData, CreateClientNoteErrors, CreateClientNoteResponses, CreateClientReminderData, CreateClientReminderErrors, CreateClientReminderResponses, FlagClientData, FlagClientErrors, FlagClientResponses, GetClientData, GetClientErrors, GetClientResponses, GetClientSuspensionData, GetClientSuspensionErrors, GetClientSuspensionResponses, GetFormData, GetFormErrors, GetFormResponses, GetFormSubmissionData, GetFormSubmissionErrors, GetFormSubmissionResponses, GetLocationData, GetLocationErrors, GetLocationResponses, GetMeData, GetMeErrors, GetMeResponses, ListClientFormSubmissionsData, ListClientFormSubmissionsErrors, ListClientFormSubmissionsResponses, ListClientInteractionsData, ListClientInteractionsErrors, ListClientInteractionsResponses, ListClientLabelsData, ListClientLabelsErrors, ListClientLabelsResponses, ListClientNotesData, ListClientNotesErrors, ListClientNotesResponses, ListClientRemindersData, ListClientRemindersErrors, ListClientRemindersResponses, ListClientsData, ListClientsErrors, ListClientsResponses, ListFormsData, ListFormsErrors, ListFormsResponses, ListFormSubmissionsData, ListFormSubmissionsErrors, ListFormSubmissionsResponses, ListTeamMembersData, ListTeamMembersErrors, ListTeamMembersResponses, PinNoteData, PinNoteErrors, PinNoteResponses, RemoveClientLabelData, RemoveClientLabelErrors, RemoveClientLabelResponses, SetClientDoNotContactData, SetClientDoNotContactErrors, SetClientDoNotContactResponses, SnoozeClientData, SnoozeClientErrors, SnoozeClientResponses, UnflagClientData, UnflagClientErrors, UnflagClientResponses, UnpinNoteData, UnpinNoteErrors, UnpinNoteResponses, UnsnoozeClientData, UnsnoozeClientErrors, UnsnoozeClientResponses, UpdateClientSuspensionData, UpdateClientSuspensionErrors, UpdateClientSuspensionResponses, UpdateReminderData, UpdateReminderErrors, UpdateReminderResponses } from './types.gen.js';
3
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
4
+ /**
5
+ * You can provide a client instance returned by `createClient()` instead of
6
+ * individual options. This might be also useful if you want to implement a
7
+ * custom client.
8
+ */
9
+ client?: Client;
10
+ /**
11
+ * You can pass arbitrary values through the `meta` object. This can be
12
+ * used to access values that aren't defined as part of the SDK function.
13
+ */
14
+ meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
15
+ };
16
+ declare class HeyApiClient {
17
+ protected client: Client;
18
+ constructor(args?: {
19
+ client?: Client;
20
+ });
21
+ }
22
+ declare class HeyApiRegistry<T> {
23
+ private readonly defaultKey;
24
+ private readonly instances;
25
+ get(key?: string): T;
26
+ set(value: T, key?: string): void;
27
+ }
28
+ export declare class RecovrSdk extends HeyApiClient {
29
+ static readonly __registry: HeyApiRegistry<RecovrSdk>;
30
+ constructor(args?: {
31
+ client?: Client;
32
+ key?: string;
33
+ });
34
+ /**
35
+ * The credential making this request
36
+ *
37
+ * How this request authenticated (a personal access token or an OAuth app), the credential's name, the permissions that apply, its location and rate-limit state. A good first call to check a credential works. Any valid personal access token or OAuth token can call it.
38
+ */
39
+ getMe<ThrowOnError extends boolean = true>(options?: Options<GetMeData, ThrowOnError>): RequestResult<GetMeResponses, GetMeErrors, ThrowOnError>;
40
+ /**
41
+ * The key's location
42
+ *
43
+ * The one location this key belongs to; every other endpoint reads and writes only there. Any valid key can call it.
44
+ */
45
+ getLocation<ThrowOnError extends boolean = true>(options?: Options<GetLocationData, ThrowOnError>): RequestResult<GetLocationResponses, GetLocationErrors, ThrowOnError>;
46
+ /**
47
+ * List team members
48
+ *
49
+ * The team at the key's location, for assigning clients (POST /clients/{id}/assign) and filtering by `assigned_to`. Needs `clients:read`.
50
+ */
51
+ listTeamMembers<ThrowOnError extends boolean = true>(options?: Options<ListTeamMembersData, ThrowOnError>): RequestResult<ListTeamMembersResponses, ListTeamMembersErrors, ThrowOnError>;
52
+ /**
53
+ * Get a client
54
+ *
55
+ * One client at the key's location, read fresh. Needs `clients:read`; `email` and `phone` are included only with `contact_details:read`. A client at another location is a 404.
56
+ */
57
+ getClient<ThrowOnError extends boolean = true>(options: Options<GetClientData, ThrowOnError>): RequestResult<GetClientResponses, GetClientErrors, ThrowOnError>;
58
+ /**
59
+ * List clients
60
+ *
61
+ * Clients at the key's location, filtered the way the Clients page filters them. Needs `clients:read`; filtering by `email` or `phone` also needs `contact_details:read`.
62
+ *
63
+ * Every filter you send must match (AND). Includes leads and former members unless you filter by `lifecycle_stage` or `is_active_member`. Exact filters (`external_client_id`, `email`, `phone`) can match several clients, for example a family sharing an email: all of them are returned.
64
+ *
65
+ * Pages are stable: a client added or removed between pages doesn't make the next page repeat or skip anyone else. Lists are read from data that can be up to a minute old; GET /clients/{id} reads one client fresh.
66
+ */
67
+ listClients<ThrowOnError extends boolean = true>(options?: Options<ListClientsData, ThrowOnError>): RequestResult<ListClientsResponses, ListClientsErrors, ThrowOnError>;
68
+ /**
69
+ * Assign a client to a team member
70
+ *
71
+ * Sets who looks after this client, as assigning a coach does on their profile. The team member is emailed unless they've turned assignment emails off. Send `assigned_to: null` to unassign. An id that isn't on the location's team is a 400. Needs `clients:write`. Works only on clients at the key's location: any other id is a 404.
72
+ */
73
+ assignClient<ThrowOnError extends boolean = true>(options: Options<AssignClientData, ThrowOnError>): RequestResult<AssignClientResponses, AssignClientErrors, ThrowOnError>;
74
+ /**
75
+ * Flag a client
76
+ *
77
+ * Flags the client for the team's attention from now, and records it on their timeline. The body is optional. Needs `clients:write`. Works only on clients at the key's location: any other id is a 404.
78
+ */
79
+ flagClient<ThrowOnError extends boolean = true>(options: Options<FlagClientData, ThrowOnError>): RequestResult<FlagClientResponses, FlagClientErrors, ThrowOnError>;
80
+ /**
81
+ * Remove a client's flag
82
+ *
83
+ * Unflagging a client who isn't flagged changes nothing. Needs `clients:write`. Works only on clients at the key's location: any other id is a 404.
84
+ */
85
+ unflagClient<ThrowOnError extends boolean = true>(options: Options<UnflagClientData, ThrowOnError>): RequestResult<UnflagClientResponses, UnflagClientErrors, ThrowOnError>;
86
+ /**
87
+ * Snooze a client
88
+ *
89
+ * Takes the client out of Next Up until the snooze ends. Send `days` or `until`, not both. Snoozing a snoozed client replaces the end. Needs `clients:write`. Works only on clients at the key's location: any other id is a 404.
90
+ */
91
+ snoozeClient<ThrowOnError extends boolean = true>(options: Options<SnoozeClientData, ThrowOnError>): RequestResult<SnoozeClientResponses, SnoozeClientErrors, ThrowOnError>;
92
+ /**
93
+ * End a client's snooze
94
+ *
95
+ * Ends the snooze now. Unsnoozing a client who isn't snoozed changes nothing. Needs `clients:write`. Works only on clients at the key's location: any other id is a 404.
96
+ */
97
+ unsnoozeClient<ThrowOnError extends boolean = true>(options: Options<UnsnoozeClientData, ThrowOnError>): RequestResult<UnsnoozeClientResponses, UnsnoozeClientErrors, ThrowOnError>;
98
+ /**
99
+ * Set a client's do-not-contact channels
100
+ *
101
+ * Stops (or allows again) messages and calls to the client on the channels you name; the client's `do_not_contact` shows the result. Every send from Recovr, including workflows, checks this. At a location connected to GoHighLevel, a later sync from GoHighLevel can change it, and this doesn't change it in GoHighLevel. Needs `clients:write`. Works only on clients at the key's location: any other id is a 404.
102
+ */
103
+ setClientDoNotContact<ThrowOnError extends boolean = true>(options: Options<SetClientDoNotContactData, ThrowOnError>): RequestResult<SetClientDoNotContactResponses, SetClientDoNotContactErrors, ThrowOnError>;
104
+ /**
105
+ * Add a label to a client
106
+ *
107
+ * Applies one of the location's labels, which can start workflows that trigger on it. Adding a label the client already has changes nothing. An archived label is restored. Smart labels can't be added by hand. Needs `clients:write`. Works only on clients at the key's location: any other id is a 404.
108
+ */
109
+ addClientLabel<ThrowOnError extends boolean = true>(options: Options<AddClientLabelData, ThrowOnError>): RequestResult<AddClientLabelResponses, AddClientLabelErrors, ThrowOnError>;
110
+ /**
111
+ * Remove a label from a client
112
+ *
113
+ * Removing a label the client doesn't have changes nothing. Recovr won't re-apply a label you removed by itself. Smart labels can't be removed by hand. Needs `clients:write`. Works only on clients at the key's location: any other id is a 404.
114
+ */
115
+ removeClientLabel<ThrowOnError extends boolean = true>(options: Options<RemoveClientLabelData, ThrowOnError>): RequestResult<RemoveClientLabelResponses, RemoveClientLabelErrors, ThrowOnError>;
116
+ /**
117
+ * Get a client's suspension details
118
+ *
119
+ * The Suspended Member details on the client's profile. A client who isn't suspended has `is_suspended: false`; details from an earlier suspension aren't returned. Needs `clients:read`. Works only on clients at the key's location: any other id is a 404.
120
+ */
121
+ getClientSuspension<ThrowOnError extends boolean = true>(options: Options<GetClientSuspensionData, ThrowOnError>): RequestResult<GetClientSuspensionResponses, GetClientSuspensionErrors, ThrowOnError>;
122
+ /**
123
+ * Update a client's suspension details
124
+ *
125
+ * Sets the reason, expected return date and notes on the client's Suspended Member card. Fields you leave out keep their value; null clears one. The client must already be Suspended in Recovr, which follows the booking platform: a hold made there shows up after Recovr's next sync of that client, and until then this returns 409 `client_not_suspended`. Needs `clients:write`. Works only on clients at the key's location: any other id is a 404.
126
+ */
127
+ updateClientSuspension<ThrowOnError extends boolean = true>(options: Options<UpdateClientSuspensionData, ThrowOnError>): RequestResult<UpdateClientSuspensionResponses, UpdateClientSuspensionErrors, ThrowOnError>;
128
+ /**
129
+ * List client labels
130
+ *
131
+ * The location's labels, for `label_id` in GET /clients and POST /clients/{id}/labels. Archived labels only with `include_archived=true`. Needs `clients:read`.
132
+ */
133
+ listClientLabels<ThrowOnError extends boolean = true>(options?: Options<ListClientLabelsData, ThrowOnError>): RequestResult<ListClientLabelsResponses, ListClientLabelsErrors, ThrowOnError>;
134
+ /**
135
+ * List a client's notes
136
+ *
137
+ * Newest first; pages don't repeat or skip items when new ones are added meanwhile. Includes notes imported from the booking platform. Needs `notes:read`. Only for clients at the key's location: any other id is a 404.
138
+ */
139
+ listClientNotes<ThrowOnError extends boolean = true>(options: Options<ListClientNotesData, ThrowOnError>): RequestResult<ListClientNotesResponses, ListClientNotesErrors, ThrowOnError>;
140
+ /**
141
+ * Add a note
142
+ *
143
+ * Adds a note as the key's owner, exactly as the Note tab does: it shows on the client's timeline and counts as the team being in touch. Needs `notes:write`. Only for clients at the key's location: any other id is a 404.
144
+ */
145
+ createClientNote<ThrowOnError extends boolean = true>(options: Options<CreateClientNoteData, ThrowOnError>): RequestResult<CreateClientNoteResponses, CreateClientNoteErrors, ThrowOnError>;
146
+ /**
147
+ * Pin a note
148
+ *
149
+ * Pins it to the top of the client's profile, unpinning whichever note was pinned before. Needs `notes:write`. Only for notes at the key's location: any other id is a 404.
150
+ */
151
+ pinNote<ThrowOnError extends boolean = true>(options: Options<PinNoteData, ThrowOnError>): RequestResult<PinNoteResponses, PinNoteErrors, ThrowOnError>;
152
+ /**
153
+ * Unpin a note
154
+ *
155
+ * Unpinning a note that isn't pinned changes nothing. Needs `notes:write`. Only for notes at the key's location: any other id is a 404.
156
+ */
157
+ unpinNote<ThrowOnError extends boolean = true>(options: Options<UnpinNoteData, ThrowOnError>): RequestResult<UnpinNoteResponses, UnpinNoteErrors, ThrowOnError>;
158
+ /**
159
+ * List a client's interactions
160
+ *
161
+ * Calls, in-person conversations and messages the team logged, including contact logs imported from the booking platform. Snoozes, flags, assignments and other changes on the profile aren't contact and aren't listed. Newest first; pages don't repeat or skip items when new ones are added meanwhile. (ordered by when they were logged). Notes are at /clients/{id}/notes; messages sent through Recovr aren't listed here. Needs `notes:read`. Only for clients at the key's location: any other id is a 404.
162
+ */
163
+ listClientInteractions<ThrowOnError extends boolean = true>(options: Options<ListClientInteractionsData, ThrowOnError>): RequestResult<ListClientInteractionsResponses, ListClientInteractionsErrors, ThrowOnError>;
164
+ /**
165
+ * Log an interaction
166
+ *
167
+ * Records contact the team had with the client, as the key's owner: a `call` (as the profile's Call tab logs it), an `in_person` conversation (the Interact tab) or a `message` sent outside Recovr by `email`, `sms` or `whatsapp`. It counts as contact made in reports and Next Up, and doesn't send anything to the client. Needs `notes:write`. Only for clients at the key's location: any other id is a 404.
168
+ */
169
+ createClientInteraction<ThrowOnError extends boolean = true>(options: Options<CreateClientInteractionData, ThrowOnError>): RequestResult<CreateClientInteractionResponses, CreateClientInteractionErrors, ThrowOnError>;
170
+ /**
171
+ * List a client's open reminders
172
+ *
173
+ * Reminders the team still has to tick off for this client. Newest first; pages don't repeat or skip items when new ones are added meanwhile. Closed reminders aren't listed. Answers 404 `reminders_unavailable` where the location doesn't have reminders turned on. Needs `notes:read`. Only for clients at the key's location: any other id is a 404.
174
+ */
175
+ listClientReminders<ThrowOnError extends boolean = true>(options: Options<ListClientRemindersData, ThrowOnError>): RequestResult<ListClientRemindersResponses, ListClientRemindersErrors, ThrowOnError>;
176
+ /**
177
+ * Set a reminder
178
+ *
179
+ * A reminder for the team about this client, set as the key's owner: due at a time (`due_kind: "date"`, it comes up in Next Up) or at their next class (`due_kind: "next_class"`, it's shown on the class list). Answers 404 `reminders_unavailable` where the location doesn't have reminders turned on. Needs `notes:write`. Only for clients at the key's location: any other id is a 404.
180
+ */
181
+ createClientReminder<ThrowOnError extends boolean = true>(options: Options<CreateClientReminderData, ThrowOnError>): RequestResult<CreateClientReminderResponses, CreateClientReminderErrors, ThrowOnError>;
182
+ /**
183
+ * Change a reminder
184
+ *
185
+ * Changes the due time, the note, or both, on an open dated reminder; what you leave out stays. Moving the time re-arms it. A next-class reminder has no time to change (400). Answers 404 `reminders_unavailable` where the location doesn't have reminders turned on. Needs `notes:write`. Only for reminders at the key's location: any other id is a 404.
186
+ */
187
+ updateReminder<ThrowOnError extends boolean = true>(options: Options<UpdateReminderData, ThrowOnError>): RequestResult<UpdateReminderResponses, UpdateReminderErrors, ThrowOnError>;
188
+ /**
189
+ * Close a reminder
190
+ *
191
+ * Ticks it off as the key's owner. It doesn't snooze the client. The body is optional. Answers 404 `reminders_unavailable` where the location doesn't have reminders turned on. Needs `notes:write`. Only for reminders at the key's location: any other id is a 404.
192
+ */
193
+ closeReminder<ThrowOnError extends boolean = true>(options: Options<CloseReminderData, ThrowOnError>): RequestResult<CloseReminderResponses, CloseReminderErrors, ThrowOnError>;
194
+ /**
195
+ * List forms
196
+ *
197
+ * The location's published forms, newest first. Use a form's id to list its submissions.
198
+ */
199
+ listForms<ThrowOnError extends boolean = true>(options?: Options<ListFormsData, ThrowOnError>): RequestResult<ListFormsResponses, ListFormsErrors, ThrowOnError>;
200
+ /**
201
+ * Get a form
202
+ *
203
+ * One form with the questions it asks. Works for forms that are no longer published, so older submissions can still be read.
204
+ */
205
+ getForm<ThrowOnError extends boolean = true>(options: Options<GetFormData, ThrowOnError>): RequestResult<GetFormResponses, GetFormErrors, ThrowOnError>;
206
+ /**
207
+ * List a form's submissions
208
+ *
209
+ * Newest first, or with `after_id` oldest first from that id, which is how to fetch new submissions. Includes anonymous answers (for example to the Feedback form), which have a null `client_id`. Answers can contain contact and health details. Pages hold steady while new submissions arrive: none is repeated or skipped.
210
+ */
211
+ listFormSubmissions<ThrowOnError extends boolean = true>(options: Options<ListFormSubmissionsData, ThrowOnError>): RequestResult<ListFormSubmissionsResponses, ListFormSubmissionsErrors, ThrowOnError>;
212
+ /**
213
+ * List a client's form submissions
214
+ *
215
+ * Every form this client has submitted, newest first (or with `after_id`, oldest first from that id), with their answers. Anonymous answers are never attached to a client. Answers can contain contact and health details.
216
+ */
217
+ listClientFormSubmissions<ThrowOnError extends boolean = true>(options: Options<ListClientFormSubmissionsData, ThrowOnError>): RequestResult<ListClientFormSubmissionsResponses, ListClientFormSubmissionsErrors, ThrowOnError>;
218
+ /**
219
+ * Get a form submission
220
+ *
221
+ * One submission with its answers. Answers can contain contact and health details.
222
+ */
223
+ getFormSubmission<ThrowOnError extends boolean = true>(options: Options<GetFormSubmissionData, ThrowOnError>): RequestResult<GetFormSubmissionResponses, GetFormSubmissionErrors, ThrowOnError>;
224
+ }
225
+ export {};