@iblai/iblai-api 4.265.1-core → 4.265.2-core
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/dist/index.cjs.js +2168 -258
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2165 -259
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +2168 -258
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +26 -1
- package/dist/types/models/Activity.d.ts +83 -0
- package/dist/types/models/ActivityTypeEnum.d.ts +18 -0
- package/dist/types/models/Deal.d.ts +83 -0
- package/dist/types/models/DealLostRequest.d.ts +10 -0
- package/dist/types/models/DealMoveStageRequest.d.ts +10 -0
- package/dist/types/models/DealStatusEnum.d.ts +10 -0
- package/dist/types/models/DealWonRequest.d.ts +6 -0
- package/dist/types/models/LeadSource.d.ts +30 -0
- package/dist/types/models/NotificationTemplateDetail.d.ts +24 -2
- package/dist/types/models/NotificationTemplateList.d.ts +5 -2
- package/dist/types/models/Organization.d.ts +1 -1
- package/dist/types/models/PaginatedActivityList.d.ts +7 -0
- package/dist/types/models/PaginatedDealList.d.ts +7 -0
- package/dist/types/models/PaginatedLeadSourceList.d.ts +7 -0
- package/dist/types/models/PaginatedPipelineList.d.ts +7 -0
- package/dist/types/models/PaginatedPipelineStageList.d.ts +7 -0
- package/dist/types/models/PatchedActivity.d.ts +83 -0
- package/dist/types/models/PatchedDeal.d.ts +83 -0
- package/dist/types/models/PatchedLeadSource.d.ts +30 -0
- package/dist/types/models/PatchedNotificationTemplateDetail.d.ts +24 -2
- package/dist/types/models/PatchedOrganization.d.ts +1 -1
- package/dist/types/models/PatchedPipeline.d.ts +34 -0
- package/dist/types/models/PatchedPipelineStage.d.ts +40 -0
- package/dist/types/models/Pipeline.d.ts +34 -0
- package/dist/types/models/PipelineStage.d.ts +40 -0
- package/dist/types/models/RecipientsRecipientModeEnum.d.ts +14 -0
- package/dist/types/models/{TypeD36Enum.d.ts → Type4b7Enum.d.ts} +7 -1
- package/dist/types/services/ActivitiesService.d.ts +126 -0
- package/dist/types/services/CrmService.d.ts +553 -1
- package/dist/types/services/DealsService.d.ts +160 -0
- package/dist/types/services/LeadSourcesService.d.ts +95 -0
- package/dist/types/services/PersonsService.d.ts +1 -1
- package/dist/types/services/PipelinesService.d.ts +183 -0
- package/package.json +1 -1
- package/sdk_schema.yml +4093 -141
- package/src/core/OpenAPI.ts +1 -1
- package/src/index.ts +26 -1
- package/src/models/Activity.ts +88 -0
- package/src/models/ActivityTypeEnum.ts +22 -0
- package/src/models/Deal.ts +88 -0
- package/src/models/DealLostRequest.ts +15 -0
- package/src/models/DealMoveStageRequest.ts +15 -0
- package/src/models/DealStatusEnum.ts +14 -0
- package/src/models/DealWonRequest.ts +11 -0
- package/src/models/LeadSource.ts +35 -0
- package/src/models/NotificationTemplateDetail.ts +24 -2
- package/src/models/NotificationTemplateList.ts +5 -2
- package/src/models/Organization.ts +1 -1
- package/src/models/PaginatedActivityList.ts +12 -0
- package/src/models/PaginatedDealList.ts +12 -0
- package/src/models/PaginatedLeadSourceList.ts +12 -0
- package/src/models/PaginatedPipelineList.ts +12 -0
- package/src/models/PaginatedPipelineStageList.ts +12 -0
- package/src/models/PatchedActivity.ts +88 -0
- package/src/models/PatchedDeal.ts +88 -0
- package/src/models/PatchedLeadSource.ts +35 -0
- package/src/models/PatchedNotificationTemplateDetail.ts +24 -2
- package/src/models/PatchedOrganization.ts +1 -1
- package/src/models/PatchedPipeline.ts +39 -0
- package/src/models/PatchedPipelineStage.ts +45 -0
- package/src/models/Pipeline.ts +39 -0
- package/src/models/PipelineStage.ts +45 -0
- package/src/models/RecipientsRecipientModeEnum.ts +18 -0
- package/src/models/{TypeD36Enum.ts → Type4b7Enum.ts} +7 -1
- package/src/services/ActivitiesService.ts +255 -0
- package/src/services/CrmService.ts +1161 -1
- package/src/services/DealsService.ts +337 -0
- package/src/services/LeadSourcesService.ts +198 -0
- package/src/services/PersonsService.ts +1 -1
- package/src/services/PipelinesService.ts +406 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { Deal } from '../models/Deal';
|
|
6
|
+
import type { DealLostRequest } from '../models/DealLostRequest';
|
|
7
|
+
import type { DealMoveStageRequest } from '../models/DealMoveStageRequest';
|
|
8
|
+
import type { DealWonRequest } from '../models/DealWonRequest';
|
|
9
|
+
import type { PaginatedDealList } from '../models/PaginatedDealList';
|
|
10
|
+
import type { PatchedDeal } from '../models/PatchedDeal';
|
|
11
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
12
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
13
|
+
import { request as __request } from '../core/request';
|
|
14
|
+
export class DealsService {
|
|
15
|
+
/**
|
|
16
|
+
* List deals
|
|
17
|
+
* Returns a paginated list of Deals in your Platform. Supports filtering by `status`, `pipeline`, `stage`, `owner`, `source`, `person`, `organization`, expected-close-date and created-at ranges, and `metadata__has_key`.
|
|
18
|
+
*
|
|
19
|
+
* **Required permission:** `Ibl.CRM/Deals/list`.
|
|
20
|
+
* @returns PaginatedDealList
|
|
21
|
+
* @throws ApiError
|
|
22
|
+
*/
|
|
23
|
+
public static dealsList({
|
|
24
|
+
createdAtGte,
|
|
25
|
+
createdAtLte,
|
|
26
|
+
expectedCloseDateGte,
|
|
27
|
+
expectedCloseDateLte,
|
|
28
|
+
metadataHasKey,
|
|
29
|
+
organization,
|
|
30
|
+
owner,
|
|
31
|
+
page,
|
|
32
|
+
pageSize,
|
|
33
|
+
person,
|
|
34
|
+
pipeline,
|
|
35
|
+
source,
|
|
36
|
+
stage,
|
|
37
|
+
status,
|
|
38
|
+
}: {
|
|
39
|
+
createdAtGte?: string,
|
|
40
|
+
createdAtLte?: string,
|
|
41
|
+
expectedCloseDateGte?: string,
|
|
42
|
+
expectedCloseDateLte?: string,
|
|
43
|
+
metadataHasKey?: string,
|
|
44
|
+
organization?: string,
|
|
45
|
+
owner?: number,
|
|
46
|
+
/**
|
|
47
|
+
* A page number within the paginated result set.
|
|
48
|
+
*/
|
|
49
|
+
page?: number,
|
|
50
|
+
/**
|
|
51
|
+
* Number of results to return per page.
|
|
52
|
+
*/
|
|
53
|
+
pageSize?: number,
|
|
54
|
+
person?: string,
|
|
55
|
+
pipeline?: number,
|
|
56
|
+
source?: number,
|
|
57
|
+
stage?: number,
|
|
58
|
+
/**
|
|
59
|
+
* Service-managed (read-only in serializer). Derived from the destination stage's is_won/is_lost.
|
|
60
|
+
*
|
|
61
|
+
* * `open` - Open
|
|
62
|
+
* * `won` - Won
|
|
63
|
+
* * `lost` - Lost
|
|
64
|
+
*/
|
|
65
|
+
status?: 'lost' | 'open' | 'won',
|
|
66
|
+
}): CancelablePromise<PaginatedDealList> {
|
|
67
|
+
return __request(OpenAPI, {
|
|
68
|
+
method: 'GET',
|
|
69
|
+
url: '/deals/',
|
|
70
|
+
query: {
|
|
71
|
+
'created_at__gte': createdAtGte,
|
|
72
|
+
'created_at__lte': createdAtLte,
|
|
73
|
+
'expected_close_date__gte': expectedCloseDateGte,
|
|
74
|
+
'expected_close_date__lte': expectedCloseDateLte,
|
|
75
|
+
'metadata__has_key': metadataHasKey,
|
|
76
|
+
'organization': organization,
|
|
77
|
+
'owner': owner,
|
|
78
|
+
'page': page,
|
|
79
|
+
'page_size': pageSize,
|
|
80
|
+
'person': person,
|
|
81
|
+
'pipeline': pipeline,
|
|
82
|
+
'source': source,
|
|
83
|
+
'stage': stage,
|
|
84
|
+
'status': status,
|
|
85
|
+
},
|
|
86
|
+
errors: {
|
|
87
|
+
401: `Authentication required.`,
|
|
88
|
+
403: `Missing required permission \`Ibl.CRM/Deals/list\`.`,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Create a deal
|
|
94
|
+
* Creates a new Deal. All FK targets (`person`, `organization`, `pipeline`, `stage`, `source`) must belong to your Platform; `stage` must belong to `pipeline`. `status` and `closed_at` are service-managed — passing them returns `400`.
|
|
95
|
+
*
|
|
96
|
+
* **Required permission:** `Ibl.CRM/Deals/write`.
|
|
97
|
+
* @returns Deal
|
|
98
|
+
* @throws ApiError
|
|
99
|
+
*/
|
|
100
|
+
public static dealsCreate({
|
|
101
|
+
requestBody,
|
|
102
|
+
}: {
|
|
103
|
+
requestBody: Deal,
|
|
104
|
+
}): CancelablePromise<Deal> {
|
|
105
|
+
return __request(OpenAPI, {
|
|
106
|
+
method: 'POST',
|
|
107
|
+
url: '/deals/',
|
|
108
|
+
body: requestBody,
|
|
109
|
+
mediaType: 'application/json',
|
|
110
|
+
errors: {
|
|
111
|
+
400: `Validation error.`,
|
|
112
|
+
403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Retrieve a deal
|
|
118
|
+
* Returns a single Deal by id.
|
|
119
|
+
*
|
|
120
|
+
* **Required permission:** `Ibl.CRM/Deals/read`.
|
|
121
|
+
* @returns Deal
|
|
122
|
+
* @throws ApiError
|
|
123
|
+
*/
|
|
124
|
+
public static dealsRetrieve({
|
|
125
|
+
id,
|
|
126
|
+
}: {
|
|
127
|
+
/**
|
|
128
|
+
* A unique integer value identifying this deal.
|
|
129
|
+
*/
|
|
130
|
+
id: number,
|
|
131
|
+
}): CancelablePromise<Deal> {
|
|
132
|
+
return __request(OpenAPI, {
|
|
133
|
+
method: 'GET',
|
|
134
|
+
url: '/deals/{id}/',
|
|
135
|
+
path: {
|
|
136
|
+
'id': id,
|
|
137
|
+
},
|
|
138
|
+
errors: {
|
|
139
|
+
403: `Missing required permission \`Ibl.CRM/Deals/read\`.`,
|
|
140
|
+
404: `Deal not found.`,
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Replace a deal
|
|
146
|
+
* Replaces all editable fields on the Deal.
|
|
147
|
+
*
|
|
148
|
+
* **Required permission:** `Ibl.CRM/Deals/write`.
|
|
149
|
+
* @returns Deal
|
|
150
|
+
* @throws ApiError
|
|
151
|
+
*/
|
|
152
|
+
public static dealsUpdate({
|
|
153
|
+
id,
|
|
154
|
+
requestBody,
|
|
155
|
+
}: {
|
|
156
|
+
/**
|
|
157
|
+
* A unique integer value identifying this deal.
|
|
158
|
+
*/
|
|
159
|
+
id: number,
|
|
160
|
+
requestBody: Deal,
|
|
161
|
+
}): CancelablePromise<Deal> {
|
|
162
|
+
return __request(OpenAPI, {
|
|
163
|
+
method: 'PUT',
|
|
164
|
+
url: '/deals/{id}/',
|
|
165
|
+
path: {
|
|
166
|
+
'id': id,
|
|
167
|
+
},
|
|
168
|
+
body: requestBody,
|
|
169
|
+
mediaType: 'application/json',
|
|
170
|
+
errors: {
|
|
171
|
+
400: `Validation error.`,
|
|
172
|
+
403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
|
|
173
|
+
404: `Deal not found.`,
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Update a deal
|
|
179
|
+
* Updates only the supplied fields on the Deal. Direct writes to `status` or `closed_at` are rejected with `400` — use `POST /deals/{id}/move-stage/`, `won/`, or `lost/`.
|
|
180
|
+
*
|
|
181
|
+
* **Required permission:** `Ibl.CRM/Deals/write`.
|
|
182
|
+
* @returns Deal
|
|
183
|
+
* @throws ApiError
|
|
184
|
+
*/
|
|
185
|
+
public static dealsPartialUpdate({
|
|
186
|
+
id,
|
|
187
|
+
requestBody,
|
|
188
|
+
}: {
|
|
189
|
+
/**
|
|
190
|
+
* A unique integer value identifying this deal.
|
|
191
|
+
*/
|
|
192
|
+
id: number,
|
|
193
|
+
requestBody?: PatchedDeal,
|
|
194
|
+
}): CancelablePromise<Deal> {
|
|
195
|
+
return __request(OpenAPI, {
|
|
196
|
+
method: 'PATCH',
|
|
197
|
+
url: '/deals/{id}/',
|
|
198
|
+
path: {
|
|
199
|
+
'id': id,
|
|
200
|
+
},
|
|
201
|
+
body: requestBody,
|
|
202
|
+
mediaType: 'application/json',
|
|
203
|
+
errors: {
|
|
204
|
+
400: `Validation error.`,
|
|
205
|
+
403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
|
|
206
|
+
404: `Deal not found.`,
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Delete a deal
|
|
212
|
+
* Deletes the Deal.
|
|
213
|
+
*
|
|
214
|
+
* **Required permission:** `Ibl.CRM/Deals/delete`.
|
|
215
|
+
* @returns void
|
|
216
|
+
* @throws ApiError
|
|
217
|
+
*/
|
|
218
|
+
public static dealsDestroy({
|
|
219
|
+
id,
|
|
220
|
+
}: {
|
|
221
|
+
/**
|
|
222
|
+
* A unique integer value identifying this deal.
|
|
223
|
+
*/
|
|
224
|
+
id: number,
|
|
225
|
+
}): CancelablePromise<void> {
|
|
226
|
+
return __request(OpenAPI, {
|
|
227
|
+
method: 'DELETE',
|
|
228
|
+
url: '/deals/{id}/',
|
|
229
|
+
path: {
|
|
230
|
+
'id': id,
|
|
231
|
+
},
|
|
232
|
+
errors: {
|
|
233
|
+
403: `Missing required permission \`Ibl.CRM/Deals/delete\`.`,
|
|
234
|
+
404: `Deal not found.`,
|
|
235
|
+
},
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Mark a deal as lost
|
|
240
|
+
* Moves the Deal into a closed-lost stage and persists `lost_reason`. If `stage_code` is omitted, the first `is_lost=True` stage in the Deal's pipeline (by sort order) is used.
|
|
241
|
+
*
|
|
242
|
+
* **Required permission:** `Ibl.CRM/Deals/write`.
|
|
243
|
+
* @returns Deal
|
|
244
|
+
* @throws ApiError
|
|
245
|
+
*/
|
|
246
|
+
public static dealsLostCreate({
|
|
247
|
+
id,
|
|
248
|
+
requestBody,
|
|
249
|
+
}: {
|
|
250
|
+
/**
|
|
251
|
+
* A unique integer value identifying this deal.
|
|
252
|
+
*/
|
|
253
|
+
id: number,
|
|
254
|
+
requestBody: DealLostRequest,
|
|
255
|
+
}): CancelablePromise<Deal> {
|
|
256
|
+
return __request(OpenAPI, {
|
|
257
|
+
method: 'POST',
|
|
258
|
+
url: '/deals/{id}/lost/',
|
|
259
|
+
path: {
|
|
260
|
+
'id': id,
|
|
261
|
+
},
|
|
262
|
+
body: requestBody,
|
|
263
|
+
mediaType: 'application/json',
|
|
264
|
+
errors: {
|
|
265
|
+
400: `Missing \`lost_reason\`, no \`is_lost\` stage configured, or the supplied stage_code is not flagged is_lost=True.`,
|
|
266
|
+
403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
|
|
267
|
+
404: `Deal not found.`,
|
|
268
|
+
},
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Move a deal to a different stage
|
|
273
|
+
* Moves the Deal to the stage identified by `stage_id` or `stage_code`. The target stage must belong to this Deal's pipeline. Records an audit Activity and emits `deal_stage_changed`. `Deal.status` is recomputed from the new stage's `is_won` / `is_lost` flags.
|
|
274
|
+
*
|
|
275
|
+
* **Required permission:** `Ibl.CRM/Deals/write`.
|
|
276
|
+
* @returns Deal
|
|
277
|
+
* @throws ApiError
|
|
278
|
+
*/
|
|
279
|
+
public static dealsMoveStageCreate({
|
|
280
|
+
id,
|
|
281
|
+
requestBody,
|
|
282
|
+
}: {
|
|
283
|
+
/**
|
|
284
|
+
* A unique integer value identifying this deal.
|
|
285
|
+
*/
|
|
286
|
+
id: number,
|
|
287
|
+
requestBody?: DealMoveStageRequest,
|
|
288
|
+
}): CancelablePromise<Deal> {
|
|
289
|
+
return __request(OpenAPI, {
|
|
290
|
+
method: 'POST',
|
|
291
|
+
url: '/deals/{id}/move-stage/',
|
|
292
|
+
path: {
|
|
293
|
+
'id': id,
|
|
294
|
+
},
|
|
295
|
+
body: requestBody,
|
|
296
|
+
mediaType: 'application/json',
|
|
297
|
+
errors: {
|
|
298
|
+
400: `Validation error (e.g. stage not in pipeline).`,
|
|
299
|
+
403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
|
|
300
|
+
404: `Deal or stage not found.`,
|
|
301
|
+
},
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
/**
|
|
305
|
+
* Mark a deal as won
|
|
306
|
+
* Moves the Deal into a closed-won stage and sets `status='won'`. If `stage_code` is omitted, the first `is_won=True` stage in the Deal's pipeline (by sort order) is used.
|
|
307
|
+
*
|
|
308
|
+
* **Required permission:** `Ibl.CRM/Deals/write`.
|
|
309
|
+
* @returns Deal
|
|
310
|
+
* @throws ApiError
|
|
311
|
+
*/
|
|
312
|
+
public static dealsWonCreate({
|
|
313
|
+
id,
|
|
314
|
+
requestBody,
|
|
315
|
+
}: {
|
|
316
|
+
/**
|
|
317
|
+
* A unique integer value identifying this deal.
|
|
318
|
+
*/
|
|
319
|
+
id: number,
|
|
320
|
+
requestBody?: DealWonRequest,
|
|
321
|
+
}): CancelablePromise<Deal> {
|
|
322
|
+
return __request(OpenAPI, {
|
|
323
|
+
method: 'POST',
|
|
324
|
+
url: '/deals/{id}/won/',
|
|
325
|
+
path: {
|
|
326
|
+
'id': id,
|
|
327
|
+
},
|
|
328
|
+
body: requestBody,
|
|
329
|
+
mediaType: 'application/json',
|
|
330
|
+
errors: {
|
|
331
|
+
400: `No \`is_won\` stage configured, or the supplied stage_code is not flagged is_won=True.`,
|
|
332
|
+
403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
|
|
333
|
+
404: `Deal not found.`,
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { LeadSource } from '../models/LeadSource';
|
|
6
|
+
import type { PaginatedLeadSourceList } from '../models/PaginatedLeadSourceList';
|
|
7
|
+
import type { PatchedLeadSource } from '../models/PatchedLeadSource';
|
|
8
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
9
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
10
|
+
import { request as __request } from '../core/request';
|
|
11
|
+
export class LeadSourcesService {
|
|
12
|
+
/**
|
|
13
|
+
* List lead sources
|
|
14
|
+
* Returns a paginated list of LeadSources in your Platform.
|
|
15
|
+
*
|
|
16
|
+
* **Required permission:** `Ibl.CRM/Pipelines/list`.
|
|
17
|
+
* @returns PaginatedLeadSourceList
|
|
18
|
+
* @throws ApiError
|
|
19
|
+
*/
|
|
20
|
+
public static leadSourcesList({
|
|
21
|
+
code,
|
|
22
|
+
name,
|
|
23
|
+
page,
|
|
24
|
+
pageSize,
|
|
25
|
+
}: {
|
|
26
|
+
code?: string,
|
|
27
|
+
name?: string,
|
|
28
|
+
/**
|
|
29
|
+
* A page number within the paginated result set.
|
|
30
|
+
*/
|
|
31
|
+
page?: number,
|
|
32
|
+
/**
|
|
33
|
+
* Number of results to return per page.
|
|
34
|
+
*/
|
|
35
|
+
pageSize?: number,
|
|
36
|
+
}): CancelablePromise<PaginatedLeadSourceList> {
|
|
37
|
+
return __request(OpenAPI, {
|
|
38
|
+
method: 'GET',
|
|
39
|
+
url: '/lead-sources/',
|
|
40
|
+
query: {
|
|
41
|
+
'code': code,
|
|
42
|
+
'name': name,
|
|
43
|
+
'page': page,
|
|
44
|
+
'page_size': pageSize,
|
|
45
|
+
},
|
|
46
|
+
errors: {
|
|
47
|
+
401: `Authentication required.`,
|
|
48
|
+
403: `Missing required permission \`Ibl.CRM/Pipelines/list\`.`,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Create a lead source
|
|
54
|
+
* Creates a new LeadSource in your Platform. `code` must be unique.
|
|
55
|
+
*
|
|
56
|
+
* **Required permission:** `Ibl.CRM/Pipelines/write`.
|
|
57
|
+
* @returns LeadSource
|
|
58
|
+
* @throws ApiError
|
|
59
|
+
*/
|
|
60
|
+
public static leadSourcesCreate({
|
|
61
|
+
requestBody,
|
|
62
|
+
}: {
|
|
63
|
+
requestBody: LeadSource,
|
|
64
|
+
}): CancelablePromise<LeadSource> {
|
|
65
|
+
return __request(OpenAPI, {
|
|
66
|
+
method: 'POST',
|
|
67
|
+
url: '/lead-sources/',
|
|
68
|
+
body: requestBody,
|
|
69
|
+
mediaType: 'application/json',
|
|
70
|
+
errors: {
|
|
71
|
+
400: `Validation error.`,
|
|
72
|
+
403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Retrieve a lead source
|
|
78
|
+
* Returns a single LeadSource by id.
|
|
79
|
+
*
|
|
80
|
+
* **Required permission:** `Ibl.CRM/Pipelines/read`.
|
|
81
|
+
* @returns LeadSource
|
|
82
|
+
* @throws ApiError
|
|
83
|
+
*/
|
|
84
|
+
public static leadSourcesRetrieve({
|
|
85
|
+
id,
|
|
86
|
+
}: {
|
|
87
|
+
/**
|
|
88
|
+
* A unique integer value identifying this lead source.
|
|
89
|
+
*/
|
|
90
|
+
id: number,
|
|
91
|
+
}): CancelablePromise<LeadSource> {
|
|
92
|
+
return __request(OpenAPI, {
|
|
93
|
+
method: 'GET',
|
|
94
|
+
url: '/lead-sources/{id}/',
|
|
95
|
+
path: {
|
|
96
|
+
'id': id,
|
|
97
|
+
},
|
|
98
|
+
errors: {
|
|
99
|
+
403: `Missing required permission \`Ibl.CRM/Pipelines/read\`.`,
|
|
100
|
+
404: `LeadSource not found.`,
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Replace a lead source
|
|
106
|
+
* Replaces all editable fields on the LeadSource.
|
|
107
|
+
*
|
|
108
|
+
* **Required permission:** `Ibl.CRM/Pipelines/write`.
|
|
109
|
+
* @returns LeadSource
|
|
110
|
+
* @throws ApiError
|
|
111
|
+
*/
|
|
112
|
+
public static leadSourcesUpdate({
|
|
113
|
+
id,
|
|
114
|
+
requestBody,
|
|
115
|
+
}: {
|
|
116
|
+
/**
|
|
117
|
+
* A unique integer value identifying this lead source.
|
|
118
|
+
*/
|
|
119
|
+
id: number,
|
|
120
|
+
requestBody: LeadSource,
|
|
121
|
+
}): CancelablePromise<LeadSource> {
|
|
122
|
+
return __request(OpenAPI, {
|
|
123
|
+
method: 'PUT',
|
|
124
|
+
url: '/lead-sources/{id}/',
|
|
125
|
+
path: {
|
|
126
|
+
'id': id,
|
|
127
|
+
},
|
|
128
|
+
body: requestBody,
|
|
129
|
+
mediaType: 'application/json',
|
|
130
|
+
errors: {
|
|
131
|
+
400: `Validation error.`,
|
|
132
|
+
403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
|
|
133
|
+
404: `LeadSource not found.`,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Update a lead source
|
|
139
|
+
* Updates only the supplied fields on the LeadSource.
|
|
140
|
+
*
|
|
141
|
+
* **Required permission:** `Ibl.CRM/Pipelines/write`.
|
|
142
|
+
* @returns LeadSource
|
|
143
|
+
* @throws ApiError
|
|
144
|
+
*/
|
|
145
|
+
public static leadSourcesPartialUpdate({
|
|
146
|
+
id,
|
|
147
|
+
requestBody,
|
|
148
|
+
}: {
|
|
149
|
+
/**
|
|
150
|
+
* A unique integer value identifying this lead source.
|
|
151
|
+
*/
|
|
152
|
+
id: number,
|
|
153
|
+
requestBody?: PatchedLeadSource,
|
|
154
|
+
}): CancelablePromise<LeadSource> {
|
|
155
|
+
return __request(OpenAPI, {
|
|
156
|
+
method: 'PATCH',
|
|
157
|
+
url: '/lead-sources/{id}/',
|
|
158
|
+
path: {
|
|
159
|
+
'id': id,
|
|
160
|
+
},
|
|
161
|
+
body: requestBody,
|
|
162
|
+
mediaType: 'application/json',
|
|
163
|
+
errors: {
|
|
164
|
+
400: `Validation error.`,
|
|
165
|
+
403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
|
|
166
|
+
404: `LeadSource not found.`,
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Delete a lead source
|
|
172
|
+
* Deletes the LeadSource. Any Deals referencing it have their `source` cleared.
|
|
173
|
+
*
|
|
174
|
+
* **Required permission:** `Ibl.CRM/Pipelines/delete`.
|
|
175
|
+
* @returns void
|
|
176
|
+
* @throws ApiError
|
|
177
|
+
*/
|
|
178
|
+
public static leadSourcesDestroy({
|
|
179
|
+
id,
|
|
180
|
+
}: {
|
|
181
|
+
/**
|
|
182
|
+
* A unique integer value identifying this lead source.
|
|
183
|
+
*/
|
|
184
|
+
id: number,
|
|
185
|
+
}): CancelablePromise<void> {
|
|
186
|
+
return __request(OpenAPI, {
|
|
187
|
+
method: 'DELETE',
|
|
188
|
+
url: '/lead-sources/{id}/',
|
|
189
|
+
path: {
|
|
190
|
+
'id': id,
|
|
191
|
+
},
|
|
192
|
+
errors: {
|
|
193
|
+
403: `Missing required permission \`Ibl.CRM/Pipelines/delete\`.`,
|
|
194
|
+
404: `LeadSource not found.`,
|
|
195
|
+
},
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
}
|
|
@@ -35,7 +35,7 @@ export class PersonsService {
|
|
|
35
35
|
createdAtGte?: string,
|
|
36
36
|
createdAtLte?: string,
|
|
37
37
|
/**
|
|
38
|
-
* Funnel position.
|
|
38
|
+
* Funnel position. Transitions are unrestricted — any stage may move to any other.
|
|
39
39
|
*
|
|
40
40
|
* * `lead` - Lead
|
|
41
41
|
* * `qualified` - Qualified
|