@hirefinn/sdk 0.2.0 → 0.3.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/README.md +39 -9
- package/dist/cjs/client.d.ts +13 -1
- package/dist/cjs/client.js +5 -0
- package/dist/cjs/core.d.ts +1 -1
- package/dist/cjs/core.js +3 -1
- package/dist/cjs/generated/openapi.d.ts +17426 -5875
- package/dist/cjs/generated/operations.d.ts +26 -0
- package/dist/cjs/generated/operations.js +165 -0
- package/dist/cjs/generated/resources.d.ts +887 -0
- package/dist/cjs/generated/resources.js +737 -0
- package/dist/cjs/resource.d.ts +30 -0
- package/dist/cjs/resource.js +23 -0
- package/dist/cjs/resources.d.ts +47 -54
- package/dist/cjs/resources.js +24 -34
- package/dist/cjs/types.d.ts +11 -3
- package/dist/esm/client.d.ts +13 -1
- package/dist/esm/client.js +6 -1
- package/dist/esm/core.d.ts +1 -1
- package/dist/esm/core.js +3 -1
- package/dist/esm/generated/openapi.d.ts +17426 -5875
- package/dist/esm/generated/operations.d.ts +26 -0
- package/dist/esm/generated/operations.js +162 -0
- package/dist/esm/generated/resources.d.ts +887 -0
- package/dist/esm/generated/resources.js +716 -0
- package/dist/esm/resource.d.ts +30 -0
- package/dist/esm/resource.js +19 -0
- package/dist/esm/resources.d.ts +47 -54
- package/dist/esm/resources.js +17 -32
- package/dist/esm/types.d.ts +11 -3
- package/package.json +2 -1
|
@@ -0,0 +1,887 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource methods for every operation src/resources.ts does not hand-write. Hand-written classes extend the
|
|
3
|
+
* `*Generated` bases; the other classes are used as they are.
|
|
4
|
+
* Generated by scripts/generate.mjs from spec/openapi.json. Do not edit by hand: run `npm run generate`.
|
|
5
|
+
* Spec: Finn API v1 (OpenAPI 3.1.0)
|
|
6
|
+
*/
|
|
7
|
+
import { Resource, type B, type Id, type Q } from '../resource.js';
|
|
8
|
+
import type { RequestOptions } from '../types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Generated methods for the Calls tag; `Calls` in src/resources.ts adds the hand-written ones.
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class CallsGenerated extends Resource {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Generated methods for the Finns tag; `Finns` in src/resources.ts adds the hand-written ones.
|
|
16
|
+
*/
|
|
17
|
+
export declare abstract class FinnsGenerated extends Resource {
|
|
18
|
+
/**
|
|
19
|
+
* Draft a Finn with AI.
|
|
20
|
+
* `POST /finns/generate`, operationId `generateFinn`.
|
|
21
|
+
*/
|
|
22
|
+
generate(body: B<'/finns/generate', 'post'>, options?: RequestOptions): Promise<{
|
|
23
|
+
success: true;
|
|
24
|
+
data: import("./openapi.js").components["schemas"]["Finn"];
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Read a Finn's call flow.
|
|
28
|
+
* `GET /finns/{finn_id}/flow`, operationId `getFinnFlow`.
|
|
29
|
+
*/
|
|
30
|
+
getFlow(finnId: Id, options?: RequestOptions): Promise<{
|
|
31
|
+
success: true;
|
|
32
|
+
data: import("./openapi.js").components["schemas"]["FinnFlow"];
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Turn a Finn's call flow on.
|
|
36
|
+
* `POST /finns/{finn_id}/flow/enable`, operationId `enableFinnFlow`.
|
|
37
|
+
*/
|
|
38
|
+
enableFlow(finnId: Id, options?: RequestOptions): Promise<{
|
|
39
|
+
success: true;
|
|
40
|
+
data: import("./openapi.js").components["schemas"]["FinnFlow"];
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Turn a Finn's call flow off.
|
|
44
|
+
* `POST /finns/{finn_id}/flow/disable`, operationId `disableFinnFlow`.
|
|
45
|
+
*/
|
|
46
|
+
disableFlow(finnId: Id, options?: RequestOptions): Promise<{
|
|
47
|
+
success: true;
|
|
48
|
+
data: import("./openapi.js").components["schemas"]["FinnFlow"];
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Read a Finn's settings.
|
|
52
|
+
* `GET /finns/{finn_id}/settings`, operationId `getFinnSettings`.
|
|
53
|
+
*/
|
|
54
|
+
getSettings(finnId: Id, options?: RequestOptions): Promise<{
|
|
55
|
+
success: true;
|
|
56
|
+
data: import("./openapi.js").components["schemas"]["FinnSettings"];
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Read a Finn's variables.
|
|
60
|
+
* `GET /finns/{finn_id}/variables`, operationId `getFinnVariables`.
|
|
61
|
+
*/
|
|
62
|
+
getVariables(finnId: Id, options?: RequestOptions): Promise<{
|
|
63
|
+
success: true;
|
|
64
|
+
data: import("./openapi.js").components["schemas"]["FinnVariables"];
|
|
65
|
+
}>;
|
|
66
|
+
/**
|
|
67
|
+
* Edit a Finn's variables.
|
|
68
|
+
* `PATCH /finns/{finn_id}/variables`, operationId `updateFinnVariables`.
|
|
69
|
+
*/
|
|
70
|
+
updateVariables(finnId: Id, body: B<'/finns/{finn_id}/variables', 'patch'>, options?: RequestOptions): Promise<{
|
|
71
|
+
success: true;
|
|
72
|
+
data: import("./openapi.js").components["schemas"]["FinnVariables"];
|
|
73
|
+
}>;
|
|
74
|
+
/**
|
|
75
|
+
* Edit a Finn's agent handbook.
|
|
76
|
+
* `PATCH /finns/{finn_id}/handbook`, operationId `updateFinnHandbook`.
|
|
77
|
+
*/
|
|
78
|
+
updateHandbook(finnId: Id, body: B<'/finns/{finn_id}/handbook', 'patch'>, options?: RequestOptions): Promise<{
|
|
79
|
+
success: true;
|
|
80
|
+
data: {
|
|
81
|
+
finn?: import("./openapi.js").components["schemas"]["FinnSummary"];
|
|
82
|
+
handbook?: import("./openapi.js").components["schemas"]["FinnHandbook"];
|
|
83
|
+
schema_version?: number;
|
|
84
|
+
};
|
|
85
|
+
}>;
|
|
86
|
+
/**
|
|
87
|
+
* Edit a Finn's speech settings.
|
|
88
|
+
* `PATCH /finns/{finn_id}/speech_settings`, operationId `updateFinnSpeechSettings`.
|
|
89
|
+
*/
|
|
90
|
+
updateSpeechSettings(finnId: Id, body: B<'/finns/{finn_id}/speech_settings', 'patch'>, options?: RequestOptions): Promise<{
|
|
91
|
+
success: true;
|
|
92
|
+
data: {
|
|
93
|
+
finn?: import("./openapi.js").components["schemas"]["FinnSummary"];
|
|
94
|
+
speech_settings?: {
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
} | null;
|
|
97
|
+
};
|
|
98
|
+
}>;
|
|
99
|
+
/**
|
|
100
|
+
* Edit a draft Finn.
|
|
101
|
+
* `PATCH /finns/{finn_id}/draft`, operationId `updateFinnDraft`.
|
|
102
|
+
*/
|
|
103
|
+
updateDraft(finnId: Id, body: B<'/finns/{finn_id}/draft', 'patch'>, options?: RequestOptions): Promise<{
|
|
104
|
+
success: true;
|
|
105
|
+
data: import("./openapi.js").components["schemas"]["Finn"];
|
|
106
|
+
}>;
|
|
107
|
+
/**
|
|
108
|
+
* Copy a Finn.
|
|
109
|
+
* `POST /finns/{finn_id}/duplicate`, operationId `duplicateFinn`.
|
|
110
|
+
*/
|
|
111
|
+
duplicate(finnId: Id, body: B<'/finns/{finn_id}/duplicate', 'post'>, options?: RequestOptions): Promise<{
|
|
112
|
+
success: true;
|
|
113
|
+
data: import("./openapi.js").components["schemas"]["Finn"];
|
|
114
|
+
}>;
|
|
115
|
+
/**
|
|
116
|
+
* Read a Finn's share link.
|
|
117
|
+
* `GET /finns/{finn_id}/share_link`, operationId `getFinnShareLink`.
|
|
118
|
+
*/
|
|
119
|
+
getShareLink(finnId: Id, options?: RequestOptions): Promise<{
|
|
120
|
+
success: true;
|
|
121
|
+
data: import("./openapi.js").components["schemas"]["FinnShareLink"] | null;
|
|
122
|
+
}>;
|
|
123
|
+
/**
|
|
124
|
+
* Get or make a Finn's share link.
|
|
125
|
+
* `POST /finns/{finn_id}/share_link`, operationId `createFinnShareLink`.
|
|
126
|
+
*/
|
|
127
|
+
createShareLink(finnId: Id, options?: RequestOptions): Promise<{
|
|
128
|
+
success: true;
|
|
129
|
+
data: import("./openapi.js").components["schemas"]["FinnShareLink"];
|
|
130
|
+
} | {
|
|
131
|
+
success: true;
|
|
132
|
+
data: import("./openapi.js").components["schemas"]["FinnShareLink"];
|
|
133
|
+
}>;
|
|
134
|
+
/**
|
|
135
|
+
* A Finn's call stats.
|
|
136
|
+
* `GET /finns/{finn_id}/stats`, operationId `getFinnStats`.
|
|
137
|
+
*/
|
|
138
|
+
getStats(finnId: Id, query?: Q<'/finns/{finn_id}/stats', 'get'>, options?: RequestOptions): Promise<{
|
|
139
|
+
success: true;
|
|
140
|
+
data: {
|
|
141
|
+
[key: string]: unknown;
|
|
142
|
+
};
|
|
143
|
+
}>;
|
|
144
|
+
/**
|
|
145
|
+
* Summarize a Finn's call outcomes.
|
|
146
|
+
* `GET /finns/{finn_id}/outcomes`, operationId `getFinnOutcomes`.
|
|
147
|
+
*/
|
|
148
|
+
getOutcomes(finnId: Id, query?: Q<'/finns/{finn_id}/outcomes', 'get'>, options?: RequestOptions): Promise<{
|
|
149
|
+
success: true;
|
|
150
|
+
data: {
|
|
151
|
+
[key: string]: unknown;
|
|
152
|
+
};
|
|
153
|
+
}>;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Generated methods for the Voices tag; `Voices` in src/resources.ts adds the hand-written ones.
|
|
157
|
+
*/
|
|
158
|
+
export declare abstract class VoicesGenerated extends Resource {
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Generated methods for the Phone numbers tag; `PhoneNumbers` in src/resources.ts adds the hand-written ones.
|
|
162
|
+
*/
|
|
163
|
+
export declare abstract class PhoneNumbersGenerated extends Resource {
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Generated methods for the Audiences tag; `Audiences` in src/resources.ts adds the hand-written ones.
|
|
167
|
+
*/
|
|
168
|
+
export declare abstract class AudiencesGenerated extends Resource {
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Generated methods for the Deployments tag; `Deployments` in src/resources.ts adds the hand-written ones.
|
|
172
|
+
*/
|
|
173
|
+
export declare abstract class DeploymentsGenerated extends Resource {
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Generated methods for the Wallet tag; `Wallet` in src/resources.ts adds the hand-written ones.
|
|
177
|
+
*/
|
|
178
|
+
export declare abstract class WalletGenerated extends Resource {
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Generated methods for the Do not call tag; `DoNotCall` in src/resources.ts adds the hand-written ones.
|
|
182
|
+
*/
|
|
183
|
+
export declare abstract class DoNotCallGenerated extends Resource {
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Generated methods for the Records tag; `Contacts` in src/resources.ts adds the hand-written ones.
|
|
187
|
+
*/
|
|
188
|
+
export declare abstract class ContactsGenerated extends Resource {
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Generated methods for the Cases tag; `Cases` in src/resources.ts adds the hand-written ones.
|
|
192
|
+
*/
|
|
193
|
+
export declare abstract class CasesGenerated extends Resource {
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Generated methods for the Approvals tag; `Approvals` in src/resources.ts adds the hand-written ones.
|
|
197
|
+
*/
|
|
198
|
+
export declare abstract class ApprovalsGenerated extends Resource {
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Generated methods for the Agents tag; `Agents` in src/resources.ts adds the hand-written ones.
|
|
202
|
+
*/
|
|
203
|
+
export declare abstract class AgentsGenerated extends Resource {
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Generated methods for the Chat tag; `Chat` in src/resources.ts adds the hand-written ones.
|
|
207
|
+
*/
|
|
208
|
+
export declare abstract class ChatGenerated extends Resource {
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* CRM: records, stages, forms, documents, follow-ups, views and imports (`/crm`). Reached as `finn.crm`.
|
|
212
|
+
*/
|
|
213
|
+
export declare class Crm extends Resource {
|
|
214
|
+
/**
|
|
215
|
+
* Get the CRM setup.
|
|
216
|
+
* `GET /crm/setup`, operationId `getCrmSetup`, scope `crm:read`.
|
|
217
|
+
*/
|
|
218
|
+
getSetup(options?: RequestOptions): Promise<{
|
|
219
|
+
[key: string]: unknown;
|
|
220
|
+
}>;
|
|
221
|
+
/**
|
|
222
|
+
* Get the filter schema.
|
|
223
|
+
* `GET /crm/filter_schema`, operationId `getCrmFilterSchema`, scope `crm:read`.
|
|
224
|
+
*/
|
|
225
|
+
getFilterSchema(options?: RequestOptions): Promise<{
|
|
226
|
+
[key: string]: unknown;
|
|
227
|
+
}>;
|
|
228
|
+
/**
|
|
229
|
+
* Search records.
|
|
230
|
+
* `POST /crm/records/search`, operationId `searchCrmRecords`, scope `crm:read`.
|
|
231
|
+
*/
|
|
232
|
+
searchRecords(body: B<'/crm/records/search', 'post'>, options?: RequestOptions): Promise<{
|
|
233
|
+
[key: string]: unknown;
|
|
234
|
+
}>;
|
|
235
|
+
/**
|
|
236
|
+
* Query records.
|
|
237
|
+
* `POST /crm/records/query`, operationId `queryCrmRecords`, scope `crm:read`.
|
|
238
|
+
*/
|
|
239
|
+
queryRecords(body?: B<'/crm/records/query', 'post'>, query?: Q<'/crm/records/query', 'post'>, options?: RequestOptions): Promise<{
|
|
240
|
+
data: {
|
|
241
|
+
[key: string]: unknown;
|
|
242
|
+
}[];
|
|
243
|
+
next_cursor: string | null;
|
|
244
|
+
has_more: boolean;
|
|
245
|
+
total_count?: number;
|
|
246
|
+
}>;
|
|
247
|
+
/**
|
|
248
|
+
* Count records.
|
|
249
|
+
* `POST /crm/records/query/count`, operationId `countCrmRecords`, scope `crm:read`.
|
|
250
|
+
*/
|
|
251
|
+
countRecords(body?: B<'/crm/records/query/count', 'post'>, options?: RequestOptions): Promise<{
|
|
252
|
+
[key: string]: unknown;
|
|
253
|
+
}>;
|
|
254
|
+
/**
|
|
255
|
+
* Count records by stage.
|
|
256
|
+
* `POST /crm/records/query/stage_counts`, operationId `countCrmRecordsByStage`, scope `crm:read`.
|
|
257
|
+
*/
|
|
258
|
+
countRecordsByStage(body?: B<'/crm/records/query/stage_counts', 'post'>, options?: RequestOptions): Promise<{
|
|
259
|
+
[key: string]: unknown;
|
|
260
|
+
}>;
|
|
261
|
+
/**
|
|
262
|
+
* Get a record.
|
|
263
|
+
* `GET /crm/records/{id}`, operationId `getCrmRecord`, scope `crm:read`.
|
|
264
|
+
*/
|
|
265
|
+
getRecord(id: Id, options?: RequestOptions): Promise<{
|
|
266
|
+
[key: string]: unknown;
|
|
267
|
+
}>;
|
|
268
|
+
/**
|
|
269
|
+
* Update a record's fields.
|
|
270
|
+
* `PATCH /crm/records/{id}`, operationId `updateCrmRecord`, scope `crm:write`.
|
|
271
|
+
*/
|
|
272
|
+
updateRecord(id: Id, body: B<'/crm/records/{id}', 'patch'>, options?: RequestOptions): Promise<{
|
|
273
|
+
[key: string]: unknown;
|
|
274
|
+
}>;
|
|
275
|
+
/**
|
|
276
|
+
* Get a record's timeline.
|
|
277
|
+
* `GET /crm/records/{id}/timeline`, operationId `getCrmRecordTimeline`, scope `crm:read`.
|
|
278
|
+
*/
|
|
279
|
+
getRecordTimeline(id: Id, query?: Q<'/crm/records/{id}/timeline', 'get'>, options?: RequestOptions): Promise<{
|
|
280
|
+
[key: string]: unknown;
|
|
281
|
+
}>;
|
|
282
|
+
/**
|
|
283
|
+
* Get a stage gate.
|
|
284
|
+
* `GET /crm/records/{id}/stage_gate`, operationId `getCrmStageGate`, scope `crm:read`.
|
|
285
|
+
*/
|
|
286
|
+
getStageGate(id: Id, query?: Q<'/crm/records/{id}/stage_gate', 'get'>, options?: RequestOptions): Promise<{
|
|
287
|
+
[key: string]: unknown;
|
|
288
|
+
}>;
|
|
289
|
+
/**
|
|
290
|
+
* List a record's documents.
|
|
291
|
+
* `GET /crm/records/{id}/documents`, operationId `listCrmRecordDocuments`, scope `crm:read`.
|
|
292
|
+
*/
|
|
293
|
+
listRecordDocuments(id: Id, options?: RequestOptions): Promise<{
|
|
294
|
+
[key: string]: unknown;
|
|
295
|
+
}>;
|
|
296
|
+
/**
|
|
297
|
+
* List a record's files.
|
|
298
|
+
* `GET /crm/records/{id}/files`, operationId `listCrmRecordFiles`, scope `crm:read`.
|
|
299
|
+
*/
|
|
300
|
+
listRecordFiles(id: Id, options?: RequestOptions): Promise<{
|
|
301
|
+
[key: string]: unknown;
|
|
302
|
+
}>;
|
|
303
|
+
/**
|
|
304
|
+
* Attach a file.
|
|
305
|
+
* `POST /crm/records/{id}/files`, operationId `attachCrmFile`, scope `crm:docs:write`.
|
|
306
|
+
*/
|
|
307
|
+
attachFile(id: Id, body: B<'/crm/records/{id}/files', 'post'> | FormData, options?: RequestOptions): Promise<{
|
|
308
|
+
[key: string]: unknown;
|
|
309
|
+
}>;
|
|
310
|
+
/**
|
|
311
|
+
* Get a record's forms checklist.
|
|
312
|
+
* `GET /crm/records/{id}/forms_checklist`, operationId `getCrmFormsChecklist`, scope `crm:read`.
|
|
313
|
+
*/
|
|
314
|
+
getFormsChecklist(id: Id, options?: RequestOptions): Promise<{
|
|
315
|
+
[key: string]: unknown;
|
|
316
|
+
}>;
|
|
317
|
+
/**
|
|
318
|
+
* List a record's form submissions.
|
|
319
|
+
* `GET /crm/records/{id}/submissions`, operationId `listCrmFormSubmissions`, scope `crm:read`.
|
|
320
|
+
*/
|
|
321
|
+
listFormSubmissions(id: Id, options?: RequestOptions): Promise<{
|
|
322
|
+
[key: string]: unknown;
|
|
323
|
+
}>;
|
|
324
|
+
/**
|
|
325
|
+
* List a record's form drafts.
|
|
326
|
+
* `GET /crm/records/{id}/form_drafts`, operationId `listCrmFormDrafts`, scope `crm:read`.
|
|
327
|
+
*/
|
|
328
|
+
listFormDrafts(id: Id, options?: RequestOptions): Promise<{
|
|
329
|
+
[key: string]: unknown;
|
|
330
|
+
}>;
|
|
331
|
+
/**
|
|
332
|
+
* List forms.
|
|
333
|
+
* `GET /crm/forms`, operationId `listCrmForms`, scope `crm:read`.
|
|
334
|
+
*/
|
|
335
|
+
listForms(options?: RequestOptions): Promise<{
|
|
336
|
+
[key: string]: unknown;
|
|
337
|
+
}>;
|
|
338
|
+
/**
|
|
339
|
+
* List follow-ups.
|
|
340
|
+
* `GET /crm/follow_ups`, operationId `listCrmFollowUps`, scope `crm:read`.
|
|
341
|
+
*/
|
|
342
|
+
listFollowUps(query?: Q<'/crm/follow_ups', 'get'>, options?: RequestOptions): Promise<{
|
|
343
|
+
data: {
|
|
344
|
+
[key: string]: unknown;
|
|
345
|
+
}[];
|
|
346
|
+
next_cursor: string | null;
|
|
347
|
+
has_more: boolean;
|
|
348
|
+
total_count?: number;
|
|
349
|
+
}>;
|
|
350
|
+
/** Every item of `listFollowUps`, page by page (follows `next_cursor`). */
|
|
351
|
+
listAllFollowUps(query?: Q<'/crm/follow_ups', 'get'>, options?: RequestOptions): import("../pagination.js").Paginator<{
|
|
352
|
+
[key: string]: unknown;
|
|
353
|
+
}, unknown>;
|
|
354
|
+
/**
|
|
355
|
+
* Get follow-up counts.
|
|
356
|
+
* `GET /crm/follow_ups/stats`, operationId `getCrmFollowUpStats`, scope `crm:read`.
|
|
357
|
+
*/
|
|
358
|
+
getFollowUpStats(query?: Q<'/crm/follow_ups/stats', 'get'>, options?: RequestOptions): Promise<{
|
|
359
|
+
[key: string]: unknown;
|
|
360
|
+
}>;
|
|
361
|
+
/**
|
|
362
|
+
* Get my work.
|
|
363
|
+
* `GET /crm/my_work`, operationId `getCrmMyWork`, scope `crm:read`.
|
|
364
|
+
*/
|
|
365
|
+
getMyWork(options?: RequestOptions): Promise<{
|
|
366
|
+
[key: string]: unknown;
|
|
367
|
+
}>;
|
|
368
|
+
/**
|
|
369
|
+
* List saved views.
|
|
370
|
+
* `GET /crm/views`, operationId `listCrmViews`, scope `crm:read`.
|
|
371
|
+
*/
|
|
372
|
+
listViews(options?: RequestOptions): Promise<{
|
|
373
|
+
[key: string]: unknown;
|
|
374
|
+
}>;
|
|
375
|
+
/**
|
|
376
|
+
* Save a view.
|
|
377
|
+
* `POST /crm/views`, operationId `saveCrmView`, scope `crm:write`.
|
|
378
|
+
*/
|
|
379
|
+
saveView(body: B<'/crm/views', 'post'>, options?: RequestOptions): Promise<{
|
|
380
|
+
[key: string]: unknown;
|
|
381
|
+
}>;
|
|
382
|
+
/**
|
|
383
|
+
* Get the pipeline summary.
|
|
384
|
+
* `GET /crm/summary`, operationId `getCrmSummary`, scope `crm:read`.
|
|
385
|
+
*/
|
|
386
|
+
getSummary(options?: RequestOptions): Promise<{
|
|
387
|
+
[key: string]: unknown;
|
|
388
|
+
}>;
|
|
389
|
+
/**
|
|
390
|
+
* Get counts per stage.
|
|
391
|
+
* `GET /crm/stage_counts`, operationId `getCrmStageCounts`, scope `crm:read`.
|
|
392
|
+
*/
|
|
393
|
+
getStageCounts(options?: RequestOptions): Promise<{
|
|
394
|
+
[key: string]: unknown;
|
|
395
|
+
}>;
|
|
396
|
+
/**
|
|
397
|
+
* Get speed to lead.
|
|
398
|
+
* `GET /crm/speed`, operationId `getCrmSpeed`, scope `crm:read`.
|
|
399
|
+
*/
|
|
400
|
+
getSpeed(query?: Q<'/crm/speed', 'get'>, options?: RequestOptions): Promise<{
|
|
401
|
+
[key: string]: unknown;
|
|
402
|
+
}>;
|
|
403
|
+
/**
|
|
404
|
+
* Find duplicates.
|
|
405
|
+
* `GET /crm/duplicates`, operationId `listCrmDuplicates`, scope `crm:read`.
|
|
406
|
+
*/
|
|
407
|
+
listDuplicates(options?: RequestOptions): Promise<{
|
|
408
|
+
[key: string]: unknown;
|
|
409
|
+
}>;
|
|
410
|
+
/**
|
|
411
|
+
* Ask the CRM.
|
|
412
|
+
* `POST /crm/ask`, operationId `askCrm`, scope `crm:read`.
|
|
413
|
+
*/
|
|
414
|
+
ask(body: B<'/crm/ask', 'post'>, options?: RequestOptions): Promise<{
|
|
415
|
+
[key: string]: unknown;
|
|
416
|
+
}>;
|
|
417
|
+
/**
|
|
418
|
+
* Add a note.
|
|
419
|
+
* `POST /crm/records/{id}/notes`, operationId `addCrmNote`, scope `crm:write`.
|
|
420
|
+
*/
|
|
421
|
+
addNote(id: Id, body: B<'/crm/records/{id}/notes', 'post'>, options?: RequestOptions): Promise<{
|
|
422
|
+
[key: string]: unknown;
|
|
423
|
+
}>;
|
|
424
|
+
/**
|
|
425
|
+
* Create a follow-up.
|
|
426
|
+
* `POST /crm/records/{id}/follow_ups`, operationId `createCrmFollowUp`, scope `crm:write`.
|
|
427
|
+
*/
|
|
428
|
+
createFollowUp(id: Id, body: B<'/crm/records/{id}/follow_ups', 'post'>, options?: RequestOptions): Promise<{
|
|
429
|
+
[key: string]: unknown;
|
|
430
|
+
}>;
|
|
431
|
+
/**
|
|
432
|
+
* Update a follow-up.
|
|
433
|
+
* `PATCH /crm/follow_ups/{id}`, operationId `updateCrmFollowUp`, scope `crm:write`.
|
|
434
|
+
*/
|
|
435
|
+
updateFollowUp(id: Id, body: B<'/crm/follow_ups/{id}', 'patch'>, options?: RequestOptions): Promise<{
|
|
436
|
+
[key: string]: unknown;
|
|
437
|
+
}>;
|
|
438
|
+
/**
|
|
439
|
+
* Create a record.
|
|
440
|
+
* `POST /crm/records`, operationId `createCrmRecord`, scope `crm:write`.
|
|
441
|
+
*/
|
|
442
|
+
createRecord(body: B<'/crm/records', 'post'>, options?: RequestOptions): Promise<{
|
|
443
|
+
[key: string]: unknown;
|
|
444
|
+
}>;
|
|
445
|
+
/**
|
|
446
|
+
* Tick a stage check.
|
|
447
|
+
* `PUT /crm/records/{id}/stage_checks/{stage}/{check}`, operationId `setCrmStageCheck`, scope `crm:write`.
|
|
448
|
+
*/
|
|
449
|
+
setStageCheck(id: Id, stage: string, check: string, body: B<'/crm/records/{id}/stage_checks/{stage}/{check}', 'put'>, options?: RequestOptions): Promise<{
|
|
450
|
+
[key: string]: unknown;
|
|
451
|
+
}>;
|
|
452
|
+
/**
|
|
453
|
+
* Assign a reference number.
|
|
454
|
+
* `POST /crm/records/{id}/ref_no`, operationId `assignCrmReferenceNo`, scope `crm:write`.
|
|
455
|
+
*/
|
|
456
|
+
assignReferenceNo(id: Id, options?: RequestOptions): Promise<{
|
|
457
|
+
[key: string]: unknown;
|
|
458
|
+
}>;
|
|
459
|
+
/**
|
|
460
|
+
* Set a document status.
|
|
461
|
+
* `POST /crm/records/{id}/documents/{type}/status`, operationId `setCrmDocumentStatus`, scope `crm:write`.
|
|
462
|
+
*/
|
|
463
|
+
setDocumentStatus(id: Id, type: string, body: B<'/crm/records/{id}/documents/{type}/status', 'post'>, options?: RequestOptions): Promise<{
|
|
464
|
+
[key: string]: unknown;
|
|
465
|
+
}>;
|
|
466
|
+
/**
|
|
467
|
+
* Save a form draft.
|
|
468
|
+
* `PUT /crm/records/{id}/forms/{form_id}/draft`, operationId `saveCrmFormDraft`, scope `crm:write`.
|
|
469
|
+
*/
|
|
470
|
+
saveFormDraft(id: Id, formId: Id, body: B<'/crm/records/{id}/forms/{form_id}/draft', 'put'>, options?: RequestOptions): Promise<{
|
|
471
|
+
[key: string]: unknown;
|
|
472
|
+
}>;
|
|
473
|
+
/**
|
|
474
|
+
* Draft a document.
|
|
475
|
+
* `POST /crm/records/{id}/doc_drafts`, operationId `draftCrmDocument`, scope `crm:write`.
|
|
476
|
+
*/
|
|
477
|
+
draftDocument(id: Id, body: B<'/crm/records/{id}/doc_drafts', 'post'>, options?: RequestOptions): Promise<{
|
|
478
|
+
[key: string]: unknown;
|
|
479
|
+
}>;
|
|
480
|
+
/**
|
|
481
|
+
* Move a record to another stage.
|
|
482
|
+
* `POST /crm/records/{id}/stage_moves`, operationId `moveCrmRecordStage`, scope `crm:stage`.
|
|
483
|
+
* May answer `pending_approval` (see isPendingApproval).
|
|
484
|
+
*/
|
|
485
|
+
moveRecordStage(id: Id, body: B<'/crm/records/{id}/stage_moves', 'post'>, options?: RequestOptions): Promise<{
|
|
486
|
+
[key: string]: unknown;
|
|
487
|
+
} | {
|
|
488
|
+
[key: string]: unknown;
|
|
489
|
+
} | import("../types.js").PendingApproval>;
|
|
490
|
+
/**
|
|
491
|
+
* Submit a form.
|
|
492
|
+
* `POST /crm/records/{id}/forms/{form_id}/submissions`, operationId `submitCrmForm`, scope `crm:stage`.
|
|
493
|
+
* May answer `pending_approval` (see isPendingApproval).
|
|
494
|
+
*/
|
|
495
|
+
submitForm(id: Id, formId: Id, body: B<'/crm/records/{id}/forms/{form_id}/submissions', 'post'>, options?: RequestOptions): Promise<{
|
|
496
|
+
[key: string]: unknown;
|
|
497
|
+
} | {
|
|
498
|
+
[key: string]: unknown;
|
|
499
|
+
} | import("../types.js").PendingApproval>;
|
|
500
|
+
/**
|
|
501
|
+
* Share a form link.
|
|
502
|
+
* `POST /crm/records/{id}/forms/{form_id}/links`, operationId `createCrmFormLink`, scope `crm:share`.
|
|
503
|
+
* May answer `pending_approval` (see isPendingApproval).
|
|
504
|
+
*/
|
|
505
|
+
createFormLink(id: Id, formId: Id, body: B<'/crm/records/{id}/forms/{form_id}/links', 'post'>, options?: RequestOptions): Promise<{
|
|
506
|
+
[key: string]: unknown;
|
|
507
|
+
} | {
|
|
508
|
+
[key: string]: unknown;
|
|
509
|
+
} | import("../types.js").PendingApproval>;
|
|
510
|
+
/**
|
|
511
|
+
* Share an upload link.
|
|
512
|
+
* `POST /crm/records/{id}/upload_links`, operationId `createCrmUploadLink`, scope `crm:share`.
|
|
513
|
+
* May answer `pending_approval` (see isPendingApproval).
|
|
514
|
+
*/
|
|
515
|
+
createUploadLink(id: Id, body: B<'/crm/records/{id}/upload_links', 'post'>, options?: RequestOptions): Promise<{
|
|
516
|
+
[key: string]: unknown;
|
|
517
|
+
} | {
|
|
518
|
+
[key: string]: unknown;
|
|
519
|
+
} | import("../types.js").PendingApproval>;
|
|
520
|
+
/**
|
|
521
|
+
* Map import columns.
|
|
522
|
+
* `POST /crm/imports/columns`, operationId `guessCrmImportColumns`, scope `crm:import`.
|
|
523
|
+
*/
|
|
524
|
+
guessImportColumns(body: B<'/crm/imports/columns', 'post'>, options?: RequestOptions): Promise<{
|
|
525
|
+
[key: string]: unknown;
|
|
526
|
+
}>;
|
|
527
|
+
/**
|
|
528
|
+
* Import records.
|
|
529
|
+
* `POST /crm/imports`, operationId `importCrmRecords`, scope `crm:import`.
|
|
530
|
+
* May answer `pending_approval` (see isPendingApproval).
|
|
531
|
+
*/
|
|
532
|
+
importRecords(body: B<'/crm/imports', 'post'>, options?: RequestOptions): Promise<{
|
|
533
|
+
[key: string]: unknown;
|
|
534
|
+
} | {
|
|
535
|
+
[key: string]: unknown;
|
|
536
|
+
} | import("../types.js").PendingApproval>;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Dialer sessions, analytics, follow-ups and lead briefs (`/dialer`). Reached as `finn.dialer`.
|
|
540
|
+
*/
|
|
541
|
+
export declare class Dialer extends Resource {
|
|
542
|
+
/**
|
|
543
|
+
* List dialer sessions.
|
|
544
|
+
* `GET /dialer/sessions`, operationId `listDialerSessions`, scope `dialer:read`.
|
|
545
|
+
*/
|
|
546
|
+
listSessions(query?: Q<'/dialer/sessions', 'get'>, options?: RequestOptions): Promise<{
|
|
547
|
+
data: {
|
|
548
|
+
[key: string]: unknown;
|
|
549
|
+
}[];
|
|
550
|
+
next_cursor: string | null;
|
|
551
|
+
has_more: boolean;
|
|
552
|
+
}>;
|
|
553
|
+
/** Every item of `listSessions`, page by page (follows `next_cursor`). */
|
|
554
|
+
listAllSessions(query?: Q<'/dialer/sessions', 'get'>, options?: RequestOptions): import("../pagination.js").Paginator<{
|
|
555
|
+
[key: string]: unknown;
|
|
556
|
+
}, unknown>;
|
|
557
|
+
/**
|
|
558
|
+
* Get a dialer session.
|
|
559
|
+
* `GET /dialer/sessions/{id}`, operationId `getDialerSession`, scope `dialer:read`.
|
|
560
|
+
*/
|
|
561
|
+
getSession(id: Id, options?: RequestOptions): Promise<{
|
|
562
|
+
[key: string]: unknown;
|
|
563
|
+
}>;
|
|
564
|
+
/**
|
|
565
|
+
* Dialer analytics.
|
|
566
|
+
* `GET /dialer/analytics`, operationId `getDialerAnalytics`, scope `dialer:read`.
|
|
567
|
+
*/
|
|
568
|
+
getAnalytics(query?: Q<'/dialer/analytics', 'get'>, options?: RequestOptions): Promise<{
|
|
569
|
+
[key: string]: unknown;
|
|
570
|
+
}>;
|
|
571
|
+
/**
|
|
572
|
+
* List dialer follow-ups.
|
|
573
|
+
* `GET /dialer/follow-ups`, operationId `listDialerFollowUps`, scope `dialer:read`.
|
|
574
|
+
*/
|
|
575
|
+
listFollowUps(options?: RequestOptions): Promise<{
|
|
576
|
+
data: {
|
|
577
|
+
[key: string]: unknown;
|
|
578
|
+
}[];
|
|
579
|
+
next_cursor: string | null;
|
|
580
|
+
has_more: boolean;
|
|
581
|
+
}>;
|
|
582
|
+
/**
|
|
583
|
+
* Get a lead's cached brief.
|
|
584
|
+
* `GET /dialer/leads/{id}/brief`, operationId `getDialerLeadBrief`, scope `dialer:read`.
|
|
585
|
+
*/
|
|
586
|
+
getLeadBrief(id: Id, query?: Q<'/dialer/leads/{id}/brief', 'get'>, options?: RequestOptions): Promise<{
|
|
587
|
+
[key: string]: unknown;
|
|
588
|
+
}>;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Webhook endpoints, their deliveries, and the event types (`/webhook_endpoints`, `/events`). Reached as `finn.webhooks`.
|
|
592
|
+
*/
|
|
593
|
+
export declare class Webhooks extends Resource {
|
|
594
|
+
/**
|
|
595
|
+
* List webhook endpoints.
|
|
596
|
+
* `GET /webhook_endpoints`, operationId `listWebhookEndpoints`, scope `admin:webhooks`.
|
|
597
|
+
*/
|
|
598
|
+
listEndpoints(query?: Q<'/webhook_endpoints', 'get'>, options?: RequestOptions): Promise<{
|
|
599
|
+
data: import("./openapi.js").components["schemas"]["WebhookEndpoint"][];
|
|
600
|
+
next_cursor: string | null;
|
|
601
|
+
has_more: boolean;
|
|
602
|
+
}>;
|
|
603
|
+
/** Every item of `listEndpoints`, page by page (follows `next_cursor`). */
|
|
604
|
+
listAllEndpoints(query?: Q<'/webhook_endpoints', 'get'>, options?: RequestOptions): import("../pagination.js").Paginator<{
|
|
605
|
+
id: string;
|
|
606
|
+
object: "webhook_endpoint";
|
|
607
|
+
url: string;
|
|
608
|
+
events: ("call.completed" | "contact.created" | "contact.assigned" | "contact.stage_changed" | "contact.substatus_changed" | "contact.section_row_added" | "contact.link_changed" | "lead.created" | "lead.status_changed" | "document.status_changed" | "contact.updated" | "case.created" | "case.completed" | "approval.requested")[];
|
|
609
|
+
enabled: boolean;
|
|
610
|
+
created_at: string;
|
|
611
|
+
updated_at: string;
|
|
612
|
+
last_success_at: string | null;
|
|
613
|
+
last_failure_at: string | null;
|
|
614
|
+
failure_count: number;
|
|
615
|
+
}, unknown>;
|
|
616
|
+
/**
|
|
617
|
+
* Create a webhook endpoint.
|
|
618
|
+
* `POST /webhook_endpoints`, operationId `createWebhookEndpoint`, scope `admin:webhooks`.
|
|
619
|
+
*/
|
|
620
|
+
createEndpoint(body: B<'/webhook_endpoints', 'post'>, options?: RequestOptions): Promise<{
|
|
621
|
+
id: string;
|
|
622
|
+
object: "webhook_endpoint";
|
|
623
|
+
url: string;
|
|
624
|
+
events: ("call.completed" | "contact.created" | "contact.assigned" | "contact.stage_changed" | "contact.substatus_changed" | "contact.section_row_added" | "contact.link_changed" | "lead.created" | "lead.status_changed" | "document.status_changed" | "contact.updated" | "case.created" | "case.completed" | "approval.requested")[];
|
|
625
|
+
enabled: boolean;
|
|
626
|
+
created_at: string;
|
|
627
|
+
updated_at: string;
|
|
628
|
+
last_success_at: string | null;
|
|
629
|
+
last_failure_at: string | null;
|
|
630
|
+
failure_count: number;
|
|
631
|
+
} & {
|
|
632
|
+
secret: string;
|
|
633
|
+
}>;
|
|
634
|
+
/**
|
|
635
|
+
* Get a webhook endpoint.
|
|
636
|
+
* `GET /webhook_endpoints/{id}`, operationId `getWebhookEndpoint`, scope `admin:webhooks`.
|
|
637
|
+
*/
|
|
638
|
+
getEndpoint(id: Id, options?: RequestOptions): Promise<{
|
|
639
|
+
id: string;
|
|
640
|
+
object: "webhook_endpoint";
|
|
641
|
+
url: string;
|
|
642
|
+
events: ("call.completed" | "contact.created" | "contact.assigned" | "contact.stage_changed" | "contact.substatus_changed" | "contact.section_row_added" | "contact.link_changed" | "lead.created" | "lead.status_changed" | "document.status_changed" | "contact.updated" | "case.created" | "case.completed" | "approval.requested")[];
|
|
643
|
+
enabled: boolean;
|
|
644
|
+
created_at: string;
|
|
645
|
+
updated_at: string;
|
|
646
|
+
last_success_at: string | null;
|
|
647
|
+
last_failure_at: string | null;
|
|
648
|
+
failure_count: number;
|
|
649
|
+
}>;
|
|
650
|
+
/**
|
|
651
|
+
* Update, enable or disable a webhook endpoint.
|
|
652
|
+
* `PATCH /webhook_endpoints/{id}`, operationId `updateWebhookEndpoint`, scope `admin:webhooks`.
|
|
653
|
+
*/
|
|
654
|
+
updateEndpoint(id: Id, body: B<'/webhook_endpoints/{id}', 'patch'>, options?: RequestOptions): Promise<{
|
|
655
|
+
id: string;
|
|
656
|
+
object: "webhook_endpoint";
|
|
657
|
+
url: string;
|
|
658
|
+
events: ("call.completed" | "contact.created" | "contact.assigned" | "contact.stage_changed" | "contact.substatus_changed" | "contact.section_row_added" | "contact.link_changed" | "lead.created" | "lead.status_changed" | "document.status_changed" | "contact.updated" | "case.created" | "case.completed" | "approval.requested")[];
|
|
659
|
+
enabled: boolean;
|
|
660
|
+
created_at: string;
|
|
661
|
+
updated_at: string;
|
|
662
|
+
last_success_at: string | null;
|
|
663
|
+
last_failure_at: string | null;
|
|
664
|
+
failure_count: number;
|
|
665
|
+
}>;
|
|
666
|
+
/**
|
|
667
|
+
* Delete a webhook endpoint.
|
|
668
|
+
* `DELETE /webhook_endpoints/{id}`, operationId `deleteWebhookEndpoint`, scope `admin:webhooks`.
|
|
669
|
+
*/
|
|
670
|
+
deleteEndpoint(id: Id, options?: RequestOptions): Promise<{
|
|
671
|
+
id: string;
|
|
672
|
+
object: "webhook_endpoint";
|
|
673
|
+
deleted: true;
|
|
674
|
+
}>;
|
|
675
|
+
/**
|
|
676
|
+
* List an endpoint's deliveries.
|
|
677
|
+
* `GET /webhook_endpoints/{id}/deliveries`, operationId `listWebhookDeliveries`, scope `admin:webhooks`.
|
|
678
|
+
*/
|
|
679
|
+
listDeliveries(id: Id, query?: Q<'/webhook_endpoints/{id}/deliveries', 'get'>, options?: RequestOptions): Promise<{
|
|
680
|
+
data: import("./openapi.js").components["schemas"]["WebhookDelivery"][];
|
|
681
|
+
next_cursor: string | null;
|
|
682
|
+
has_more: boolean;
|
|
683
|
+
}>;
|
|
684
|
+
/** Every item of `listDeliveries`, page by page (follows `next_cursor`). */
|
|
685
|
+
listAllDeliveries(id: Id, query?: Q<'/webhook_endpoints/{id}/deliveries', 'get'>, options?: RequestOptions): import("../pagination.js").Paginator<{
|
|
686
|
+
id: string;
|
|
687
|
+
object: "webhook_delivery";
|
|
688
|
+
endpoint_id: string;
|
|
689
|
+
event: "call.completed" | "contact.created" | "contact.assigned" | "contact.stage_changed" | "contact.substatus_changed" | "contact.section_row_added" | "contact.link_changed" | "lead.created" | "lead.status_changed" | "document.status_changed" | "contact.updated" | "case.created" | "case.completed" | "approval.requested";
|
|
690
|
+
event_id: string | null;
|
|
691
|
+
call_uuid: string | null;
|
|
692
|
+
status: "pending" | "delivered" | "failed";
|
|
693
|
+
attempts: number;
|
|
694
|
+
response_status: number | null;
|
|
695
|
+
error: string | null;
|
|
696
|
+
created_at: string;
|
|
697
|
+
delivered_at: string | null;
|
|
698
|
+
next_attempt_at: string | null;
|
|
699
|
+
}, unknown>;
|
|
700
|
+
/**
|
|
701
|
+
* List webhook events.
|
|
702
|
+
* `GET /events`, operationId `listEventTypes`, scope `admin:webhooks`.
|
|
703
|
+
*/
|
|
704
|
+
listEventTypes(options?: RequestOptions): Promise<{
|
|
705
|
+
data: import("./openapi.js").components["schemas"]["EventType"][];
|
|
706
|
+
next_cursor: null;
|
|
707
|
+
has_more: false;
|
|
708
|
+
}>;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* The organization, its members, integrations and API keys (read only). Reached as `finn.organization`.
|
|
712
|
+
*/
|
|
713
|
+
export declare class Organization extends Resource {
|
|
714
|
+
/**
|
|
715
|
+
* Get the organization.
|
|
716
|
+
* `GET /organization`, operationId `getOrganization`, scope `admin:read`.
|
|
717
|
+
*/
|
|
718
|
+
get(options?: RequestOptions): Promise<{
|
|
719
|
+
data: import("./openapi.js").components["schemas"]["Organization"];
|
|
720
|
+
}>;
|
|
721
|
+
/**
|
|
722
|
+
* List members.
|
|
723
|
+
* `GET /organization/members`, operationId `listOrganizationMembers`, scope `admin:read`.
|
|
724
|
+
*/
|
|
725
|
+
listMembers(query?: Q<'/organization/members', 'get'>, options?: RequestOptions): Promise<{
|
|
726
|
+
data: import("./openapi.js").components["schemas"]["OrganizationMember"][];
|
|
727
|
+
next_cursor: string | null;
|
|
728
|
+
has_more: boolean;
|
|
729
|
+
}>;
|
|
730
|
+
/** Every item of `listMembers`, page by page (follows `next_cursor`). */
|
|
731
|
+
listAllMembers(query?: Q<'/organization/members', 'get'>, options?: RequestOptions): import("../pagination.js").Paginator<{
|
|
732
|
+
user_id: string;
|
|
733
|
+
name: string | null;
|
|
734
|
+
email: string | null;
|
|
735
|
+
role: string | null;
|
|
736
|
+
}, unknown>;
|
|
737
|
+
/**
|
|
738
|
+
* List integrations.
|
|
739
|
+
* `GET /organization/integrations`, operationId `listOrganizationIntegrations`, scope `admin:read`.
|
|
740
|
+
*/
|
|
741
|
+
listIntegrations(query?: Q<'/organization/integrations', 'get'>, options?: RequestOptions): Promise<{
|
|
742
|
+
data: import("./openapi.js").components["schemas"]["IntegrationConnection"][];
|
|
743
|
+
next_cursor: string | null;
|
|
744
|
+
has_more: boolean;
|
|
745
|
+
}>;
|
|
746
|
+
/** Every item of `listIntegrations`, page by page (follows `next_cursor`). */
|
|
747
|
+
listAllIntegrations(query?: Q<'/organization/integrations', 'get'>, options?: RequestOptions): import("../pagination.js").Paginator<{
|
|
748
|
+
id: string;
|
|
749
|
+
provider: string;
|
|
750
|
+
provider_name: string;
|
|
751
|
+
category: string | null;
|
|
752
|
+
label: string | null;
|
|
753
|
+
status: "pending" | "connected" | "expired" | "error";
|
|
754
|
+
last_error: string | null;
|
|
755
|
+
last_tested_at: string | null;
|
|
756
|
+
last_activity_at: string | null;
|
|
757
|
+
webhook_configured: boolean;
|
|
758
|
+
created_at: string;
|
|
759
|
+
}, unknown>;
|
|
760
|
+
/**
|
|
761
|
+
* List API keys.
|
|
762
|
+
* `GET /organization/api_keys`, operationId `listOrganizationApiKeys`, scope `admin:read`.
|
|
763
|
+
*/
|
|
764
|
+
listApiKeys(query?: Q<'/organization/api_keys', 'get'>, options?: RequestOptions): Promise<{
|
|
765
|
+
data: import("./openapi.js").components["schemas"]["ApiKeyInfo"][];
|
|
766
|
+
next_cursor: string | null;
|
|
767
|
+
has_more: boolean;
|
|
768
|
+
}>;
|
|
769
|
+
/** Every item of `listApiKeys`, page by page (follows `next_cursor`). */
|
|
770
|
+
listAllApiKeys(query?: Q<'/organization/api_keys', 'get'>, options?: RequestOptions): import("../pagination.js").Paginator<{
|
|
771
|
+
id: string;
|
|
772
|
+
name: string | null;
|
|
773
|
+
prefix: string;
|
|
774
|
+
scopes: string[] | null;
|
|
775
|
+
product_scopes: string[];
|
|
776
|
+
created_by: string | null;
|
|
777
|
+
created_at: string;
|
|
778
|
+
last_used_at: string | null;
|
|
779
|
+
revoked_at: string | null;
|
|
780
|
+
expires_at: string | null;
|
|
781
|
+
}, unknown>;
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Sales plays, prospects, drafts and threads (`/sales`). Reached as `finn.sales`.
|
|
785
|
+
*
|
|
786
|
+
* @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
|
|
787
|
+
*/
|
|
788
|
+
export declare class Sales extends Resource {
|
|
789
|
+
/**
|
|
790
|
+
* List Sales AI plays.
|
|
791
|
+
* `GET /sales/plays`, operationId `listSalesPlays`, scope `sales:read`.
|
|
792
|
+
* @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
|
|
793
|
+
*/
|
|
794
|
+
listPlays(options?: RequestOptions): Promise<{
|
|
795
|
+
data: {
|
|
796
|
+
[key: string]: unknown;
|
|
797
|
+
}[];
|
|
798
|
+
next_cursor: string | null;
|
|
799
|
+
has_more: boolean;
|
|
800
|
+
}>;
|
|
801
|
+
/**
|
|
802
|
+
* List a play's runs.
|
|
803
|
+
* `GET /sales/plays/{slug}/runs`, operationId `listSalesPlayRuns`, scope `sales:read`.
|
|
804
|
+
* @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
|
|
805
|
+
*/
|
|
806
|
+
listPlayRuns(slug: string, query?: Q<'/sales/plays/{slug}/runs', 'get'>, options?: RequestOptions): Promise<{
|
|
807
|
+
data: {
|
|
808
|
+
[key: string]: unknown;
|
|
809
|
+
}[];
|
|
810
|
+
next_cursor: string | null;
|
|
811
|
+
has_more: boolean;
|
|
812
|
+
}>;
|
|
813
|
+
/**
|
|
814
|
+
* List a play's prospects.
|
|
815
|
+
* `GET /sales/plays/{slug}/prospects`, operationId `listSalesProspects`, scope `sales:read`.
|
|
816
|
+
* @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
|
|
817
|
+
*/
|
|
818
|
+
listProspects(slug: string, query?: Q<'/sales/plays/{slug}/prospects', 'get'>, options?: RequestOptions): Promise<{
|
|
819
|
+
data: {
|
|
820
|
+
[key: string]: unknown;
|
|
821
|
+
}[];
|
|
822
|
+
next_cursor: string | null;
|
|
823
|
+
has_more: boolean;
|
|
824
|
+
} & {
|
|
825
|
+
total?: number | null;
|
|
826
|
+
}>;
|
|
827
|
+
/**
|
|
828
|
+
* Run a play.
|
|
829
|
+
* `POST /sales/plays/{slug}/run`, operationId `runSalesPlay`, scope `sales:write`.
|
|
830
|
+
* @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
|
|
831
|
+
*/
|
|
832
|
+
runPlay(slug: string, options?: RequestOptions): Promise<{
|
|
833
|
+
[key: string]: unknown;
|
|
834
|
+
}>;
|
|
835
|
+
/**
|
|
836
|
+
* List drafts.
|
|
837
|
+
* `GET /sales/drafts`, operationId `listSalesDrafts`, scope `sales:read`.
|
|
838
|
+
* @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
|
|
839
|
+
*/
|
|
840
|
+
listDrafts(query?: Q<'/sales/drafts', 'get'>, options?: RequestOptions): Promise<{
|
|
841
|
+
data: {
|
|
842
|
+
[key: string]: unknown;
|
|
843
|
+
}[];
|
|
844
|
+
next_cursor: string | null;
|
|
845
|
+
has_more: boolean;
|
|
846
|
+
} & {
|
|
847
|
+
total?: number | null;
|
|
848
|
+
}>;
|
|
849
|
+
/**
|
|
850
|
+
* Edit a draft.
|
|
851
|
+
* `PATCH /sales/drafts/{id}`, operationId `updateSalesDraft`, scope `sales:write`.
|
|
852
|
+
* @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
|
|
853
|
+
*/
|
|
854
|
+
updateDraft(id: Id, body: B<'/sales/drafts/{id}', 'patch'>, options?: RequestOptions): Promise<{
|
|
855
|
+
[key: string]: unknown;
|
|
856
|
+
}>;
|
|
857
|
+
/**
|
|
858
|
+
* Skip a draft.
|
|
859
|
+
* `POST /sales/drafts/{id}/skip`, operationId `skipSalesDraft`, scope `sales:write`.
|
|
860
|
+
* @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
|
|
861
|
+
*/
|
|
862
|
+
skipDraft(id: Id, body: B<'/sales/drafts/{id}/skip', 'post'>, options?: RequestOptions): Promise<{
|
|
863
|
+
[key: string]: unknown;
|
|
864
|
+
}>;
|
|
865
|
+
/**
|
|
866
|
+
* List threads.
|
|
867
|
+
* `GET /sales/threads`, operationId `listSalesThreads`, scope `sales:read`.
|
|
868
|
+
* @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
|
|
869
|
+
*/
|
|
870
|
+
listThreads(query?: Q<'/sales/threads', 'get'>, options?: RequestOptions): Promise<{
|
|
871
|
+
data: {
|
|
872
|
+
[key: string]: unknown;
|
|
873
|
+
}[];
|
|
874
|
+
next_cursor: string | null;
|
|
875
|
+
has_more: boolean;
|
|
876
|
+
} & {
|
|
877
|
+
total?: number | null;
|
|
878
|
+
}>;
|
|
879
|
+
/**
|
|
880
|
+
* Get a thread.
|
|
881
|
+
* `GET /sales/threads/{id}`, operationId `getSalesThread`, scope `sales:read`.
|
|
882
|
+
* @experimental The Sales API is switched off for every organization, so these calls answer an error until it is switched on for yours. Names and shapes may change without a major version.
|
|
883
|
+
*/
|
|
884
|
+
getThread(id: Id, options?: RequestOptions): Promise<{
|
|
885
|
+
[key: string]: unknown;
|
|
886
|
+
}>;
|
|
887
|
+
}
|