@iblai/iblai-api 4.288.1-core → 4.289.0-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.
Files changed (43) hide show
  1. package/dist/index.cjs.js +10618 -12607
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +10619 -12593
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +10618 -12607
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +0 -15
  8. package/dist/types/services/BillingService.d.ts +215 -4
  9. package/package.json +1 -1
  10. package/sdk_schema.yml +10797 -14096
  11. package/src/core/OpenAPI.ts +1 -1
  12. package/src/index.ts +0 -15
  13. package/src/services/BillingService.ts +468 -6
  14. package/dist/types/services/AccessCheckService.d.ts +0 -17
  15. package/dist/types/services/AccountService.d.ts +0 -36
  16. package/dist/types/services/ActivitiesService.d.ts +0 -126
  17. package/dist/types/services/AutoRechargeService.d.ts +0 -14
  18. package/dist/types/services/CreditsService.d.ts +0 -12
  19. package/dist/types/services/DealsService.d.ts +0 -192
  20. package/dist/types/services/ItemsService.d.ts +0 -13
  21. package/dist/types/services/LeadSourcesService.d.ts +0 -95
  22. package/dist/types/services/OrganizationsService.d.ts +0 -109
  23. package/dist/types/services/PersonsService.d.ts +0 -168
  24. package/dist/types/services/PipelinesService.d.ts +0 -183
  25. package/dist/types/services/PlatformsService.d.ts +0 -332
  26. package/dist/types/services/PricesService.d.ts +0 -15
  27. package/dist/types/services/TagsService.d.ts +0 -96
  28. package/dist/types/services/TransactionsService.d.ts +0 -35
  29. package/src/services/AccessCheckService.ts +0 -39
  30. package/src/services/AccountService.ts +0 -70
  31. package/src/services/ActivitiesService.ts +0 -255
  32. package/src/services/AutoRechargeService.ts +0 -29
  33. package/src/services/CreditsService.ts +0 -23
  34. package/src/services/DealsService.ts +0 -406
  35. package/src/services/ItemsService.ts +0 -29
  36. package/src/services/LeadSourcesService.ts +0 -198
  37. package/src/services/OrganizationsService.ts +0 -249
  38. package/src/services/PersonsService.ts +0 -367
  39. package/src/services/PipelinesService.ts +0 -406
  40. package/src/services/PlatformsService.ts +0 -716
  41. package/src/services/PricesService.ts +0 -34
  42. package/src/services/TagsService.ts +0 -201
  43. package/src/services/TransactionsService.ts +0 -57
@@ -1,249 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { _TagAttachRequest } from '../models/_TagAttachRequest';
6
- import type { Organization } from '../models/Organization';
7
- import type { PaginatedOrganizationList } from '../models/PaginatedOrganizationList';
8
- import type { PatchedOrganization } from '../models/PatchedOrganization';
9
- import type { CancelablePromise } from '../core/CancelablePromise';
10
- import { OpenAPI } from '../core/OpenAPI';
11
- import { request as __request } from '../core/request';
12
- export class OrganizationsService {
13
- /**
14
- * List organizations
15
- * Returns a paginated list of organizations in your Platform. Supports filtering by `owner` and by `name` (case-insensitive substring match).
16
- *
17
- * **Required permission:** `Ibl.CRM/Organizations/list`.
18
- * @returns PaginatedOrganizationList
19
- * @throws ApiError
20
- */
21
- public static organizationsList({
22
- name,
23
- owner,
24
- page,
25
- pageSize,
26
- tags,
27
- }: {
28
- name?: string,
29
- owner?: number,
30
- /**
31
- * A page number within the paginated result set.
32
- */
33
- page?: number,
34
- /**
35
- * Number of results to return per page.
36
- */
37
- pageSize?: number,
38
- tags?: string,
39
- }): CancelablePromise<PaginatedOrganizationList> {
40
- return __request(OpenAPI, {
41
- method: 'GET',
42
- url: '/organizations/',
43
- query: {
44
- 'name': name,
45
- 'owner': owner,
46
- 'page': page,
47
- 'page_size': pageSize,
48
- 'tags': tags,
49
- },
50
- errors: {
51
- 401: `Authentication required.`,
52
- 403: `Missing required permission \`Ibl.CRM/Organizations/list\`.`,
53
- },
54
- });
55
- }
56
- /**
57
- * Create an organization
58
- * Creates a new organization in your Platform. The Platform is inferred from your credentials. `name` must be unique within your Platform.
59
- *
60
- * **Required permission:** `Ibl.CRM/Organizations/action`.
61
- * @returns Organization
62
- * @throws ApiError
63
- */
64
- public static organizationsCreate({
65
- requestBody,
66
- }: {
67
- requestBody: Organization,
68
- }): CancelablePromise<Organization> {
69
- return __request(OpenAPI, {
70
- method: 'POST',
71
- url: '/organizations/',
72
- body: requestBody,
73
- mediaType: 'application/json',
74
- errors: {
75
- 400: `Validation error (for example, duplicate name).`,
76
- 403: `Missing required permission \`Ibl.CRM/Organizations/action\`.`,
77
- },
78
- });
79
- }
80
- /**
81
- * Retrieve an organization
82
- * Returns a single organization by id.
83
- *
84
- * **Required permission:** `Ibl.CRM/Organizations/read`.
85
- * @returns Organization
86
- * @throws ApiError
87
- */
88
- public static organizationsRetrieve({
89
- id,
90
- }: {
91
- id: string,
92
- }): CancelablePromise<Organization> {
93
- return __request(OpenAPI, {
94
- method: 'GET',
95
- url: '/organizations/{id}/',
96
- path: {
97
- 'id': id,
98
- },
99
- errors: {
100
- 403: `Missing required permission \`Ibl.CRM/Organizations/read\`.`,
101
- 404: `Organization not found.`,
102
- },
103
- });
104
- }
105
- /**
106
- * Replace an organization
107
- * Replaces all editable fields on the organization.
108
- *
109
- * **Required permission:** `Ibl.CRM/Organizations/write`.
110
- * @returns Organization
111
- * @throws ApiError
112
- */
113
- public static organizationsUpdate({
114
- id,
115
- requestBody,
116
- }: {
117
- id: string,
118
- requestBody: Organization,
119
- }): CancelablePromise<Organization> {
120
- return __request(OpenAPI, {
121
- method: 'PUT',
122
- url: '/organizations/{id}/',
123
- path: {
124
- 'id': id,
125
- },
126
- body: requestBody,
127
- mediaType: 'application/json',
128
- errors: {
129
- 400: `Validation error.`,
130
- 403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`,
131
- 404: `Organization not found.`,
132
- },
133
- });
134
- }
135
- /**
136
- * Update an organization
137
- * Updates only the supplied fields on the organization.
138
- *
139
- * **Required permission:** `Ibl.CRM/Organizations/write`.
140
- * @returns Organization
141
- * @throws ApiError
142
- */
143
- public static organizationsPartialUpdate({
144
- id,
145
- requestBody,
146
- }: {
147
- id: string,
148
- requestBody?: PatchedOrganization,
149
- }): CancelablePromise<Organization> {
150
- return __request(OpenAPI, {
151
- method: 'PATCH',
152
- url: '/organizations/{id}/',
153
- path: {
154
- 'id': id,
155
- },
156
- body: requestBody,
157
- mediaType: 'application/json',
158
- errors: {
159
- 400: `Validation error.`,
160
- 403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`,
161
- 404: `Organization not found.`,
162
- },
163
- });
164
- }
165
- /**
166
- * Delete an organization
167
- * Deletes the organization. Any persons linked to it are kept; their organization reference is cleared.
168
- *
169
- * **Required permission:** `Ibl.CRM/Organizations/delete`.
170
- * @returns void
171
- * @throws ApiError
172
- */
173
- public static organizationsDestroy({
174
- id,
175
- }: {
176
- id: string,
177
- }): CancelablePromise<void> {
178
- return __request(OpenAPI, {
179
- method: 'DELETE',
180
- url: '/organizations/{id}/',
181
- path: {
182
- 'id': id,
183
- },
184
- errors: {
185
- 403: `Missing required permission \`Ibl.CRM/Organizations/delete\`.`,
186
- 404: `Organization not found.`,
187
- },
188
- });
189
- }
190
- /**
191
- * Attach a tag to this record
192
- * Attaches an existing Tag to this record. Both the Tag and the record must belong to your Platform. Returns `409 Conflict` with the existing `assignment_id` if the tag is already attached.
193
- *
194
- * **Required permission:** `Ibl.CRM/Tags/write`.
195
- * @returns any No response body
196
- * @throws ApiError
197
- */
198
- public static organizationsTagsCreate({
199
- id,
200
- requestBody,
201
- }: {
202
- id: string,
203
- requestBody: _TagAttachRequest,
204
- }): CancelablePromise<any> {
205
- return __request(OpenAPI, {
206
- method: 'POST',
207
- url: '/organizations/{id}/tags/',
208
- path: {
209
- 'id': id,
210
- },
211
- body: requestBody,
212
- mediaType: 'application/json',
213
- errors: {
214
- 400: `No response body`,
215
- 403: `No response body`,
216
- 404: `No response body`,
217
- 409: `No response body`,
218
- },
219
- });
220
- }
221
- /**
222
- * Detach a tag from this record
223
- * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
224
- *
225
- * **Required permission:** `Ibl.CRM/Tags/write`.
226
- * @returns void
227
- * @throws ApiError
228
- */
229
- public static organizationsTagsDestroy({
230
- id,
231
- tagId,
232
- }: {
233
- id: string,
234
- tagId: string,
235
- }): CancelablePromise<void> {
236
- return __request(OpenAPI, {
237
- method: 'DELETE',
238
- url: '/organizations/{id}/tags/{tag_id}/',
239
- path: {
240
- 'id': id,
241
- 'tag_id': tagId,
242
- },
243
- errors: {
244
- 403: `No response body`,
245
- 404: `No response body`,
246
- },
247
- });
248
- }
249
- }
@@ -1,367 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- import type { _TagAttachRequest } from '../models/_TagAttachRequest';
6
- import type { PaginatedPersonList } from '../models/PaginatedPersonList';
7
- import type { PatchedPerson } from '../models/PatchedPerson';
8
- import type { Person } from '../models/Person';
9
- import type { PersonInviteRequest } from '../models/PersonInviteRequest';
10
- import type { PersonInviteResponse } from '../models/PersonInviteResponse';
11
- import type { PersonLinkUserRequest } from '../models/PersonLinkUserRequest';
12
- import type { PersonMergeRequest } from '../models/PersonMergeRequest';
13
- import type { PersonMergeResponse } from '../models/PersonMergeResponse';
14
- import type { CancelablePromise } from '../core/CancelablePromise';
15
- import { OpenAPI } from '../core/OpenAPI';
16
- import { request as __request } from '../core/request';
17
- export class PersonsService {
18
- /**
19
- * List persons
20
- * Returns a paginated list of persons in your Platform. Supports filtering by `lifecycle_stage`, `owner`, `organization`, `created_at__gte`/`created_at__lte`, and `metadata__has_key`.
21
- *
22
- * **Required permission:** `Ibl.CRM/Persons/list`.
23
- * @returns PaginatedPersonList
24
- * @throws ApiError
25
- */
26
- public static personsList({
27
- createdAtGte,
28
- createdAtLte,
29
- lifecycleStage,
30
- metadataHasKey,
31
- organization,
32
- owner,
33
- page,
34
- pageSize,
35
- tags,
36
- }: {
37
- createdAtGte?: string,
38
- createdAtLte?: string,
39
- /**
40
- * Funnel position. Transitions are unrestricted — any stage may move to any other.
41
- *
42
- * * `lead` - Lead
43
- * * `qualified` - Qualified
44
- * * `opportunity` - Opportunity
45
- * * `customer` - Customer
46
- * * `churned` - Churned
47
- */
48
- lifecycleStage?: 'churned' | 'customer' | 'lead' | 'opportunity' | 'qualified',
49
- metadataHasKey?: string,
50
- organization?: string,
51
- owner?: number,
52
- /**
53
- * A page number within the paginated result set.
54
- */
55
- page?: number,
56
- /**
57
- * Number of results to return per page.
58
- */
59
- pageSize?: number,
60
- tags?: string,
61
- }): CancelablePromise<PaginatedPersonList> {
62
- return __request(OpenAPI, {
63
- method: 'GET',
64
- url: '/persons/',
65
- query: {
66
- 'created_at__gte': createdAtGte,
67
- 'created_at__lte': createdAtLte,
68
- 'lifecycle_stage': lifecycleStage,
69
- 'metadata__has_key': metadataHasKey,
70
- 'organization': organization,
71
- 'owner': owner,
72
- 'page': page,
73
- 'page_size': pageSize,
74
- 'tags': tags,
75
- },
76
- errors: {
77
- 401: `Authentication required.`,
78
- 403: `Missing required permission \`Ibl.CRM/Persons/list\`.`,
79
- },
80
- });
81
- }
82
- /**
83
- * Create a person
84
- * Creates a new person in your Platform. The Platform is inferred from your credentials. If `organization` is supplied, it must reference an organization in your Platform.
85
- *
86
- * **Required permission:** `Ibl.CRM/Persons/action`.
87
- * @returns Person
88
- * @throws ApiError
89
- */
90
- public static personsCreate({
91
- requestBody,
92
- }: {
93
- requestBody: Person,
94
- }): CancelablePromise<Person> {
95
- return __request(OpenAPI, {
96
- method: 'POST',
97
- url: '/persons/',
98
- body: requestBody,
99
- mediaType: 'application/json',
100
- errors: {
101
- 400: `Validation error.`,
102
- 403: `Missing required permission \`Ibl.CRM/Persons/action\`.`,
103
- },
104
- });
105
- }
106
- /**
107
- * Retrieve a person
108
- * Returns a single person by id.
109
- *
110
- * **Required permission:** `Ibl.CRM/Persons/read`.
111
- * @returns Person
112
- * @throws ApiError
113
- */
114
- public static personsRetrieve({
115
- id,
116
- }: {
117
- id: string,
118
- }): CancelablePromise<Person> {
119
- return __request(OpenAPI, {
120
- method: 'GET',
121
- url: '/persons/{id}/',
122
- path: {
123
- 'id': id,
124
- },
125
- errors: {
126
- 403: `Missing required permission \`Ibl.CRM/Persons/read\`.`,
127
- 404: `Person not found.`,
128
- },
129
- });
130
- }
131
- /**
132
- * Replace a person
133
- * Replaces all editable fields on the person.
134
- *
135
- * **Required permission:** `Ibl.CRM/Persons/write`.
136
- * @returns Person
137
- * @throws ApiError
138
- */
139
- public static personsUpdate({
140
- id,
141
- requestBody,
142
- }: {
143
- id: string,
144
- requestBody: Person,
145
- }): CancelablePromise<Person> {
146
- return __request(OpenAPI, {
147
- method: 'PUT',
148
- url: '/persons/{id}/',
149
- path: {
150
- 'id': id,
151
- },
152
- body: requestBody,
153
- mediaType: 'application/json',
154
- errors: {
155
- 400: `Validation error.`,
156
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
157
- 404: `Person not found.`,
158
- },
159
- });
160
- }
161
- /**
162
- * Update a person
163
- * Updates only the supplied fields on the person.
164
- *
165
- * **Required permission:** `Ibl.CRM/Persons/write`.
166
- * @returns Person
167
- * @throws ApiError
168
- */
169
- public static personsPartialUpdate({
170
- id,
171
- requestBody,
172
- }: {
173
- id: string,
174
- requestBody?: PatchedPerson,
175
- }): CancelablePromise<Person> {
176
- return __request(OpenAPI, {
177
- method: 'PATCH',
178
- url: '/persons/{id}/',
179
- path: {
180
- 'id': id,
181
- },
182
- body: requestBody,
183
- mediaType: 'application/json',
184
- errors: {
185
- 400: `Validation error.`,
186
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
187
- 404: `Person not found.`,
188
- },
189
- });
190
- }
191
- /**
192
- * Delete a person
193
- * Deletes the person.
194
- *
195
- * **Required permission:** `Ibl.CRM/Persons/delete`.
196
- * @returns void
197
- * @throws ApiError
198
- */
199
- public static personsDestroy({
200
- id,
201
- }: {
202
- id: string,
203
- }): CancelablePromise<void> {
204
- return __request(OpenAPI, {
205
- method: 'DELETE',
206
- url: '/persons/{id}/',
207
- path: {
208
- 'id': id,
209
- },
210
- errors: {
211
- 403: `Missing required permission \`Ibl.CRM/Persons/delete\`.`,
212
- 404: `Person not found.`,
213
- },
214
- });
215
- }
216
- /**
217
- * Invite a person to the platform
218
- * Sends a platform invitation to the person's `primary_email`. On acceptance, the invitee joins your Platform with the privileges configured in the request body.
219
- *
220
- * Returns `409 Conflict` if an active invitation already exists for this email in your Platform, and `422 Unprocessable Entity` if the person is already linked to a platform user.
221
- *
222
- * **Required permission:** `Ibl.CRM/Invite/action`.
223
- * @returns PersonInviteResponse
224
- * @throws ApiError
225
- */
226
- public static personsInviteCreate({
227
- id,
228
- requestBody,
229
- }: {
230
- id: string,
231
- requestBody?: PersonInviteRequest,
232
- }): CancelablePromise<PersonInviteResponse> {
233
- return __request(OpenAPI, {
234
- method: 'POST',
235
- url: '/persons/{id}/invite/',
236
- path: {
237
- 'id': id,
238
- },
239
- body: requestBody,
240
- mediaType: 'application/json',
241
- errors: {
242
- 400: `Person has no \`primary_email\`; cannot invite.`,
243
- 403: `Missing required permission \`Ibl.CRM/Invite/action\`.`,
244
- 404: `Person not found.`,
245
- 422: `Person is already linked to a platform user.`,
246
- },
247
- });
248
- }
249
- /**
250
- * Bind a person to an existing platform user
251
- * Links this person to an existing platform user. The target user must already be a member of your Platform — if they are not, send them an invitation via `POST /persons/{id}/invite/` instead.
252
- *
253
- * This call is idempotent: linking a person that is already bound to the same user is a no-op. Re-linking a person that is already bound to a *different* user is refused; the existing binding is preserved and the unchanged person is returned.
254
- *
255
- * **Required permission:** `Ibl.CRM/Persons/write`.
256
- * @returns Person
257
- * @throws ApiError
258
- */
259
- public static personsLinkUserCreate({
260
- id,
261
- requestBody,
262
- }: {
263
- id: string,
264
- requestBody: PersonLinkUserRequest,
265
- }): CancelablePromise<Person> {
266
- return __request(OpenAPI, {
267
- method: 'POST',
268
- url: '/persons/{id}/link-user/',
269
- path: {
270
- 'id': id,
271
- },
272
- body: requestBody,
273
- mediaType: 'application/json',
274
- errors: {
275
- 400: `Validation error.`,
276
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`, or the target user is not a member of your Platform.`,
277
- 404: `Person or user not found.`,
278
- },
279
- });
280
- }
281
- /**
282
- * Attach a tag to this record
283
- * Attaches an existing Tag to this record. Both the Tag and the record must belong to your Platform. Returns `409 Conflict` with the existing `assignment_id` if the tag is already attached.
284
- *
285
- * **Required permission:** `Ibl.CRM/Tags/write`.
286
- * @returns any No response body
287
- * @throws ApiError
288
- */
289
- public static personsTagsCreate({
290
- id,
291
- requestBody,
292
- }: {
293
- id: string,
294
- requestBody: _TagAttachRequest,
295
- }): CancelablePromise<any> {
296
- return __request(OpenAPI, {
297
- method: 'POST',
298
- url: '/persons/{id}/tags/',
299
- path: {
300
- 'id': id,
301
- },
302
- body: requestBody,
303
- mediaType: 'application/json',
304
- errors: {
305
- 400: `No response body`,
306
- 403: `No response body`,
307
- 404: `No response body`,
308
- 409: `No response body`,
309
- },
310
- });
311
- }
312
- /**
313
- * Detach a tag from this record
314
- * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
315
- *
316
- * **Required permission:** `Ibl.CRM/Tags/write`.
317
- * @returns void
318
- * @throws ApiError
319
- */
320
- public static personsTagsDestroy({
321
- id,
322
- tagId,
323
- }: {
324
- id: string,
325
- tagId: string,
326
- }): CancelablePromise<void> {
327
- return __request(OpenAPI, {
328
- method: 'DELETE',
329
- url: '/persons/{id}/tags/{tag_id}/',
330
- path: {
331
- 'id': id,
332
- 'tag_id': tagId,
333
- },
334
- errors: {
335
- 403: `No response body`,
336
- 404: `No response body`,
337
- },
338
- });
339
- }
340
- /**
341
- * Merge duplicate persons into a primary
342
- * Marks each person in `duplicate_ids` as inactive and reports how many related records (deals, activities, tags) were re-parented onto `primary_id`.
343
- *
344
- * All ids — both the primary and every duplicate — must belong to your Platform. `primary_id` may not appear in `duplicate_ids`.
345
- *
346
- * **Required permission:** `Ibl.CRM/Persons/write`.
347
- * @returns PersonMergeResponse
348
- * @throws ApiError
349
- */
350
- public static personsMergeCreate({
351
- requestBody,
352
- }: {
353
- requestBody: PersonMergeRequest,
354
- }): CancelablePromise<PersonMergeResponse> {
355
- return __request(OpenAPI, {
356
- method: 'POST',
357
- url: '/persons/merge/',
358
- body: requestBody,
359
- mediaType: 'application/json',
360
- errors: {
361
- 400: `Validation error: the primary appears in duplicates, or one or more ids belong to another Platform.`,
362
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
363
- 404: `Primary person not found.`,
364
- },
365
- });
366
- }
367
- }