@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.
- package/LICENSE +21 -0
- package/README.md +139 -2
- package/dist/cjs/client.d.ts +36 -0
- package/dist/cjs/client.js +100 -0
- package/dist/cjs/errors.d.ts +31 -0
- package/dist/cjs/errors.js +69 -0
- package/dist/cjs/generated/client/client.gen.d.ts +2 -0
- package/dist/cjs/generated/client/client.gen.js +220 -0
- package/dist/cjs/generated/client/index.d.ts +10 -0
- package/dist/cjs/generated/client/index.js +17 -0
- package/dist/cjs/generated/client/types.gen.d.ts +120 -0
- package/dist/cjs/generated/client/types.gen.js +3 -0
- package/dist/cjs/generated/client/utils.gen.d.ts +37 -0
- package/dist/cjs/generated/client/utils.gen.js +239 -0
- package/dist/cjs/generated/client.gen.d.ts +12 -0
- package/dist/cjs/generated/client.gen.js +6 -0
- package/dist/cjs/generated/core/auth.gen.d.ts +25 -0
- package/dist/cjs/generated/core/auth.gen.js +18 -0
- package/dist/cjs/generated/core/bodySerializer.gen.d.ts +25 -0
- package/dist/cjs/generated/core/bodySerializer.gen.js +60 -0
- package/dist/cjs/generated/core/params.gen.d.ts +43 -0
- package/dist/cjs/generated/core/params.gen.js +112 -0
- package/dist/cjs/generated/core/pathSerializer.gen.d.ts +33 -0
- package/dist/cjs/generated/core/pathSerializer.gen.js +115 -0
- package/dist/cjs/generated/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/cjs/generated/core/queryKeySerializer.gen.js +98 -0
- package/dist/cjs/generated/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/cjs/generated/core/serverSentEvents.gen.js +135 -0
- package/dist/cjs/generated/core/types.gen.d.ts +83 -0
- package/dist/cjs/generated/core/types.gen.js +3 -0
- package/dist/cjs/generated/core/utils.gen.d.ts +19 -0
- package/dist/cjs/generated/core/utils.gen.js +93 -0
- package/dist/cjs/generated/index.d.ts +2 -0
- package/dist/cjs/generated/index.js +6 -0
- package/dist/cjs/generated/sdk.gen.d.ts +225 -0
- package/dist/cjs/generated/sdk.gen.js +825 -0
- package/dist/cjs/generated/types.gen.d.ts +2455 -0
- package/dist/cjs/generated/types.gen.js +3 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +11 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/paginate.d.ts +24 -0
- package/dist/cjs/paginate.js +18 -0
- package/dist/esm/client.d.ts +36 -0
- package/dist/esm/client.js +95 -0
- package/dist/esm/errors.d.ts +31 -0
- package/dist/esm/errors.js +64 -0
- package/dist/esm/generated/client/client.gen.d.ts +2 -0
- package/dist/esm/generated/client/client.gen.js +216 -0
- package/dist/esm/generated/client/index.d.ts +10 -0
- package/dist/esm/generated/client/index.js +6 -0
- package/dist/esm/generated/client/types.gen.d.ts +120 -0
- package/dist/esm/generated/client/types.gen.js +2 -0
- package/dist/esm/generated/client/utils.gen.d.ts +37 -0
- package/dist/esm/generated/client/utils.gen.js +228 -0
- package/dist/esm/generated/client.gen.d.ts +12 -0
- package/dist/esm/generated/client.gen.js +3 -0
- package/dist/esm/generated/core/auth.gen.d.ts +25 -0
- package/dist/esm/generated/core/auth.gen.js +14 -0
- package/dist/esm/generated/core/bodySerializer.gen.d.ts +25 -0
- package/dist/esm/generated/core/bodySerializer.gen.js +57 -0
- package/dist/esm/generated/core/params.gen.d.ts +43 -0
- package/dist/esm/generated/core/params.gen.js +109 -0
- package/dist/esm/generated/core/pathSerializer.gen.d.ts +33 -0
- package/dist/esm/generated/core/pathSerializer.gen.js +106 -0
- package/dist/esm/generated/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/esm/generated/core/queryKeySerializer.gen.js +92 -0
- package/dist/esm/generated/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/esm/generated/core/serverSentEvents.gen.js +132 -0
- package/dist/esm/generated/core/types.gen.d.ts +83 -0
- package/dist/esm/generated/core/types.gen.js +2 -0
- package/dist/esm/generated/core/utils.gen.d.ts +19 -0
- package/dist/esm/generated/core/utils.gen.js +87 -0
- package/dist/esm/generated/index.d.ts +2 -0
- package/dist/esm/generated/index.js +2 -0
- package/dist/esm/generated/sdk.gen.d.ts +225 -0
- package/dist/esm/generated/sdk.gen.js +821 -0
- package/dist/esm/generated/types.gen.d.ts +2455 -0
- package/dist/esm/generated/types.gen.js +2 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/paginate.d.ts +24 -0
- package/dist/esm/paginate.js +15 -0
- package/package.json +56 -4
|
@@ -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 {};
|